
        /* Inside the iOS app the page fills the whole screen, so keep content clear of the notch and the home bar. */
        html.zuno-native-app .app-shell { box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
        /* Sign-up and sign-in screens are taller than a phone: in the app they use the phone's normal page scrolling, so they can be scrolled both ways. */
        html.zuno-native-app body:has(#view-signup.active) .app-shell,
        html.zuno-native-app body:has(#view-login.active) .app-shell { height: auto !important; min-height: 100dvh; overflow: visible !important; padding-top: 0 !important; padding-bottom: 0 !important; }
        html.zuno-native-app #view-signup, html.zuno-native-app #view-login { min-height: 100dvh !important; max-height: none !important; overflow: visible !important; justify-content: flex-start !important; }
        /* Sign-in screen inside the app: centred when it fits the phone, scrolls when it does not, and kept compact. The Web / iOS / Android chips are for the website, so they are hidden in the app. */
        html.zuno-native-app #view-login { justify-content: center !important; justify-content: safe center !important; }
        html.zuno-native-app #view-login .auth-card { padding: 1.5rem 1.25rem !important; }
        html.zuno-native-app #view-login .main-brand-logo { width: 6.5rem !important; margin-bottom: .5rem !important; }
        html.zuno-native-app #view-login .login-title { font-size: 1.4rem; line-height: 1.75rem; }
        html.zuno-native-app #view-login .login-subtitle { margin-top: .25rem !important; margin-bottom: 1rem !important; }
        html.zuno-native-app #view-login .login-platforms { display: none !important; }
        html.zuno-native-app #view-login .auth-card > p.text-xs { margin-top: 1rem !important; }
        html.zuno-native-app #menu-drawer { box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
        /* Fixed scanner overlays sit outside app-shell, so need their own safe areas. */
        #barcode-scanner-modal { box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
        #barcode-scanner-modal > .flex-grow { min-height: 0; }
        #close-barcode-scanner-btn { min-width: 44px; min-height: 44px; }
        #manual-barcode-input { min-width: 0; font-size: 16px; }
        body:has(#barcode-scanner-modal:not(.hidden)) #zuno-environment-badge { bottom: calc(10px + env(safe-area-inset-bottom, 0px) + 132px); }
    

        /* Critical first-paint geometry only. Removed after app initialization.
           This prevents a right-shift / white flash while the web bundle is loading. */
        html {
            width: 100%;
            min-width: 100%;
            min-height: 100%;
            overflow-x: hidden;
            background: #071018 !important;
        }
        body {
            width: 100%;
            min-width: 100%;
            min-height: 100dvh;
            margin: 0;
            overflow-x: hidden;
            background: #071018 !important;
        }
        #app-loading {
            position: fixed !important;
            inset: 0 !important;
            width: 100vw !important;
            height: 100dvh !important;
            margin: 0 !important;
            transform: none !important;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #071018 !important;
        }


        /* Compact checkout category product counts; keep chips on one line. */
        #view-checkout .category-tab { white-space: nowrap; }
        #view-checkout .checkout-category-count {
            display: inline-flex; align-items: center; justify-content: center;
            min-width: 1.4em; margin-left: .3rem; padding: .1rem .3rem;
            border-radius: 999px; background: rgba(127, 156, 174, .18);
            font-size: .78em; font-weight: 800; font-variant-numeric: tabular-nums;
            vertical-align: middle;
        }
        #view-checkout .category-tab.active .checkout-category-count {
            background: rgba(255, 255, 255, .2);
        }


/* Wide checkout: 70% product discovery / 30% live cart.
   In dropdown mode, search and category chooser also share a 70/30 row.
   Compact chips, mobile layout, and existing interaction logic remain unchanged. */
@media (min-width: 1280px) {
  #view-checkout.has-live-cart { --zuno-cart-share: 30%; }
  #view-checkout.has-live-cart #category-tabs,
  #view-checkout.has-live-cart #product-grid,
  #view-checkout.has-live-cart .checkout-discovery {
    margin-right: var(--zuno-cart-share);
  }
  #view-checkout.has-live-cart .checkout-desktop-cart {
    width: var(--zuno-cart-share);
  }
  #view-checkout.checkout-categories-dropdown .checkout-discovery {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    align-items: center;
    gap: .75rem;
  }
  #view-checkout.checkout-categories-dropdown .checkout-discovery-search,
  #view-checkout.checkout-categories-dropdown .checkout-discovery-category {
    width: 100%;
    min-width: 0;
  }
  #view-checkout.checkout-categories-dropdown .checkout-discovery-category select {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }
  #view-checkout.checkout-categories-dropdown .checkout-discovery-category button {
    flex: 0 0 auto;
  }
}


/* Activity uses the opposite surface for high contrast on both themes. */
#zuno-product-alert-panel {position:fixed;inset:auto!important;z-index:950;top:var(--zuno-activity-top,78px);left:var(--zuno-activity-left,auto);right:12px;width:min(410px,calc(100vw - 24px));height:auto;background:transparent!important;display:block;padding:0!important;}
#zuno-product-alert-panel .zuno-alert-sheet {width:100%;max-height:min(68dvh,540px);background:#182431!important;color:#fff!important;border:1px solid #52677a;box-shadow:0 18px 55px #02061775;}
.dark #zuno-product-alert-panel .zuno-alert-sheet {background:#f8fafc!important;color:#101827!important;border-color:#d7e2ed;}
#zuno-product-alert-panel .zuno-alert-row {position:relative;width:100%;display:grid;grid-template-columns:minmax(0,1fr) 16px;gap:5px 10px;background:#243849;color:#fff;border:1px solid #516a7c;text-align:left;cursor:pointer;}
.dark #zuno-product-alert-panel .zuno-alert-row {background:#fff;color:#101827;border-color:#dce4ef;}
#zuno-product-alert-panel .zuno-alert-row strong{white-space:normal;line-height:1.35;grid-column:1;overflow-wrap:anywhere;}
#zuno-product-alert-panel .zuno-alert-row small{grid-column:1;color:#c0d0df;}
.dark #zuno-product-alert-panel .zuno-alert-row small{color:#536577;}
#zuno-product-alert-panel .zuno-alert-row-arrow{grid-column:2;grid-row:1/3;align-self:center;font-size:23px;opacity:.8;}
#zuno-product-alert-panel .zuno-alert-close{color:inherit;cursor:pointer;}
#zuno-order-alert-toast {left:var(--zuno-activity-left,auto);right:12px;top:var(--zuno-activity-top,78px);width:min(410px,calc(100vw - 24px));max-width:none;display:flex;flex-direction:column;gap:5px;background:#182431;color:#fff;border:1px solid #81eadb;box-shadow:0 12px 38px #02061780;}
.dark #zuno-order-alert-toast{background:#f8fafc;color:#101827;border-color:#26a995;}
#zuno-order-alert-toast small{font-size:11px;opacity:.72;}
@keyframes zuno-activity-pulse{0%{transform:translateX(0);outline:2px solid #10b3a0}12%{transform:translateX(-3px)}24%{transform:translateX(3px)}36%{transform:translateX(-2px)}48%{transform:translateX(2px)}60%,100%{transform:translateX(0);outline:2px solid transparent}}
.zuno-activity-focus{animation:zuno-activity-pulse 1.1s ease-out 2;outline-offset:3px;}
@media (prefers-reduced-motion:reduce){.zuno-activity-focus{animation:none;outline:3px solid #10b3a0;}}
@media(max-width:619px){#zuno-product-alert-panel{left:12px;right:12px;top:calc(env(safe-area-inset-top,0px) + 66px);width:calc(100vw - 24px)}#zuno-order-alert-toast{left:12px;right:12px;top:calc(env(safe-area-inset-top,0px) + 66px);width:calc(100vw - 24px)}}


/* Small, consistent notification management controls across web and WebView. */
#zuno-product-alert-panel .zuno-alert-tools {
    display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center;
    gap:8px; padding:10px 12px 0;
}
#zuno-product-alert-panel .zuno-alert-tool {
    min-height:34px; padding:7px 12px; font-size:12px; font-weight:700;
    border:1px solid currentColor; border-radius:10px; color:inherit;
    background:transparent; opacity:.9; white-space:nowrap; cursor:pointer;
}
#zuno-product-alert-panel .zuno-alert-tool--danger {color:#fb7185;}
.dark #zuno-product-alert-panel .zuno-alert-tool--danger {color:#b91c1c;}
#zuno-product-alert-panel .zuno-alert-tool:disabled {opacity:.35;cursor:not-allowed;}
#zuno-product-alert-panel .zuno-alert-empty {padding:12px;margin:0;opacity:.8;}

#zuno-activity-notice{position:fixed;z-index:100005;right:16px;bottom:calc(env(safe-area-inset-bottom,0px) + 24px);max-width:min(390px,calc(100vw - 32px));padding:12px 16px;border-radius:12px;background:#104f49;color:#fff;box-shadow:0 12px 32px #0005;font-size:13px;font-weight:700;}
#zuno-activity-notice[hidden]{display:none!important;}
/* Transaction identity in expanded sale / cancelled / pay-later cards. */
.zuno-transaction-id { display:flex; align-items:baseline; justify-content:space-between;
  flex-wrap:wrap; gap:3px 12px; margin:7px 0 10px; font-size:12px;
  color:#718096; }
.zuno-transaction-id-value { color:inherit; font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  overflow-wrap:anywhere; font-size:12px; user-select:text; }
.dark .zuno-transaction-id { color:#b4c2d1; }

/* Private support replies inside the main activity bell. */
#zuno-product-alert-panel .zuno-alert-row--ticket {border-color:#14b8a6;}
#zuno-product-alert-panel .zuno-alert-row--ticket .zuno-alert-kind-icon {background:rgba(20,184,166,.19);color:#5eead4;}
.dark #zuno-product-alert-panel .zuno-alert-row--ticket .zuno-alert-kind-icon {color:#0f766e;}
/* Ticket Center — private, owner-specific notifications, both themes and WebView. */
.zuno-ticket-header-actions{display:flex;align-items:center;gap:8px}
.zuno-ticket-bell{position:relative;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:42px;border:1px solid #64748b66;border-radius:13px;color:inherit;background:#64748b12}
.zuno-ticket-dot{position:absolute;right:1px;top:0;min-width:17px;height:17px;padding:0 3px;border-radius:20px;background:#ef4444;color:white;font:700 10px/17px system-ui;text-align:center}
.zuno-ticket-dot[hidden],.zuno-ticket-bell[hidden]{display:none!important}
.zuno-ticket-panel{position:fixed;right:12px;top:76px;z-index:1020;width:min(390px,calc(100vw - 24px));max-height:min(66vh,560px);overflow:hidden;border:1px solid #64748b70;border-radius:19px;background:#f8fafc;color:#162131;box-shadow:0 24px 60px #02061788;display:flex;flex-direction:column}
.dark .zuno-ticket-panel{background:#172532;color:#f8fafc;border-color:#64748b88}
.zuno-ticket-panel.hidden{display:none!important}
.zuno-ticket-panel>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:15px 17px;border-bottom:1px solid #64748b48}
.zuno-ticket-panel>header>div{display:flex;align-items:center;gap:8px}
.zuno-ticket-panel header button{padding:5px 10px;border:1px solid #64748b77;border-radius:9px;font-size:12px;font-weight:700}
.zuno-ticket-panel header button:last-child{font-size:19px;line-height:20px}
.zuno-ticket-panel button[hidden]{display:none!important}
.zuno-ticket-alert-list{overflow-y:auto;padding:10px;display:grid;gap:8px}
.zuno-ticket-alert-item{display:grid;text-align:left;gap:6px;border:1px solid #64748b55;border-radius:12px;padding:12px;background:#eef3f7;color:#182432}
.dark .zuno-ticket-alert-item{background:#203141;color:#f8fafc}
.zuno-ticket-alert-item.is-unread{border-color:#0d9488}
.zuno-ticket-alert-item small,.zuno-ticket-empty{opacity:.7;font-size:12px}
.zuno-ticket-empty{padding:12px}
.zuno-ticket-toast{position:fixed;z-index:1021;top:calc(82px + env(safe-area-inset-top,0px));right:12px;width:min(370px,calc(100vw - 24px));padding:14px 17px;border:1px solid #14b8a6;border-radius:14px;background:#f8fafc;color:#172432;font-weight:700;text-align:left;box-shadow:0 16px 42px #02061777}
.dark .zuno-ticket-toast{background:#1d3040;color:white}
.zuno-ticket-toast[hidden]{display:none!important}
/* Foreground WebView short alerts. Use the same position for support and team activity. */
#zuno-order-alert-toast, #zuno-ticket-toast {
    position:fixed!important; z-index:2147483000!important;
    left:auto; right:12px; top:calc(78px + env(safe-area-inset-top, 0px));
    max-width:calc(100vw - 24px); pointer-events:auto;
    animation:zuno-mobile-toast-appear .26s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes zuno-mobile-toast-appear {
    from {opacity:0;transform:translateY(-12px) scale(.98)}
    to {opacity:1;transform:translateY(0) scale(1)}
}
@media(max-width:619px) {
    #zuno-order-alert-toast,#zuno-ticket-toast {
        left:12px!important; right:12px!important; width:calc(100vw - 24px)!important;
        top:calc(74px + env(safe-area-inset-top, 0px))!important;
        font-size:14px; line-height:1.4; border-radius:14px;
    }
}
@media(prefers-reduced-motion:reduce) {
    #zuno-order-alert-toast,#zuno-ticket-toast {animation:none}
}
.zuno-ticket-focus{outline:3px solid #14b8a6;outline-offset:4px;border-radius:12px;transition:outline-color .5s}


/* Prominent full identity inside every expanded Transaction card. */
#view-transactions .zuno-txn-identity,
.zuno-record-card--transaction .zuno-txn-identity {
    display:block; box-sizing:border-box; min-width:0; max-width:100%;
    padding:13px 14px; margin:12px 0 15px;
    border:1px solid rgba(20,184,166,.48); border-radius:13px;
    background:rgba(20,184,166,.11); color:#e7faf6;
}
.zuno-txn-identity-label {font-size:11px;line-height:1.5;letter-spacing:.055em;text-transform:uppercase;font-weight:750;color:#79dacb;}
.zuno-txn-identity-number {display:block;margin:4px 0 10px;font-size:clamp(15px,3.9vw,20px);line-height:1.4;font-weight:800;letter-spacing:.015em;overflow-wrap:anywhere;word-break:break-word;user-select:text;-webkit-user-select:text;color:inherit;}
.zuno-txn-people {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin-top:9px;padding-top:10px;border-top:1px solid rgba(20,184,166,.24);}
.zuno-txn-person {min-width:0;display:flex;flex-direction:column;gap:2px;}
.zuno-txn-person strong {font-size:12px;line-height:1.4;font-weight:700;overflow-wrap:anywhere;}
.zuno-txn-person .zuno-txn-identity-label {font-size:10px;letter-spacing:.025em;}
@media(max-width:360px){.zuno-txn-people{gap:6px}.zuno-txn-person strong{font-size:11px}}
html:not(.dark) .zuno-txn-identity {color:#143831;background:#e7f7f3;border-color:#88cfc2;}
html:not(.dark) .zuno-txn-identity-label {color:#0e7468;}
@media(max-width:540px){.zuno-record-card--transaction .zuno-txn-identity{padding:12px;margin:11px 0 15px;}}

/* Prevent cart mutations and navigation while a save/payment is pending. */
#view-checkout.checkout-processing #product-grid,
#view-checkout.checkout-processing #category-tabs,
#view-checkout.checkout-processing .zco-line,
#view-cart.checkout-processing #cart-items { pointer-events:none; opacity:.65; }



        :root {
            /* Zuno Blue — default until a business's saved theme is applied (see THEME_PRESETS). */
            --accent: #0372c0;
            --accent-2: #014599;
            --accent-rgb: 3, 114, 192;
            --accent-2-rgb: 1, 69, 153;
            --accent-light-rgb: 4, 162, 222;
            --accent-contrast: #ffffff;
            --glass: rgba(255, 255, 255, 0.82);
            --glass-border: rgba(255, 255, 255, 0.4);
        }

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

        html, body {
            margin: 0;
            padding: 0;
            width: 100%;
            max-width: 100%;
            min-height: 100%;
            overflow-x: hidden;
        }

        @supports (overflow: clip) {
            html, body {
                overflow-x: clip;
            }
        }


        /* ============================================================
           DARK-FIRST ACCESSIBILITY + MODERN TYPE SCALE
           ============================================================ */
        html.dark,
        html.dark body {
            background: #071018 !important;
            color: #f5f8fb;
            color-scheme: dark;
        }

        html:not(.dark),
        html:not(.dark) body {
            color-scheme: light;
        }

        /* Login/signup remain unmistakably dark when dark mode is active. */
        .dark #view-login,
        .dark #view-signup,
        .dark #view-choose-org,
        .dark #app-loading {
            background:
                radial-gradient(circle at 50% -12%, rgba(16,179,160,.12), transparent 31rem),
                linear-gradient(180deg, #08131d 0%, #071018 55%, #050b11 100%) !important;
            color: #f8fafc;
        }

        .dark .glass-panel,
        .dark .auth-card {
            background: rgba(11, 21, 31, .90) !important;
            border-color: rgba(148, 163, 184, .16) !important;
            box-shadow: 0 24px 60px rgba(0,0,0,.26);
        }

        .dark .auth-card p,
        .dark .auth-card label,
        .dark .auth-card .text-black,
        .dark #view-login .text-black,
        .dark #view-signup .text-black {
            color: #e8eef5 !important;
        }

        .dark .text-gray-500,
        .dark .text-gray-400 {
            color: #aebdca !important;
        }

        .dark input:not([type="checkbox"]):not([type="radio"]),
        .dark select,
        .dark textarea {
            background: #0d1924 !important;
            color: #f8fafc !important;
            border-color: #2a3b4b !important;
        }

        .dark input::placeholder,
        .dark textarea::placeholder {
            color: #8192a2 !important;
            opacity: 1;
        }

        .dark input:not([type="checkbox"]):not([type="radio"]):focus,
        .dark select:focus,
        .dark textarea:focus {
            border-color: #22c7b3 !important;
            box-shadow: 0 0 0 4px rgba(34,199,179,.13) !important;
        }

        /* Comfortable modern sizing: readable on mobile without making the POS bulky. */
        body {
            font-size: 15px !important;
            line-height: 1.5;
        }

        #view-login,
        #view-signup,
        #view-choose-org {
            font-size: 15px !important;
        }

        #view-login h1,
        #view-signup h1,
        #view-choose-org h1 {
            font-size: clamp(1.9rem, 7vw, 2.45rem);
            line-height: 1.08;
            letter-spacing: -.035em;
        }

        #view-login p,
        #view-signup p,
        #view-choose-org p {
            line-height: 1.6;
        }

        #view-login button,
        #view-signup button,
        #view-choose-org button,
        #auth-method-modal button {
            min-height: 46px;
            font-size: 1rem;
        }

        #auth-method-modal input,
        #auth-method-modal select,
        #auth-method-modal textarea,
        #view-signup input,
        #view-signup select {
            min-height: 48px;
            font-size: 16px;
        }

        .view header h1,
        .app-header-title {
            font-size: clamp(1.12rem, 4vw, 1.35rem);
            line-height: 1.2;
        }

        label {
            font-size: .92rem;
            line-height: 1.35;
        }

        table {
            font-size: .88rem;
        }

        @media (min-width: 768px) {
            body {
                font-size: 16px !important;
            }
            table {
                font-size: .92rem;
            }
        }

        html {
            background: #ffffff !important;
            color: #0b0b0f;
            font-size: 16px;
            /* Prevent Android/iOS WebViews from enlarging text independently of the layout. */
            -webkit-text-size-adjust: 100%;
            text-size-adjust: 100%;
        }

        body {
            font-family: 'Inter', sans-serif;
            -webkit-tap-highlight-color: transparent;
            background: #ffffff !important;
            color: #0b0b0f;
            overflow-x: hidden;
            overflow-y: auto;
            min-height: 100dvh;
            font-size: 14px;
            font-variant-numeric: tabular-nums;
        }

        /* Distinctive display type for headers and totals, app-wide.
           Body text, buttons and data stay on Inter for maximum legibility. */
        h1, h2 {
            font-family: 'Manrope', 'Inter', sans-serif;
            letter-spacing: -0.02em;
        }

        @media (min-width: 768px) {
            body {
                font-size: 16px;
            }
        }

        img,
        video,
        iframe,
        canvas,
        svg {
            max-width: 100%;
        }

        /* Do not flash the built-in fallback logo while saved platform branding loads. */
        [data-platform-logo]:not([data-branding-ready]) {
            visibility: hidden;
        }

        img,
        video,
        iframe {
            height: auto;
        }

        /* WebViews are less forgiving of flex/grid content's automatic minimum size. */
        .app-shell,
        #app-container,
        .view,
        .view > *,
        .scroll-area,
        main,
        section,
        form,
        .grid,
        .flex,
        .flex-grow,
        .flex-1 {
            min-width: 0;
        }

        input,
        select,
        textarea,
        table {
            max-width: 100%;
        }

        table {
            overflow-wrap: anywhere;
        }

        .accent-blobs {
            width: 100%;
            max-width: 100%;
            overflow: hidden;
        }

        /* Ensure text stays dark in light mode and flips to light in dark mode */
        :root:not(.dark) body,
        :root:not(.dark) html {
            color: #0b0b0f !important;
            background: #ffffff !important;
            background-size: cover;
        }

        .dark body,
        .dark html {
            background: radial-gradient(120% 120% at 20% 20%, #1f2937 0%, #0b1120 40%, #030712 100%) !important;
            background-size: cover;
            background-attachment: fixed;
            color: #f8fafc !important;
        }
        .view { display: none; min-height: 100%; }
        .view.active { display: flex; }
        /* Help & Support: the assistant can be taller than the screen, so the whole screen scrolls. */
        #view-support.active { overflow-y: auto; }
        #view-support > header { position: sticky; top: 0; z-index: 5; }
        #view-support > .flex-grow { flex: 0 0 auto; overflow: visible; }
        .custom-scrollbar {
            scrollbar-width: thin;
            scrollbar-color: #cbd5e1 transparent;
        }
        .custom-scrollbar::-webkit-scrollbar { width: 8px; height: 8px; }
        .custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
        .custom-scrollbar::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 9999px; }
        .custom-scrollbar::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; }

        #category-tabs {
            -webkit-overflow-scrolling: touch;
            overscroll-behavior-x: contain;
            scrollbar-gutter: stable both-edges;
        }
        #menu-drawer { transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; }
        #menu-overlay { transition: opacity 0.3s ease-in-out; }
        .zuno-permission-unavailable { display:none!important; }
        .admin-only { display: none; } /* Hidden by default */
        .admin-visible { display: block !important; } /* Shown when user has explicit permission */
        .admin-visible.hidden { display: none !important; } /* Respect UI-driven hidden state */
        body.is-admin .admin-only { display: block; } /* Shown for admins */

        /* Keep the experience phone-first while still centering on wider screens */
        .view {
            max-width: 480px;
            width: 100%;
            margin: 0 auto;
        }
        #view-choose-org.active {
            position: fixed;
            inset: 0;
            z-index: 60;
            display: flex;
            align-items: center;
            justify-content: center;
            max-width: none;
        }
        @media (min-width: 768px) {
            .view {
                max-width: 820px;
            }
        }
        @media (min-width: 1024px) {
            .view {
                max-width: 960px;
            }
        }
        @media (min-width: 1280px) {
            .view {
                max-width: 1120px;
            }
        }

        @media (max-width: 480px) {
            /* The view itself must be full bleed. Individual sections already own
               their spacing; padding the view produced a visible frame in WebViews. */
            .view { padding-left: 0; padding-right: 0; }
        }

        /* --- Desktop/web layout: persistent left sidebar instead of a slide-out drawer ---
           Only kicks in at wide viewport widths, so phones/tablets (including the native
           Android app) are completely unaffected and keep the overlay-drawer behavior. */
        :root {
            --sidebar-width: 18rem; /* desktop sidebar width, adjustable via drag handle */
            --sidebar-rail-width: 4.75rem; /* collapsed icon-only rail width */
        }

        @media (min-width: 1024px) {
            .menu-btn {
                display: none !important;
            }

            #menu-overlay {
                display: none !important;
            }

            #menu-drawer {
                position: fixed;
                width: var(--sidebar-width) !important;
                transform: none !important;
                box-shadow: none;
                border-right: 1px solid rgba(255, 255, 255, 0.08);
                transition: width 0.22s ease;
            }

            .app-shell {
                padding-left: var(--sidebar-width);
                transition: padding-left 0.22s ease;
            }

            #offline-banner {
                left: var(--sidebar-width);
                transition: left 0.22s ease;
            }

            #update-available-banner {
                left: var(--sidebar-width);
                transition: left 0.22s ease;
            }

            body.sidebar-resizing #menu-drawer {
                transition: none !important; /* no lag while actively dragging */
            }

            body.sidebar-resizing .app-shell,
            body.sidebar-resizing #offline-banner,
            body.sidebar-resizing #update-available-banner {
                transition: none !important;
            }

            body.sidebar-resizing {
                cursor: col-resize;
                user-select: none;
            }

            .sidebar-resize-handle {
                position: absolute;
                top: 0;
                right: -3px;
                width: 6px;
                height: 100%;
                cursor: col-resize;
                z-index: 7;
                background: transparent;
            }

            .sidebar-resize-handle:hover,
            body.sidebar-resizing .sidebar-resize-handle {
                background: rgba(45, 212, 191, 0.4);
            }

            /* A small always-visible grip mark on the handle so it reads as draggable even
               when not hovered, otherwise a 6px invisible strip is too easy to miss. */
            .sidebar-resize-handle::after {
                content: '';
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                width: 3px;
                height: 2.5rem;
                border-radius: 999px;
                background: rgba(148, 163, 184, 0.35);
                transition: background 0.15s ease;
            }

            .sidebar-resize-handle:hover::after,
            body.sidebar-resizing .sidebar-resize-handle::after {
                background: rgba(45, 212, 191, 0.85);
            }

            /* --- Collapsed state: icon-only rail, like Monday.com's minimized sidebar ---
               The sidebar stays fully visible and functional, just narrow, nothing hides
               off-screen, so there's no separate "reopen" button to hunt for. */
            body.sidebar-collapsed #menu-drawer {
                width: var(--sidebar-rail-width) !important;
            }

            body.sidebar-collapsed .app-shell {
                padding-left: var(--sidebar-rail-width) !important;
            }

            body.sidebar-collapsed #offline-banner,
            body.sidebar-collapsed #update-available-banner {
                left: var(--sidebar-rail-width) !important;
            }

            body.sidebar-collapsed .menu-header-plan-cta-text,
            body.sidebar-collapsed .menu-header-plan-cta-arrow,
            body.sidebar-collapsed .menu-header-identity,
            body.sidebar-collapsed .menu-section-title,
            body.sidebar-collapsed .menu-link .menu-label > span:last-child,
            body.sidebar-collapsed .menu-link .menu-badge,
            body.sidebar-collapsed .platform-footer-text,
            body.sidebar-collapsed #user-profile-toggle .text-left,
            body.sidebar-collapsed #user-profile-chevron {
                display: none !important;
            }

            body.sidebar-collapsed .menu-header-plan-cta {
                width: 2.75rem;
                height: 2.75rem;
                padding: 0;
                justify-content: center;
                border-radius: 0.85rem;
                margin: 0 auto;
            }

            body.sidebar-collapsed .menu-header-top-row {
                justify-content: center;
                padding: 1rem 0.5rem 0.75rem;
            }

            body.sidebar-collapsed nav {
                align-items: center;
            }

            /* Collapsed rail: still scrolls, but no scrollbar taking up the narrow width. */
            body.sidebar-collapsed #menu-drawer nav,
            body.sidebar-collapsed #menu-drawer .custom-scrollbar {
                scrollbar-width: none;
                -ms-overflow-style: none;
            }
            body.sidebar-collapsed #menu-drawer nav::-webkit-scrollbar,
            body.sidebar-collapsed #menu-drawer .custom-scrollbar::-webkit-scrollbar {
                display: none;
                width: 0;
                height: 0;
            }

            /* The base rule for these three selectors carries #menu-drawer (an ID), which
               otherwise outranks a class-only override no matter what comes later in the
               stylesheet, that mismatch was silently blocking these overrides entirely and
               is what caused the stretched/misaligned icons. Matching the ID here fixes it. */
            body.sidebar-collapsed #menu-drawer .menu-link {
                width: 2.75rem;
                height: 2.75rem;
                flex: 0 0 auto;
                margin: 0 auto;
                justify-content: center;
                padding: 0;
                border-radius: 0.85rem;
                background: rgba(255, 255, 255, 0.05);
            }

            body.sidebar-collapsed #menu-drawer .menu-link .menu-label {
                gap: 0;
            }

            body.sidebar-collapsed #menu-drawer .menu-link .menu-label > svg:first-child {
                width: 2.75rem;
                height: 2.75rem;
                padding: 0.7rem;
                margin: 0;
                border-radius: 0.85rem;
                background: transparent;
                border: none;
            }

            body.sidebar-collapsed #user-profile-toggle {
                width: 2.75rem;
                height: 2.75rem;
                margin: 0 auto;
                padding: 0;
                justify-content: center;
                border-radius: 999px;
                background: transparent;
                border-color: transparent;
            }

            body.sidebar-collapsed #user-profile-toggle > div:first-child {
                gap: 0;
            }

            body.sidebar-collapsed .platform-footer-brand {
                padding: 0.4rem 0;
            }

            body.sidebar-collapsed #sign-out-btn {
                width: 2.75rem;
                height: 2.75rem;
                margin: 0 auto;
                padding: 0;
                border-radius: 0.85rem;
            }

            body.sidebar-collapsed #sign-out-btn span {
                display: none;
            }

            body.sidebar-collapsed .user-account-panel {
                top: 0;
                left: calc(100% + 0.75rem);
                right: auto;
                width: 240px;
            }

            /* Hover tooltips in rail mode — reads each element's data-tooltip attribute,
               so no extra markup is needed per-item beyond that one attribute. */
            body.sidebar-collapsed [data-tooltip] {
                position: relative;
            }

            body.sidebar-collapsed [data-tooltip]::after {
                content: attr(data-tooltip);
                position: absolute;
                left: calc(100% + 0.75rem);
                top: 50%;
                transform: translateY(-50%) translateX(-6px);
                background: #0f172a;
                color: #ffffff;
                padding: 0.4rem 0.75rem;
                border-radius: 0.5rem;
                font-size: 0.8rem;
                font-weight: 700;
                white-space: nowrap;
                box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.15s ease, transform 0.15s ease;
                z-index: 60;
            }

            body.sidebar-collapsed [data-tooltip]:hover::after,
            body.sidebar-collapsed [data-tooltip]:focus-visible::after {
                opacity: 1;
                transform: translateY(-50%) translateX(0);
            }
        }

        .app-shell {
            min-height: 100vh;
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        @supports (height: 100dvh) {
            .app-shell {
                min-height: 100dvh;
                height: 100dvh;
            }
        }

        .scroll-area {
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        #category-tabs {
            -webkit-overflow-scrolling: touch;
            scroll-behavior: smooth;
        }

        .glass-panel {
            background: var(--glass);
            border: 1px solid var(--glass-border);
            box-shadow: 0 10px 40px rgba(var(--accent-rgb), 0.14);
            backdrop-filter: blur(16px);
        }

        .hero-gradient {
            background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.15), rgba(245, 158, 11, 0.12));
        }

        .dark .hero-gradient {
            background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.16), rgba(245, 158, 11, 0.1));
        }

        .dark .accent-blobs .blob-1 { background: rgba(var(--accent-light-rgb), 0.14); }
        .dark .accent-blobs .blob-2 { background: rgba(var(--accent-rgb), 0.16); }
        .dark .accent-blobs .blob-3 { background: rgba(245, 158, 11, 0.1); }

        .pill-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.4rem 0.8rem;
            border-radius: 9999px;
            background: rgba(14, 165, 233, 0.1);
            color: #0369a1;
            font-weight: 600;
        }

        .primary-action {
            background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
            box-shadow: 0 10px 30px rgba(14, 165, 233, 0.25);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .primary-action:hover {
            transform: translateY(-1px);
            box-shadow: 0 15px 35px rgba(14, 165, 233, 0.3);
        }

        .primary-action:active {
            transform: translateY(0);
        }

        /* Invoice share/print/pdf action row */
        .invoice-action-row {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 0.6rem;
        }

        .invoice-action-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            padding: 0.75rem 0.5rem;
            border-radius: 1rem;
            border: 1px solid rgba(226, 232, 240, 0.9);
            background: #f8fafc;
            color: #334155;
            font-size: 0.78rem;
            font-weight: 700;
            transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
        }

        .invoice-action-item:active {
            transform: scale(0.96);
        }

        .invoice-action-item:disabled {
            opacity: 0.55;
            pointer-events: none;
        }

        .dark .invoice-action-item {
            background: #111827;
            border-color: rgba(55, 65, 81, 0.9);
            color: #cbd5e1;
        }

        .invoice-action-icon {
            width: 1.5rem;
            height: 1.5rem;
        }

        .invoice-action-icon svg {
            width: 100%;
            height: 100%;
        }

        .invoice-action-item--primary {
            background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
            border-color: transparent;
            color: #ffffff;
            box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.28);
        }

        .invoice-action-item--primary:hover {
            box-shadow: 0 14px 30px rgba(var(--accent-rgb), 0.34);
        }

        /* Keep invoice actions contained on web at every viewport width. */
        #view-invoice footer { width: 100%; max-width: 100%; }
        .invoice-action-row { width: 100%; max-width: 100%; }
        .invoice-action-item { min-width: 0; width: 100%; overflow: hidden; }
        .invoice-action-item > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        @media (max-width: 600px) {
            .invoice-action-row { gap: 0.35rem; }
            .invoice-action-item { padding: 0.45rem 0.15rem; font-size: 0.68rem; gap: 0.2rem; }
            .invoice-action-icon { transform: scale(.85); }
        }
        @media (max-width: 360px) {
            .invoice-action-row { gap: 0.4rem; }
            .invoice-action-item { padding-left: 0.25rem; padding-right: 0.25rem; font-size: 0.72rem; }
        }

        button,
        input,
        select,
        textarea {
            font: inherit;
        }

        button,
        [role="button"],
        input,
        select {
            min-height: 44px;
        }

        input,
        select,
        textarea {
            font-size: 16px;
        }

        button:focus-visible,
        a:focus-visible,
        input:focus-visible,
        select:focus-visible,
        textarea:focus-visible {
            outline: 3px solid rgba(var(--accent-rgb), 0.35);
            outline-offset: 2px;
        }

        .view header {
            padding-top: max(1rem, env(safe-area-inset-top));
            padding-left: max(1rem, env(safe-area-inset-left));
            padding-right: max(1rem, env(safe-area-inset-right));
        }

        .view footer,
        #checkout-footer {
            padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
            padding-left: max(0.75rem, env(safe-area-inset-left));
            padding-right: max(0.75rem, env(safe-area-inset-right));
        }

        #menu-drawer {
            padding-left: env(safe-area-inset-left);
            padding-bottom: env(safe-area-inset-bottom);
        }

        #app-container .view {
            border-left: 1px solid rgba(226, 232, 240, 0.75);
            border-right: 1px solid rgba(226, 232, 240, 0.75);
            box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
        }

        .dark #app-container .view {
            border-color: rgba(31, 41, 55, 0.9);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
        }

        .view > header,
        .view > footer,
        #checkout-footer {
            background: rgba(255, 255, 255, 0.9) !important;
            border-color: #e2e8f0 !important;
            backdrop-filter: blur(12px);
            box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
        }

        .dark .view > header,
        .dark .view > footer,
        .dark #checkout-footer {
            background: rgba(17, 24, 39, 0.92) !important;
            border-color: #1f2937 !important;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
        }

        #menu-drawer {
            background:
                radial-gradient(circle at 14% 8%, rgba(125, 211, 252, 0.42), transparent 32%),
                linear-gradient(165deg, #082f49 0%, #0f172a 46%, #111827 100%);
            box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28);
            color: #e5e7eb;
        }

        #menu-drawer .menu-header {
            position: relative;
            overflow: hidden;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
            border: 1px solid rgba(255, 255, 255, 0.16);
            /* overflow:hidden above exists only to clip the decorative circle (::after,
               below) to this card's rounded corners, it was never meant to clip real
               content. Without enough guaranteed bottom padding, the plan button (this
               card's last child, with its own bottom margin) could end up partially cut
               off by that same overflow:hidden instead of contributing to the card's
               height like it should. */
            padding-bottom: 0.25rem;
            /* On short windows the sidebar column squeezed this card and clipped the business and user names. */
            flex-shrink: 0;
        }

        #menu-drawer .menu-header::after {
            content: '';
            position: absolute;
            width: 8rem;
            height: 8rem;
            right: -4rem;
            top: -4rem;
            border-radius: 9999px;
            background: rgba(var(--accent-rgb), 0.28);
            pointer-events: none;
        }

        #menu-drawer .brand-mark {
            background: linear-gradient(135deg, #ffffff, #e0f2fe);
            position: relative;
            overflow: hidden;
            transition: box-shadow 0.15s ease;
        }

        /* Non-production environments get a colored ring around the business logo so it's
           unmistakable at a glance which environment you're in, even before reading the
           env badge text, and the same color/label repeats in the hover tooltip below. */
        #menu-drawer .brand-mark.brand-mark--env-dev {
            box-shadow: 0 0 0 3px #f59e0b, 0 6px 14px rgba(0, 0, 0, 0.25);
        }

        #menu-drawer .brand-mark.brand-mark--env-uat {
            box-shadow: 0 0 0 3px #6366f1, 0 6px 14px rgba(0, 0, 0, 0.25);
        }

        .menu-header-home-logo-btn {
            background: none;
            border: none;
            padding: 0;
            cursor: pointer;
            position: relative;
        }

        /* This tooltip works in both expanded and collapsed sidebar states (unlike the
           rail-only tooltips below) since it's the one place people asked to always be able
           to hover and confirm which environment/business they're looking at. */
        .menu-header-home-logo-btn[data-tooltip]::after {
            content: attr(data-tooltip);
            position: absolute;
            left: calc(100% + 0.75rem);
            top: 50%;
            transform: translateY(-50%) translateX(-6px);
            background: #0f172a;
            color: #ffffff;
            padding: 0.4rem 0.75rem;
            border-radius: 0.5rem;
            font-size: 0.78rem;
            font-weight: 700;
            white-space: nowrap;
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.15s ease, transform 0.15s ease;
            z-index: 60;
        }

        .menu-header-home-logo-btn[data-tooltip]:hover::after {
            opacity: 1;
            transform: translateY(-50%) translateX(0);
        }

        .main-brand-logo {
            display: block;
            width: min(15rem, 72vw);
            height: auto;
            object-fit: contain;
        }

        /* Logo backdrop is admin-chosen (see admin portal Branding tab) and independent of
           the app's own light/dark theme, a white/light logo needs a dark tile to stay
           visible even when the rest of the app is in light mode. Default 'white' preserves
           old behavior for logos that were designed assuming a light background. */
        .main-brand-logo.logo-bg-dark, .platform-footer-logo.logo-bg-dark {
            background: #0b1220;
            border-radius: 0.6rem;
            padding: 0.4rem;
        }
        .main-brand-logo.logo-bg-white, .platform-footer-logo.logo-bg-white {
            background: #ffffff;
            border-radius: 0.6rem;
            padding: 0.4rem;
        }

        /* The startup state belongs to the viewport, not the padded desktop app shell.
           Keeping it fixed prevents the persistent menu from nudging the logo off-center. */
        #app-loading {
            position: fixed;
            inset: 0;
            width: 100vw;
            height: 100dvh;
            z-index: 70;
            padding: 1.5rem;
            background: inherit;
        }

        .loading-logo-wrap {
            position: relative;
            display: grid;
            place-items: center;
            width: min(19rem, 82vw);
            min-height: 10rem;
        }

        .loading-orb {
            position: absolute;
            z-index: 0;
            width: min(12rem, 58vw);
            height: min(12rem, 58vw);
            border-radius: 50%;
            opacity: 0.96;
            filter: saturate(1.1);
        }

        .loading-logo-wrap::before,
        .loading-logo-wrap::after {
            content: '';
            position: absolute;
            width: 7.5rem;
            height: 7.5rem;
            border: 2px solid rgba(var(--accent-rgb), 0.45);
            border-radius: 9999px;
            animation: loading-logo-pulse 1.8s ease-out infinite;
        }

        .loading-logo-wrap::after {
            animation-delay: 0.9s;
        }

        .loading-logo-wrap .main-brand-logo {
            position: relative;
            z-index: 2;
            width: min(5rem, 24vw);
            max-height: 5rem;
            animation: loading-logo-breathe 1.8s ease-in-out infinite;
        }

        @keyframes loading-logo-pulse {
            0% { opacity: 0; transform: scale(0.55); }
            35% { opacity: 0.7; }
            100% { opacity: 0; transform: scale(1.55); }
        }

        @keyframes loading-logo-breathe {
            0%, 100% { transform: scale(0.98); opacity: 0.88; }
            50% { transform: scale(1.02); opacity: 1; }
        }

        @media (prefers-reduced-motion: reduce) {
            .loading-logo-wrap::before,
            .loading-logo-wrap::after,
            .loading-logo-wrap .main-brand-logo {
                animation: none;
            }
        }

        .brand-thumbnail {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        /* The sidebar mark specifically fills its square as a clean app-icon-style crop
           (cover) rather than shrinking a wide/landscape business logo down to fit
           (contain), contain is still correct everywhere else the logo appears. */
        #menu-drawer .brand-mark .brand-thumbnail {
            object-fit: cover;
        }

        #menu-drawer .menu-header p.font-black,
        #menu-drawer .menu-header p#menu-header-business-name {
            font-family: 'Manrope', 'Inter', sans-serif;
            letter-spacing: -0.02em;
        }

        #nav-timeclock { position: relative; }
        .zuno-tc-badge { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); background: #dc2626; color: #fff; border-radius: 999px; font-size: .7rem; font-weight: 700; line-height: 1; padding: .2rem .45rem; min-width: 1.2rem; text-align: center; }
        body.has-tc-alerts .menu-btn { position: relative; }
        body.has-tc-alerts .menu-btn::after { content: ''; position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: #dc2626; border: 2px solid #fff; box-sizing: content-box; }
        #zuno-clock-banner { position: fixed; top: var(--zb-top, 0rem); left: 0; right: 0; z-index: 58; height: 2rem; box-sizing: border-box; display: flex; align-items: center; gap: .5rem; padding: 0 .5rem 0 .85rem; font-size: .75rem; font-weight: 600; line-height: 1; color: #fff; }
        #zuno-clock-banner.zb-amber, #zuno-clock-pill.zb-amber { background: #b45309; }
        #zuno-clock-banner.zb-red, #zuno-clock-pill.zb-red { background: #b91c1c; }
        #zuno-clock-banner.hidden, #zuno-clock-pill.hidden { display: none !important; }
        #zuno-clock-banner-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        #zuno-clock-banner-btn { flex: 0 0 auto; background: #fff; color: #111827; border-radius: 999px; padding: .28rem .7rem; font-size: .7rem; font-weight: 700; white-space: nowrap; }
        #zuno-clock-banner-hide { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; color: #fff; opacity: .85; }
        #zuno-clock-banner-hide:active { background: rgba(255,255,255,.18); }
        .zb-dot { width: .45rem; height: .45rem; border-radius: 50%; background: #fff; flex: 0 0 auto; animation: zb-pulse 1.6s ease-in-out infinite; }
        #zuno-clock-pill { position: fixed; top: calc(var(--zb-top, 0rem) + .4rem); left: 50%; transform: translateX(-50%); z-index: 58; display: flex; align-items: center; gap: .4rem; color: #fff; font-size: .68rem; font-weight: 700; line-height: 1; padding: .3rem .7rem; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.22); animation: zb-bob 2.8s ease-in-out infinite; }
        @keyframes zb-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.7); } }
        @keyframes zb-bob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(3px); } }
        @media (prefers-reduced-motion: reduce) { .zb-dot, #zuno-clock-pill { animation: none; } }
        body.has-clock-banner .app-shell { margin-top: calc(var(--zb-top, 0rem) + 2rem) !important; height: calc(100dvh - var(--zb-top, 0rem) - 2rem) !important; min-height: calc(100dvh - var(--zb-top, 0rem) - 2rem) !important; }
        #offline-banner {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 60;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            padding-top: max(0.5rem, env(safe-area-inset-top));
            background: linear-gradient(90deg, #b45309, #92400e);
            color: #fff7ed;
            font-size: 0.75rem;
            font-weight: 600;
            text-align: center;
            justify-content: center;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
            line-height: 1.3;
        }

        body.has-offline-banner .app-shell {
            height: calc(100vh - 2.05rem);
            min-height: calc(100vh - 2.05rem);
            margin-top: 2.05rem;
        }

        #update-available-banner {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 59;
            display: flex;
            align-items: center;
            gap: 0.6rem;
            padding: 0.5rem 1rem;
            padding-top: max(0.5rem, env(safe-area-inset-top));
            background: linear-gradient(90deg, #0c766c, #0b5a53);
            color: #ecfdf7;
            font-size: 0.75rem;
            font-weight: 600;
            justify-content: center;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
            line-height: 1.3;
        }

        #update-available-banner svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
        }

        #update-available-banner.hidden { display: none; }

        #update-available-refresh-btn {
            background: rgba(255, 255, 255, 0.18);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: #ffffff;
            font-size: 0.72rem;
            font-weight: 800;
            padding: 0.25rem 0.7rem;
            border-radius: 999px;
            flex-shrink: 0;
            white-space: nowrap;
        }

        #update-available-refresh-btn:active { background: rgba(255, 255, 255, 0.3); }

        body.has-update-banner .app-shell {
            margin-top: 2.05rem;
        }

        body.has-offline-banner.has-update-banner #update-available-banner {
            top: 2.05rem;
        }

        body.has-offline-banner.has-update-banner .app-shell {
            margin-top: 4.1rem;
            height: calc(100vh - 4.1rem);
            min-height: calc(100vh - 4.1rem);
        }

        @supports (height: 100dvh) {
            body.has-offline-banner .app-shell {
                height: calc(100dvh - 2.05rem);
                min-height: calc(100dvh - 2.05rem);
            }
        }

        #offline-banner svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
        }

        #offline-banner.hidden { display: none; }

        .theme-icon-toggle {
            width: 2.5rem;
            height: 2.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 0.75rem;
            background: rgba(255, 255, 255, 0.12);
            border: 1px solid rgba(255, 255, 255, 0.18);
            color: #fef3c7;
            transition: background 0.15s ease, transform 0.15s ease;
        }

        .theme-icon-toggle:hover { background: rgba(255, 255, 255, 0.2); }
        .theme-icon-toggle:active { transform: scale(0.94); }

        .menu-header-plan-cta {
            width: fit-content;
            flex: 0 0 auto;
            margin: 0 auto 0.85rem;
            /* The app-wide accessibility rule forces every <button> to a 44px minimum tap
               height, appropriate for real actions, but it was silently inflating this
               small badge into a big, mostly-empty-looking bar. Overriding it here keeps
               the badge genuinely compact while every other button keeps its full 44px. */
            min-height: 0;
            display: flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.3rem 0.6rem;
            border-radius: 0.6rem;
            background: linear-gradient(135deg, #fcd34d, #d97706);
            color: #451a03;
            font-weight: 800;
            font-size: 0.7rem;
            line-height: 1.1;
            letter-spacing: 0.01em;
            box-shadow: 0 4px 10px rgba(217, 119, 6, 0.35);
            transition: transform 0.15s ease, box-shadow 0.15s ease;
        }

        .menu-header-plan-cta--max {
            background: var(--badge-color, #64748b);
            color: #ffffff;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }

        .menu-header-plan-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(217, 119, 6, 0.42); }
        .menu-header-plan-cta--max:hover { box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28); }
        .menu-header-plan-cta:active { transform: translateY(0); }
        .menu-header-plan-diamond { font-size: 0.7rem; line-height: 1; flex-shrink: 0; display: inline-flex; }
        .menu-header-plan-pips { display: inline-flex; gap: 2px; align-items: center; flex-shrink: 0; }
        .menu-header-plan-pips i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.3; }
        .menu-header-plan-pips i.on { opacity: 1; }
        .menu-header-plan-cta[data-tier="leaf"] { background: linear-gradient(135deg, #bbf7d0, #22c55e); color: #052e16; box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3); }
        .menu-header-plan-cta[data-tier="bolt"] { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #451a03; }
        .menu-header-plan-cta[data-tier="star"] { background: linear-gradient(135deg, #c4b5fd, #7c3aed); color: #ffffff; box-shadow: 0 4px 10px rgba(124, 58, 237, 0.35); }
        .menu-header-plan-cta[data-tier="diamond"] { background: linear-gradient(135deg, #67e8f9, #0e7490 60%, #164e63); color: #ffffff; box-shadow: 0 4px 12px rgba(14, 116, 144, 0.45); }
        .menu-header-plan-cta-text { text-align: left; white-space: nowrap; line-height: 1.1; }
        .menu-header-plan-cta-arrow { opacity: 0.75; flex-shrink: 0; width: 0.65rem; height: 0.65rem; }

        /* Compact horizontal bar: small logo (clickable → Checkout) + name on one line,
           theme toggle at the end, replaces the earlier large centered/stacked layout,
           which took up too much sidebar height for what it showed. */
        .menu-header-top-row {
            position: relative;
            display: flex;
            align-items: center;
            gap: 0.6rem;
            padding: 0.8rem 0.75rem 0.5rem;
        }

        #nav-zuno-web {
            color: var(--accent-2, #0c766c);
            animation: zunoWebGlow 2.6s ease-in-out infinite;
        }

        .dark #nav-zuno-web { color: var(--accent, #10b3a0); }

        #nav-zuno-web svg { color: var(--accent, #10b3a0); }

        @keyframes zunoWebGlow {
            0%, 100% { box-shadow: 0 0 0 rgba(var(--accent-rgb, 16, 179, 160), 0); }
            50% { box-shadow: 0 0 10px rgba(var(--accent-rgb, 16, 179, 160), 0.3); }
        }

        .platform-footer-brand {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            padding: 0.3rem 0 0.1rem;
            opacity: 0.8;
        }

        .platform-footer-logo {
            width: 1.65rem;
            height: 1.65rem;
            border-radius: 0.4rem;
            object-fit: contain;
            flex-shrink: 0;
        }

        .platform-footer-text {
            font-size: 0.68rem;
            color: rgba(255, 255, 255, 0.6);
            font-weight: 600;
            white-space: nowrap;
        }

        .platform-footer-text strong { color: rgba(255, 255, 255, 0.85); }


        .menu-header-avatar-wrap {
            position: relative;
            display: inline-flex;
            flex-shrink: 0;
        }

        /* Small always-visible presence dot on the logo's corner (like a chat app's online
           indicator on an avatar), replaces the old separate "Online" pill entirely. Its
           color is always accurate; hovering it just confirms the word via tooltip. */
        .menu-header-presence-dot {
            position: absolute;
            bottom: -1px;
            right: -1px;
            width: 0.65rem;
            height: 0.65rem;
            border-radius: 999px;
            background: #34d399;
            border: 2px solid #0c2237;
            transition: background-color 0.15s ease;
        }

        .menu-header-presence-dot.is-offline {
            background: #94a3b8;
        }

        .menu-header-presence-dot[data-tooltip] {
            position: absolute;
        }

        .menu-header-presence-dot[data-tooltip]::after {
            content: attr(data-tooltip);
            position: absolute;
            left: calc(100% + 0.6rem);
            bottom: 50%;
            transform: translateY(50%) translateX(-6px);
            background: #0f172a;
            color: #ffffff;
            padding: 0.35rem 0.65rem;
            border-radius: 0.5rem;
            font-size: 0.72rem;
            font-weight: 700;
            white-space: nowrap;
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.15s ease, transform 0.15s ease;
            z-index: 60;
        }

        .menu-header-presence-dot[data-tooltip]:hover::after {
            opacity: 1;
            transform: translateY(50%) translateX(0);
        }

        .brand-mark-fallback-initial {
            font-family: 'Manrope', 'Inter', sans-serif;
            font-weight: 800;
            font-size: 0.85rem;
            color: #0c766c;
        }

        .menu-header-business-name-inline {
            flex: 1;
            min-width: 0;
            font-family: 'Manrope', 'Inter', sans-serif;
            font-weight: 800;
            letter-spacing: -0.01em;
            color: #ffffff;
            font-size: 0.78rem;
            line-height: 1.3;
            text-align: left;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .menu-header-identity {
            flex: 1;
            min-width: 0;
            display: grid;
            gap: 0.18rem;
        }

        .menu-header-identity-line {
            display: flex;
            align-items: baseline;
            gap: 0.45rem;
            min-width: 0;
        }

        .menu-header-identity-label {
            width: 3.7rem;
            flex: 0 0 3.7rem;
            color: rgba(255, 255, 255, 0.48);
            font-size: 0.56rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .menu-header-user-name-inline {
            flex: 1;
            min-width: 0;
            overflow: hidden;
            color: rgba(255, 255, 255, 0.75);
            font-size: 0.72rem;
            font-weight: 650;
            line-height: 1.2;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .menu-header-presence-dot:not(.is-offline) {
            animation: connection-pulse 2s ease-in-out infinite;
        }

        /* --- Account panel: popup triggered by the user avatar/name row, consolidating
           Settings, Subscription, Support, Switch User, and Sign Out into one place instead
           of scattering them (Sign Out used to be its own standalone button at the bottom). */
        .user-profile-wrap {
            position: relative;
        }

        .user-account-panel {
            position: absolute;
            top: calc(100% + 0.5rem);
            left: 0.5rem;
            right: 0.5rem;
            background: #101c30;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 1rem;
            box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
            padding: 0.85rem;
            z-index: 70;
            opacity: 0;
            transform: translateY(-6px);
            pointer-events: none;
            transition: opacity 0.15s ease, transform 0.15s ease;
        }

        .user-account-panel.is-open {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        .user-account-panel-header {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            padding-bottom: 0.65rem;
        }

        .user-account-panel-role-badge {
            display: inline-block;
            margin-top: 0.2rem;
            font-size: 0.62rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: #6ee7d8;
            background: rgba(var(--accent-light-rgb), 0.16);
            padding: 0.1rem 0.5rem;
            border-radius: 999px;
        }

        .user-account-panel-divider {
            height: 1px;
            background: rgba(255, 255, 255, 0.1);
            margin: 0.5rem 0;
        }

        .user-account-panel-nav {
            display: flex;
            flex-direction: column;
            gap: 0.15rem;
        }

        .user-account-panel-item {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 0.65rem;
            padding: 0.55rem 0.6rem;
            border-radius: 0.65rem;
            color: #e2e8f0;
            font-size: 0.84rem;
            font-weight: 600;
            text-align: left;
            transition: background 0.15s ease;
        }

        .user-account-panel-item:hover { background: rgba(255, 255, 255, 0.08); }
        .user-account-panel-item svg { width: 18px; height: 18px; color: #6ee7d8; flex-shrink: 0; }

        .user-account-panel-item--danger { color: #fca5a5; }
        .user-account-panel-item--danger svg { color: #fca5a5; }
        .user-account-panel-item--danger:hover { background: rgba(220, 38, 38, 0.14); }

        /* Muted by default (small, gray) — red only shows up on hover as a warning cue,
           rather than being a permanently loud red block sitting at the bottom of the app. */
        .sign-out-btn-muted {
            width: 100%;
            min-height: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            padding: 0.5rem;
            margin-top: 0.25rem;
            border-radius: 0.7rem;
            background: rgba(255, 255, 255, 0.05);
            color: #94a3b8;
            font-weight: 700;
            font-size: 0.8rem;
            transition: background 0.15s ease, color 0.15s ease;
        }

        .sign-out-btn-muted:hover {
            background: rgba(220, 38, 38, 0.16);
            color: #fca5a5;
        }

        @keyframes connection-pulse {
            0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(110, 231, 183, 0.5); }
            50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(110, 231, 183, 0); }
        }

        #menu-drawer .menu-link {
            position: relative;
            border: 1px solid transparent;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            color: #cbd5e1;
            padding: 0.65rem 1rem 0.65rem 0.75rem;
            line-height: 1.25;
            border-radius: 0.9rem;
            transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
        }

        #menu-drawer .menu-link::before {
            content: '';
            position: absolute;
            left: -0.1rem;
            top: 50%;
            transform: translateY(-50%);
            width: 3px;
            height: 0;
            border-radius: 999px;
            background: #31cdae;
            transition: height 0.18s ease;
        }

        #menu-drawer .menu-link .menu-label {
            display: flex;
            align-items: center;
            gap: 0.7rem;
            font-weight: 600;
        }

        #menu-drawer .menu-link .menu-label svg {
            width: 18px;
            height: 18px;
            color: #6ee7d8;
            flex-shrink: 0;
            position: relative;
            z-index: 1;
        }

        #menu-drawer .menu-link .menu-label > svg:first-child {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.1rem;
            height: 2.1rem;
            padding: 0.5rem;
            box-sizing: border-box;
            border-radius: 0.65rem;
            background: rgba(var(--accent-light-rgb), 0.14);
            border: 1px solid rgba(103, 229, 203, 0.14);
        }

        #menu-drawer .menu-link:hover {
            border-color: rgba(var(--accent-light-rgb), 0.3);
            background: rgba(var(--accent-light-rgb), 0.09);
            color: #f1f5f9;
            transform: translateX(2px);
        }

        #menu-drawer .menu-link.active {
            background: linear-gradient(135deg, rgba(var(--accent-light-rgb), 0.22), rgba(var(--accent-2-rgb), 0.24));
            border-color: rgba(var(--accent-light-rgb), 0.4);
            color: #ffffff;
            box-shadow: 0 15px 30px rgba(var(--accent-2-rgb), 0.22);
        }

        #menu-drawer .menu-link.active::before {
            height: 1.4rem;
        }

        #menu-drawer .menu-link.active .menu-label > svg:first-child {
            background: rgba(var(--accent-light-rgb), 0.3);
            color: #ffffff;
        }

        #menu-drawer .menu-link .menu-badge {
            background: rgba(var(--accent-light-rgb), 0.18);
            color: #d1faf0;
            padding: 0.2rem 0.65rem;
            border-radius: 9999px;
            font-size: 0.78rem;
            font-weight: 700;
        }

        #menu-drawer .menu-section-title {
            color: rgba(148, 163, 184, 0.75);
            letter-spacing: 0.1em;
            margin-top: 0.4rem;
            padding-top: 0.6rem;
            border-top: 1px solid rgba(148, 163, 184, 0.12);
        }

        #menu-drawer nav > .menu-section-title:first-child {
            border-top: none;
            padding-top: 0;
            margin-top: 0;
        }

        #product-grid > .grid {
            gap: 0.75rem;
            align-content: start;
        }

        /* The layout picker's own column choice (2/3/4 wide) must always win over
           Tailwind's width-based responsive classes already on the same element
           (grid-cols-2 sm:grid-cols-3 md:grid-cols-4 ...), previously this override
           only existed inside the max-width:640px media query below, so picking 3 or
           4 wide silently had no visible effect on anything wider than a narrow phone
           screen (a laptop/desktop browser, a tablet, or a larger phone in landscape).
           The #product-grid ID gives this more specificity than Tailwind's own
           classes, so it wins at every screen size once it's unconditional. */
        #product-grid > .grid[data-mobile-columns="2"] {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        #product-grid > .grid[data-mobile-columns="3"] {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
        #product-grid > .grid[data-mobile-columns="4"] {
            grid-template-columns: repeat(4, minmax(0, 1fr));
        }
        /* "Auto" — let the browser fit as many columns as the available width allows,
           instead of a fixed count, so nobody has to guess 2 vs 3 vs 4. */
        #product-grid > .grid[data-mobile-columns="auto"] {
            grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
        }

        #product-grid {
            padding-bottom: 1.5rem;
        }

        .mobile-grid-size-control {
            display: none;
        }

        .product-layout-menu-wrap { position: relative; }
        .product-layout-menu {
            position: absolute;
            top: calc(100% + 0.55rem);
            right: 0;
            z-index: 45;
            width: 17rem;
            padding: 0.65rem;
            border: 1px solid #e2e8f0;
            border-radius: 1rem;
            background: rgba(255, 255, 255, 0.98);
            box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
            transform-origin: top right;
        }
        .dark .product-layout-menu { background: rgba(17, 24, 39, 0.98); border-color: #374151; }
        .product-layout-menu-title { padding: 0.2rem 0.25rem 0.55rem; color: #64748b; font-size: 0.67rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
        .product-layout-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.35rem; }
        .product-layout-option {
            min-width: 0;
            min-height: 3.5rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.3rem;
            border: 1px solid transparent;
            border-radius: 0.75rem;
            color: #64748b;
            font-size: 0.64rem;
            font-weight: 800;
        }
        .product-layout-option:hover { background: #f1f5f9; color: #0f766e; }
        .dark .product-layout-option { color: #cbd5e1; }
        .dark .product-layout-option:hover { background: #1f2937; color: #5eead4; }
        .product-layout-option[aria-checked="true"] { border-color: #2dd4bf; background: #ccfbf1; color: #0f766e; box-shadow: 0 3px 10px rgba(13, 148, 136, 0.14); }
        .dark .product-layout-option[aria-checked="true"] { background: rgba(13, 148, 136, 0.2); color: #5eead4; }
        .product-layout-option svg { width: 1.25rem; height: 1.25rem; }

        #product-grid > .grid > div,
        #product-grid button,
        #product-grid .cursor-pointer,
        #product-management-list .cursor-pointer,
        #orders-list > div,
        #transactions-list > div,
        #expenses-list > div,
        #receivables-list > div,
        #customers-list-management > div,
        #category-list > div,
        #users-list > div {
            border: 1px solid rgba(226, 232, 240, 0.85);
            border-radius: 1rem;
            box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
            transition: box-shadow 0.15s ease, transform 0.15s ease;
        }

        .dark #product-grid > .grid > div,
        .dark #product-grid button,
        .dark #product-grid .cursor-pointer,
        .dark #product-management-list .cursor-pointer,
        .dark #orders-list > div,
        .dark #transactions-list > div,
        .dark #expenses-list > div,
        .dark #receivables-list > div,
        .dark #customers-list-management > div,
        .dark #category-list > div,
        .dark #users-list > div {
            border-color: rgba(55, 65, 81, 0.85);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
        }



        .surface-card {
            background: rgba(255, 255, 255, 0.94);
            border: 1px solid rgba(226, 232, 240, 0.9);
            border-radius: 1.25rem;
            box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
        }

        .dark .surface-card {
            background: rgba(17, 24, 39, 0.92);
            border-color: rgba(55, 65, 81, 0.86);
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
        }

        .app-header-title {
            letter-spacing: -0.03em;
        }

        .checkout-summary-strip {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 0.75rem;
            padding: 0.9rem 1rem;
        }

        .checkout-summary-strip--two {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .checkout-summary-card {
            border-radius: 1.1rem;
            padding: 0.75rem;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(238, 251, 249, 0.95));
            border: 1px solid rgba(112, 211, 196, 0.55);
            box-shadow: 0 6px 16px rgba(var(--accent-2-rgb), 0.06);
        }

        .dark .checkout-summary-card {
            background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 94, 87, 0.28));
            border-color: rgba(var(--accent-light-rgb), 0.22);
        }

        .category-tab {
            border: 1px solid rgba(203, 213, 225, 0.85);
            box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
            transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
        }

        .category-tab.active {
            border-color: rgba(var(--accent-rgb), 0.65);
            box-shadow: 0 12px 24px rgba(var(--accent-rgb), 0.22);
        }

        .product-card {
            position: relative;
            overflow: hidden;
            min-height: 13.5rem;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
            transition: transform 0.15s ease, box-shadow 0.15s ease;
        }


        /* Keep text inside checkout cards even with an explicitly chosen 3/4-column view. */
        /* Sales-based Hot badge in Checkout only. One subtle label, no extra border lines. */
        #view-checkout .checkout-hot-badge {
            display:inline-flex;
            align-items:center;
            flex:0 0 auto;
            max-width:100%;
            padding:.17rem .38rem;
            margin-right:.32rem;
            border-radius:999px;
            background:rgba(245,108,45,.14);
            color:#c2410c;
            font-size:.62rem;
            font-weight:800;
            white-space:nowrap;
            vertical-align:middle;
        }
        .dark #view-checkout .checkout-hot-badge { background:rgba(251,113,48,.2); color:#fdba74; }
        #view-checkout .product-card .checkout-hot-badge--grid { align-self:flex-start; margin:0 0 .32rem; }
        #view-checkout .product-list-row .checkout-product-name { display:flex; align-items:center; min-width:0; }
        #product-grid > .grid { min-width:0; }
        #product-grid > .grid .product-card { width:100%; min-width:0; max-width:100%; }
        #product-grid .product-card h3,
        #product-grid .product-card .product-card-price,
        #product-grid .product-card .product-card-stock {
            display:block;
            flex:0 0 auto;
            width:100%;
            max-width:100%;
            min-width:0;
            overflow:hidden;
            text-overflow:ellipsis;
            white-space:nowrap;
        }
        #product-grid .product-card .product-card-stock {
            width:auto;
            max-width:100%;
            min-height:0;
            padding:.2rem .42rem;
            font-size:.64rem;
            line-height:1.2;
        }
        @media (max-width:640px) {
            #product-grid > .grid[data-mobile-columns="3"] .product-card,
            #product-grid > .grid[data-mobile-columns="4"] .product-card {
                padding:.42rem;
            }
            #product-grid > .grid[data-mobile-columns="3"] .product-card .product-card-price,
            #product-grid > .grid[data-mobile-columns="4"] .product-card .product-card-price {
                margin-top:.3rem;
                font-size:clamp(.61rem,2.3vw,.76rem);
            }
            #product-grid > .grid[data-mobile-columns="3"] .product-card .product-card-stock,
            #product-grid > .grid[data-mobile-columns="4"] .product-card .product-card-stock {
                padding:.15rem .25rem;
                font-size:clamp(.56rem,2.1vw,.64rem);
            }
        }

        .product-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.1), transparent 42%, rgba(var(--accent-2-rgb), 0.1));
            opacity: 0;
            transition: opacity 0.2s ease;
            pointer-events: none;
        }

        .product-card:hover::before { opacity: 1; }
        .product-card:hover { box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1); }

        .product-image-wrap {
            width: 100%;
            border-radius: 0.9rem;
            padding: 0.35rem;
            background: linear-gradient(135deg, #d1faf0, #a3f3e1);
        }

        .dark .product-image-wrap {
            background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-2-rgb), 0.16));
        }

        .empty-state {
            margin: 2rem auto;
            max-width: 22rem;
            border-radius: 1.25rem;
            padding: 1.5rem;
            text-align: center;
            background: rgba(255, 255, 255, 0.88);
            border: 1px dashed rgba(var(--accent-rgb), 0.35);
            color: #475569;
        }

        .dark .empty-state {
            background: rgba(17, 24, 39, 0.8);
            color: #cbd5e1;
        }

        .date-filter-btn {
            min-height: 38px;
            white-space: nowrap;
        }

        .filter-toolbar {
            display: flex;
            gap: 0.65rem;
            align-items: center;
        }

        .filter-toolbar > input { margin-bottom: 0 !important; }

        #view-expenses .filter-toolbar { padding: 0; }
        #view-expenses .filter-toolbar input { min-height: 44px; }
        #view-expenses .filter-panel-inner {
            display: grid;
            gap: 0.75rem;
            padding: 0.85rem;
            border: 1px solid rgba(var(--accent-rgb), 0.18);
            border-radius: 1rem;
            background: rgba(238, 251, 249, 0.72);
        }
        .dark #view-expenses .filter-panel-inner { background: rgba(15, 94, 87, 0.14); }
        #view-expenses .expense-quick-filters {
            display: flex;
            flex-wrap: nowrap;
            gap: 0.5rem;
            overflow-x: auto;
            padding-bottom: 0.2rem;
            scrollbar-width: none;
        }
        #view-expenses .expense-quick-filters::-webkit-scrollbar { display: none; }
        .date-range-field-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
        .date-range-field { display: grid; gap: 0.3rem; min-width: 0; }
        .date-range-field span { font-size: 0.72rem; font-weight: 700; color: #64748b; }
        .dark .date-range-field span { color: #94a3b8; }
        #view-expenses .expense-date-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
        #view-expenses .expense-date-field { display: grid; gap: 0.3rem; min-width: 0; }
        #view-expenses .expense-date-field span { font-size: 0.72rem; font-weight: 700; color: #64748b; }
        #view-expenses .expense-filter-actions { display: flex; justify-content: flex-end; }
        #view-expenses .expense-filter-actions button { min-height: 38px; }

        .filter-toggle {
            min-height: 42px;
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            padding: 0.65rem 0.85rem;
            border: 1px solid rgba(var(--accent-rgb), 0.3);
            border-radius: 0.8rem;
            background: rgba(255, 255, 255, 0.9);
            color: #0c766c;
            font-weight: 700;
            box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
        }

        .dark .filter-toggle { background: #111827; color: #67e5cb; border-color: rgba(112, 211, 196, 0.35); }
        .filter-toggle[aria-expanded="true"] { background: #ecfdf7; border-color: #10b3a0; }
        .dark .filter-toggle[aria-expanded="true"] { background: rgba(var(--accent-rgb), 0.18); }
        .filter-toggle svg { width: 18px; height: 18px; transition: transform 180ms ease; }
        .filter-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

        .collapsible-filter-panel {
            display: grid;
            grid-template-rows: 0fr;
            opacity: 0;
            transition: grid-template-rows 220ms ease, opacity 180ms ease, margin-top 220ms ease;
        }

        .collapsible-filter-panel > .filter-panel-inner { min-height: 0; overflow: hidden; }
        .collapsible-filter-panel.is-open { grid-template-rows: 1fr; opacity: 1; margin-top: 0.65rem; }
        .active-filter-count {
            min-width: 1.25rem;
            height: 1.25rem;
            padding: 0 0.3rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 999px;
            background: #10b3a0;
            color: white;
            font-size: 0.7rem;
        }

        @media (max-width: 640px) {
            body {
                font-size: 15px;
            }

            .accent-blobs {
                opacity: 0.42;
            }

            .view {
                max-width: 100%;
            }

            #app-container .view {
                border-left: 0;
                border-right: 0;
                box-shadow: none;
            }

            .view > header {
                position: sticky;
                top: 0;
                z-index: 20;
                min-height: 64px;
            }

            .view > header h1 {
                font-size: 1.125rem;
                line-height: 1.4;
                text-align: center;
            }

            #category-tabs {
                padding: 0.65rem 0.75rem;
                scrollbar-width: none;
            }

            #category-tabs::-webkit-scrollbar {
                display: none;
            }

            #category-tabs .category-tab {
                padding: 0.7rem 1rem;
                border-radius: 9999px;
            }

            #product-grid {
                padding: 0.75rem;
            }

            /* Column COUNT for the grid is set unconditionally above (so the picker
               works at any screen width), this narrow-screen block now only tightens
               spacing/sizing at 3-4 columns on small phones, it doesn't set columns. */
            #product-grid > .grid {
                gap: 0.65rem;
            }

            #product-grid > .grid[data-mobile-columns="3"] .product-card,
            #product-grid > .grid[data-mobile-columns="4"] .product-card {
                min-height: 0;
                padding: 0.5rem;
            }

            #product-grid > .grid[data-mobile-columns="3"] .product-image-wrap,
            #product-grid > .grid[data-mobile-columns="4"] .product-image-wrap {
                margin-bottom: 0.4rem;
                padding: 0.2rem;
            }

            #product-grid > .grid[data-mobile-columns="3"] .product-image-wrap img,
            #product-grid > .grid[data-mobile-columns="4"] .product-image-wrap img {
                height: 4.25rem;
            }

            #product-grid > .grid[data-mobile-columns="4"] .product-card h3,
            #product-grid > .grid[data-mobile-columns="4"] .product-card p {
                font-size: 0.68rem;
            }

            .checkout-summary-strip {
                gap: 0.4rem;
                padding: 0.65rem 0.75rem;
            }

            .checkout-summary-card {
                min-width: 0;
                padding: 0.6rem 0.45rem;
                overflow-wrap: anywhere;
            }

            .checkout-summary-card p:last-child {
                font-size: 1rem;
            }

            #cart-items,
            #product-management-list,
            #orders-list,
            #transactions-list,
            #expenses-list,
            #receivables-list,
            #customers-list-management,
            #stock-history-list {
                padding: 0.75rem;
            }

            #view-cart footer,
            #view-customer-account footer,
            #view-invoice footer {
                position: sticky;
                bottom: 0;
                z-index: 20;
            }

            #view-payment .flex.gap-4 {
                width: 100%;
                flex-direction: column;
                gap: 0.75rem;
            }

            #view-payment .payment-method-btn {
                padding: 1.15rem;
            }

            #view-orders .flex.gap-2,
            #view-transactions .flex.gap-2,
            #view-expenses .flex.gap-2,
            #view-receivables .flex.gap-2,
            #view-analytics .flex.gap-2,
            #view-users form .flex.gap-2,
            #add-category-form {
                flex-wrap: wrap;
            }

            #view-orders input[type="date"],
            #view-transactions input[type="date"],
            #view-expenses input[type="date"],
            #view-receivables input[type="date"],
            #view-analytics input[type="date"] {
                min-width: calc(50% - 0.25rem);
                max-width: 100%;
            }

            #apply-order-date-filter,
            #apply-transaction-date-filter,
            #apply-receivable-date-filter,
            #apply-analytics-date-filter,
            #add-category-form button {
                flex: 1 0 100%;
            }

            #menu-drawer {
                width: min(22rem, 92vw);
                max-width: 92vw;
            }

            #menu-drawer .p-4 {
                padding: 0.85rem;
            }

            #menu-drawer .menu-link {
                padding: 0.85rem 0.9rem;
            }

            #credit-debit-modal,
            #discount-modal,
            #custom-item-modal,
            #select-customer-modal,
            #generic-modal,
            #edit-user-modal {
                align-items: flex-end;
                padding: 0;
            }

            #expense-panel-overlay {
                padding-top: max(1rem, env(safe-area-inset-top));
                padding-right: max(1rem, env(safe-area-inset-right));
                padding-bottom: max(1rem, env(safe-area-inset-bottom));
                padding-left: max(1rem, env(safe-area-inset-left));
            }

            #credit-debit-modal > div,
            #discount-modal > div,
            #custom-item-modal > div,
            #select-customer-modal > div,
            #generic-modal > div,
            #edit-user-modal > div {
                width: 100%;
                max-width: 100%;
                margin: 0;
                border-radius: 1.25rem 1.25rem 0 0;
                padding: 1.25rem;
                padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
            }
        }

        @media (max-width: 380px) {
            .pill-badge {
                padding: 0.35rem 0.6rem;
                font-size: 0.8rem;
            }

            #view-orders input[type="date"],
            #view-transactions input[type="date"],
            #view-expenses input[type="date"],
            #view-receivables input[type="date"],
            #view-analytics input[type="date"] {
                flex-basis: 100%;
                min-width: 0;
                width: 100%;
            }
        }


        /* --- Zuno motion system: transaction completion --- */
        .zuno-result-overlay {
            position: fixed;
            inset: 0;
            z-index: 100000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            background:
                radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--zuno-result-accent) 18%, transparent) 0%, transparent 34%),
                rgba(3, 10, 18, 0.62);
            backdrop-filter: blur(12px) saturate(115%);
            -webkit-backdrop-filter: blur(12px) saturate(115%);
            animation: zuno-result-backdrop-in 240ms ease-out both;
        }

        .zuno-result-card {
            --zuno-result-accent: #16a34a;
            --zuno-result-soft: rgba(22, 163, 74, 0.14);
            position: relative;
            width: min(92vw, 410px);
            overflow: hidden;
            border-radius: 28px;
            padding: 2.15rem 1.6rem 1.7rem;
            text-align: center;
            background: rgba(255, 255, 255, 0.96);
            border: 1px solid rgba(255, 255, 255, 0.72);
            box-shadow: 0 30px 90px rgba(2, 8, 23, 0.32);
            transform-origin: center;
            animation: zuno-result-card-in 580ms cubic-bezier(.16, 1, .3, 1) both;
        }

        .dark .zuno-result-card {
            background: rgba(13, 22, 33, 0.96);
            border-color: rgba(255, 255, 255, 0.1);
        }

        .zuno-result-card[data-tone="green"] {
            --zuno-result-accent: #16a34a;
            --zuno-result-soft: rgba(22, 163, 74, 0.14);
        }

        .zuno-result-card[data-tone="amber"] {
            --zuno-result-accent: #d99805;
            --zuno-result-soft: rgba(217, 152, 5, 0.16);
        }

        .zuno-result-card[data-tone="red"] {
            --zuno-result-accent: #dc2626;
            --zuno-result-soft: rgba(220, 38, 38, 0.14);
        }

        .zuno-result-card[data-tone="teal"] {
            --zuno-result-accent: #0f9f91;
            --zuno-result-soft: rgba(15, 159, 145, 0.14);
        }

        .zuno-result-card[data-tone="blue"] {
            --zuno-result-accent: #2563eb;
            --zuno-result-soft: rgba(37, 99, 235, 0.13);
        }

        .zuno-result-card[data-tone="violet"] {
            --zuno-result-accent: #7c3aed;
            --zuno-result-soft: rgba(124, 58, 237, 0.13);
        }

        .zuno-result-card[data-tone="grey"] {
            --zuno-result-accent: #94a3b8;
            --zuno-result-soft: rgba(148, 163, 184, 0.12);
        }

        .zuno-result-sheen {
            position: absolute;
            inset: -35% -70%;
            pointer-events: none;
            background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.46) 50%, transparent 58%);
            transform: translateX(-40%);
            animation: zuno-result-sheen 1050ms 260ms ease-out both;
        }

        .zuno-result-orbit {
            position: relative;
            width: 112px;
            height: 112px;
            margin: 0 auto 1.15rem;
            display: grid;
            place-items: center;
        }

        .zuno-result-ring,
        .zuno-result-ring::before {
            position: absolute;
            inset: 0;
            content: "";
            border-radius: 999px;
            border: 1px solid color-mix(in srgb, var(--zuno-result-accent) 34%, transparent);
            animation: zuno-result-ring 1250ms cubic-bezier(.2,.75,.2,1) both;
        }

        .zuno-result-ring::before {
            inset: 12px;
            opacity: .7;
            animation-delay: 90ms;
        }

        .zuno-result-icon {
            position: relative;
            width: 72px;
            height: 72px;
            border-radius: 999px;
            display: grid;
            place-items: center;
            color: white;
            background:
                radial-gradient(circle at 32% 26%, rgba(255,255,255,.42), transparent 30%),
                linear-gradient(145deg, color-mix(in srgb, var(--zuno-result-accent) 80%, white), var(--zuno-result-accent));
            box-shadow:
                0 18px 34px color-mix(in srgb, var(--zuno-result-accent) 34%, transparent),
                inset 0 1px 0 rgba(255,255,255,.55);
            animation: zuno-result-icon-pop 650ms 120ms cubic-bezier(.2,1.45,.35,1) both;
        }

        .zuno-result-icon svg {
            width: 37px;
            height: 37px;
            overflow: visible;
        }

        .zuno-result-icon .zuno-check-path {
            stroke-dasharray: 30;
            stroke-dashoffset: 30;
            animation: zuno-result-check 520ms 430ms cubic-bezier(.2,.8,.2,1) forwards;
        }

        .zuno-result-title {
            margin: 0;
            font-size: clamp(1.55rem, 5vw, 2rem);
            line-height: 1.08;
            font-weight: 850;
            letter-spacing: -0.035em;
            color: #0f172a;
            animation: zuno-result-copy-in 460ms 240ms ease-out both;
        }

        .dark .zuno-result-title { color: #f8fafc; }

        .zuno-result-copy {
            margin: .6rem auto 0;
            max-width: 31ch;
            color: #64748b;
            font-size: .94rem;
            line-height: 1.55;
            animation: zuno-result-copy-in 460ms 310ms ease-out both;
        }

        .dark .zuno-result-copy { color: #aebdce; }

        .zuno-result-pill {
            display: inline-flex;
            align-items: center;
            gap: .42rem;
            margin-top: 1.05rem;
            padding: .5rem .78rem;
            border-radius: 999px;
            color: color-mix(in srgb, var(--zuno-result-accent) 82%, #07111c);
            background: var(--zuno-result-soft);
            font-size: .76rem;
            font-weight: 800;
            letter-spacing: .01em;
            animation: zuno-result-copy-in 460ms 380ms ease-out both;
        }

        .dark .zuno-result-pill {
            color: color-mix(in srgb, var(--zuno-result-accent) 58%, white);
        }

        .zuno-result-particle {
            --x: 0px;
            --y: 0px;
            --r: 0deg;
            position: absolute;
            left: 50%;
            top: 42%;
            width: 8px;
            height: 8px;
            border-radius: 3px;
            background: var(--zuno-result-accent);
            opacity: 0;
            pointer-events: none;
            animation: zuno-result-particle 900ms 170ms cubic-bezier(.12,.65,.2,1) both;
        }

        .zuno-result-card.zuno-result-card--activity {
            width: min(90vw, 380px);
            padding: 1.8rem 1.45rem 1.45rem;
        }

        .zuno-result-card--activity .zuno-result-orbit {
            width: 96px;
            height: 96px;
            margin-bottom: .9rem;
        }

        .zuno-result-card--activity .zuno-result-icon {
            width: 64px;
            height: 64px;
        }

        .zuno-result-card--activity .zuno-result-icon svg {
            width: 31px;
            height: 31px;
        }

        .zuno-result-card--activity .zuno-result-title {
            font-size: clamp(1.35rem, 4.5vw, 1.72rem);
        }

        .zuno-result-card--activity .zuno-result-copy {
            font-size: .88rem;
        }

        .zuno-result-card--activity .zuno-result-particle {
            width: 6px;
            height: 6px;
        }

        .zuno-result-progress {
            position: absolute;
            left: 0;
            bottom: 0;
            height: 3px;
            width: 100%;
            transform-origin: left;
            background: var(--zuno-result-accent);
            animation: zuno-result-progress var(--zuno-result-duration, 2200ms) linear both;
        }

        .payment-method-btn,
        #save-order-btn,
        #pay-later-btn {
            position: relative;
            overflow: hidden;
            transform: translateZ(0);
        }

        @media (hover:hover) and (pointer:fine) {
            .payment-method-btn:hover,
            #save-order-btn:hover,
            #pay-later-btn:hover {
                transform: translateY(-2px);
                box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
            }
        }

        .payment-method-btn:active,
        #save-order-btn:active,
        #pay-later-btn:active {
            transform: scale(.985);
        }

        @keyframes zuno-result-backdrop-in {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes zuno-result-card-in {
            0% { opacity: 0; transform: translateY(18px) scale(.92); }
            62% { opacity: 1; transform: translateY(-2px) scale(1.015); }
            100% { opacity: 1; transform: translateY(0) scale(1); }
        }

        @keyframes zuno-result-ring {
            0% { opacity: 0; transform: scale(.55); }
            30% { opacity: .75; }
            100% { opacity: 0; transform: scale(1.38); }
        }

        @keyframes zuno-result-icon-pop {
            0% { opacity: 0; transform: scale(.42) rotate(-8deg); }
            70% { opacity: 1; transform: scale(1.08) rotate(2deg); }
            100% { opacity: 1; transform: scale(1) rotate(0); }
        }

        @keyframes zuno-result-check {
            to { stroke-dashoffset: 0; }
        }

        @keyframes zuno-result-copy-in {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes zuno-result-sheen {
            from { transform: translateX(-46%) rotate(0.001deg); opacity: 0; }
            20% { opacity: .75; }
            to { transform: translateX(46%) rotate(0.001deg); opacity: 0; }
        }

        @keyframes zuno-result-particle {
            0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(0); }
            18% { opacity: .95; }
            100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(.8) rotate(var(--r)); }
        }

        @keyframes zuno-result-progress {
            from { transform: scaleX(0); opacity: .85; }
            to { transform: scaleX(1); opacity: .32; }
        }

        @media (prefers-reduced-motion: reduce) {
            .zuno-result-overlay,
            .zuno-result-card,
            .zuno-result-ring,
            .zuno-result-ring::before,
            .zuno-result-icon,
            .zuno-result-icon .zuno-check-path,
            .zuno-result-title,
            .zuno-result-copy,
            .zuno-result-pill,
            .zuno-result-particle,
            .zuno-result-progress,
            .zuno-result-sheen {
                animation: none !important;
            }
            .zuno-result-icon .zuno-check-path { stroke-dashoffset: 0; }
        }


        /* ============================================================
           ZUNO MOTION SYSTEM
           Modern, fast, tactile animation used across startup, auth,
           messages, sign-in/sign-out and workspace arrival.
           ============================================================ */

        :root {
            --zuno-motion-ease: cubic-bezier(.16, 1, .3, 1);
            --zuno-motion-spring: cubic-bezier(.2, 1.35, .3, 1);
        }

        /* ---------- STARTUP ---------- */
        #app-loading {
            position: fixed;
            inset: 0;
            width: 100vw;
            height: 100dvh;
            isolation: isolate;
            overflow: hidden;
            z-index: 70;
            padding: 1.5rem;
        }

        #app-loading::before {
            content: "";
            position: absolute;
            width: min(78vw, 34rem);
            aspect-ratio: 1;
            border-radius: 50%;
            background:
                radial-gradient(circle at 35% 32%, rgba(255,255,255,.9), transparent 22%),
                radial-gradient(circle, rgba(16,179,160,.13), rgba(16,179,160,.025) 48%, transparent 70%);
            filter: blur(2px);
            animation: zuno-startup-breathe 3.8s ease-in-out infinite;
            z-index: -1;
        }

        .zuno-startup-meta {
            width: min(88vw, 31rem);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: .85rem;
            margin-top: -.15rem;
        }

        .zuno-startup-pulse {
            width: min(78vw, 18rem);
            height: 3px;
            overflow: hidden;
            border-radius: 999px;
            background: rgba(148,163,184,.18);
        }

        .zuno-startup-pulse::after {
            content: "";
            display: block;
            width: 42%;
            height: 100%;
            border-radius: inherit;
            background: linear-gradient(90deg, transparent, #10b3a0, #6ee7d8, transparent);
            animation: zuno-startup-runway 1.65s ease-in-out infinite;
        }

        .zuno-startup-signals {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: .45rem;
        }

        .zuno-startup-signal {
            display: inline-flex;
            align-items: center;
            gap: .36rem;
            padding: .38rem .62rem;
            border: 1px solid rgba(148,163,184,.2);
            border-radius: 999px;
            background: rgba(255,255,255,.48);
            color: #64748b;
            font-size: .66rem;
            font-weight: 750;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            animation: zuno-startup-chip-in .55s var(--zuno-motion-ease) both;
        }

        .dark .zuno-startup-signal {
            background: rgba(15,23,42,.42);
            color: #aebdce;
        }

        .zuno-startup-signal:nth-child(2) { animation-delay: 90ms; }
        .zuno-startup-signal:nth-child(3) { animation-delay: 180ms; }

        .zuno-startup-dot {
            width: .38rem;
            height: .38rem;
            border-radius: 50%;
            background: #10b3a0;
            box-shadow: 0 0 0 .24rem rgba(16,179,160,.10);
        }

        #loading-screen-text {
            min-height: 1.35rem;
            transition: opacity .18s ease, transform .18s ease;
        }

        #loading-screen-text.is-changing {
            opacity: 0;
            transform: translateY(5px);
        }

        /* ---------- LOGIN / AUTH LANDING ---------- */
        #view-login.active .auth-layout > * {
            animation: zuno-auth-rise .7s var(--zuno-motion-ease) both;
        }

        #view-login.active .auth-layout > *:nth-child(1) { animation-delay: 40ms; }
        #view-login.active .auth-layout > *:nth-child(2) { animation-delay: 120ms; }

        #view-login.active .main-brand-logo {
            animation: zuno-logo-arrive .8s var(--zuno-motion-spring) both;
        }

        #view-login.active .login-title,
        #view-login.active .login-subtitle {
            animation: zuno-copy-arrive .58s var(--zuno-motion-ease) both;
        }

        #view-login.active .login-subtitle { animation-delay: 80ms; }

        #view-login.active #welcome-signin-btn,
        #view-login.active #welcome-signup-btn {
            transition: transform .22s var(--zuno-motion-ease), box-shadow .22s ease, filter .22s ease;
        }

        @media (hover:hover) and (pointer:fine) {
            #view-login.active #welcome-signin-btn:hover,
            #view-login.active #welcome-signup-btn:hover {
                transform: translateY(-2px);
                box-shadow: 0 14px 30px rgba(15,23,42,.12);
            }
        }

        #view-login.active #welcome-signin-btn:active,
        #view-login.active #welcome-signup-btn:active {
            transform: scale(.985);
        }

        /* ---------- AUTH METHOD SHEET ---------- */
        /* Sign-in choices open inside the sign-in card (same page, no pop-up) */
        #view-login .auth-card { position: relative; }
        #view-login .auth-card.auth-inline-open .auth-welcome { display: none; }
        #view-login .auth-card.auth-inline-open .main-brand-logo { width: 56px !important; height: 56px !important; margin-bottom: .25rem !important; }
        #auth-method-modal:not(.hidden) { animation: none; }
        #auth-method-choice > button { text-align: left; justify-content: flex-start !important; padding-left: 1rem; padding-right: 1rem; }
        #auth-method-choice > button svg { flex: none; }

        #auth-method-modal:not(.hidden) {
            animation: zuno-auth-backdrop-in .22s ease-out both;
        }

        #auth-method-modal:not(.hidden) > div {
            animation: zuno-auth-option-in .3s ease-out both;
            transform-origin: 50% 70%;
        }

        #auth-method-choice > button,
        #email-signin-form > *,
        #phone-signin-form > *,
        #email-signup-flow > * {
            animation: zuno-auth-option-in .4s var(--zuno-motion-ease) both;
        }

        #auth-method-choice > button:nth-child(2) { animation-delay: 45ms; }
        #auth-method-choice > button:nth-child(3) { animation-delay: 90ms; }

        /* ---------- APP WORKSPACE ARRIVAL ---------- */
        #app-container.zuno-workspace-enter {
            animation: zuno-workspace-enter .72s var(--zuno-motion-ease) both;
        }

        #app-container.zuno-workspace-enter .app-header-title {
            animation: zuno-copy-arrive .52s .13s var(--zuno-motion-ease) both;
        }

        /* ---------- UNIVERSAL MODALS / MESSAGES ---------- */
        #generic-modal {
            backdrop-filter: blur(7px);
            -webkit-backdrop-filter: blur(7px);
        }

        #generic-modal.zuno-modal-open {
            animation: zuno-auth-backdrop-in .2s ease-out both;
        }

        #generic-modal.zuno-modal-open > div {
            position: relative;
            overflow: hidden;
            border-radius: 1.35rem !important;
            animation: zuno-message-card-in .46s var(--zuno-motion-ease) both;
        }

        #generic-modal.zuno-modal-open > div::before {
            content: "";
            position: absolute;
            top: 0;
            left: 12%;
            right: 12%;
            height: 3px;
            border-radius: 0 0 999px 999px;
            background: linear-gradient(90deg, transparent, var(--accent, #10b3a0), transparent);
            opacity: .9;
        }

        #generic-modal.zuno-modal-closing {
            animation: zuno-modal-out .18s ease-in both;
        }

        #generic-modal.zuno-modal-closing > div {
            animation: zuno-message-card-out .18s ease-in both;
        }

        #generic-modal-buttons button {
            transition: transform .18s var(--zuno-motion-ease), filter .18s ease, box-shadow .18s ease;
        }

        @media (hover:hover) and (pointer:fine) {
            #generic-modal-buttons button:hover {
                transform: translateY(-1px);
                filter: brightness(1.035);
            }
        }

        #generic-modal-buttons button:active { transform: scale(.98); }

        #welcome-status-message.zuno-status-show {
            display: block !important;
            animation: zuno-status-message-in .45s var(--zuno-motion-ease) both;
            border-radius: .9rem;
            padding: .72rem .85rem;
            background: rgba(148,163,184,.09);
        }

        /* ---------- SESSION SIGN-IN / SIGN-OUT MOMENT ---------- */
        .zuno-session-overlay {
            position: fixed;
            inset: 0;
            z-index: 120000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            background:
                radial-gradient(circle at 50% 42%, rgba(16,179,160,.15), transparent 34%),
                rgba(2,8,23,.68);
            backdrop-filter: blur(14px) saturate(120%);
            -webkit-backdrop-filter: blur(14px) saturate(120%);
            animation: zuno-auth-backdrop-in .2s ease-out both;
        }

        .zuno-session-card {
            width: min(92vw, 390px);
            padding: 2rem 1.55rem 1.55rem;
            text-align: center;
            border-radius: 28px;
            background: rgba(255,255,255,.96);
            border: 1px solid rgba(255,255,255,.68);
            box-shadow: 0 34px 90px rgba(2,8,23,.34);
            animation: zuno-session-card-in .55s var(--zuno-motion-ease) both;
        }

        .dark .zuno-session-card {
            background: rgba(13,22,33,.96);
            border-color: rgba(255,255,255,.10);
        }

        .zuno-session-orb {
            position: relative;
            width: 86px;
            height: 86px;
            margin: 0 auto 1rem;
            display: grid;
            place-items: center;
        }

        .zuno-session-orb::before,
        .zuno-session-orb::after {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: 50%;
            border: 1px solid rgba(16,179,160,.32);
            animation: zuno-session-ring 1.45s ease-out infinite;
        }

        .zuno-session-orb::after { animation-delay: .4s; }

        .zuno-session-core {
            width: 58px;
            height: 58px;
            display: grid;
            place-items: center;
            border-radius: 50%;
            color: white;
            background:
                radial-gradient(circle at 30% 25%, rgba(255,255,255,.38), transparent 28%),
                linear-gradient(145deg, #38d7c3, #0b8f80);
            box-shadow: 0 15px 36px rgba(16,179,160,.30);
            animation: zuno-session-core .62s var(--zuno-motion-spring) both;
        }

        .zuno-session-core svg { width: 29px; height: 29px; }

        .zuno-session-title {
            color: #0f172a;
            font-size: 1.42rem;
            line-height: 1.1;
            font-weight: 850;
            letter-spacing: -.025em;
        }

        .dark .zuno-session-title { color: #f8fafc; }

        .zuno-session-copy {
            margin: .55rem auto 0;
            max-width: 31ch;
            color: #64748b;
            font-size: .88rem;
            line-height: 1.55;
        }

        .dark .zuno-session-copy { color: #aebdce; }

        .zuno-session-thinking {
            display: inline-flex;
            align-items: center;
            gap: .32rem;
            margin-top: 1rem;
        }

        .zuno-session-thinking i {
            width: 5px;
            height: 5px;
            border-radius: 50%;
            background: #10b3a0;
            animation: zuno-thinking-dot 1s ease-in-out infinite;
        }

        .zuno-session-thinking i:nth-child(2) { animation-delay: .13s; }
        .zuno-session-thinking i:nth-child(3) { animation-delay: .26s; }

        /* ---------- KEYFRAMES ---------- */
        @keyframes zuno-startup-breathe {
            0%,100% { transform: scale(.92); opacity: .66; }
            50% { transform: scale(1.08); opacity: 1; }
        }

        @keyframes zuno-startup-runway {
            0% { transform: translateX(-120%); opacity: 0; }
            18% { opacity: 1; }
            78% { opacity: 1; }
            100% { transform: translateX(340%); opacity: 0; }
        }

        @keyframes zuno-startup-chip-in {
            from { opacity: 0; transform: translateY(6px) scale(.96); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        @keyframes zuno-auth-rise {
            from { opacity: 0; transform: translateY(18px) scale(.985); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        @keyframes zuno-logo-arrive {
            0% { opacity: 0; transform: scale(.72) rotate(-4deg); }
            72% { opacity: 1; transform: scale(1.045) rotate(1deg); }
            100% { opacity: 1; transform: scale(1) rotate(0); }
        }

        @keyframes zuno-copy-arrive {
            from { opacity: 0; transform: translateY(9px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes zuno-auth-backdrop-in {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes zuno-auth-sheet-in {
            0% { opacity: 0; transform: translateY(18px) scale(.94); }
            72% { opacity: 1; transform: translateY(-2px) scale(1.01); }
            100% { opacity: 1; transform: translateY(0) scale(1); }
        }

        @keyframes zuno-auth-option-in {
            from { opacity: 0; transform: translateY(7px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes zuno-workspace-enter {
            0% { opacity: 0; transform: scale(.985); filter: blur(6px); }
            55% { opacity: 1; filter: blur(0); }
            100% { opacity: 1; transform: scale(1); filter: blur(0); }
        }

        @keyframes zuno-message-card-in {
            0% { opacity: 0; transform: translateY(16px) scale(.93); }
            70% { opacity: 1; transform: translateY(-2px) scale(1.008); }
            100% { opacity: 1; transform: translateY(0) scale(1); }
        }

        @keyframes zuno-message-card-out {
            to { opacity: 0; transform: translateY(8px) scale(.97); }
        }

        @keyframes zuno-modal-out {
            to { opacity: 0; }
        }

        @keyframes zuno-status-message-in {
            from { opacity: 0; transform: translateY(-5px) scale(.98); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        @keyframes zuno-session-card-in {
            0% { opacity: 0; transform: translateY(16px) scale(.92); }
            70% { opacity: 1; transform: translateY(-2px) scale(1.01); }
            100% { opacity: 1; transform: translateY(0) scale(1); }
        }

        @keyframes zuno-session-ring {
            from { opacity: .65; transform: scale(.64); }
            to { opacity: 0; transform: scale(1.38); }
        }

        @keyframes zuno-session-core {
            from { opacity: 0; transform: scale(.45) rotate(-8deg); }
            to { opacity: 1; transform: scale(1) rotate(0); }
        }

        @keyframes zuno-thinking-dot {
            0%,100% { opacity: .24; transform: translateY(0); }
            50% { opacity: 1; transform: translateY(-4px); }
        }

        @media (prefers-reduced-motion: reduce) {
            #app-loading::before,
            .zuno-startup-pulse::after,
            .zuno-startup-signal,
            #view-login.active .auth-layout > *,
            #view-login.active .main-brand-logo,
            #view-login.active .login-title,
            #view-login.active .login-subtitle,
            #auth-method-modal:not(.hidden),
            #auth-method-modal:not(.hidden) > div,
            #auth-method-choice > button,
            #email-signin-form > *,
            #phone-signin-form > *,
            #email-signup-flow > *,
            #app-container.zuno-workspace-enter,
            #generic-modal.zuno-modal-open,
            #generic-modal.zuno-modal-open > div,
            #generic-modal.zuno-modal-closing,
            #generic-modal.zuno-modal-closing > div,
            #welcome-status-message.zuno-status-show,
            .zuno-session-overlay,
            .zuno-session-card,
            .zuno-session-orb::before,
            .zuno-session-orb::after,
            .zuno-session-core,
            .zuno-session-thinking i {
                animation: none !important;
            }
        }


        /* ============================================================
           ZUNO DOMAIN MOTION + VIEW POLISH
           One visual language, different motion signatures by activity.
           ============================================================ */

        .view.active {
            animation: zuno-view-enter 420ms cubic-bezier(.16,1,.3,1) both;
        }

        .surface-card,
        .glass-panel,
        .dash-stat-card,
        .report-card,
        .product-mgmt-card,
        .receivable-card,
        .order-card,
        .user-card {
            transition:
                transform 220ms cubic-bezier(.16,1,.3,1),
                box-shadow 220ms ease,
                border-color 220ms ease;
        }

        @media (hover:hover) and (pointer:fine) {
            .surface-card:hover,
            .dash-stat-card:hover,
            .report-card:hover,
            .product-mgmt-card:hover,
            .receivable-card:hover,
            .order-card:hover,
            .user-card:hover {
                transform: translateY(-2px);
                box-shadow: 0 16px 34px rgba(15,23,42,.08);
            }
        }

        input:not([type="checkbox"]):not([type="radio"]),
        select,
        textarea {
            transition:
                border-color 180ms ease,
                box-shadow 180ms ease,
                background-color 180ms ease;
        }

        input:not([type="checkbox"]):not([type="radio"]):focus,
        select:focus,
        textarea:focus {
            box-shadow: 0 0 0 4px rgba(16,179,160,.10);
        }

        .menu-link,
        .category-tab,
        .product-mgmt-action-btn,
        .nav-back-btn {
            transition:
                transform 180ms cubic-bezier(.16,1,.3,1),
                background-color 180ms ease,
                color 180ms ease,
                box-shadow 180ms ease;
        }

        .menu-link:active,
        .category-tab:active,
        .product-mgmt-action-btn:active,
        .nav-back-btn:active {
            transform: scale(.975);
        }

        /* Different completion signatures share the same result shell. */
        .zuno-domain-icon {
            position: relative;
        }

        .zuno-domain-icon::after {
            content: "";
            position: absolute;
            inset: -12px;
            border-radius: 999px;
            border: 1px solid color-mix(in srgb, var(--zuno-result-accent) 24%, transparent);
            opacity: 0;
        }

        .zuno-motion-customer .zuno-domain-icon {
            animation: zuno-domain-customer 720ms cubic-bezier(.2,1.4,.3,1) both;
        }

        .zuno-motion-customer .zuno-domain-icon::after {
            animation: zuno-domain-pulse 900ms 170ms ease-out both;
        }

        .zuno-motion-product .zuno-domain-icon {
            animation: zuno-domain-product 760ms cubic-bezier(.16,1,.3,1) both;
        }

        .zuno-motion-category .zuno-domain-icon svg {
            animation: zuno-domain-category 720ms cubic-bezier(.16,1,.3,1) both;
        }

        .zuno-motion-expense .zuno-domain-icon {
            animation: zuno-domain-receipt 760ms cubic-bezier(.16,1,.3,1) both;
        }

        .zuno-motion-ledger .zuno-domain-icon {
            animation: zuno-domain-ledger 780ms cubic-bezier(.2,1.3,.3,1) both;
        }

        .zuno-motion-cancel .zuno-domain-icon {
            animation: zuno-domain-cancel 650ms cubic-bezier(.16,1,.3,1) both;
        }

        .zuno-motion-admin .zuno-domain-icon {
            animation: zuno-domain-admin 760ms cubic-bezier(.16,1,.3,1) both;
        }

        .zuno-motion-spark .zuno-domain-icon {
            animation: zuno-domain-spark 740ms cubic-bezier(.2,1.35,.3,1) both;
        }

        .zuno-domain-streak {
            position: absolute;
            left: 50%;
            top: 45%;
            width: 2px;
            height: 44px;
            border-radius: 999px;
            background: linear-gradient(to bottom, transparent, var(--zuno-result-accent), transparent);
            opacity: 0;
            pointer-events: none;
        }

        .zuno-motion-product .zuno-domain-streak,
        .zuno-motion-spark .zuno-domain-streak {
            animation: zuno-domain-streak 900ms 160ms ease-out both;
        }

        @keyframes zuno-view-enter {
            from { opacity: 0; transform: translateY(7px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes zuno-domain-customer {
            0% { opacity:0; transform: scale(.55) rotate(-7deg); }
            70% { opacity:1; transform: scale(1.08) rotate(2deg); }
            100% { opacity:1; transform: scale(1) rotate(0); }
        }

        @keyframes zuno-domain-pulse {
            0% { opacity:.7; transform:scale(.6); }
            100% { opacity:0; transform:scale(1.55); }
        }

        @keyframes zuno-domain-product {
            0% { opacity:0; transform: translateY(12px) rotateX(35deg) scale(.72); }
            65% { opacity:1; transform: translateY(-2px) rotateX(-6deg) scale(1.05); }
            100% { opacity:1; transform: translateY(0) rotateX(0) scale(1); }
        }

        @keyframes zuno-domain-category {
            0% { opacity:0; transform:scale(.7) rotate(-8deg); }
            55% { opacity:1; transform:scale(1.08) rotate(3deg); }
            100% { opacity:1; transform:scale(1) rotate(0); }
        }

        @keyframes zuno-domain-receipt {
            0% { opacity:0; transform: translateY(-9px) scaleY(.72); }
            70% { opacity:1; transform: translateY(2px) scaleY(1.04); }
            100% { opacity:1; transform: translateY(0) scaleY(1); }
        }

        @keyframes zuno-domain-ledger {
            0% { opacity:0; transform: scale(.6) rotate(-12deg); }
            58% { opacity:1; transform: scale(1.08) rotate(4deg); }
            100% { opacity:1; transform: scale(1) rotate(0); }
        }

        @keyframes zuno-domain-cancel {
            0% { opacity:0; transform:scale(.5) rotate(-18deg); }
            70% { opacity:1; transform:scale(1.06) rotate(2deg); }
            100% { opacity:1; transform:scale(1) rotate(0); }
        }

        @keyframes zuno-domain-admin {
            0% { opacity:0; transform:rotate(-20deg) scale(.65); }
            68% { opacity:1; transform:rotate(5deg) scale(1.07); }
            100% { opacity:1; transform:rotate(0) scale(1); }
        }

        @keyframes zuno-domain-spark {
            0% { opacity:0; transform:scale(.4) rotate(-20deg); }
            65% { opacity:1; transform:scale(1.12) rotate(5deg); }
            100% { opacity:1; transform:scale(1) rotate(0); }
        }

        @keyframes zuno-domain-streak {
            0% { opacity:0; transform:translate(-50%,-65px) rotate(42deg) scaleY(.2); }
            35% { opacity:.8; }
            100% { opacity:0; transform:translate(45px,55px) rotate(42deg) scaleY(1); }
        }

        @media (prefers-reduced-motion: reduce) {
            .view.active,
            .zuno-motion-customer .zuno-domain-icon,
            .zuno-motion-product .zuno-domain-icon,
            .zuno-motion-category .zuno-domain-icon svg,
            .zuno-motion-expense .zuno-domain-icon,
            .zuno-motion-ledger .zuno-domain-icon,
            .zuno-motion-cancel .zuno-domain-icon,
            .zuno-motion-admin .zuno-domain-icon,
            .zuno-motion-spark .zuno-domain-icon,
            .zuno-domain-streak {
                animation: none !important;
            }
        }


        /* ============================================================
           ZUNO ADVANCED NAV + SEMANTIC ACTION BUTTONS
           ============================================================ */
        #menu-drawer {
            background:
                radial-gradient(circle at 15% 0%, rgba(16,179,160,.10), transparent 20rem),
                linear-gradient(180deg, #0b151f 0%, #071018 100%) !important;
            border-right-color: rgba(148,163,184,.10) !important;
        }

        #menu-drawer nav {
            gap: .22rem;
            padding-right: .18rem;
        }

        #menu-drawer .menu-section-title {
            margin: .72rem .45rem .24rem;
            padding: .62rem .35rem 0;
            border-top-color: rgba(148,163,184,.10);
            color: #748596;
            font-size: .61rem !important;
            font-weight: 850;
            letter-spacing: .16em;
        }

        #menu-drawer .menu-link {
            position: relative;
            min-height: 46px;
            margin: 0;
            padding: .42rem .5rem;
            border: 1px solid transparent;
            border-radius: 14px;
            color: #b8c4cf;
            background: transparent;
            overflow: hidden;
        }

        #menu-drawer .menu-link .menu-label {
            display: flex;
            align-items: center;
            gap: .68rem;
            min-width: 0;
            font-size: .91rem;
            font-weight: 720;
            letter-spacing: -.01em;
        }

        #menu-drawer .menu-link .menu-label > svg:first-child {
            width: 34px;
            height: 34px;
            flex: 0 0 34px;
            padding: 7px;
            border-radius: 10px;
            color: #93a4b5;
            background: rgba(148,163,184,.07);
            border: 1px solid rgba(148,163,184,.08);
            transition:
                transform 200ms cubic-bezier(.16,1,.3,1),
                color 180ms ease,
                background 180ms ease,
                border-color 180ms ease;
        }

        #menu-drawer .menu-link::before {
            content: "";
            position: absolute;
            left: 0;
            top: 9px;
            bottom: 9px;
            width: 3px;
            border-radius: 0 999px 999px 0;
            background: var(--accent);
            transform: scaleY(0);
            opacity: 0;
            transition: transform 200ms cubic-bezier(.16,1,.3,1), opacity 180ms ease;
        }

        #menu-drawer .menu-link:hover {
            color: #eef5f8;
            background: rgba(148,163,184,.075);
            border-color: rgba(148,163,184,.08);
        }

        #menu-drawer .menu-link:hover .menu-label > svg:first-child {
            transform: translateY(-1px);
            color: #d9f7f1;
            background: rgba(16,179,160,.10);
            border-color: rgba(16,179,160,.16);
        }

        #menu-drawer .menu-link.active {
            color: #ffffff;
            background:
                linear-gradient(90deg, rgba(16,179,160,.16), rgba(16,179,160,.055));
            border-color: rgba(45,212,191,.16);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
        }

        #menu-drawer .menu-link.active::before {
            transform: scaleY(1);
            opacity: 1;
        }

        #menu-drawer .menu-link.active .menu-label > svg:first-child {
            color: #74f0dc;
            background: rgba(16,179,160,.15);
            border-color: rgba(45,212,191,.22);
            box-shadow: 0 8px 20px rgba(16,179,160,.08);
        }

        #menu-drawer .menu-badge {
            min-width: 1.35rem;
            height: 1.35rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 999px;
            background: rgba(16,179,160,.15);
            color: #75ead9;
            border: 1px solid rgba(45,212,191,.18);
            font-size: .66rem;
            font-weight: 850;
        }

        /* Keep the icon-only desktop rail elegant after the menu upgrade. */
        body.sidebar-collapsed #menu-drawer .menu-link {
            width: 2.85rem;
            height: 2.85rem;
            min-height: 2.85rem;
            padding: 0;
            margin: 0 auto;
            border-radius: .9rem;
        }

        body.sidebar-collapsed #menu-drawer .menu-link .menu-label > svg:first-child {
            width: 2.85rem;
            height: 2.85rem;
            padding: .78rem;
            border-radius: .9rem;
        }

        body.sidebar-collapsed #menu-drawer .menu-link::before {
            top: .55rem;
            bottom: .55rem;
        }

        /* Collapsed rail: icons keep the size they have when the menu is open, and no label text leaks through. */
        body.sidebar-collapsed #menu-drawer .menu-link { width: 3rem; height: 3rem; min-height: 3rem; overflow: hidden; }
        body.sidebar-collapsed #menu-drawer .menu-link .menu-label { font-size: 0 !important; line-height: 0 !important; width: 100%; height: 100%; justify-content: center; align-items: center; overflow: hidden; }
        body.sidebar-collapsed #menu-drawer .menu-link .menu-label > :not(svg) { display: none !important; }
        body.sidebar-collapsed #menu-drawer .menu-link .menu-label > svg:first-child {
            width: 1.4rem !important; height: 1.4rem !important; min-width: 1.4rem; min-height: 1.4rem; flex: 0 0 1.4rem !important;
            padding: 0 !important; margin: 0 !important; background: transparent !important; border: 0 !important;
        }
        body.sidebar-collapsed #zn-sound-btn { width: 2.75rem; height: 2.75rem; margin: 0 auto; padding: 0; justify-content: center; overflow: hidden; }
        body.sidebar-collapsed #zn-sound-btn span { display: none !important; }
        body.sidebar-collapsed #zn-sound-btn i { font-size: 1.25rem; }

        /* Semantic action buttons: their visual role now matches their completion motion. */
        .zuno-action {
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
            gap: .5rem;
            min-height: 44px;
            border-radius: 12px !important;
            font-weight: 780 !important;
            letter-spacing: -.01em;
            transition:
                transform 180ms cubic-bezier(.16,1,.3,1),
                box-shadow 180ms ease,
                border-color 180ms ease,
                background 180ms ease,
                filter 180ms ease !important;
        }

        .zuno-action svg {
            width: 18px;
            height: 18px;
            flex: 0 0 auto;
        }

        @media (hover:hover) and (pointer:fine) {
            .zuno-action:hover {
                transform: translateY(-1px);
                box-shadow: 0 10px 25px rgba(2,8,23,.14);
            }
        }

        .zuno-action:active { transform: scale(.98); }

        .zuno-action--primary {
            background: linear-gradient(135deg, #15b9a5, #0b8175) !important;
            border-color: transparent !important;
            color: #fff !important;
        }

        .zuno-action--product {
            background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
            border-color: transparent !important;
            color: #fff !important;
        }

        .zuno-action--money-in {
            background: linear-gradient(135deg, #22a55a, #15803d) !important;
            border-color: transparent !important;
            color: #fff !important;
        }

        .zuno-action--money-out {
            background: linear-gradient(135deg, #d79a0a, #b56b04) !important;
            border-color: transparent !important;
            color: #fff !important;
        }

        .zuno-action--danger {
            background: rgba(220,38,38,.10) !important;
            border: 1px solid rgba(239,68,68,.28) !important;
            color: #ef6a6a !important;
        }

        .zuno-action--export {
            background: rgba(37,99,235,.11) !important;
            border: 1px solid rgba(96,165,250,.23) !important;
            color: #7db1ff !important;
        }

        .zuno-action--neutral {
            background: rgba(148,163,184,.09) !important;
            border: 1px solid rgba(148,163,184,.15) !important;
            color: #dce5ec !important;
        }

        .report-export-btn.zuno-action {
            padding: .58rem .82rem !important;
            font-size: .78rem !important;
        }

        @media (prefers-reduced-motion: reduce) {
            #menu-drawer .menu-link,
            #menu-drawer .menu-link::before,
            #menu-drawer .menu-link .menu-label > svg:first-child,
            .zuno-action {
                transition: none !important;
            }
        }


        /* ============================================================
           EMPTY STATES / LIST SYSTEM / DESTRUCTIVE MOTION
           ============================================================ */

        .zuno-empty-onboarding {
            width: min(100%, 430px);
            margin: clamp(1.25rem, 7vh, 3.4rem) auto;
            padding: 1.45rem;
            border-radius: 22px;
            text-align: center;
            border: 1px solid rgba(16,179,160,.18);
            background:
                radial-gradient(circle at 50% 0%, rgba(16,179,160,.11), transparent 12rem),
                rgba(255,255,255,.84);
            box-shadow: 0 18px 45px rgba(15,23,42,.07);
        }

        .dark .zuno-empty-onboarding {
            background:
                radial-gradient(circle at 50% 0%, rgba(34,199,179,.12), transparent 12rem),
                rgba(10,20,30,.88);
            border-color: rgba(45,212,191,.16);
            box-shadow: 0 20px 48px rgba(0,0,0,.24);
        }

        .zuno-empty-onboarding__icon {
            width: 62px;
            height: 62px;
            margin: 0 auto .9rem;
            border-radius: 19px;
            display: grid;
            place-items: center;
            color: #16a895;
            background: linear-gradient(145deg, rgba(16,179,160,.14), rgba(37,99,235,.08));
            border: 1px solid rgba(16,179,160,.15);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
        }

        .zuno-empty-onboarding__icon svg {
            width: 30px;
            height: 30px;
        }

        .zuno-empty-onboarding h3 {
            margin: 0;
            font-family: 'Manrope','Inter',sans-serif;
            font-size: 1.12rem;
            line-height: 1.25;
            letter-spacing: -.025em;
            color: #0f172a;
        }

        .dark .zuno-empty-onboarding h3 { color: #f8fafc; }

        .zuno-empty-onboarding p {
            max-width: 330px;
            margin: .48rem auto 1rem;
            color: #64748b;
            font-size: .88rem;
            line-height: 1.55;
        }

        .dark .zuno-empty-onboarding p { color: #9fb0bf; }

        .zuno-empty-onboarding__cta {
            min-height: 46px;
            width: 100%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: .55rem;
            padding: .72rem 1rem;
            border: 0;
            border-radius: 14px;
            font-size: .94rem;
            font-weight: 820;
            color: white;
            background: linear-gradient(135deg, #18b7a4, #0c8175);
            box-shadow: 0 12px 28px rgba(16,179,160,.19);
            transition: transform 180ms cubic-bezier(.16,1,.3,1), box-shadow 180ms ease;
        }

        .zuno-empty-onboarding__cta svg {
            width: 19px;
            height: 19px;
        }

        .zuno-empty-onboarding__cta:active { transform: scale(.98); }

        /* One consistent modern list language across operational tabs. */
        #orders-list,
        #transactions-list,
        #expenses-list,
        #customer-list,
        #category-list,
        #product-management-list,
        #receivables-list,
        #users-list {
            padding: .6rem !important;
        }

        #orders-list > .order-card,
        #transactions-list > div:not(.transaction-summary-card),
        #expenses-list > div,
        #customer-list > div,
        #category-list > div,
        #product-management-list .product-mgmt-card,
        #receivables-list .receivable-card,
        #users-list .user-card {
            border-radius: 16px !important;
            border: 1px solid rgba(148,163,184,.15) !important;
            box-shadow: 0 8px 22px rgba(15,23,42,.045) !important;
            overflow: hidden;
        }

        .dark #orders-list > .order-card,
        .dark #transactions-list > div:not(.transaction-summary-card),
        .dark #expenses-list > div,
        .dark #customer-list > div,
        .dark #category-list > div,
        .dark #product-management-list .product-mgmt-card,
        .dark #receivables-list .receivable-card,
        .dark #users-list .user-card {
            border-color: rgba(148,163,184,.11) !important;
            box-shadow: 0 10px 25px rgba(0,0,0,.13) !important;
        }

        @media (hover:hover) and (pointer:fine) {
            #orders-list > .order-card:hover,
            #transactions-list > div:not(.transaction-summary-card):hover,
            #expenses-list > div:hover,
            #customer-list > div:hover,
            #category-list > div:hover,
            #product-management-list .product-mgmt-card:hover,
            #receivables-list .receivable-card:hover,
            #users-list .user-card:hover {
                transform: translateY(-2px);
                border-color: rgba(16,179,160,.22) !important;
                box-shadow: 0 15px 34px rgba(15,23,42,.085) !important;
            }
        }

        /* Destructive actions: object pops forward, fractures, then dissolves. */
        .zuno-disintegrate-overlay {
            position: fixed;
            inset: 0;
            z-index: 10070;
            display: grid;
            place-items: center;
            padding: 1.25rem;
            background: rgba(2,8,15,.58);
            backdrop-filter: blur(11px);
            -webkit-backdrop-filter: blur(11px);
            animation: zuno-destructive-backdrop-in 180ms ease-out both;
        }

        .zuno-disintegrate-stage {
            width: min(88vw, 370px);
            min-height: 270px;
            display: grid;
            place-items: center;
            position: relative;
            perspective: 900px;
        }

        .zuno-disintegrate-object {
            width: 250px;
            height: 128px;
            position: relative;
            border-radius: 23px;
            color: #fecaca;
            background:
                radial-gradient(circle at 30% 20%, rgba(239,68,68,.19), transparent 55%),
                linear-gradient(145deg, #1b2029, #111722);
            border: 1px solid rgba(248,113,113,.25);
            box-shadow: 0 30px 70px rgba(0,0,0,.38);
            animation: zuno-object-pop 420ms cubic-bezier(.16,1,.3,1) both;
        }

        .zuno-disintegrate-core {
            position: absolute;
            inset: 0;
            display: grid;
            place-items: center;
            text-align: center;
            padding: 1rem;
            z-index: 3;
            animation: zuno-object-core-away 520ms 610ms cubic-bezier(.5,0,.8,.2) both;
        }

        .zuno-disintegrate-core svg {
            width: 36px;
            height: 36px;
            margin-bottom: .55rem;
        }

        .zuno-disintegrate-core strong {
            display: block;
            color: #fff;
            font-family: 'Manrope','Inter',sans-serif;
            font-size: 1.06rem;
            letter-spacing: -.02em;
        }

        .zuno-disintegrate-core span {
            display: block;
            margin-top: .25rem;
            color: #a9b7c4;
            font-size: .77rem;
        }

        .zuno-fragment {
            position: absolute;
            inset: 0;
            border-radius: 23px;
            background:
                radial-gradient(circle at 30% 20%, rgba(239,68,68,.18), transparent 55%),
                linear-gradient(145deg, #1b2029, #111722);
            border: 1px solid rgba(248,113,113,.16);
            opacity: 0;
            z-index: 2;
        }

        .zuno-fragment:nth-child(2) { clip-path: polygon(0 0, 42% 0, 32% 48%, 0 61%); --fx:-82px; --fy:-44px; --fr:-18deg; }
        .zuno-fragment:nth-child(3) { clip-path: polygon(42% 0, 100% 0, 100% 35%, 65% 47%, 32% 48%); --fx:74px; --fy:-65px; --fr:14deg; }
        .zuno-fragment:nth-child(4) { clip-path: polygon(0 61%, 32% 48%, 48% 100%, 0 100%); --fx:-70px; --fy:62px; --fr:17deg; }
        .zuno-fragment:nth-child(5) { clip-path: polygon(32% 48%, 65% 47%, 75% 100%, 48% 100%); --fx:5px; --fy:82px; --fr:-10deg; }
        .zuno-fragment:nth-child(6) { clip-path: polygon(65% 47%, 100% 35%, 100% 100%, 75% 100%); --fx:85px; --fy:48px; --fr:20deg; }

        .zuno-disintegrate-object.is-breaking .zuno-fragment {
            animation: zuno-fragment-break 720ms cubic-bezier(.2,.7,.2,1) both;
        }

        .zuno-disintegrate-caption {
            position: absolute;
            bottom: 0;
            width: 100%;
            text-align: center;
            opacity: 0;
            transform: translateY(8px);
            animation: zuno-delete-caption 420ms 920ms cubic-bezier(.16,1,.3,1) forwards;
        }

        .zuno-disintegrate-caption strong {
            display:block;
            color:#fff;
            font-family:'Manrope','Inter',sans-serif;
            font-size:1.22rem;
            letter-spacing:-.025em;
        }

        .zuno-disintegrate-caption span {
            display:block;
            margin-top:.28rem;
            color:#9fb0bf;
            font-size:.8rem;
        }

        @keyframes zuno-destructive-backdrop-in {
            from { opacity:0; }
            to { opacity:1; }
        }

        @keyframes zuno-object-pop {
            0% { opacity:0; transform:translateY(18px) scale(.78) rotateX(16deg); }
            68% { opacity:1; transform:translateY(-3px) scale(1.035) rotateX(-2deg); }
            100% { opacity:1; transform:translateY(0) scale(1) rotateX(0); }
        }

        @keyframes zuno-object-core-away {
            0% { opacity:1; transform:scale(1); filter:blur(0); }
            100% { opacity:0; transform:scale(.84); filter:blur(8px); }
        }

        @keyframes zuno-fragment-break {
            0% { opacity:1; transform:translate3d(0,0,0) rotate(0) scale(1); filter:blur(0); }
            55% { opacity:.9; }
            100% { opacity:0; transform:translate3d(var(--fx),var(--fy),0) rotate(var(--fr)) scale(.72); filter:blur(2px); }
        }

        @keyframes zuno-delete-caption {
            to { opacity:1; transform:translateY(0); }
        }

        @media (prefers-reduced-motion: reduce) {
            .zuno-disintegrate-overlay,
            .zuno-disintegrate-object,
            .zuno-disintegrate-core,
            .zuno-disintegrate-object.is-breaking .zuno-fragment,
            .zuno-disintegrate-caption {
                animation: none !important;
            }
        }


        /* ============================================================
           REVOLUT-INSPIRED REMOVE PATTERN
           The object itself dissolves into many small particles.
           No glass cracks, no large shards, no layout changes.
           ============================================================ */
        .zuno-remove-overlay {
            position: fixed;
            inset: 0;
            z-index: 10080;
            display: grid;
            place-items: center;
            padding: 1rem;
            overflow: hidden;
            background: rgba(2, 7, 13, .64);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            animation: zuno-remove-overlay-in 180ms ease-out both;
        }

        .zuno-remove-stage {
            position: relative;
            width: min(92vw, 390px);
            height: 330px;
            display: grid;
            place-items: center;
        }

        .zuno-remove-object {
            position: relative;
            width: 258px;
            height: 136px;
            border-radius: 25px;
            animation: zuno-remove-object-in 410ms cubic-bezier(.16,1,.3,1) both;
        }

        .zuno-remove-face {
            position: absolute;
            inset: 0;
            z-index: 2;
            display: grid;
            place-items: center;
            overflow: hidden;
            border-radius: inherit;
            color: #fff;
            text-align: center;
            background:
                radial-gradient(circle at 30% 18%, rgba(54,68,255,.28), transparent 48%),
                linear-gradient(145deg, #171b42 0%, #0d1031 56%, #070818 100%);
            border: 1px solid rgba(164,172,196,.22);
            box-shadow: 0 30px 72px rgba(0,0,0,.42);
        }

        .zuno-remove-face svg {
            width: 34px;
            height: 34px;
            margin: 0 auto .48rem;
            color: #b5bcff;
        }

        .zuno-remove-face strong {
            display: block;
            font-family: 'Manrope','Inter',sans-serif;
            font-size: 1.04rem;
            letter-spacing: -.025em;
        }

        .zuno-remove-face small {
            display: block;
            margin-top: .27rem;
            color: #a4acc4;
            font-size: .72rem;
            font-weight: 650;
        }

        .zuno-remove-particles {
            position: absolute;
            inset: 0;
            z-index: 4;
            border-radius: inherit;
            overflow: visible;
            pointer-events: none;
        }

        .zuno-remove-particle {
            position: absolute;
            left: var(--px);
            top: var(--py);
            width: var(--ps);
            height: var(--ps);
            border-radius: var(--pr);
            opacity: 0;
            background: var(--pc);
            box-shadow: 0 0 5px rgba(164,172,196,.08);
            will-change: transform, opacity, filter;
        }

        .zuno-remove-object.is-dissolving .zuno-remove-face {
            animation: zuno-remove-face-dissolve 720ms cubic-bezier(.4,0,.6,1) forwards;
        }

        .zuno-remove-object.is-dissolving .zuno-remove-particle {
            animation:
                zuno-remove-particle-away var(--pd)
                cubic-bezier(.18,.72,.2,1)
                var(--delay) forwards;
        }

        .zuno-remove-message {
            position: absolute;
            inset: 0;
            z-index: 8;
            display: grid;
            place-items: center;
            text-align: center;
            opacity: 0;
            transform: translateY(10px) scale(.98);
            pointer-events: none;
        }

        .zuno-remove-message.is-visible {
            animation: zuno-remove-message-in 420ms cubic-bezier(.16,1,.3,1) forwards;
        }

        .zuno-remove-message__icon {
            width: 58px;
            height: 58px;
            margin: 0 auto .72rem;
            border-radius: 19px;
            display: grid;
            place-items: center;
            color: #aeb6ff;
            background: rgba(18,33,227,.14);
            border: 1px solid rgba(164,172,196,.18);
        }

        .zuno-remove-message__icon svg {
            width: 27px;
            height: 27px;
        }

        .zuno-remove-message strong {
            display: block;
            color: #f7f8fb;
            font-family: 'Manrope','Inter',sans-serif;
            font-size: 1.28rem;
            letter-spacing: -.035em;
        }

        .zuno-remove-message span {
            display: block;
            width: min(82vw, 330px);
            margin: .34rem auto 0;
            color: #a4acc4;
            font-size: .82rem;
            line-height: 1.5;
        }

        @keyframes zuno-remove-overlay-in {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes zuno-remove-object-in {
            0% { opacity:0; transform:translateY(18px) scale(.84); }
            70% { opacity:1; transform:translateY(-2px) scale(1.02); }
            100% { opacity:1; transform:translateY(0) scale(1); }
        }

        @keyframes zuno-remove-face-dissolve {
            0% {
                opacity: 1;
                transform: scale(1);
                filter: blur(0);
                clip-path: inset(0 0 0 0);
            }
            35% {
                opacity: .94;
                transform: scale(.995);
                clip-path: inset(0 0 0 18%);
            }
            72% {
                opacity: .35;
                clip-path: inset(0 0 0 72%);
            }
            100% {
                opacity: 0;
                transform: scale(.97);
                filter: blur(1px);
                clip-path: inset(0 0 0 100%);
            }
        }

        @keyframes zuno-remove-particle-away {
            0% {
                opacity: 0;
                transform: translate3d(0,0,0) rotate(0deg) scale(.75);
                filter: blur(0);
            }
            12% {
                opacity: .96;
                transform: translate3d(0,0,0) rotate(0deg) scale(1);
            }
            62% { opacity: .78; }
            100% {
                opacity: 0;
                transform:
                    translate3d(var(--dx), var(--dy), 0)
                    rotate(var(--rot))
                    scale(.12);
                filter: blur(1.4px);
            }
        }

        @keyframes zuno-remove-message-in {
            to { opacity:1; transform:translateY(0) scale(1); }
        }

        @media (prefers-reduced-motion: reduce) {
            .zuno-remove-overlay,
            .zuno-remove-object,
            .zuno-remove-object.is-dissolving .zuno-remove-face,
            .zuno-remove-object.is-dissolving .zuno-remove-particle,
            .zuno-remove-message.is-visible {
                animation: none !important;
            }

            .zuno-remove-object.is-dissolving { visibility:hidden; }
            .zuno-remove-message.is-visible { opacity:1; transform:none; }
        }


        /* ============================================================
           WEB FIRST-PAINT STABILITY
           Does not alter the established sidebar/content alignment.
           ============================================================ */
        #app-loading {
            left: 0 !important;
            right: 0 !important;
            top: 0 !important;
            bottom: 0 !important;
            margin: 0 !important;
            translate: none !important;
            transform: none !important;
            box-sizing: border-box;
            background:
                radial-gradient(circle at 50% 42%, rgba(16,179,160,.10), transparent 22rem),
                #071018 !important;
        }

        #app-loading > * {
            margin-inline: auto;
        }

        /* Positive / negative semantic system.
           Green always means money/value/access added or successfully completed.
           Red always means money/value/access removed, cancelled, deleted or negative. */
        .zuno-positive {
            color: #22c55e !important;
        }

        .zuno-negative {
            color: #ef4444 !important;
        }

        .zuno-positive-bg {
            color: #dcfce7 !important;
            background: rgba(34,197,94,.13) !important;
            border-color: rgba(34,197,94,.24) !important;
        }

        .zuno-negative-bg {
            color: #fee2e2 !important;
            background: rgba(239,68,68,.12) !important;
            border-color: rgba(239,68,68,.23) !important;
        }

        .zuno-action--money-in {
            background: linear-gradient(135deg, #22c55e, #15803d) !important;
            color: #fff !important;
        }

        .zuno-action--money-out,
        .zuno-action--danger {
            background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
            border-color: transparent !important;
            color: #fff !important;
        }

        /* Destructive particle completion follows the same negative/red language. */
        .zuno-remove-face {
            background:
                radial-gradient(circle at 30% 18%, rgba(239,68,68,.25), transparent 48%),
                linear-gradient(145deg, #38171c 0%, #210d12 56%, #10070a 100%) !important;
            border-color: rgba(248,113,113,.25) !important;
        }

        .zuno-remove-face svg,
        .zuno-remove-message__icon {
            color: #f87171 !important;
        }

        .zuno-remove-message__icon {
            background: rgba(239,68,68,.12) !important;
            border-color: rgba(248,113,113,.22) !important;
        }


        /* Loader readability + stable first workspace frame. */
        #app-loading { color:#f8fafc !important; }
        #app-loading #loading-screen-text {
            color:#edf6fb !important; opacity:1 !important;
            text-shadow:0 1px 12px rgba(0,0,0,.48);
        }
        #app-loading .zuno-startup-pulse {
            opacity:1 !important;
            background:linear-gradient(90deg,rgba(45,212,191,.10),#2dd4bf,#60a5fa,rgba(45,212,191,.10)) !important;
        }
        #app-loading .zuno-startup-signal {
            color:#d7e3eb !important;
            background:rgba(15,29,40,.96) !important;
            border-color:rgba(94,234,212,.22) !important;
            opacity:1 !important;
        }
        #app-loading .zuno-startup-dot {
            background:#2dd4bf !important;
            box-shadow:0 0 0 3px rgba(45,212,191,.12);
        }

        /* Startup screen follows the chosen theme: dark when dark mode is on, light otherwise. */
        html:not(.dark) #app-loading,
        html:not(.dark) #app-loading::before {
            background:
                radial-gradient(circle at 50% 42%, rgba(16,179,160,.10), transparent 22rem),
                #f6f9fb !important;
        }
        html:not(.dark) #app-loading::before { background: radial-gradient(circle, rgba(16,179,160,.14), rgba(16,179,160,.03) 48%, transparent 70%) !important; }
        html:not(.dark) #app-loading { color:#0f2233 !important; }
        html:not(.dark) #app-loading #loading-screen-text { color:#334a5c !important; text-shadow:none; }
        html:not(.dark) #app-loading .zuno-startup-pulse { background:linear-gradient(90deg,rgba(16,179,160,.12),#10b3a0,#3b82f6,rgba(16,179,160,.12)) !important; }
        html:not(.dark) #app-loading .zuno-startup-signal { color:#475b6c !important; background:rgba(255,255,255,.9) !important; border-color:rgba(16,179,160,.28) !important; }
        html:not(.dark) #app-loading .zuno-startup-dot { background:#10b3a0 !important; box-shadow:0 0 0 3px rgba(16,179,160,.14); }

        /* Fade the workspace in without translating the entire sidebar/content shell. */
        #app-container.zuno-workspace-enter {
            animation:zuno-workspace-stable-enter 420ms ease-out both !important;
        }
        @keyframes zuno-workspace-stable-enter {
            from { opacity:0; }
            to { opacity:1; }
        }


        /* ============================================================
           ORDER / ACTION UX CONSISTENCY, UI ONLY
           ============================================================ */

        /* Saved/Held orders use the same amber/yellow language in both themes. */
        .zuno-order-status--held,
        .zuno-order-status--pending {
            color: #b45309 !important;
        }
        .dark .zuno-order-status--held,
        .dark .zuno-order-status--pending {
            color: #fbbf24 !important;
        }

        /* Save Order is an amber/yellow action in light and dark mode. */
        #save-order-btn {
            min-height: 48px !important;
            padding: .72rem 1.15rem !important;
            border-radius: 14px !important;
            border: 1px solid #f59e0b !important;
            background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
            color: #451a03 !important;
            font-size: .95rem !important;
            font-weight: 800 !important;
            box-shadow: 0 9px 22px rgba(245,158,11,.16);
        }

        .dark #save-order-btn {
            border-color: #fbbf24 !important;
            background: linear-gradient(135deg, #fbbf24, #d97706) !important;
            color: #1f1300 !important;
        }

        #save-order-btn:disabled {
            opacity: .48 !important;
            filter: saturate(.72);
            cursor: not-allowed;
            box-shadow: none;
        }

        #pay-later-btn {
            min-height: 48px !important;
            padding: .72rem 1.15rem !important;
            border-radius: 14px !important;
            font-size: .95rem !important;
            font-weight: 800 !important;
        }

        /* Payment screen action row: balanced size and spacing. */
        #view-payment .zuno-payment-top-actions {
            width: min(100%, 390px);
            display: grid !important;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: .75rem !important;
            margin-bottom: 1.65rem !important;
        }

        @media (max-width: 420px) {
            #view-payment .zuno-payment-top-actions {
                grid-template-columns: 1fr;
            }
        }

        /* Order list is a compact action bar rather than three oversized flat blocks. */
        .zuno-order-actions {
            display: grid !important;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: .55rem !important;
            margin-top: .8rem !important;
        }

        .zuno-order-action {
            min-height: 44px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: .42rem;
            padding: .62rem .72rem;
            border-radius: 12px;
            border: 1px solid transparent;
            font-size: .84rem;
            font-weight: 780;
            line-height: 1;
            white-space: nowrap;
            transition:
                transform 160ms cubic-bezier(.16,1,.3,1),
                background 160ms ease,
                border-color 160ms ease,
                box-shadow 160ms ease;
        }

        .zuno-order-action svg {
            width: 17px;
            height: 17px;
            flex: 0 0 auto;
        }

        .zuno-order-action--view {
            color: #334155;
            background: #f8fafc;
            border-color: #dbe3eb;
        }

        .dark .zuno-order-action--view {
            color: #d8e2ea;
            background: #14212d;
            border-color: rgba(148,163,184,.16);
        }

        .zuno-order-action--cancel {
            color: #fff;
            background: #ef4444;
            border-color: #ef4444;
        }

        .zuno-order-action--pay {
            color: #fff;
            background: #22c55e;
            border-color: #22c55e;
        }

        @media (hover:hover) and (pointer:fine) {
            .zuno-order-action:hover {
                transform: translateY(-1px);
                box-shadow: 0 8px 18px rgba(15,23,42,.08);
            }
        }

        .zuno-order-action:active { transform: scale(.98); }

        @media (max-width: 520px) {
            .zuno-order-actions {
                grid-template-columns: 1fr;
            }
        }

        /* Keep order status and amount on a clean common right edge. */
        .zuno-order-card-right {
            min-width: 9rem;
            display: grid !important;
            grid-template-columns: minmax(0,1fr) auto;
            align-items: baseline !important;
            justify-items: end;
            column-gap: .65rem !important;
        }

        .zuno-order-amount {
            min-width: 6.4rem;
            text-align: right;
            font-variant-numeric: tabular-nums;
            font-feature-settings: "tnum" 1;
            letter-spacing: -.015em;
        }

        /* Invoice/order document: every monetary amount uses the same right column. */
        .invoice-doc-table {
            table-layout: fixed;
        }

        .invoice-doc-table th:last-child,
        .invoice-doc-table td:last-child {
            text-align: right !important;
            padding-left: 1rem;
            font-variant-numeric: tabular-nums;
            font-feature-settings: "tnum" 1;
        }

        /* The simple 2-column layout (Item / Amount, used when there's no room — or no need
           — for the full spreadsheet-style columns) still reserves a fixed right column. The
           6-column layout below sizes its own columns explicitly instead. */
        .invoice-doc-table--simple th:last-child,
        .invoice-doc-table--simple td:last-child {
            width: 9.5rem;
        }

        .invoice-doc-table--full th.invoice-doc-col-index,
        .invoice-doc-table--full td.invoice-doc-col-index { width: 2.4rem; }
        .invoice-doc-table--full th.invoice-doc-col-qty,
        .invoice-doc-table--full td.invoice-doc-col-qty { width: 3rem; text-align: right !important; }
        .invoice-doc-table--full th.invoice-doc-col-unit,
        .invoice-doc-table--full td.invoice-doc-col-unit { width: 6.5rem; text-align: right !important; }
        .invoice-doc-table--full th.invoice-doc-col-discount,
        .invoice-doc-table--full td.invoice-doc-col-discount { width: 6.5rem; text-align: right !important; }
        .invoice-doc-table--full th.invoice-doc-col-amount,
        .invoice-doc-table--full td.invoice-doc-col-amount { width: 7.5rem; }

        .invoice-doc-totals-row {
            display: grid !important;
            grid-template-columns: minmax(0, 1fr) 9.5rem;
            column-gap: 1rem;
            align-items: baseline;
        }

        .invoice-doc-totals-row > span:first-child {
            overflow-wrap: anywhere;
        }

        .invoice-doc-totals-row > span:last-child {
            text-align: right;
            font-variant-numeric: tabular-nums;
            font-feature-settings: "tnum" 1;
            white-space: nowrap;
        }

        .invoice-grand-total-banner {
            display: grid !important;
            grid-template-columns: minmax(0,1fr) 9.5rem;
            column-gap: 1rem;
        }

        .invoice-grand-total-amount {
            text-align: right;
            white-space: nowrap;
            font-variant-numeric: tabular-nums;
            font-feature-settings: "tnum" 1;
        }

        /* Reusable management actions: theme-aware, UI/UX-sized controls. */
        /* A button the page hides with the 'hidden' class must stay hidden (the action styles below set display:flex and used to win). */
        .zuno-action.hidden, .zuno-compact-action.hidden { display: none !important; }
        .zuno-compact-action {
            min-height: 42px !important;
            min-width: 76px;
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
            gap: .4rem;
            padding: .58rem .82rem !important;
            border-radius: 11px !important;
            border: 1px solid transparent !important;
            font-size: .8rem !important;
            font-weight: 760 !important;
            line-height: 1 !important;
            text-decoration: none !important;
            transition:
                transform 160ms cubic-bezier(.16,1,.3,1),
                background 160ms ease,
                color 160ms ease,
                border-color 160ms ease !important;
        }

        .zuno-compact-action--edit,
        .zuno-compact-action--switch {
            color: #0f766e !important;
            background: rgba(20,184,166,.10) !important;
            border-color: rgba(20,184,166,.18) !important;
        }

        .dark .zuno-compact-action--edit,
        .dark .zuno-compact-action--switch {
            color: #5eead4 !important;
            background: rgba(20,184,166,.13) !important;
            border-color: rgba(45,212,191,.18) !important;
        }

        .zuno-compact-action--remove,
        .zuno-compact-action--delete {
            color: #b91c1c !important;
            background: rgba(239,68,68,.09) !important;
            border-color: rgba(239,68,68,.16) !important;
        }

        .dark .zuno-compact-action--remove,
        .dark .zuno-compact-action--delete {
            color: #fca5a5 !important;
            background: rgba(239,68,68,.12) !important;
            border-color: rgba(248,113,113,.17) !important;
        }

        .zuno-compact-action--warn {
            color: #92400e !important;
            background: rgba(245,158,11,.11) !important;
            border-color: rgba(245,158,11,.18) !important;
        }

        .dark .zuno-compact-action--warn {
            color: #fcd34d !important;
            background: rgba(245,158,11,.13) !important;
            border-color: rgba(251,191,36,.18) !important;
        }

        .zuno-compact-action:active { transform: scale(.98); }

        /* Product/user actions inherit the same sizing while retaining their semantics. */
        .product-mgmt-action-btn,
        .user-action-btn {
            min-height: 42px !important;
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
            padding: .58rem .82rem !important;
            border-radius: 11px !important;
            font-size: .8rem !important;
            font-weight: 760 !important;
        }

        .user-account-panel-item {
            min-height: 44px;
            border-radius: 11px !important;
        }



        /* ============================================================
           FINTECH PAYMENT / RECEIVABLES / EXPENSES / ANALYTICS UX
           Visual and presentation layer only; existing data actions preserved.
           ============================================================ */

        /* Payment methods: instantly distinguishable actions. */
        #view-payment .payment-method-btn {
            min-height: 78px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: .75rem;
            border: 1px solid transparent;
            border-radius: 16px !important;
            font-size: .96rem;
            font-weight: 800;
            box-shadow: 0 8px 22px rgba(15,23,42,.05);
        }

        #view-payment .payment-method-btn svg {
            width: 24px;
            height: 24px;
            flex: 0 0 auto;
        }

        #view-payment .payment-method-btn[data-method="Cash"] {
            color: #166534 !important;
            background: linear-gradient(145deg, #f0fdf4, #dcfce7) !important;
            border-color: rgba(34,197,94,.22) !important;
        }

        .dark #view-payment .payment-method-btn[data-method="Cash"] {
            color: #86efac !important;
            background: linear-gradient(145deg, rgba(22,101,52,.32), rgba(20,83,45,.18)) !important;
            border-color: rgba(74,222,128,.18) !important;
        }

        #view-payment .payment-method-btn[data-method="Card"] {
            color: #1d4ed8 !important;
            background: linear-gradient(145deg, #eff6ff, #dbeafe) !important;
            border-color: rgba(59,130,246,.22) !important;
        }

        .dark #view-payment .payment-method-btn[data-method="Card"] {
            color: #93c5fd !important;
            background: linear-gradient(145deg, rgba(30,64,175,.28), rgba(30,58,138,.16)) !important;
            border-color: rgba(96,165,250,.18) !important;
        }

        /* Receivables search + red outstanding language. */
        .receivable-search-shell {
            position: relative;
            padding: .7rem .75rem;
            background: rgba(255,255,255,.84);
            border-bottom: 1px solid rgba(148,163,184,.14);
        }

        .dark .receivable-search-shell {
            background: rgba(8,17,26,.86);
            border-color: rgba(148,163,184,.10);
        }

        .receivable-search-shell svg {
            position: absolute;
            left: 1.05rem;
            top: 50%;
            width: 18px;
            height: 18px;
            transform: translateY(-50%);
            color: #94a3b8;
            pointer-events: none;
        }

        #receivable-search-input {
            width: 100%;
            min-height: 44px;
            padding: .7rem .8rem .7rem 2.45rem;
            border-radius: 13px;
            border: 1px solid #dbe3eb;
            background: #fff;
            font-size: .9rem;
            outline: none;
        }

        .dark #receivable-search-input {
            color: #f8fafc;
            background: #0d1924;
            border-color: rgba(148,163,184,.16);
        }

        #receivable-search-input:focus {
            border-color: rgba(45,212,191,.60);
            box-shadow: 0 0 0 4px rgba(45,212,191,.09);
        }

        #receivables-list .receivable-card {
            padding: .9rem;
            border-radius: 16px;
            border: 1px solid #e6ebf0;
            box-shadow: 0 5px 18px rgba(15,23,42,.045);
        }

        .dark #receivables-list .receivable-card {
            background: #0e1924;
            border-color: rgba(148,163,184,.10);
        }

        #receivables-list .receivable-avatar {
            border-radius: 13px;
            background: linear-gradient(145deg, #17202b, #263445);
            color: #f8fafc;
            box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
        }

        #receivables-list .receivable-balance--owed {
            color: #dc2626 !important;
        }

        .dark #receivables-list .receivable-balance--owed {
            color: #f87171 !important;
        }

        #receivables-list .receivable-badge--owed {
            background: rgba(239,68,68,.10) !important;
            color: #b91c1c !important;
            border: 1px solid rgba(239,68,68,.14);
        }

        .dark #receivables-list .receivable-badge--owed {
            background: rgba(239,68,68,.12) !important;
            color: #fca5a5 !important;
        }

        #receivables-list .receivable-total-card {
            background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
            box-shadow: 0 12px 28px rgba(185,28,28,.18) !important;
        }

        /* View Account: compact banking-ledger presentation. */
        #view-customer-account {
            background: #f5f7fa !important;
        }

        .dark #view-customer-account {
            background: #071018 !important;
        }

        #customer-account-summary {
            padding: .75rem !important;
            background: transparent !important;
        }

        .customer-account-hero {
            position: relative;
            overflow: hidden;
            display: grid;
            grid-template-columns: minmax(0,1fr) auto;
            gap: 1rem;
            align-items: center;
            padding: 1.1rem 1.15rem;
            border-radius: 18px;
            background: #fff;
            border: 1px solid #e5eaf0;
            box-shadow: 0 8px 28px rgba(15,23,42,.055);
        }

        .dark .customer-account-hero {
            background: linear-gradient(145deg, #0e1a25, #0a141d);
            border-color: rgba(148,163,184,.11);
            box-shadow: 0 12px 30px rgba(0,0,0,.16);
        }

        .customer-account-hero::after {
            content:"";
            position:absolute;
            width:150px;
            height:150px;
            right:-65px;
            top:-70px;
            border-radius:999px;
            background:rgba(239,68,68,.08);
            pointer-events:none;
        }

        .customer-account-kicker {
            margin: 0 0 .26rem;
            color: #64748b;
            font-size: .68rem;
            font-weight: 800;
            letter-spacing: .08em;
            text-transform: uppercase;
        }

        .customer-account-balance {
            font-family: 'Manrope','Inter',sans-serif;
            font-size: clamp(1.65rem,5vw,2.15rem);
            line-height: 1.05;
            font-weight: 850;
            letter-spacing: -.04em;
            font-variant-numeric: tabular-nums;
        }

        .customer-account-balance--owed { color:#dc2626; }
        .dark .customer-account-balance--owed { color:#f87171; }
        .customer-account-balance--credit { color:#16a34a; }
        .dark .customer-account-balance--credit { color:#4ade80; }

        .customer-account-state {
            display: inline-flex;
            align-items: center;
            gap: .36rem;
            margin-top: .4rem;
            color: #64748b;
            font-size: .76rem;
            font-weight: 700;
        }

        .customer-account-state i {
            width: 7px;
            height: 7px;
            border-radius: 999px;
            background: currentColor;
        }

        #customer-account-history {
            padding: .25rem .75rem .9rem !important;
        }

        #customer-account-history::before {
            content:"Activity";
            display:block;
            margin:.45rem .15rem .55rem;
            color:#94a3b8;
            font-size:.68rem;
            font-weight:850;
            letter-spacing:.08em;
            text-transform:uppercase;
        }

        #customer-account-history .ledger-row {
            padding: .8rem .9rem;
            margin-bottom: .5rem;
            border-radius: 14px;
            background: #fff;
            border: 1px solid #e7ebf0;
            box-shadow: 0 3px 12px rgba(15,23,42,.035);
        }

        .dark #customer-account-history .ledger-row {
            background:#0d1924;
            border-color:rgba(148,163,184,.10);
        }

        #customer-account-history .ledger-row-amount {
            font-variant-numeric: tabular-nums;
            font-weight: 820;
        }

        #view-customer-account footer {
            gap: .65rem !important;
            padding: .75rem !important;
            background: rgba(255,255,255,.94) !important;
            border-top-color: #e5eaf0 !important;
            backdrop-filter: blur(12px);
        }

        .dark #view-customer-account footer {
            background: rgba(8,17,26,.94) !important;
            border-top-color: rgba(148,163,184,.10) !important;
        }

        #add-credit-btn,
        #add-debit-btn {
            min-height: 48px !important;
            border-radius: 14px !important;
            font-size: .9rem !important;
            font-weight: 800 !important;
        }

        /* Expenses: modern command button + focused editor sheet. */
        #toggle-expense-form-btn {
            min-height: 48px;
            justify-content: space-between !important;
            padding: .72rem .85rem !important;
            border-radius: 15px !important;
            background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
            box-shadow: 0 10px 24px rgba(185,28,28,.16);
        }

        #toggle-expense-form-btn .expense-new-copy {
            display:flex;
            flex-direction:column;
            align-items:flex-start;
            line-height:1.15;
        }

        #toggle-expense-form-btn .expense-new-copy strong {
            font-size:.9rem;
        }

        #toggle-expense-form-btn .expense-new-copy small {
            margin-top:.2rem;
            color:rgba(255,255,255,.76);
            font-size:.67rem;
            font-weight:650;
        }

        #toggle-expense-form-btn .expense-new-plus {
            width:32px;
            height:32px;
            display:grid;
            place-items:center;
            border-radius:10px;
            background:rgba(255,255,255,.14);
            border:1px solid rgba(255,255,255,.16);
        }

        #expense-panel-overlay {
            background: rgba(2,8,15,.64) !important;
            backdrop-filter: blur(14px) !important;
        }

        #add-expense-panel {
            overflow:hidden;
            padding:0 !important;
            border-radius: 22px !important;
            border: 1px solid rgba(148,163,184,.17) !important;
            box-shadow: 0 30px 90px rgba(2,8,23,.28) !important;
        }

        .expense-editor-head {
            position:relative;
            display:flex;
            align-items:center;
            justify-content:space-between;
            padding:1rem 1.1rem;
            background:
                radial-gradient(circle at 0 0, rgba(239,68,68,.10), transparent 12rem),
                #fff;
            border-bottom:1px solid #e7ebf0;
        }

        .dark .expense-editor-head {
            background:
                radial-gradient(circle at 0 0, rgba(239,68,68,.12), transparent 12rem),
                #0d1924;
            border-color:rgba(148,163,184,.10);
        }

        .expense-editor-icon {
            width:44px;
            height:44px;
            display:grid;
            place-items:center;
            border-radius:14px;
            color:#dc2626;
            background:rgba(239,68,68,.09);
            border:1px solid rgba(239,68,68,.13);
        }

        .dark .expense-editor-icon { color:#f87171; }

        .expense-editor-icon svg { width:22px; height:22px; }

        #add-expense-form {
            padding:1rem 1.1rem 1.1rem;
            background:#fff !important;
        }

        .dark #add-expense-form { background:#0a141d !important; }

        #add-expense-form label {
            color:#64748b;
            font-size:.72rem !important;
            font-weight:760 !important;
        }

        .dark #add-expense-form label { color:#9fb0bf; }

        #add-expense-form input,
        #add-expense-form select,
        #add-expense-form textarea {
            min-height:46px;
            border-radius:12px !important;
            background:#f8fafc !important;
            border-color:#dfe6ed !important;
        }

        .dark #add-expense-form input,
        .dark #add-expense-form select,
        .dark #add-expense-form textarea {
            color:#f8fafc;
            background:#0f1d29 !important;
            border-color:rgba(148,163,184,.14) !important;
        }

        #add-expense-form button[type="submit"] {
            min-height:48px;
            border-radius:14px !important;
            background:linear-gradient(135deg,#ef4444,#b91c1c) !important;
            font-size:.9rem !important;
        }

        /* Analytics: mobile-first finance dashboard, P&L and visual/table modes. */
        #analytics-content {
            padding: .8rem !important;
            gap: .85rem !important;
        }

        .analytics-view-toggle {
            display:inline-flex;
            gap:.25rem;
            padding:.25rem;
            border-radius:12px;
            background:#e9eef3;
        }

        .dark .analytics-view-toggle { background:#111e29; }

        .analytics-view-toggle button {
            min-height:36px;
            padding:.5rem .8rem;
            border-radius:9px;
            color:#64748b;
            font-size:.75rem;
            font-weight:800;
        }

        .analytics-view-toggle button.is-active {
            color:#0f172a;
            background:#fff;
            box-shadow:0 2px 8px rgba(15,23,42,.08);
        }

        .dark .analytics-view-toggle button.is-active {
            color:#f8fafc;
            background:#1a2936;
        }

        .analytics-kpi-grid {
            display:grid;
            grid-template-columns:repeat(4,minmax(0,1fr));
            gap:.65rem;
        }

        #analytics-content .dash-stat-card {
            min-height:0 !important;
            padding:.72rem !important;
            gap:.55rem !important;
            border:1px solid #e7ebf0;
            border-radius:14px !important;
            box-shadow:0 4px 16px rgba(15,23,42,.035) !important;
        }

        .dark #analytics-content .dash-stat-card {
            border-color:rgba(148,163,184,.09);
            background:#0d1924;
        }

        #analytics-content .dash-stat-icon {
            width:2rem !important;
            height:2rem !important;
            border-radius:10px !important;
        }

        #analytics-content .dash-stat-value {
            font-size:1.13rem !important;
            line-height:1.15 !important;
            letter-spacing:-.025em;
        }

        #analytics-content .dash-stat-label { font-size:.66rem !important; }
        #analytics-content .dash-stat-sub {
            font-size:.62rem !important;
            line-height:1.3;
        }

        @media (max-width: 640px) {
            .analytics-kpi-grid {
                grid-template-columns:repeat(2,minmax(0,1fr));
                gap:.5rem;
            }

            #analytics-content .dash-stat-card {
                padding:.58rem !important;
                gap:.45rem !important;
            }

            #analytics-content .dash-stat-icon {
                width:1.8rem !important;
                height:1.8rem !important;
            }

            #analytics-content .dash-stat-icon svg {
                width:15px !important;
                height:15px !important;
            }

            #analytics-content .dash-stat-value { font-size:.98rem !important; }
            #analytics-content .dash-stat-sub { display:none; }
        }

        .analytics-panel {
            background:#fff;
            border:1px solid #e7ebf0;
            border-radius:16px;
            padding:.9rem;
            box-shadow:0 5px 18px rgba(15,23,42,.035);
        }

        .dark .analytics-panel {
            background:#0d1924;
            border-color:rgba(148,163,184,.09);
        }

        .analytics-panel-head {
            display:flex;
            align-items:flex-start;
            justify-content:space-between;
            gap:.75rem;
            margin-bottom:.7rem;
        }

        .analytics-panel-title {
            font-size:.9rem;
            font-weight:820;
            letter-spacing:-.018em;
        }

        .analytics-panel-note {
            color:#94a3b8;
            font-size:.67rem;
            margin-top:.12rem;
        }

        .analytics-chart-sm { height:210px; position:relative; }
        .analytics-chart-md { height:235px; position:relative; }

        @media (max-width:640px) {
            .analytics-chart-sm { height:180px; }
            .analytics-chart-md { height:200px; }
        }

        .analytics-pl {
            overflow:hidden;
            padding:0;
        }

        .analytics-pl-head {
            display:flex;
            align-items:center;
            justify-content:space-between;
            gap:1rem;
            padding:.9rem 1rem;
            border-bottom:1px solid #e7ebf0;
        }

        .dark .analytics-pl-head { border-color:rgba(148,163,184,.09); }

        .analytics-pl-row {
            display:grid;
            grid-template-columns:minmax(0,1fr) auto;
            gap:1rem;
            align-items:center;
            padding:.64rem 1rem;
            font-size:.8rem;
            border-bottom:1px solid #f0f3f6;
        }

        .dark .analytics-pl-row { border-color:rgba(148,163,184,.065); }

        .analytics-pl-row strong {
            text-align:right;
            font-variant-numeric:tabular-nums;
        }

        .analytics-pl-row--subtotal {
            font-weight:780;
            background:#f8fafc;
        }

        .dark .analytics-pl-row--subtotal { background:#101d28; }

        .analytics-pl-row--result {
            padding:.8rem 1rem;
            font-size:.9rem;
            font-weight:850;
            border-bottom:0;
        }

        .analytics-pl-positive { color:#16a34a; }
        .analytics-pl-negative { color:#dc2626; }

        .analytics-data-table {
            width:100%;
            border-collapse:collapse;
            font-size:.76rem;
        }

        .analytics-data-table th,
        .analytics-data-table td {
            padding:.62rem .72rem;
            border-bottom:1px solid #edf1f4;
            text-align:left;
        }

        .dark .analytics-data-table th,
        .dark .analytics-data-table td {
            border-color:rgba(148,163,184,.07);
        }

        .analytics-data-table th {
            color:#94a3b8;
            font-size:.65rem;
            letter-spacing:.06em;
            text-transform:uppercase;
        }

        .analytics-data-table td:last-child,
        .analytics-data-table th:last-child {
            text-align:right;
            font-variant-numeric:tabular-nums;
        }

        .analytics-table-wrap { overflow-x:auto; }



        /* ============================================================
           STANDARD ZUNO MODAL SYSTEM
           One consistent confirmation/alert pattern across the app.
           ============================================================ */
        #generic-modal {
            padding: 1rem;
            background: rgba(2,8,15,.62) !important;
            backdrop-filter: blur(13px) saturate(108%);
            -webkit-backdrop-filter: blur(13px) saturate(108%);
        }

        #generic-modal > div {
            position: relative;
            width: min(100%, 390px) !important;
            max-width: 390px !important;
            margin: 0 !important;
            padding: 1.15rem !important;
            overflow: hidden;
            border-radius: 22px !important;
            background: rgba(255,255,255,.985) !important;
            border: 1px solid rgba(148,163,184,.17) !important;
            box-shadow: 0 30px 90px rgba(2,8,23,.30) !important;
        }

        .dark #generic-modal > div {
            background: rgba(12,22,32,.985) !important;
            border-color: rgba(148,163,184,.11) !important;
        }

        #generic-modal > div::before {
            content:"";
            position:absolute;
            left:0;
            right:0;
            top:0;
            height:3px;
            background: var(--zuno-modal-accent, var(--accent));
        }

        #generic-modal[data-modal-tone="danger"] > div {
            --zuno-modal-accent:#ef4444;
        }
        #generic-modal[data-modal-tone="warning"] > div {
            --zuno-modal-accent:#f59e0b;
        }
        #generic-modal[data-modal-tone="success"] > div {
            --zuno-modal-accent:#22c55e;
        }
        #generic-modal[data-modal-tone="info"] > div {
            --zuno-modal-accent:#3b82f6;
        }
        #generic-modal[data-modal-tone="primary"] > div {
            --zuno-modal-accent:var(--accent);
        }

        .zuno-modal-heading {
            display:flex;
            align-items:flex-start;
            gap:.8rem;
            margin-bottom:.75rem;
        }

        .zuno-modal-symbol {
            width:44px;
            height:44px;
            flex:0 0 44px;
            display:grid;
            place-items:center;
            border-radius:14px;
            color:var(--zuno-modal-accent, var(--accent));
            background:color-mix(in srgb, var(--zuno-modal-accent, var(--accent)) 11%, transparent);
            border:1px solid color-mix(in srgb, var(--zuno-modal-accent, var(--accent)) 17%, transparent);
        }

        .zuno-modal-symbol svg {
            width:22px;
            height:22px;
        }

        #generic-modal-title {
            margin: .04rem 0 0 !important;
            color:#101827;
            font-family:'Manrope','Inter',sans-serif;
            font-size:1.08rem !important;
            line-height:1.25;
            font-weight:820 !important;
            letter-spacing:-.025em;
        }

        .dark #generic-modal-title { color:#f8fafc; }

        #generic-modal-message {
            margin: .35rem 0 0 !important;
            color:#526273;
            font-size:.88rem;
            line-height:1.55;
        }

        .dark #generic-modal-message { color:#aebdca; }

        #generic-modal-buttons {
            display:grid !important;
            grid-template-columns:repeat(var(--zuno-modal-button-count, 1), minmax(0,1fr));
            gap:.55rem !important;
            margin-top:1rem;
        }

        #generic-modal-buttons .zuno-modal-btn {
            min-height:46px;
            width:100%;
            display:inline-flex;
            align-items:center;
            justify-content:center;
            gap:.42rem;
            padding:.68rem .8rem !important;
            border-radius:13px !important;
            border:1px solid transparent !important;
            font-size:.86rem !important;
            line-height:1.15;
            font-weight:790 !important;
            box-shadow:none !important;
            transition:
                transform 160ms cubic-bezier(.16,1,.3,1),
                background 160ms ease,
                border-color 160ms ease,
                box-shadow 160ms ease !important;
        }

        #generic-modal-buttons .zuno-modal-btn--neutral {
            color:#334155 !important;
            background:#eef2f6 !important;
            border-color:#e1e7ed !important;
        }

        .dark #generic-modal-buttons .zuno-modal-btn--neutral {
            color:#d5e0e8 !important;
            background:#172531 !important;
            border-color:rgba(148,163,184,.12) !important;
        }

        #generic-modal-buttons .zuno-modal-btn--primary {
            color:#fff !important;
            background:linear-gradient(135deg,var(--accent),var(--accent-2)) !important;
        }

        #generic-modal-buttons .zuno-modal-btn--success {
            color:#fff !important;
            background:linear-gradient(135deg,#22c55e,#15803d) !important;
        }

        #generic-modal-buttons .zuno-modal-btn--danger {
            color:#fff !important;
            background:linear-gradient(135deg,#ef4444,#b91c1c) !important;
        }

        #generic-modal-buttons .zuno-modal-btn--warning {
            color:#451a03 !important;
            background:linear-gradient(135deg,#fbbf24,#f59e0b) !important;
        }

        #generic-modal-buttons .zuno-modal-btn--info {
            color:#fff !important;
            background:linear-gradient(135deg,#3b82f6,#1d4ed8) !important;
        }

        @media (hover:hover) and (pointer:fine) {
            #generic-modal-buttons .zuno-modal-btn:hover {
                transform:translateY(-1px);
                box-shadow:0 8px 18px rgba(15,23,42,.09) !important;
            }
        }

        #generic-modal-buttons .zuno-modal-btn:active {
            transform:scale(.985);
        }

        @media (max-width:420px) {
            #generic-modal {
                align-items:flex-end !important;
                padding:0 !important;
            }

            #generic-modal > div {
                width:100% !important;
                max-width:100% !important;
                border-radius:22px 22px 0 0 !important;
                padding:1rem 1rem max(1rem, env(safe-area-inset-bottom)) !important;
            }

            #generic-modal-buttons {
                grid-template-columns:1fr !important;
            }
        }

        /* Analytics KPI expansion for Tax Collected. */
        .analytics-kpi-grid {
            grid-template-columns:repeat(5,minmax(0,1fr)) !important;
        }

        @media (max-width:860px) {
            .analytics-kpi-grid {
                grid-template-columns:repeat(3,minmax(0,1fr)) !important;
            }
        }

        @media (max-width:640px) {
            .analytics-kpi-grid {
                grid-template-columns:repeat(2,minmax(0,1fr)) !important;
            }

            .analytics-kpi-grid > .dash-stat-card:last-child:nth-child(odd) {
                grid-column:1 / -1;
            }
        }



        /* ============================================================
           PRODUCT / CATEGORY VIEW MODE + ANALYTICS PERIOD + CHECKOUT GLOSS
           Presentation only; existing CRUD/payment logic is preserved.
           ============================================================ */

        .catalog-view-toggle {
            display:inline-flex;
            align-items:center;
            gap:.2rem;
            padding:.2rem;
            border-radius:11px;
            background:#eef2f6;
            border:1px solid #e2e8f0;
        }

        .dark .catalog-view-toggle {
            background:#12202b;
            border-color:rgba(148,163,184,.12);
        }

        .catalog-view-toggle button {
            width:36px;
            height:36px;
            display:grid;
            place-items:center;
            border-radius:9px;
            color:#64748b;
            transition:background 150ms ease,color 150ms ease,transform 150ms ease;
        }

        .catalog-view-toggle button.is-active {
            color:#0f766e;
            background:#fff;
            box-shadow:0 2px 8px rgba(15,23,42,.07);
        }

        .dark .catalog-view-toggle button.is-active {
            color:#5eead4;
            background:#1b2b37;
        }

        .catalog-view-toggle svg { width:18px;height:18px; }
        .catalog-view-toggle button:active { transform:scale(.96); }

        .product-management-grid {
            display:grid;
            grid-template-columns:repeat(auto-fit,minmax(min(100%, 190px),1fr));
            gap:.7rem;
            align-items:start;
        }

        .product-management-grid .product-mgmt-card {
            margin:0 !important;
            min-width:0;
        }

        .category-management-grid {
            display:grid !important;
            grid-template-columns:repeat(auto-fit,minmax(min(100%, 240px),1fr));
            gap:.7rem !important;
            align-content:start;
        }

        .category-management-grid .product-mgmt-card {
            margin:0 !important;
            min-width:0;
        }

        @media (max-width:520px) {
            .product-management-grid {
                grid-template-columns:repeat(auto-fit,minmax(min(100%, 160px),1fr));
                gap:.5rem;
            }

            .product-management-grid .product-mgmt-card {
                padding:.62rem;
            }

            .product-management-grid .product-mgmt-card-top {
                align-items:flex-start;
                flex-wrap:wrap;
            }

            .product-management-grid .product-mgmt-thumb {
                width:2.85rem;
                height:2.85rem;
            }

            .product-management-grid .product-mgmt-card-top > p {
                width:100%;
                text-align:right;
                font-size:.9rem !important;
            }

            .product-management-grid .product-mgmt-card-bottom {
                align-items:flex-start;
                gap:.4rem;
                flex-direction:column;
            }

            .product-management-grid .product-mgmt-card-bottom > div {
                width:100%;
                display:grid !important;
                grid-template-columns:1fr;
            }

            .category-management-grid {
                grid-template-columns:1fr;
            }
        }

        /* Analytics period control is always visible; no need to open Filters for common periods. */
        .analytics-period-switch {
            display:inline-flex;
            align-items:center;
            gap:.22rem;
            padding:.22rem;
            border-radius:12px;
            background:#e9eef3;
            border:1px solid #e0e7ed;
        }

        .dark .analytics-period-switch {
            background:#101e29;
            border-color:rgba(148,163,184,.10);
        }

        .analytics-period-switch button {
            min-height:36px;
            padding:.48rem .72rem;
            border-radius:9px;
            color:#64748b;
            font-size:.74rem;
            font-weight:800;
            white-space:nowrap;
        }

        .analytics-period-switch button.is-active {
            color:#0f172a;
            background:#fff;
            box-shadow:0 2px 8px rgba(15,23,42,.07);
        }

        .dark .analytics-period-switch button.is-active {
            color:#f8fafc;
            background:#1a2a36;
        }

        .analytics-tax-highlight {
            color:#2563eb !important;
        }
        .dark .analytics-tax-highlight { color:#60a5fa !important; }

        /* Checkout: subtle glossy fintech treatment, without changing geometry. */
        #view-checkout {
            background:
                radial-gradient(circle at 72% 7%, rgba(45,212,191,.08), transparent 25rem),
                #f6f8fa;
        }

        .dark #view-checkout {
            background:
                radial-gradient(circle at 72% 7%, rgba(45,212,191,.075), transparent 25rem),
                #071018;
        }

        #view-checkout .checkout-summary-card,
        #view-checkout .surface-card,
        #view-checkout .cart-item-card,
        #view-checkout .cart-invoice-footer {
            position:relative;
            overflow:hidden;
        }

        #view-checkout .checkout-summary-card::after,
        #view-checkout .product-card::after {
            content:"";
            position:absolute;
            inset:-60% -80%;
            pointer-events:none;
            background:linear-gradient(110deg,transparent 43%,rgba(255,255,255,.34) 50%,transparent 57%);
            transform:translateX(-55%) rotate(6deg);
            opacity:0;
        }

        @media (hover:hover) and (pointer:fine) {
            #view-checkout .product-card:hover::after {
                opacity:1;
                animation:zuno-checkout-sheen 720ms ease-out both;
            }

            #view-checkout .product-card:hover {
                transform:translateY(-3px) scale(1.008);
                box-shadow:0 16px 34px rgba(15,23,42,.10);
                border-color:rgba(45,212,191,.24);
            }
        }

        #view-checkout .product-card {
            border:1px solid rgba(148,163,184,.15);
            box-shadow:0 6px 20px rgba(15,23,42,.045);
            transition:
                transform 190ms cubic-bezier(.16,1,.3,1),
                box-shadow 190ms ease,
                border-color 190ms ease;
        }

        .dark #view-checkout .product-card {
            border-color:rgba(148,163,184,.10);
            box-shadow:0 8px 22px rgba(0,0,0,.14);
        }

        #view-checkout .product-image-wrap {
            position:relative;
            background:
                radial-gradient(circle at 35% 20%,rgba(255,255,255,.85),rgba(241,245,249,.76));
            border:1px solid rgba(148,163,184,.10);
            box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
        }

        .dark #view-checkout .product-image-wrap {
            background:
                radial-gradient(circle at 35% 20%,rgba(255,255,255,.06),rgba(15,29,40,.65));
            border-color:rgba(148,163,184,.08);
        }

        #view-checkout .category-tab {
            position:relative;
            overflow:hidden;
            backdrop-filter:blur(10px);
            -webkit-backdrop-filter:blur(10px);
        }

        #view-checkout .category-tab.active {
            box-shadow:0 8px 20px rgba(16,179,160,.12);
        }

        #view-checkout .cart-invoice-total-banner {
            position:relative;
            overflow:hidden;
            box-shadow:0 12px 28px rgba(var(--accent-rgb),.20);
        }

        #view-checkout .cart-invoice-total-banner::after,
        #go-to-payment-btn::after {
            content:"";
            position:absolute;
            inset:-60% -45%;
            background:linear-gradient(105deg,transparent 43%,rgba(255,255,255,.30) 50%,transparent 57%);
            transform:translateX(-75%);
            pointer-events:none;
            animation:zuno-checkout-soft-sheen 4.2s 1.2s ease-in-out infinite;
        }

        #go-to-payment-btn {
            position:relative;
            overflow:hidden;
            box-shadow:0 12px 28px rgba(var(--accent-rgb),.18);
            transition:transform 170ms cubic-bezier(.16,1,.3,1),box-shadow 170ms ease;
        }

        #go-to-payment-btn:active { transform:scale(.987); }

        @keyframes zuno-checkout-sheen {
            from { transform:translateX(-55%) rotate(6deg); }
            to { transform:translateX(55%) rotate(6deg); }
        }

        @keyframes zuno-checkout-soft-sheen {
            0%,68% { transform:translateX(-75%); opacity:0; }
            74% { opacity:.7; }
            88% { transform:translateX(75%); opacity:0; }
            100% { transform:translateX(75%); opacity:0; }
        }

        @media (prefers-reduced-motion: reduce) {
            #view-checkout .product-card::after,
            #view-checkout .cart-invoice-total-banner::after,
            #go-to-payment-btn::after {
                animation:none !important;
            }
        }



        /* Critical action flow lock: no second action until commit + completion motion finish. */
        body.zuno-critical-flow-active { overflow: hidden !important; }
        body.zuno-critical-flow-active #app-container {
            pointer-events: none !important;
            user-select: none !important;
            -webkit-user-select: none !important;
        }

        .zuno-critical-flow-shield {
            position: fixed;
            inset: 0;
            z-index: 10074;
            display: grid;
            place-items: center;
            padding: 1rem;
            background: rgba(2,8,15,.52);
            backdrop-filter: blur(9px);
            -webkit-backdrop-filter: blur(9px);
            cursor: wait;
            pointer-events: all;
            animation: zuno-critical-shield-in 130ms ease-out both;
        }

        .zuno-critical-flow-shield.is-covered {
            opacity: 0;
            pointer-events: none;
            transition: opacity 90ms ease;
        }

        .zuno-critical-flow-chip {
            display: inline-flex;
            align-items: center;
            gap: .62rem;
            min-height: 44px;
            padding: .62rem .85rem;
            border-radius: 14px;
            color: #e8f1f7;
            background: rgba(13,25,36,.95);
            border: 1px solid rgba(148,163,184,.13);
            box-shadow: 0 16px 42px rgba(0,0,0,.24);
            font-size: .78rem;
            font-weight: 760;
        }

        .zuno-critical-flow-spinner {
            width: 18px;
            height: 18px;
            border-radius: 999px;
            border: 2px solid rgba(255,255,255,.18);
            border-top-color: #2dd4bf;
            animation: zuno-critical-spin 620ms linear infinite;
        }

        @keyframes zuno-critical-shield-in {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes zuno-critical-spin {
            to { transform: rotate(360deg); }
        }

        /* Quicker destructive motion: same pattern, tighter pacing. */
        .zuno-remove-object { animation-duration: 280ms !important; }
        .zuno-remove-object.is-dissolving .zuno-remove-face { animation-duration: 520ms !important; }
        .zuno-remove-object.is-dissolving .zuno-remove-particle {
            animation-duration: 600ms !important;
            animation-delay: min(var(--delay), 190ms) !important;
        }
        .zuno-remove-message.is-visible { animation-duration: 280ms !important; }



        /* ============================================================
           SUBSCRIPTION UPGRADE EXPERIENCE
           Trust-led fintech presentation. Billing/payment logic unchanged.
           ============================================================ */

        #view-subscription {
            background:
                radial-gradient(circle at 68% 0%, rgba(99,91,255,.075), transparent 28rem),
                radial-gradient(circle at 22% 10%, rgba(16,179,160,.07), transparent 24rem),
                #f5f7fa !important;
        }

        .dark #view-subscription {
            background:
                radial-gradient(circle at 68% 0%, rgba(99,91,255,.10), transparent 28rem),
                radial-gradient(circle at 22% 10%, rgba(16,179,160,.08), transparent 24rem),
                #071018 !important;
        }

        #view-subscription > .scroll-area {
            max-width: 1180px;
            width: 100%;
            margin-inline: auto;
            padding: clamp(.8rem, 2.2vw, 1.35rem) !important;
        }

        .subscription-hero {
            position: relative;
            overflow: hidden;
            padding: clamp(1.2rem, 3vw, 2rem);
            margin-bottom: 1rem;
            border-radius: 24px;
            color: #f8fafc;
            background:
                radial-gradient(circle at 80% 0%, rgba(255,255,255,.13), transparent 15rem),
                linear-gradient(135deg, #0f172a 0%, #15233a 58%, #0f766e 145%);
            border: 1px solid rgba(255,255,255,.09);
            box-shadow: 0 24px 58px rgba(15,23,42,.18);
            isolation: isolate;
        }

        .subscription-hero::before {
            content:"";
            position:absolute;
            width:280px;
            height:280px;
            right:-110px;
            top:-150px;
            border-radius:999px;
            background:radial-gradient(circle,rgba(99,91,255,.34),transparent 68%);
            filter:blur(4px);
            z-index:-1;
            animation:zuno-sub-hero-float 7s ease-in-out infinite alternate;
        }

        .subscription-hero::after {
            content:"";
            position:absolute;
            inset:-70% -50%;
            pointer-events:none;
            background:linear-gradient(112deg,transparent 44%,rgba(255,255,255,.09) 50%,transparent 56%);
            transform:translateX(-60%) rotate(5deg);
            animation:zuno-sub-hero-sheen 7.5s 1.5s ease-in-out infinite;
        }

        .subscription-hero-kicker {
            display:inline-flex;
            align-items:center;
            gap:.4rem;
            margin-bottom:.75rem;
            padding:.34rem .58rem;
            border-radius:999px;
            color:#bffbf1;
            background:rgba(45,212,191,.11);
            border:1px solid rgba(94,234,212,.16);
            font-size:.69rem;
            line-height:1;
            font-weight:850;
            letter-spacing:.06em;
            text-transform:uppercase;
        }

        .subscription-hero h2 {
            width:min(100%,760px);
            margin:0;
            font-family:'Manrope','Inter',sans-serif;
            font-size:clamp(1.65rem,4vw,2.55rem);
            line-height:1.08;
            font-weight:860;
            letter-spacing:-.045em;
        }

        .subscription-hero > p {
            width:min(100%,690px);
            margin:.72rem 0 0;
            color:#c7d4df;
            font-size:.9rem;
            line-height:1.6;
        }

        .subscription-trust-row {
            display:flex;
            flex-wrap:wrap;
            gap:.5rem;
            margin-top:1rem;
        }

        .subscription-trust-row span {
            display:inline-flex;
            align-items:center;
            gap:.34rem;
            min-height:32px;
            padding:.38rem .58rem;
            border-radius:10px;
            color:#dbe7ef;
            background:rgba(255,255,255,.075);
            border:1px solid rgba(255,255,255,.09);
            font-size:.7rem;
            font-weight:730;
        }

        .subscription-assurance-strip {
            display:grid;
            grid-template-columns:repeat(3,minmax(0,1fr));
            gap:.6rem;
            margin-bottom:1rem;
        }

        .subscription-assurance-item {
            display:flex;
            align-items:center;
            gap:.7rem;
            min-width:0;
            padding:.82rem .9rem;
            border-radius:16px;
            background:rgba(255,255,255,.86);
            border:1px solid rgba(148,163,184,.15);
            box-shadow:0 7px 22px rgba(15,23,42,.035);
            backdrop-filter:blur(12px);
            -webkit-backdrop-filter:blur(12px);
        }

        .dark .subscription-assurance-item {
            background:rgba(13,25,36,.84);
            border-color:rgba(148,163,184,.10);
        }

        .subscription-assurance-icon {
            width:36px;
            height:36px;
            flex:0 0 36px;
            display:grid;
            place-items:center;
            border-radius:12px;
            color:#0f766e;
            background:rgba(20,184,166,.10);
            border:1px solid rgba(20,184,166,.13);
        }

        .dark .subscription-assurance-icon {
            color:#5eead4;
            background:rgba(20,184,166,.11);
        }

        .subscription-assurance-icon svg {
            width:18px;
            height:18px;
            display:block;
            margin:auto;
        }

        .subscription-assurance-item > .subscription-assurance-icon {
            align-self:center;
            margin-top:0;
        }

        .subscription-assurance-item strong {
            display:block;
            color:#162132;
            font-size:.79rem;
            line-height:1.25;
        }

        .dark .subscription-assurance-item strong { color:#eef5f8; }

        .subscription-assurance-item span {
            display:block;
            margin-top:.18rem;
            color:#6c7b8a;
            font-size:.67rem;
            line-height:1.42;
        }

        .dark .subscription-assurance-item span { color:#93a5b4; }

        /* Current plan usage becomes a quiet account-status panel. */
        .plan-usage-card {
            position:relative;
            overflow:hidden;
            border-radius:20px !important;
            box-shadow:0 10px 30px rgba(15,23,42,.06);
        }

        .plan-usage-card::after {
            content:"";
            position:absolute;
            width:140px;
            height:140px;
            right:-65px;
            top:-80px;
            border-radius:999px;
            background:color-mix(in srgb,var(--plan-color) 16%,transparent);
            pointer-events:none;
        }

        /* Plan cards: stronger hierarchy, lighter density, meaningful motion. */
        .billing-plan-grid {
            grid-template-columns:repeat(auto-fit,minmax(220px,1fr)) !important;
            gap:.8rem !important;
            align-items:stretch;
        }

        .billing-plan-card {
            position:relative;
            display:flex;
            flex-direction:column;
            min-height:100%;
            padding:1.05rem !important;
            overflow:hidden;
            border-radius:19px !important;
            border:1px solid rgba(148,163,184,.17) !important;
            box-shadow:0 8px 24px rgba(15,23,42,.045);
            transform:translateY(10px);
            opacity:0;
            animation:zuno-sub-plan-arrive 440ms cubic-bezier(.16,1,.3,1) forwards;
            animation-delay:var(--plan-delay,0ms);
            transition:
                transform 200ms cubic-bezier(.16,1,.3,1),
                box-shadow 200ms ease,
                border-color 200ms ease;
        }

        .dark .billing-plan-card {
            background:rgba(14,25,36,.94) !important;
            border-color:rgba(148,163,184,.10) !important;
            box-shadow:0 10px 26px rgba(0,0,0,.14);
        }

        .billing-plan-card--recommended {
            border-color:color-mix(in srgb,var(--plan-color) 56%,transparent) !important;
            box-shadow:0 16px 38px color-mix(in srgb,var(--plan-color) 15%,transparent);
        }

        .billing-plan-card--current {
            border-color:color-mix(in srgb,var(--plan-color) 50%,transparent) !important;
            background:
                linear-gradient(145deg,color-mix(in srgb,var(--plan-color) 5%,#fff),#fff) !important;
        }

        .dark .billing-plan-card--current {
            background:
                linear-gradient(145deg,color-mix(in srgb,var(--plan-color) 8%,#0e1924),#0e1924) !important;
        }

        @media (hover:hover) and (pointer:fine) {
            .billing-plan-card:not(.billing-plan-card--current):hover {
                transform:translateY(-4px);
                border-color:color-mix(in srgb,var(--plan-color) 42%,transparent) !important;
                box-shadow:0 20px 42px rgba(15,23,42,.10);
            }
        }

        .billing-plan-ribbon {
            top:.7rem !important;
            right:.7rem !important;
            border-radius:999px !important;
            padding:.26rem .48rem !important;
            font-size:.61rem !important;
            letter-spacing:.04em;
            text-transform:uppercase;
            box-shadow:none !important;
        }

        .billing-plan-name {
            font-family:'Manrope','Inter',sans-serif;
            font-size:1.12rem !important;
            letter-spacing:-.025em;
        }

        .billing-plan-price {
            display:flex;
            align-items:baseline;
            gap:.18rem;
            margin:.72rem 0 .52rem !important;
            font-family:'Manrope','Inter',sans-serif;
            font-size:1.48rem !important;
            letter-spacing:-.035em;
        }

        .billing-plan-description {
            min-height:2.8em;
            color:#64748b;
            font-size:.72rem;
            line-height:1.45;
        }

        .dark .billing-plan-description { color:#94a3b8; }

        .billing-plan-features {
            flex:1;
            margin-top:.72rem !important;
            display:flex;
            flex-direction:column;
            gap:.32rem;
            line-height:1.42 !important;
        }

        .billing-plan-features li {
            position:relative;
            padding-left:1.22rem;
        }

        .billing-plan-features li::before {
            content:'';
            position:absolute;
            left:0;
            top:.18rem;
            width:.82rem;
            height:.82rem;
            border-radius:999px;
            background:color-mix(in srgb,var(--plan-color) 12%,transparent);
            border:1px solid color-mix(in srgb,var(--plan-color) 25%,transparent);
        }

        .billing-plan-features li::after {
            content:'';
            position:absolute;
            left:.27rem;
            top:.41rem;
            width:.3rem;
            height:.16rem;
            border-left:1.5px solid var(--plan-color);
            border-bottom:1.5px solid var(--plan-color);
            transform:rotate(-45deg);
        }

        /* Upgrade CTA: tactile + secure-payment sheen, no aggressive pulse. */
        .billing-plan-btn {
            position:relative;
            overflow:hidden;
            min-height:47px;
            margin-top:auto;
            padding:.68rem .78rem !important;
            border-radius:13px !important;
            font-size:.84rem !important;
            letter-spacing:-.01em;
            box-shadow:0 10px 24px color-mix(in srgb,var(--plan-color) 16%,transparent);
            transition:
                transform 170ms cubic-bezier(.16,1,.3,1),
                box-shadow 170ms ease,
                filter 170ms ease !important;
        }

        .billing-plan-btn:not(:disabled)::before {
            content:"";
            position:absolute;
            inset:-70% -55%;
            background:linear-gradient(108deg,transparent 43%,rgba(255,255,255,.34) 50%,transparent 57%);
            transform:translateX(-72%);
            animation:zuno-sub-btn-sheen 4.8s 1.5s ease-in-out infinite;
            pointer-events:none;
        }

        .billing-plan-btn:not(:disabled)::after {
            content:"";
            position:absolute;
            inset:0;
            border-radius:inherit;
            box-shadow:inset 0 1px 0 rgba(255,255,255,.22);
            pointer-events:none;
        }

        @media (hover:hover) and (pointer:fine) {
            .billing-plan-btn:not(:disabled):hover {
                transform:translateY(-2px);
                filter:saturate(1.06) brightness(1.02);
                box-shadow:0 15px 30px color-mix(in srgb,var(--plan-color) 22%,transparent);
            }
        }

        .billing-plan-btn:not(:disabled):active { transform:scale(.985); }

        .billing-plan-btn:disabled {
            min-height:47px;
            opacity:.72;
        }

        .billing-plan-btn-label {
            position:relative;
            z-index:2;
            display:inline-flex;
            align-items:center;
            justify-content:center;
            gap:.35rem;
        }

        .billing-plan-cta-note {
            min-height:1.1rem;
            margin:.42rem 0 0;
            color:#82909d;
            text-align:center;
            font-size:.61rem;
            line-height:1.3;
        }

        .dark .billing-plan-cta-note { color:#7f91a0; }

        /* Trust/payment area reads like a bank security block, not legal filler. */
        .payment-trust-block {
            border-radius:18px !important;
            background:
                radial-gradient(circle at 100% 0%,rgba(99,91,255,.07),transparent 13rem),
                #fff !important;
            border:1px solid rgba(148,163,184,.14) !important;
            box-shadow:0 8px 24px rgba(15,23,42,.04);
        }

        .dark .payment-trust-block {
            background:
                radial-gradient(circle at 100% 0%,rgba(99,91,255,.09),transparent 13rem),
                #0d1924 !important;
            border-color:rgba(148,163,184,.10) !important;
        }

        .payment-trust-badge {
            margin-bottom:.65rem !important;
            padding-bottom:.65rem !important;
        }

        .payment-trust-stripe-wordmark {
            display:inline-flex;
            align-items:center;
            min-height:32px;
            padding:0 .55rem;
            border-radius:9px;
            color:#635bff !important;
            background:rgba(99,91,255,.08);
            font-size:.98rem !important;
        }

        .payment-trust-list {
            gap:.48rem !important;
        }

        .payment-trust-list li {
            padding:.4rem .45rem;
            border-radius:10px;
            background:rgba(148,163,184,.045);
            font-size:.74rem !important;
        }

        .payment-method-card,
        .payment-method-empty {
            border-radius:15px !important;
        }

        .payment-method-update-btn,
        .payment-method-add-btn {
            min-height:42px;
            border-radius:11px !important;
            transition:transform 160ms cubic-bezier(.16,1,.3,1),box-shadow 160ms ease;
        }

        .payment-method-update-btn:active,
        .payment-method-add-btn:active { transform:scale(.985); }

        .plan-compare {
            overflow:hidden;
            border-radius:18px !important;
            border:1px solid rgba(148,163,184,.15) !important;
            background:rgba(255,255,255,.88);
            box-shadow:0 7px 22px rgba(15,23,42,.035);
        }

        .dark .plan-compare {
            background:rgba(13,25,36,.88);
            border-color:rgba(148,163,184,.09) !important;
        }

        .plan-compare summary {
            min-height:49px;
            padding:.72rem .9rem !important;
        }

        .subscription-legal-links {
            display:flex;
            justify-content:center;
            flex-wrap:wrap;
            gap:.65rem 1rem;
        }

        .subscription-legal-links a {
            font-size:.7rem;
            font-weight:720;
            color:#64748b;
            text-decoration:underline;
            text-underline-offset:3px;
        }

        @keyframes zuno-sub-plan-arrive {
            to { opacity:1; transform:translateY(0); }
        }

        @keyframes zuno-sub-btn-sheen {
            0%,72% { transform:translateX(-72%); opacity:0; }
            77% { opacity:.8; }
            90% { transform:translateX(72%); opacity:0; }
            100% { transform:translateX(72%); opacity:0; }
        }

        @keyframes zuno-sub-hero-sheen {
            0%,72% { transform:translateX(-60%) rotate(5deg); opacity:0; }
            78% { opacity:1; }
            92% { transform:translateX(60%) rotate(5deg); opacity:0; }
            100% { transform:translateX(60%) rotate(5deg); opacity:0; }
        }

        @keyframes zuno-sub-hero-float {
            to { transform:translate3d(-22px,20px,0) scale(1.05); }
        }

        @media (max-width:720px) {
            .subscription-assurance-strip {
                grid-template-columns:1fr;
                gap:.48rem;
            }

            .subscription-assurance-item {
                padding:.7rem .75rem;
            }

            .billing-plan-grid {
                grid-template-columns:1fr !important;
            }

            .billing-plan-card {
                padding:.9rem !important;
            }

            .subscription-hero {
                border-radius:20px;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .subscription-hero::before,
            .subscription-hero::after,
            .billing-plan-card,
            .billing-plan-btn::before {
                animation:none !important;
            }

            .billing-plan-card {
                opacity:1;
                transform:none;
            }
        }



        /* Multi-org chooser must always sit above a fully-dismissed startup loader. */
        #app-loading.hidden {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
        }

        #view-choose-org.active {
            position: fixed;
            inset: 0;
            z-index: 80;
            display: flex;
            background:
                radial-gradient(circle at 50% 14%, rgba(16,179,160,.10), transparent 22rem),
                #f7fafb;
        }

        .dark #view-choose-org.active {
            background:
                radial-gradient(circle at 50% 14%, rgba(45,212,191,.08), transparent 22rem),
                #071018;
        }

        .org-choice-item {
            min-height: 58px;
        }

        .org-choice-item.is-opening {
            border-color: var(--accent, #10b3a0) !important;
            background: rgba(var(--accent-rgb, 16,179,160), .10) !important;
            box-shadow: 0 10px 24px rgba(var(--accent-rgb, 16,179,160), .10);
        }

        .org-choice-item:disabled {
            cursor: wait;
        }

        .org-choice-opening {
            margin-left: auto;
            display: inline-flex;
            align-items: center;
            gap: .4rem;
            color: var(--accent, #10b3a0);
            font-size: .7rem;
            font-weight: 800;
        }

        .org-choice-opening i {
            width: 15px;
            height: 15px;
            border-radius: 999px;
            border: 2px solid rgba(var(--accent-rgb, 16,179,160), .18);
            border-top-color: var(--accent, #10b3a0);
            animation: org-choice-spin .6s linear infinite;
        }

        @keyframes org-choice-spin {
            to { transform: rotate(360deg); }
        }



        /* ============================================================
           MULTI-BUSINESS / SINGLE-SESSION MODAL LAYER FIX
           The chooser sits at z-index 60. Standard confirmation modals must
           be above it, otherwise "Sign In Here?" is waiting invisibly behind
           the business picker and the selected business appears stuck.
           ============================================================ */
        #generic-modal {
            z-index: 120100 !important;
            pointer-events: auto !important;
        }

        #generic-modal:not(.hidden) {
            display: flex !important;
        }

        #view-choose-org.active {
            z-index: 60 !important;
        }



        /* Grid cards adapt to the actual available width instead of forcing columns. */
        .product-management-grid .product-mgmt-card,
        .category-management-grid .product-mgmt-card {
            width:100%;
            max-width:none;
            min-width:0;
            box-sizing:border-box;
        }

        .product-management-grid .product-mgmt-card-bottom > div,
        .category-management-grid .product-mgmt-card-bottom > div {
            flex-wrap:wrap;
        }

        .product-management-grid .product-mgmt-action-btn,
        .category-management-grid .product-mgmt-action-btn {
            flex:1 1 78px;
            min-width:0;
        }

        @media (max-width:360px) {
            .product-management-grid,
            .category-management-grid {
                grid-template-columns:1fr !important;
            }
        }


        #view-choose-org[aria-hidden="true"] {
            display: none !important;
            pointer-events: none !important;
        }

        #app-container.zuno-business-switch-ready {
            animation: zuno-business-switch-ready .3s ease-out both;
        }

        @keyframes zuno-business-switch-ready {
            from { opacity: .72; }
            to { opacity: 1; }
        }


        /* ============================================================
           ADMIN SESSION CONTROL
           Owner/admin can end exactly one User + Organisation session.
           ============================================================ */
        .session-admin-card {
            padding:.85rem;
            border-radius:15px;
            background:#fff;
            border:1px solid #e4e9ef;
            box-shadow:0 5px 18px rgba(15,23,42,.035);
        }

        .dark .session-admin-card {
            background:#152235;
            border-color:rgba(148,163,184,.11);
        }

        .session-admin-head {
            display:flex;
            align-items:flex-start;
            justify-content:space-between;
            gap:.75rem;
        }

        .session-admin-status {
            display:inline-flex;
            align-items:center;
            gap:.34rem;
            margin-top:.24rem;
            font-size:.68rem;
            font-weight:760;
        }

        .session-admin-status::before {
            content:"";
            width:7px;
            height:7px;
            border-radius:999px;
            background:currentColor;
        }

        .session-admin-status--active { color:#16a34a; }
        .dark .session-admin-status--active { color:#4ade80; }
        .session-admin-status--idle { color:#94a3b8; }

        .session-admin-actions {
            display:flex;
            flex-wrap:wrap;
            gap:.42rem;
            margin-top:.7rem;
        }

        .session-admin-btn {
            min-height:40px;
            display:inline-flex;
            align-items:center;
            justify-content:center;
            gap:.38rem;
            padding:.55rem .72rem;
            border-radius:10px;
            font-size:.75rem;
            font-weight:790;
            border:1px solid transparent;
        }

        .session-admin-btn svg {
            width:16px;
            height:16px;
        }

        .session-admin-btn--danger {
            color:#fff;
            background:#ef4444;
            border-color:#ef4444;
        }

        .session-admin-btn--neutral {
            color:#475569;
            background:#f8fafc;
            border-color:#dbe3eb;
        }

        .dark .session-admin-btn--neutral {
            color:#d3dee7;
            background:#0f1b26;
            border-color:rgba(148,163,184,.14);
        }

        .session-admin-device {
            display:flex;
            align-items:center;
            justify-content:space-between;
            gap:.5rem;
            padding:.48rem .55rem;
            margin-top:.4rem;
            border-radius:10px;
            background:rgba(148,163,184,.055);
            font-size:.72rem;
        }

        .session-admin-note {
            margin-top:.55rem;
            color:#94a3b8;
            font-size:.67rem;
            line-height:1.45;
        }



        /* Phone authentication attempt guidance */
        .phone-attempt-status {
            min-height: 1.1rem;
            margin-top: .18rem;
            text-align: center;
            color: #64748b;
            font-size: .72rem;
            line-height: 1.4;
            font-weight: 650;
        }

        .dark .phone-attempt-status { color: #94a3b8; }

        .phone-attempt-status.is-warning {
            color: #b45309;
        }

        .dark .phone-attempt-status.is-warning {
            color: #fbbf24;
        }

        .phone-attempt-status.is-locked {
            color: #dc2626;
            font-weight: 760;
        }

        .dark .phone-attempt-status.is-locked {
            color: #f87171;
        }



        .password-visibility-btn {
            position:absolute;
            right:.65rem;
            top:50%;
            width:34px;
            height:34px;
            transform:translateY(-50%);
            display:grid;
            place-items:center;
            border-radius:10px;
            color:#64748b;
            transition:background 150ms ease,color 150ms ease,transform 150ms ease;
        }

        .password-visibility-btn svg { width:18px;height:18px; }
        .password-visibility-btn:hover { background:#f1f5f9;color:#0f766e; }
        .dark .password-visibility-btn:hover { background:#172531;color:#5eead4; }
        .password-visibility-btn:active { transform:translateY(-50%) scale(.95); }

        .password-policy-card {
            margin-top:.35rem;
            padding:.72rem;
            border-radius:13px;
            background:#f8fafc;
            border:1px solid #e3e9ef;
        }

        .dark .password-policy-card {
            background:#0d1924;
            border-color:rgba(148,163,184,.12);
        }

        .password-policy-title {
            font-size:.72rem;
            font-weight:800;
            color:#475569;
        }

        .dark .password-policy-title { color:#cbd5e1; }

        .password-policy-state {
            font-size:.67rem;
            font-weight:800;
            color:#b45309;
        }

        .password-policy-grid {
            display:grid;
            grid-template-columns:repeat(2,minmax(0,1fr));
            gap:.38rem .6rem;
        }

        .password-policy-grid span {
            display:flex;
            align-items:center;
            gap:.34rem;
            color:#7c8997;
            font-size:.67rem;
            font-weight:680;
        }

        .password-policy-grid span i {
            width:16px;
            height:16px;
            display:grid;
            place-items:center;
            border-radius:999px;
            background:#e7edf2;
            color:#94a3b8;
            font-size:.61rem;
            font-style:normal;
            font-weight:900;
        }

        .dark .password-policy-grid span i { background:#172531; }

        .password-policy-grid span.is-met {
            color:#15803d;
        }

        .dark .password-policy-grid span.is-met { color:#4ade80; }

        .password-policy-grid span.is-met i {
            color:#fff;
            background:#22c55e;
        }

        @media (max-width:390px) {
            .password-policy-grid { grid-template-columns:1fr; }
        }

        /* Users: compact, hierarchy-led management view */
        .users-command-bar {
            display:flex;
            align-items:center;
            justify-content:space-between;
            gap:.8rem;
            margin:.1rem .1rem .65rem;
            padding:.75rem .8rem;
            border-radius:15px;
            background:#fff;
            border:1px solid #e6ebf0;
        }

        .dark .users-command-bar {
            background:#0d1924;
            border-color:rgba(148,163,184,.10);
        }

        .users-command-title {
            font-size:.9rem;
            font-weight:820;
            letter-spacing:-.015em;
        }

        .users-command-copy {
            margin-top:.12rem;
            color:#7b8997;
            font-size:.67rem;
        }

        .users-invite-btn {
            min-height:40px;
            display:inline-flex;
            align-items:center;
            gap:.4rem;
            padding:.55rem .72rem;
            border-radius:11px;
            color:#fff;
            background:linear-gradient(135deg,#14b8a6,#0f9488);
            font-size:.78rem;
            font-weight:800;
            flex:0 0 auto;
        }

        .users-invite-btn svg { width:16px;height:16px; }

        .users-filter-row {
            display:grid;
            grid-template-columns:1fr 1fr;
            gap:.35rem;
            margin:0 .1rem .65rem;
            padding:.25rem;
            border-radius:12px;
            background:#e9eef3;
        }

        .dark .users-filter-row { background:#101e29; }

        .users-list-modern .user-card {
            border-radius:14px !important;
            box-shadow:none !important;
        }

        .users-list-modern .user-card-header {
            min-height:58px;
            padding:.72rem .8rem !important;
        }

        .users-list-modern .user-card-expand {
            padding:0 .8rem .75rem !important;
        }

        .users-session-shell {
            margin:.8rem .1rem .2rem;
            border-radius:15px;
            overflow:hidden;
            border:1px solid #e4e9ef;
            background:#fff;
        }

        .dark .users-session-shell {
            background:#0d1924;
            border-color:rgba(148,163,184,.10);
        }

        .users-session-toggle {
            width:100%;
            min-height:64px;
            display:flex;
            align-items:center;
            gap:.7rem;
            padding:.72rem .8rem;
        }

        .users-session-icon {
            width:36px;
            height:36px;
            flex:0 0 36px;
            display:grid;
            place-items:center;
            border-radius:11px;
            color:#0f766e;
            background:rgba(20,184,166,.10);
        }

        .dark .users-session-icon { color:#5eead4; }

        .users-session-icon svg { width:18px;height:18px; }

        .users-session-toggle strong {
            display:block;
            font-size:.8rem;
            line-height:1.25;
        }

        .users-session-toggle small {
            display:block;
            margin-top:.14rem;
            color:#7d8b99;
            font-size:.65rem;
            line-height:1.35;
        }

        .users-session-chevron {
            width:17px;
            height:17px;
            flex:0 0 auto;
            color:#94a3b8;
            transition:transform 180ms ease;
        }

        .users-session-toggle[aria-expanded="true"] .users-session-chevron {
            transform:rotate(90deg);
        }

        #session-controls-body {
            padding:.15rem .65rem .65rem;
            border-top:1px solid #eef2f5;
        }

        .dark #session-controls-body {
            border-color:rgba(148,163,184,.08);
        }



        /* ============================================================
           USERS COMMAND CENTER
           Built for 2 users or 2,000: rail navigation, search, compact rows,
           and a focused detail drawer for permissions + session actions.
           ============================================================ */
        .users-command-layout {
            position:relative;
            display:grid;
            grid-template-columns:92px minmax(0,1fr);
            min-height:0;
            background:#f5f7fa;
        }

        .dark .users-command-layout { background:#071018; }

        .users-view-rail {
            position:sticky;
            top:0;
            align-self:stretch;
            display:flex;
            flex-direction:column;
            gap:.45rem;
            padding:.75rem .55rem;
            border-right:1px solid #e4e9ef;
            background:rgba(255,255,255,.90);
            backdrop-filter:blur(14px);
            -webkit-backdrop-filter:blur(14px);
        }

        .dark .users-view-rail {
            background:rgba(10,20,29,.94);
            border-color:rgba(148,163,184,.09);
        }

        .users-view-rail-btn {
            position:relative;
            min-height:68px;
            display:flex;
            flex-direction:column;
            align-items:center;
            justify-content:center;
            gap:.28rem;
            padding:.48rem .35rem;
            border-radius:14px;
            color:#718090;
            transition:transform 170ms cubic-bezier(.16,1,.3,1),background 170ms ease,color 170ms ease;
        }

        .users-view-rail-btn svg { width:21px;height:21px; }
        .users-view-rail-btn span { font-size:.67rem;font-weight:790; }
        .users-view-rail-btn b {
            position:absolute;
            top:.35rem;
            right:.45rem;
            min-width:18px;
            height:18px;
            display:grid;
            place-items:center;
            padding:0 .28rem;
            border-radius:999px;
            background:#edf2f6;
            color:#64748b;
            font-size:.59rem;
            line-height:1;
        }

        .dark .users-view-rail-btn b { background:#172531;color:#9fb0bf; }

        .users-view-rail-btn.is-active {
            color:#0f766e;
            background:rgba(20,184,166,.10);
        }

        .dark .users-view-rail-btn.is-active {
            color:#5eead4;
            background:rgba(20,184,166,.11);
        }

        .users-view-rail-btn.is-active::before {
            content:"";
            position:absolute;
            left:-.55rem;
            top:15px;
            bottom:15px;
            width:3px;
            border-radius:0 999px 999px 0;
            background:#14b8a6;
        }

        .users-command-main {
            min-width:0;
            min-height:0;
            overflow-y:auto;
            padding:.8rem;
        }

        .users-plan-banner { margin-bottom:.65rem; }

        .users-command-topbar {
            display:grid;
            grid-template-columns:minmax(0,1fr) auto;
            gap:.55rem;
            align-items:center;
            margin-bottom:.7rem;
        }

        .users-search-box {
            position:relative;
            min-width:0;
        }

        .users-search-box > svg {
            position:absolute;
            left:.8rem;
            top:50%;
            width:17px;
            height:17px;
            transform:translateY(-50%);
            color:#94a3b8;
            pointer-events:none;
        }

        #users-search-input {
            width:100%;
            min-height:44px;
            padding:.65rem 2.35rem .65rem 2.35rem;
            border-radius:13px;
            border:1px solid #dce4eb;
            background:#fff;
            color:#172033;
            font-size:.84rem;
            outline:none;
        }

        .dark #users-search-input {
            color:#f8fafc;
            background:#0d1924;
            border-color:rgba(148,163,184,.13);
        }

        #users-search-input:focus {
            border-color:rgba(20,184,166,.48);
            box-shadow:0 0 0 4px rgba(20,184,166,.08);
        }

        #users-search-clear {
            position:absolute;
            right:.6rem;
            top:50%;
            width:27px;
            height:27px;
            transform:translateY(-50%);
            border-radius:8px;
            color:#94a3b8;
            font-size:1.15rem;
            line-height:1;
        }

        .users-invite-btn,
        .users-header-invite {
            display:inline-flex;
            align-items:center;
            justify-content:center;
            gap:.38rem;
            color:#fff;
            background:linear-gradient(135deg,#14b8a6,#0f9488);
            box-shadow:0 7px 18px rgba(15,148,136,.13);
        }

        .users-invite-btn {
            min-height:44px;
            padding:.6rem .78rem;
            border-radius:12px;
            font-size:.78rem;
            font-weight:800;
        }

        .users-header-invite {
            width:36px;
            height:36px;
            border-radius:11px;
        }

        .users-invite-btn svg,
        .users-header-invite svg { width:17px;height:17px; }

        .users-view-heading {
            display:flex;
            align-items:flex-end;
            justify-content:space-between;
            gap:.75rem;
            margin:.1rem .15rem .6rem;
        }

        #users-view-title {
            font-size:.9rem;
            font-weight:840;
            letter-spacing:-.018em;
        }

        #users-view-subtitle {
            display:block;
            margin-top:.1rem;
            color:#7d8b99;
            font-size:.67rem;
            line-height:1.35;
        }

        .users-list-modern {
            display:flex;
            flex-direction:column;
            gap:.42rem;
        }

        .users-person-row {
            width:100%;
            min-height:64px;
            display:grid;
            grid-template-columns:42px minmax(0,1fr) auto;
            gap:.7rem;
            align-items:center;
            padding:.62rem .72rem;
            border-radius:14px;
            border:1px solid #e5eaf0;
            background:#fff;
            text-align:left;
            box-shadow:0 3px 12px rgba(15,23,42,.025);
            transition:transform 160ms cubic-bezier(.16,1,.3,1),border-color 160ms ease,box-shadow 160ms ease;
        }

        .dark .users-person-row {
            background:#0d1924;
            border-color:rgba(148,163,184,.09);
        }

        @media (hover:hover) and (pointer:fine) {
            .users-person-row:hover {
                transform:translateY(-1px);
                border-color:rgba(20,184,166,.26);
                box-shadow:0 8px 20px rgba(15,23,42,.055);
            }
        }

        .users-person-avatar {
            width:42px;
            height:42px;
            display:grid;
            place-items:center;
            border-radius:13px;
            color:#0f766e;
            background:linear-gradient(145deg,#e6fffb,#d9f7f2);
            border:1px solid rgba(20,184,166,.14);
            font-weight:860;
            text-transform:uppercase;
        }

        .dark .users-person-avatar {
            color:#5eead4;
            background:linear-gradient(145deg,#102c2d,#0d2428);
        }

        .users-person-name {
            color:#172033;
            font-size:.83rem;
            font-weight:790;
            overflow:hidden;
            text-overflow:ellipsis;
            white-space:nowrap;
        }

        .dark .users-person-name { color:#f0f6f9; }

        .users-person-email {
            margin-top:.1rem;
            color:#7b8997;
            font-size:.68rem;
            overflow:hidden;
            text-overflow:ellipsis;
            white-space:nowrap;
        }

        .users-person-meta {
            display:flex;
            align-items:center;
            gap:.38rem;
        }

        .users-person-chevron {
            width:16px;
            height:16px;
            color:#94a3b8;
        }

        .users-empty-state {
            padding:2.4rem 1rem;
            text-align:center;
            border:1px dashed #d9e1e8;
            border-radius:15px;
            color:#7b8997;
            background:rgba(255,255,255,.52);
        }

        .dark .users-empty-state {
            background:rgba(13,25,36,.45);
            border-color:rgba(148,163,184,.11);
        }

        .users-session-list {
            display:flex;
            flex-direction:column;
            gap:.5rem;
        }

        /* Detail drawer */
        .user-detail-overlay {
            position:fixed;
            inset:0;
            z-index:120080;
        }

        .user-detail-backdrop {
            position:absolute;
            inset:0;
            background:rgba(2,8,15,.54);
            backdrop-filter:blur(8px);
            -webkit-backdrop-filter:blur(8px);
            animation:user-detail-fade .18s ease-out both;
        }

        .user-detail-panel {
            position:absolute;
            top:0;
            right:0;
            width:min(100%,430px);
            height:100%;
            display:flex;
            flex-direction:column;
            color:#172033;
            background:#f7f9fb;
            border-left:1px solid #dfe6ed;
            box-shadow:-22px 0 62px rgba(2,8,23,.18);
            animation:user-detail-slide .28s cubic-bezier(.16,1,.3,1) both;
        }

        .dark .user-detail-panel {
            color:#f1f6f9;
            background:#071018;
            border-color:rgba(148,163,184,.10);
        }

        .user-detail-head {
            display:grid;
            grid-template-columns:48px minmax(0,1fr) 38px;
            gap:.72rem;
            align-items:center;
            padding:1rem;
            border-bottom:1px solid #e4e9ef;
            background:rgba(255,255,255,.88);
            backdrop-filter:blur(12px);
        }

        .dark .user-detail-head {
            background:rgba(10,20,29,.93);
            border-color:rgba(148,163,184,.09);
        }

        .user-detail-avatar {
            width:48px;
            height:48px;
            display:grid;
            place-items:center;
            border-radius:15px;
            color:#fff;
            background:linear-gradient(145deg,#14b8a6,#0f766e);
            font-size:1rem;
            font-weight:880;
        }

        .user-detail-name {
            font-size:.96rem;
            font-weight:840;
            letter-spacing:-.018em;
            overflow:hidden;
            text-overflow:ellipsis;
            white-space:nowrap;
        }

        .user-detail-email {
            margin-top:.12rem;
            color:#7e8c99;
            font-size:.7rem;
            overflow:hidden;
            text-overflow:ellipsis;
            white-space:nowrap;
        }

        .user-detail-close {
            width:36px;
            height:36px;
            display:grid;
            place-items:center;
            border-radius:11px;
            color:#7b8997;
        }

        .user-detail-close svg { width:18px;height:18px; }

        .user-detail-content {
            flex:1;
            overflow-y:auto;
            padding:.8rem;
        }

        .user-detail-section {
            margin-bottom:.65rem;
            padding:.8rem;
            border-radius:15px;
            background:#fff;
            border:1px solid #e4e9ef;
        }

        .dark .user-detail-section {
            background:#0d1924;
            border-color:rgba(148,163,184,.09);
        }

        .user-detail-section-title {
            display:flex;
            align-items:center;
            justify-content:space-between;
            gap:.5rem;
            margin-bottom:.6rem;
            color:#667586;
            font-size:.66rem;
            font-weight:840;
            letter-spacing:.07em;
            text-transform:uppercase;
        }

        .user-detail-kv {
            display:grid;
            grid-template-columns:1fr auto;
            gap:.55rem;
            padding:.43rem 0;
            border-bottom:1px solid #eef2f5;
            font-size:.74rem;
        }

        .dark .user-detail-kv { border-color:rgba(148,163,184,.07); }
        .user-detail-kv:last-child { border-bottom:0; }
        .user-detail-kv span:first-child { color:#7d8b99; }
        .user-detail-kv strong { text-align:right;font-weight:780; }

        .user-detail-session-state {
            display:flex;
            align-items:center;
            gap:.4rem;
            padding:.58rem .65rem;
            border-radius:11px;
            background:rgba(34,197,94,.08);
            color:#15803d;
            font-size:.73rem;
            font-weight:780;
        }

        .dark .user-detail-session-state { color:#4ade80; }

        .user-detail-session-state.is-offline {
            background:rgba(148,163,184,.08);
            color:#7b8997;
        }

        .user-detail-session-state i {
            width:7px;height:7px;border-radius:999px;background:currentColor;
        }

        .user-detail-actions {
            display:grid;
            grid-template-columns:repeat(2,minmax(0,1fr));
            gap:.5rem;
            margin-top:.65rem;
        }

        .user-detail-action {
            min-height:44px;
            display:flex;
            align-items:center;
            justify-content:center;
            gap:.4rem;
            padding:.6rem .7rem;
            border-radius:12px;
            font-size:.75rem;
            font-weight:800;
        }

        .user-detail-action--primary {
            color:#fff;
            background:linear-gradient(135deg,#14b8a6,#0f9488);
        }

        .user-detail-action--danger {
            color:#fff;
            background:linear-gradient(135deg,#ef4444,#b91c1c);
        }

        .user-detail-action--neutral {
            color:#475569;
            background:#eef2f6;
        }

        .dark .user-detail-action--neutral {
            color:#d5e0e8;
            background:#172531;
        }

        @keyframes user-detail-slide {
            from { transform:translateX(22px);opacity:.45; }
            to { transform:translateX(0);opacity:1; }
        }

        @keyframes user-detail-fade {
            from { opacity:0; }
            to { opacity:1; }
        }

        @media (max-width:640px) {
            .users-command-layout {
                display:flex;
                flex-direction:column;
            }

            .users-view-rail {
                position:sticky;
                top:0;
                z-index:5;
                order:0;
                flex-direction:row;
                gap:.25rem;
                padding:.35rem .45rem;
                border-right:0;
                border-bottom:1px solid #e4e9ef;
            }

            .dark .users-view-rail { border-bottom-color:rgba(148,163,184,.09); }

            .users-view-rail-btn {
                flex:1;
                min-height:50px;
                flex-direction:row;
                gap:.34rem;
                padding:.4rem;
                border-radius:11px;
            }

            .users-view-rail-btn svg { width:17px;height:17px; }
            .users-view-rail-btn span { font-size:.65rem; }
            .users-view-rail-btn b {
                position:static;
                min-width:17px;
                height:17px;
            }

            .users-view-rail-btn.is-active::before {
                left:18%;
                right:18%;
                top:auto;
                bottom:-.35rem;
                width:auto;
                height:3px;
                border-radius:999px 999px 0 0;
            }

            .users-command-main { padding:.62rem; }
            .users-plan-banner { margin-bottom:.5rem; }
            .users-command-topbar { grid-template-columns:minmax(0,1fr) auto; }
            .users-invite-btn span { display:none; }
            .users-invite-btn { width:44px;padding:0; }
            .users-person-row { grid-template-columns:38px minmax(0,1fr) auto;min-height:58px;padding:.55rem .6rem; }
            .users-person-avatar { width:38px;height:38px;border-radius:12px; }
            .users-person-meta .user-role-badge { display:none; }

            .user-detail-panel {
                top:auto;
                bottom:0;
                width:100%;
                height:min(88vh,760px);
                border-left:0;
                border-top:1px solid #dfe6ed;
                border-radius:22px 22px 0 0;
                animation:user-detail-sheet .3s cubic-bezier(.16,1,.3,1) both;
            }

            .dark .user-detail-panel { border-top-color:rgba(148,163,184,.10); }

            @keyframes user-detail-sheet {
                from { transform:translateY(28px);opacity:.4; }
                to { transform:translateY(0);opacity:1; }
            }
        }



        /* ============================================================
           CONTENT READABILITY
           Do not hide business data behind ellipsis inside app views.
           ============================================================ */
        .view .truncate {
            overflow: visible !important;
            text-overflow: clip !important;
            white-space: normal !important;
            overflow-wrap: anywhere;
            word-break: normal;
        }

        .view p,
        .view span,
        .view strong,
        .view td,
        .view th {
            overflow-wrap: anywhere;
        }

        /* Category management: useful summary rather than a settings-only card. */
        .category-management-grid {
            grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)) !important;
            gap: .72rem !important;
        }

        .category-management-card {
            display:flex;
            flex-direction:column;
            min-height: 218px;
            padding:.9rem !important;
            border-radius:17px !important;
            background:#fff;
            border:1px solid #e5eaf0;
            box-shadow:0 6px 20px rgba(15,23,42,.035);
        }

        .dark .category-management-card {
            background:#0d1924;
            border-color:rgba(148,163,184,.10);
        }

        .category-card-title-row {
            display:flex;
            align-items:flex-start;
            gap:.45rem;
            min-width:0;
        }

        .category-card-title-row p {
            flex:1;
            min-width:0;
            font-size:.94rem;
            line-height:1.3;
            font-weight:820;
            white-space:normal;
            overflow-wrap:anywhere;
        }

        .category-product-summary {
            display:flex;
            align-items:center;
            justify-content:space-between;
            gap:.6rem;
            margin-top:.65rem;
            padding:.65rem .7rem;
            border-radius:12px;
            background:#f7fafc;
            border:1px solid #edf1f4;
        }

        .dark .category-product-summary {
            background:#101d28;
            border-color:rgba(148,163,184,.07);
        }

        .category-product-count {
            display:flex;
            flex-direction:column;
            min-width:0;
        }

        .category-product-count strong {
            color:#172033;
            font-size:.92rem;
            font-weight:850;
            font-variant-numeric:tabular-nums;
        }

        .dark .category-product-count strong { color:#f4f8fb; }

        .category-product-count span {
            margin-top:.08rem;
            color:#7b8997;
            font-size:.65rem;
        }

        .category-card-action-row {
            display:grid;
            grid-template-columns:repeat(2,minmax(0,1fr));
            gap:.45rem;
            margin-top:.55rem;
        }

        .category-card-action {
            min-height:40px;
            display:inline-flex;
            align-items:center;
            justify-content:center;
            gap:.38rem;
            padding:.5rem .58rem;
            border-radius:10px;
            border:1px solid transparent;
            font-size:.72rem;
            font-weight:790;
            line-height:1.2;
            text-align:center;
        }

        .category-card-action svg { width:15px;height:15px;flex:0 0 auto; }

        .category-card-action--view {
            color:#0f766e;
            background:rgba(20,184,166,.09);
            border-color:rgba(20,184,166,.14);
        }

        .dark .category-card-action--view { color:#5eead4; }

        .category-card-action--add {
            color:#fff;
            background:linear-gradient(135deg,#14b8a6,#0f9488);
        }

        .category-card-delete {
            min-height:36px;
            padding:.45rem .58rem;
            border-radius:9px;
            color:#dc2626;
            background:rgba(239,68,68,.08);
            border:1px solid rgba(239,68,68,.13);
            font-size:.7rem;
            font-weight:780;
        }

        .dark .category-card-delete { color:#fca5a5; }

        /* Category products detail drawer */
        .category-products-overlay {
            position:fixed;
            inset:0;
            z-index:120080;
        }

        .category-products-backdrop {
            position:absolute;
            inset:0;
            background:rgba(2,8,15,.55);
            backdrop-filter:blur(8px);
            -webkit-backdrop-filter:blur(8px);
        }

        .category-products-panel {
            position:absolute;
            top:0;
            right:0;
            width:min(100%,500px);
            height:100%;
            display:flex;
            flex-direction:column;
            background:#f7f9fb;
            border-left:1px solid #e0e7ed;
            box-shadow:-22px 0 60px rgba(2,8,23,.19);
            animation:category-products-slide .28s cubic-bezier(.16,1,.3,1) both;
        }

        .dark .category-products-panel {
            background:#071018;
            border-color:rgba(148,163,184,.10);
        }

        .category-products-head {
            display:flex;
            align-items:flex-start;
            gap:.7rem;
            padding:1rem;
            background:rgba(255,255,255,.90);
            border-bottom:1px solid #e5eaf0;
            backdrop-filter:blur(12px);
        }

        .dark .category-products-head {
            background:rgba(10,20,29,.94);
            border-color:rgba(148,163,184,.09);
        }

        .category-products-kicker {
            color:#0f9488;
            font-size:.64rem;
            font-weight:850;
            letter-spacing:.08em;
            text-transform:uppercase;
        }

        #category-products-title {
            margin-top:.15rem;
            font-size:1.15rem;
            line-height:1.25;
            font-weight:850;
            letter-spacing:-.025em;
            overflow-wrap:anywhere;
        }

        #category-products-subtitle {
            margin-top:.18rem;
            color:#7b8997;
            font-size:.7rem;
        }

        .category-products-close {
            width:36px;
            height:36px;
            flex:0 0 36px;
            display:grid;
            place-items:center;
            border-radius:11px;
            color:#7b8997;
        }

        .category-products-close svg { width:18px;height:18px; }

        .category-products-actions {
            display:grid;
            grid-template-columns:minmax(0,1fr) auto;
            gap:.5rem;
            padding:.72rem;
            border-bottom:1px solid #e7ecf0;
            background:#fff;
        }

        .dark .category-products-actions {
            background:#0a141d;
            border-color:rgba(148,163,184,.08);
        }

        .category-products-search {
            position:relative;
            min-width:0;
        }

        .category-products-search svg {
            position:absolute;
            left:.72rem;
            top:50%;
            width:16px;height:16px;
            transform:translateY(-50%);
            color:#94a3b8;
        }

        #category-products-search-input {
            width:100%;
            min-height:42px;
            padding:.6rem .7rem .6rem 2.15rem;
            border-radius:11px;
            border:1px solid #dce4eb;
            background:#f8fafc;
            font-size:.78rem;
            outline:none;
        }

        .dark #category-products-search-input {
            color:#f8fafc;
            background:#0f1d29;
            border-color:rgba(148,163,184,.13);
        }

        .category-products-add {
            min-height:42px;
            display:inline-flex;
            align-items:center;
            justify-content:center;
            gap:.38rem;
            padding:.58rem .72rem;
            border-radius:11px;
            color:#fff;
            background:linear-gradient(135deg,#14b8a6,#0f9488);
            font-size:.76rem;
            font-weight:800;
        }

        .category-products-add svg { width:16px;height:16px; }

        .category-products-list {
            flex:1;
            overflow-y:auto;
            padding:.72rem;
        }

        .category-product-row {
            display:grid;
            grid-template-columns:46px minmax(0,1fr) auto;
            gap:.65rem;
            align-items:center;
            padding:.65rem;
            margin-bottom:.48rem;
            border-radius:13px;
            background:#fff;
            border:1px solid #e5eaf0;
        }

        .dark .category-product-row {
            background:#0d1924;
            border-color:rgba(148,163,184,.09);
        }

        .category-product-row img {
            width:46px;
            height:46px;
            object-fit:cover;
            border-radius:11px;
            background:#edf2f6;
        }

        .category-product-row-name {
            color:#172033;
            font-size:.8rem;
            font-weight:790;
            line-height:1.3;
            white-space:normal;
            overflow-wrap:anywhere;
        }

        .dark .category-product-row-name { color:#eef5f8; }

        .category-product-row-meta {
            margin-top:.12rem;
            color:#7b8997;
            font-size:.66rem;
            line-height:1.35;
        }

        .category-product-row-price {
            text-align:right;
            font-size:.79rem;
            font-weight:830;
            font-variant-numeric:tabular-nums;
        }

        .category-product-edit {
            display:inline-flex;
            align-items:center;
            justify-content:center;
            margin-top:.28rem;
            min-height:30px;
            padding:.35rem .52rem;
            border-radius:8px;
            color:#0f766e;
            background:rgba(20,184,166,.09);
            font-size:.66rem;
            font-weight:790;
        }

        .dark .category-product-edit { color:#5eead4; }

        @keyframes category-products-slide {
            from { transform:translateX(26px);opacity:.45; }
            to { transform:translateX(0);opacity:1; }
        }

        @media (max-width:640px) {
            .category-products-panel {
                top:auto;
                bottom:0;
                width:100%;
                height:min(88vh,760px);
                border-left:0;
                border-top:1px solid #dfe6ed;
                border-radius:22px 22px 0 0;
            }

            .category-products-actions {
                grid-template-columns:minmax(0,1fr) 42px;
            }

            .category-products-add {
                width:42px;
                padding:0;
            }

            .category-products-add span { display:none; }

            .category-product-row {
                grid-template-columns:42px minmax(0,1fr);
            }

            .category-product-row img { width:42px;height:42px; }
            .category-product-row > div:last-child {
                grid-column:2;
                text-align:left;
            }

            .category-card-action-row {
                grid-template-columns:1fr;
            }
        }


        /* ============================================================
           PRODUCT MANAGEMENT HUB
           Grid spans the whole catalogue (not one full-width row per category).
           Explicit actions replace "click the whole card to edit".
           ============================================================ */
        #product-management-list.product-catalog-grid {
            display:grid;
            grid-template-columns:repeat(auto-fit,minmax(min(100%,265px),1fr));
            /* A fixed-height scroll area must not compress grid tracks beneath their cards. */
            grid-auto-rows:max-content;
            gap:.72rem;
            align-content:start;
            align-items:start;
        }

        .product-catalog-card {
            display:flex;
            flex-direction:column;
            min-width:0;
            min-height:0;
            padding:.86rem;
            border-radius:17px;
            background:#fff;
            border:1px solid #e5eaf0;
            box-shadow:0 6px 20px rgba(15,23,42,.035);
            overflow:hidden;
            transition:transform 170ms cubic-bezier(.16,1,.3,1),border-color 170ms ease,box-shadow 170ms ease;
        }

        .dark .product-catalog-card {
            background:#0d1924;
            border-color:rgba(148,163,184,.10);
        }

        @media (hover:hover) and (pointer:fine) {
            .product-catalog-card:hover {
                transform:translateY(-2px);
                border-color:rgba(20,184,166,.22);
                box-shadow:0 12px 28px rgba(15,23,42,.07);
            }
        }

        .product-catalog-card-topline {
            display:flex;
            align-items:center;
            justify-content:space-between;
            gap:.5rem;
            min-width:0;
            margin-bottom:.65rem;
        }

        .product-category-chip {
            display:inline-flex;
            align-items:center;
            max-width:calc(100% - 42px);
            min-height:27px;
            padding:.3rem .48rem;
            border-radius:999px;
            color:#0f766e;
            background:rgba(20,184,166,.09);
            border:1px solid rgba(20,184,166,.12);
            font-size:.64rem;
            font-weight:790;
            line-height:1.2;
            min-width:0;
            white-space:nowrap;
            overflow:hidden;
            text-overflow:ellipsis;
        }

        .dark .product-category-chip { color:#5eead4; }

        .product-stock-movement-btn {
            width:34px;
            height:34px;
            flex:0 0 34px;
            display:grid;
            place-items:center;
            border-radius:10px;
            color:#64748b;
            background:#f7f9fb;
            border:1px solid #e3e9ef;
            transition:background 150ms ease,color 150ms ease,transform 150ms ease;
        }

        .dark .product-stock-movement-btn {
            color:#9fb0bf;
            background:#101d28;
            border-color:rgba(148,163,184,.10);
        }

        .product-stock-movement-btn svg { width:17px;height:17px; }

        .product-stock-movement-btn:hover {
            color:#0f766e;
            background:rgba(20,184,166,.09);
        }

        .dark .product-stock-movement-btn:hover { color:#5eead4; }
        .product-stock-movement-btn:active { transform:scale(.95); }

        .product-catalog-main {
            display:grid;
            grid-template-columns:58px minmax(0,1fr);
            gap:.68rem;
            align-items:center;
        }

        .product-catalog-thumb {
            width:58px;
            height:58px;
            object-fit:contain;
            border-radius:13px;
            padding:.2rem;
            background:#f1f5f9;
            border:1px solid #e5eaf0;
        }

        .dark .product-catalog-thumb {
            background:#172531;
            border-color:rgba(148,163,184,.09);
        }

        .product-catalog-name {
            color:#172033;
            font-size:.88rem;
            line-height:1.3;
            font-weight:820;
            display:block;
            min-width:0;
            max-width:100%;
            white-space:nowrap;
            overflow:hidden;
            text-overflow:ellipsis;
        }

        .dark .product-catalog-name { color:#f2f7fa; }

        .product-catalog-status-row {
            display:flex;
            flex-wrap:nowrap;
            min-width:0;
            align-items:center;
            gap:.3rem;
            margin-top:.3rem;
            overflow:hidden;
        }

        .product-stock-pill,
        .product-status-pill {
            display:inline-flex;
            align-items:center;
            min-height:21px;
            min-width:0;
            max-width:100%;
            padding:.22rem .4rem;
            border-radius:999px;
            font-size:.6rem;
            font-weight:760;
            line-height:1.1;
            white-space:nowrap;
            overflow:hidden;
            text-overflow:ellipsis;
        }

        .product-stock-pill {
            color:#475569;
            background:#eef2f6;
        }

        .dark .product-stock-pill {
            color:#c9d5df;
            background:#172531;
        }

        .product-stock-pill.is-low {
            color:#b91c1c;
            background:rgba(239,68,68,.10);
        }

        .dark .product-stock-pill.is-low { color:#fca5a5; }

        .product-catalog-stats {
            display:grid;
            grid-template-columns:repeat(2,minmax(0,1fr));
            gap:.4rem;
            margin-top:.65rem;
        }

        .product-catalog-stats.is-price-only {
            grid-template-columns:minmax(0,1fr);
        }

        .product-catalog-stat {
            display:flex;
            align-items:baseline;
            justify-content:space-between;
            gap:.35rem;
            min-width:0;
            padding:.5rem .48rem;
            border-radius:11px;
            background:#f7fafc;
            border:1px solid #edf1f4;
            overflow:hidden;
        }

        .dark .product-catalog-stat {
            background:#101d28;
            border-color:rgba(148,163,184,.07);
        }

        .product-catalog-stat span {
            display:block;
            color:#8794a2;
            font-size:.59rem;
            font-weight:760;
            text-transform:uppercase;
            letter-spacing:.045em;
        }

        .product-catalog-stat strong {
            display:block;
            min-width:0;
            max-width:100%;
            color:#172033;
            font-size:clamp(.67rem,1.1vw,.76rem);
            font-weight:840;
            font-variant-numeric:tabular-nums;
            white-space:nowrap;
            overflow:hidden;
            text-overflow:ellipsis;
            text-align:right;
        }

        .dark .product-catalog-stat strong { color:#eef5f8; }

        .product-catalog-stat.is-positive strong { color:#059669; }
        .product-catalog-stat.is-negative strong { color:#dc2626; }

        .product-catalog-actions {
            display:grid;
            grid-template-columns:repeat(2,minmax(0,1fr));
            gap:.45rem;
            margin-top:auto;
            padding-top:.72rem;
        }

        .product-catalog-action {
            min-height:40px;
            display:inline-flex;
            align-items:center;
            justify-content:center;
            gap:.35rem;
            padding:.5rem .58rem;
            border-radius:10px;
            border:1px solid transparent;
            font-size:.72rem;
            font-weight:790;
            line-height:1.2;
            text-align:center;
            min-width:0;
            white-space:nowrap;
            overflow:hidden;
        }

        .product-catalog-action > span {
            min-width:0;
            overflow:hidden;
            text-overflow:ellipsis;
            white-space:nowrap;
        }

        .product-catalog-action svg { width:15px;height:15px;flex:0 0 auto; }

        .product-catalog-action--edit {
            color:#0f766e;
            background:rgba(20,184,166,.09);
            border-color:rgba(20,184,166,.14);
        }

        .dark .product-catalog-action--edit { color:#5eead4; }

        .product-catalog-action--danger {
            color:#dc2626;
            background:rgba(239,68,68,.08);
            border-color:rgba(239,68,68,.13);
        }

        .dark .product-catalog-action--danger { color:#fca5a5; }

        .product-catalog-action--warn {
            color:#b45309;
            background:rgba(245,158,11,.09);
            border-color:rgba(245,158,11,.14);
        }

        .dark .product-catalog-action--warn { color:#fbbf24; }

        /* List mode keeps the same explicit action language and no truncation. */
        .product-catalog-list-section {
            margin-bottom:.85rem;
        }

        .product-catalog-list-heading {
            display:flex;
            align-items:center;
            justify-content:space-between;
            gap:.6rem;
            margin:.15rem .15rem .45rem;
        }

        .product-catalog-list-heading h3 {
            font-size:.88rem;
            font-weight:820;
            overflow-wrap:anywhere;
        }

        .product-catalog-list-row {
            display:grid;
            grid-template-columns:48px minmax(0,1fr) auto;
            gap:.65rem;
            align-items:center;
            padding:.62rem .68rem;
            margin-bottom:.4rem;
            border-radius:13px;
            background:#fff;
            border:1px solid #e5eaf0;
        }

        .dark .product-catalog-list-row {
            background:#0d1924;
            border-color:rgba(148,163,184,.09);
        }

        .product-catalog-list-row img {
            width:48px;height:48px;
            object-fit:contain;
            border-radius:11px;
            padding:.15rem;
            background:#f1f5f9;
        }

        .dark .product-catalog-list-row img { background:#172531; }

        .product-catalog-list-actions {
            display:flex;
            flex-wrap:wrap;
            justify-content:flex-end;
            gap:.35rem;
        }

        @media (max-width:680px) {
            /* Only create another column when the cards actually have room. */
            #product-management-list.product-catalog-grid {
                grid-template-columns:repeat(auto-fit,minmax(min(100%,265px),1fr));
                gap:.55rem;
            }

            .product-catalog-card {
                padding:.72rem;
            }
            .product-catalog-card-topline { margin-bottom:.45rem; }
            .product-catalog-main { grid-template-columns:48px minmax(0,1fr); gap:.55rem; }
            .product-catalog-thumb { width:48px; height:48px; }
            .product-catalog-name { font-size:.82rem; }
            .product-catalog-stats { margin-top:.55rem; }
            .product-catalog-actions { padding-top:.58rem; }
            .product-catalog-action { padding:.48rem .35rem; font-size:.7rem; }

            .product-catalog-list-row {
                grid-template-columns:42px minmax(0,1fr);
            }
            .product-catalog-list-actions {
                grid-column:2;
                flex-wrap:nowrap;
                min-width:0;
                justify-content:flex-start;
            }
            .product-catalog-list-actions .product-catalog-action {
                padding:.46rem .4rem;
                font-size:.67rem;
            }
            .product-catalog-list-row .min-w-0 > p {
                min-width:0;
                max-width:100%;
                overflow:hidden;
                text-overflow:ellipsis;
                white-space:nowrap;
            }
        }

        @media (max-width:380px) {
            #product-management-list.product-catalog-grid {
                grid-template-columns:minmax(0,1fr);
            }
        }



        .product-image-status {
            color:#64748b;
            font-size:.68rem;
            line-height:1.45;
        }

        .dark .product-image-status { color:#94a3b8; }

        .product-image-status.is-processing {
            color:#0f766e;
            font-weight:760;
        }

        .dark .product-image-status.is-processing { color:#5eead4; }

        .product-image-status.is-ready {
            color:#15803d;
            font-weight:720;
        }

        .dark .product-image-status.is-ready { color:#4ade80; }

        .product-image-status.is-error {
            color:#dc2626;
            font-weight:720;
        }

        .dark .product-image-status.is-error { color:#f87171; }



        /* Category action alignment:
           the global .admin-only rule changes admin buttons to display:block,
           which was breaking the icon/text centering on Add product. */
        body.is-admin .category-card-action.admin-only {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
        }

        body.is-admin .category-card-delete.admin-only {
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
        }

        .category-card-action > svg,
        .category-card-action > span {
            position: static !important;
            transform: none !important;
        }

        .category-card-action > span {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1.2;
        }

        .category-card-action-row > .category-card-action {
            width: 100%;
            min-width: 0;
        }


        /* Auth uses the real CSS viewport; no vw typography or whole-page scaling. */
        #view-login,
        #view-signup {
            width: 100%;
            min-width: 0;
            min-height: 100vh;
            min-height: 100dvh;
            padding-top: max(1rem, env(safe-area-inset-top));
            padding-right: max(1rem, env(safe-area-inset-right));
            padding-bottom: max(1rem, env(safe-area-inset-bottom));
            padding-left: max(1rem, env(safe-area-inset-left));
            font-size: 14px;
            line-height: 1.5;
        }

        .auth-layout {
            width: 100%;
            min-width: 0;
        }

        .auth-card {
            width: min(100%, 448px);
            max-width: 100%;
            min-width: 0;
            margin-inline: auto;
        }

        .login-kicker {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            color: #0c766c;
            font-size: 0.7rem;
            font-weight: 800;
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }

        .login-kicker::before {
            content: '';
            width: 0.5rem;
            height: 0.5rem;
            border-radius: 999px;
            background: #10b3a0;
            box-shadow: 0 0 0 0.3rem rgba(var(--accent-rgb), 0.14);
        }

        .login-platforms {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 0.5rem;
            margin-top: 1rem;
        }

        .login-platform {
            display: flex;
            min-width: 0;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            padding: 0.65rem 0.35rem;
            border: 1px solid rgba(148, 163, 184, 0.28);
            border-radius: 0.9rem;
            background: rgba(255, 255, 255, 0.62);
            color: #334155;
            font-size: 0.72rem;
            font-weight: 800;
        }

        .login-platform svg { width: 1.05rem; height: 1.05rem; flex: none; }
        .dark .login-platform { background: rgba(15, 23, 42, 0.62); color: #e2e8f0; }

        .login-trust-note {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            margin-top: 0.8rem;
            color: #64748b;
            font-size: 0.7rem;
            font-weight: 600;
        }

        /* Liquid-metal treatment inspired by the requested ThreeUI pill, implemented locally so
           the zero-build HTML app keeps loading reliably in browsers and native shells. */
        #google-getstarted-btn,
        #google-signin-btn {
            position: relative;
            isolation: isolate;
            overflow: hidden;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,.55);
            background: linear-gradient(115deg,var(--accent-2),var(--accent) 30%,var(--accent-2) 57%,var(--accent) 79%,var(--accent-2));
            background-size: 220% 100%;
            color: var(--accent-contrast, #fff) !important;
            text-shadow: 0 1px 2px rgba(0,0,0,.45);
            box-shadow: inset 0 1px 2px rgba(255,255,255,.7), inset 0 -9px 20px rgba(0,54,51,.22), 0 13px 28px rgba(var(--accent-rgb),.28);
            transition: transform .2s ease, background-position .45s ease, box-shadow .2s ease;
        }
        #google-getstarted-btn::before,
        #google-signin-btn::before { content:''; position:absolute; z-index:-1; inset:2px 7px 52%; border-radius:inherit; background:linear-gradient(90deg,transparent,rgba(255,255,255,.68),transparent); opacity:.75; }
        #google-getstarted-btn:hover,
        #google-signin-btn:hover { transform:translateY(-2px); background-position:100% 0; box-shadow:inset 0 1px 2px rgba(255,255,255,.75),0 17px 32px rgba(var(--accent-rgb),.34); }
        #google-getstarted-btn:active,
        #google-signin-btn:active { transform:translateY(1px) scale(.99); }

        #view-login .auth-card h1,
        #view-signup .auth-card h1 {
            font-size: 24px;
            line-height: 32px;
        }

        #view-login .auth-card input,
        #view-signup .auth-card input,
        #view-login .auth-card button,
        #view-signup .auth-card button {
            font-size: 16px;
        }

        #login-error,
        #signup-error {
            overflow-wrap: anywhere;
        }

        @media (max-width: 480px), (max-height: 720px) {
            #view-login,
            #view-signup {
                justify-content: flex-start;
            }

            #view-login .glass-panel,
            #view-signup .glass-panel {
                padding: 0.85rem;
            }

            #view-login .main-brand-logo,
            #view-signup .main-brand-logo {
                width: min(9rem, 45vw);
                margin-bottom: 0.6rem;
            }

            #view-login .my-3,
            #view-signup .my-3 {
                margin-top: 0.6rem;
                margin-bottom: 0.6rem;
            }
        }

        @media (max-width: 767px) {
            #view-login {
                padding: 0;
                background:
                    radial-gradient(circle at 90% 4%, rgba(var(--accent-light-rgb), 0.2), transparent 35%),
                    linear-gradient(165deg, #f8fffd 0%, #effcf8 48%, #ffffff 100%);
            }

            #view-login .auth-layout { min-height: 100dvh; display: flex; }
            #view-login .auth-card {
                display: flex;
                min-height: 100dvh;
                width: 100%;
                max-width: none;
                flex-direction: column;
                justify-content: center;
                border: 0;
                border-radius: 0;
                padding: max(1.5rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
                background: transparent;
                box-shadow: none;
            }

            #view-login .main-brand-logo { width: min(11rem, 48vw); margin-bottom: 1.35rem; }
            #view-login .login-title { font-size: clamp(2rem, 10vw, 2.75rem); line-height: 1.05; }
            #view-login .login-subtitle { font-size: 0.92rem; line-height: 1.55; }
            #view-login #google-getstarted-btn { min-height: 3.5rem; box-shadow: 0 12px 28px rgba(var(--accent-2-rgb), 0.28); }
            #view-login #google-signin-btn { min-height: 3.25rem; }
        }


        .invoice-total-cancelled {
            position: relative;
            display: inline-block;
            color: #dc2626;
        }

        .invoice-total-cancelled::before,
        .invoice-total-cancelled::after {
            content: '';
            position: absolute;
            left: -0.15em;
            right: -0.15em;
            top: 50%;
            height: 0.12em;
            border-radius: 999px;
            background: currentColor;
            transform-origin: center;
        }

        .invoice-total-cancelled::before {
            transform: rotate(12deg);
        }

        .invoice-total-cancelled::after {
            transform: rotate(-12deg);
        }

        .invoice-cancelled-card {
            border: 2px solid #fecaca;
            box-shadow: inset 0 0 0 1px #fee2e2;
        }

        .invoice-cancelled-watermark {
            position: absolute;
            inset: 46% auto auto 50%;
            transform: translate(-50%, -50%) rotate(-18deg);
            color: rgba(220, 38, 38, 0.08);
            font-size: clamp(3.5rem, 14vw, 7rem);
            font-weight: 900;
            letter-spacing: 0.08em;
            pointer-events: none;
            white-space: nowrap;
        }

        /* --- Invoice document: fintech-style receipt --- */
        .invoice-doc {
            background: #ffffff;
            color: #0f172a;
            border-radius: 1.25rem;
            border: 1px solid #e7ebf0;
            box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
            overflow: hidden;
        }

        .invoice-doc-accent-bar {
            height: 6px;
            background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
        }

        /* Decorative letterhead band behind the logo/number block. Built entirely from CSS
           gradients (no external image, no SVG filters) so it rasterises identically in the
           app, the PDF/PNG export, and print, the same reason the logo itself is sized in
           plain pixels rather than anything html2canvas has to resolve on the fly. */
        .invoice-doc-hero {
            position: relative;
            overflow: hidden;
            background:
                radial-gradient(120% 160% at 8% -20%, rgba(var(--accent-rgb), 0.16) 0%, rgba(var(--accent-rgb), 0) 60%),
                radial-gradient(90% 140% at 105% 0%, rgba(var(--accent-rgb), 0.12) 0%, rgba(var(--accent-rgb), 0) 65%),
                #ffffff;
        }

        .invoice-doc-hero-blob {
            position: absolute;
            border-radius: 999px;
            pointer-events: none;
            opacity: 0.16;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
        }

        .invoice-doc-hero-blob--a { width: 12rem; height: 12rem; top: -6rem; left: -4rem; }
        .invoice-doc-hero-blob--b { width: 9rem; height: 9rem; top: -3.5rem; right: 6%; opacity: 0.1; }

        /* "Plain" invoice look: flat white header, no wave gradients or blobs, solid accent
           color instead of the accent-to-accent-2 gradient on the top bar and table header. */
        .invoice-doc--plain .invoice-doc-hero {
            background: #ffffff;
            border-bottom: 1px solid #eef1f5;
        }

        .invoice-doc--plain .invoice-doc-accent-bar {
            background: var(--accent);
        }

        .invoice-doc--plain .invoice-doc-table thead th {
            background: var(--accent);
        }

        .invoice-doc-header {
            position: relative;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: flex-start;
            gap: 1rem;
            padding: 1.1rem 1.3rem 1rem;
        }

        /* Below ~420px (most phones in portrait), don't rely on flex-wrap deciding whether
           there's "enough" room, force the date block onto its own full-width row below the
           business name every time, and shrink both so there's real margin either way. This
           replaces a header that was overlapping/colliding on real devices. */
        @media (max-width: 420px) {
            .invoice-doc-header {
                flex-direction: column;
            }
            .invoice-doc-number-block {
                text-align: left;
                width: 100%;
            }
            .invoice-doc-brand-name {
                font-size: 0.95rem;
            }
            .invoice-doc-number {
                font-size: 1.2rem;
            }
        }

        .invoice-doc-brand {
            display: flex;
            align-items: center;
            gap: 1rem;
            min-width: 0;
            flex: 1 1 auto;
        }

        /* The logo box. An <img class="invoice-doc-logo"> sits inside
           .invoice-doc-logo-frame; the fallback initial-letter div applies both classes
           directly to itself since it has no image to frame. */
        .invoice-doc-logo-frame {
            width: 7.8rem;
            height: 7.8rem;
            aspect-ratio: 1 / 1;
            border-radius: 1.2rem;
            border: 1px solid #eef1f5;
            background: #fff;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        /* object-fit is intentionally NOT how this stays unstretched: html2canvas (the
           renderer behind the PDF/PNG/print exports) does not support object-fit, it
           ignores the "preserve aspect ratio" behavior and force-stretches the raw image
           to fill width x height, which is exactly what made non-square logos look
           squashed in exported invoices. Sizing via max-width/max-height + auto is plain
           box-model scaling, which html2canvas renders correctly, so the logo keeps its
           real aspect ratio in the app, the PDF, the PNG share, and print alike. */
        .invoice-doc-logo {
            display: block;
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            object-fit: contain;
        }

        .invoice-doc-logo--fallback {
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Manrope', sans-serif;
            font-weight: 800;
            font-size: 2.4rem;
            color: #ffffff;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            border: none;
        }

        .invoice-doc-brand-name {
            font-family: 'Manrope', sans-serif;
            font-weight: 800;
            font-size: 1.3rem;
            letter-spacing: -0.01em;
            line-height: 1.25;
            margin: 0;
            color: #0f172a;
            /* Business names are user-entered and can run long. Keep the whole name on one
               line rather than breaking mid-word (the earlier bug), but let it truncate with
               an ellipsis instead of overflowing the header once it's too long to fit, min-width:0
               is required here because this is a flex item and flex items don't shrink below
               their content width by default. overflow-x/-y are split (rather than the
               `overflow: hidden` shorthand) so only horizontal overflow is clipped for the
               ellipsis, clipping vertically too was cutting the tops off tall letters. */
            white-space: nowrap;
            overflow-x: hidden;
            overflow-y: visible;
            text-overflow: ellipsis;
            min-width: 0;
            max-width: 100%;
        }

        /* Name + slogan sit on one line, filling the width the header hands the brand block
           (it flexes to fill the space next to the logo, up to where the order number/status
           block on the right claims its own room) instead of the slogan being a small caption
           tucked underneath. */
        .invoice-doc-brand-title-row {
            display: flex;
            align-items: baseline;
            flex-wrap: wrap;
            column-gap: 0.55rem;
            row-gap: 0.1rem;
        }

        .invoice-doc-brand-name-divider {
            font-size: 1.1rem;
            font-weight: 300;
            color: #cbd5e1;
        }

        .invoice-doc-brand-name-slogan {
            font-family: 'Manrope', sans-serif;
            font-weight: 700;
            font-size: 1rem;
            color: var(--accent);
            letter-spacing: 0.01em;
        }

        .invoice-doc-brand-line {
            font-size: 0.74rem;
            color: #64748b;
            line-height: 1.5;
        }

        /* Business address/phone/email/website, shown once directly under the business name
           instead of repeated again at the bottom of the invoice, two lines (location+phone,
           then email+website) rather than one crowded row of four. */
        .invoice-doc-brand-contacts {
            display: flex;
            flex-direction: column;
            row-gap: 0.25rem;
            margin-top: 0.4rem;
        }

        .invoice-doc-brand-contacts-row {
            display: flex;
            flex-wrap: wrap;
            row-gap: 0.2rem;
            column-gap: 0.9rem;
        }

        .invoice-doc-brand-contact-item {
            display: flex;
            align-items: center;
            gap: 0.3rem;
            font-size: 0.72rem;
            color: #64748b;
            white-space: nowrap;
        }

        .invoice-doc-brand-contact-item svg { width: 0.85rem; height: 0.85rem; color: var(--accent); flex-shrink: 0; }

        .invoice-doc-slogan {
            font-size: 0.72rem;
            font-weight: 600;
            color: var(--accent);
            margin-top: 0.3rem;
        }

        .invoice-doc-number-block {
            text-align: right;
            flex-shrink: 0;
        }

        .invoice-doc-tagline {
            font-size: 0.68rem;
            font-weight: 600;
            line-height: 1.5;
            color: #64748b;
            padding-bottom: 0.5rem;
            margin-bottom: 0.6rem;
            border-bottom: 2px solid var(--accent);
            display: inline-block;
        }

        .invoice-doc-eyebrow {
            display: block;
            font-size: 0.65rem;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: #94a3b8;
        }

        .invoice-doc-number {
            display: block;
            font-family: 'Manrope', sans-serif;
            font-weight: 800;
            font-size: 1.55rem;
            font-variant-numeric: tabular-nums;
            margin-top: 0.15rem;
            letter-spacing: -0.01em;
        }

        .invoice-status-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            margin-top: 0.6rem;
            padding: 0.3rem 0.75rem;
            border-radius: 999px;
            font-size: 0.64rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        .invoice-status-badge svg { width: 0.85rem; height: 0.85rem; flex-shrink: 0; }

        .invoice-status-badge--paid {
            background: #dcfce7;
            color: #15803d;
        }

        .invoice-status-badge--pending {
            background: #fef3c7;
            color: #92400e;
        }

        .invoice-status-badge--void {
            background: #fee2e2;
            color: #b91c1c;
        }

        /* Was a 5-across grid — too narrow for real values like a long customer name or a
           "Cashier: X" sub-line, which wrapped to 3 lines and got clipped by the old
           overflow:hidden on .invoice-doc-meta-item-text, reading as overlapping text in the
           exported PDF. Flex-wrap with a wider min-width (3 cards per row, wrapping to a
           second row of 2) gives each card roughly 60% more width, and nothing here clips —
           a card simply grows taller if its content needs a second line. */
        .invoice-doc-meta-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 0.6rem;
            margin: 1.25rem 0;
        }

        .invoice-doc-meta-item {
            display: flex;
            align-items: flex-start;
            gap: 0.55rem;
            font-size: 0.75rem;
            padding: 0.75rem 0.8rem;
            background: #f8fafc;
            border: 1px solid #eef1f5;
            border-radius: 0.75rem;
            min-width: 0;
            min-height: 3.1rem;
            flex: 1 1 calc(33.333% - 0.4rem);
        }

        @media (max-width: 640px) {
            .invoice-doc-meta-item { flex: 1 1 calc(50% - 0.3rem); }
        }

        .invoice-doc-meta-icon {
            flex-shrink: 0;
            width: 1.8rem;
            height: 1.8rem;
            border-radius: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(var(--accent-rgb), 0.12);
            color: var(--accent);
        }

        .invoice-doc-meta-icon svg { width: 1rem; height: 1rem; display: block; }

        .invoice-doc-meta-item-text { min-width: 0; overflow: visible; flex: 1 1 auto; }

        /* Used by the simpler EOD/Inventory-forecast reports, which still lay out meta items
           as plain left/right pairs rather than the full icon-card row above. */
        .invoice-doc-meta-item--right { margin-left: auto; text-align: right; }

        .invoice-doc-meta-item span,
        .invoice-doc-meta-row .invoice-doc-meta-item-text span {
            display: block;
            font-size: 0.62rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #94a3b8;
        }

        .invoice-doc-meta-item strong,
        .invoice-doc-meta-row .invoice-doc-meta-item-text strong {
            display: block;
            font-weight: 700;
            color: #0f172a;
            font-size: 0.82rem;
            line-height: 1.35;
            overflow-wrap: anywhere;
            margin-top: 0.15rem;
        }

        /* Compact 2-card version of the meta grid: just Date+Created By and Billed To — Order
           No. and Status are already shown once up in the header, so repeating them again
           down here was redundant. Each card can stack more than one icon+label row. */
        .invoice-doc-meta-grid--compact {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.6rem;
            margin: 0.9rem 0;
        }

        @media (max-width: 640px) {
            .invoice-doc-meta-grid--compact { grid-template-columns: 1fr; }
        }

        .invoice-doc-meta-card {
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
            padding: 0.6rem 0.8rem;
            background: #f8fafc;
            border: 1px solid #eef1f5;
            border-radius: 0.75rem;
            min-width: 0;
        }

        .invoice-doc-meta-row {
            display: flex;
            align-items: flex-start;
            gap: 0.55rem;
            min-width: 0;
        }

        .invoice-doc-meta-row + .invoice-doc-meta-row {
            padding-top: 0.55rem;
            border-top: 1px solid #e7ebf1;
        }

        .invoice-doc-table-wrap {
            border-radius: 0.85rem;
            border: 1px solid #eef1f5;
            overflow: hidden;
        }

        .invoice-doc-table {
            width: 100%;
            font-size: 0.85rem;
            border-collapse: collapse;
        }

        .invoice-doc-table thead th {
            text-align: left;
            padding: 0.6rem 0.75rem;
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #ffffff;
            background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
            white-space: nowrap;
        }

        .invoice-doc-table thead th.text-right { text-align: right; }
        .invoice-doc-table thead th.invoice-doc-col-index { width: 2.4rem; text-align: center; }

        .invoice-doc-table tbody td {
            padding: 0.75rem 0.75rem;
            border-bottom: 1px solid #eef1f5;
            vertical-align: top;
            background: #ffffff;
        }

        .invoice-doc-table tbody tr:last-child td {
            border-bottom: none;
        }

        .invoice-doc-table tbody td.invoice-doc-col-index {
            text-align: center;
            color: #94a3b8;
            font-size: 0.78rem;
            white-space: nowrap;
            padding-left: 0.3rem;
            padding-right: 0.3rem;
        }

        .invoice-doc-item-name {
            font-weight: 600;
            color: #0f172a;
            display: block;
            overflow-wrap: anywhere;
            font-size: 0.88rem;
        }

        .invoice-doc-item-qty {
            font-size: 0.72rem;
            color: #94a3b8;
            display: block;
            margin-top: 0.15rem;
            overflow-wrap: anywhere;
        }

        .invoice-doc-item-discount {
            font-size: 0.72rem;
            color: #dc2626;
            margin-top: 0.2rem;
            font-weight: 500;
        }

        .invoice-doc-item-amount {
            font-variant-numeric: tabular-nums;
            font-weight: 700;
            white-space: nowrap;
        }

        .invoice-doc-item-unit-price {
            font-variant-numeric: tabular-nums;
            white-space: nowrap;
            color: #475569;
        }

        .invoice-doc-item-line-discount {
            font-variant-numeric: tabular-nums;
            white-space: nowrap;
            color: #dc2626;
            font-weight: 600;
        }

        .invoice-doc-item-line-discount--none { color: #cbd5e1; font-weight: 400; }

        .invoice-doc-bottom-row {
            display: flex;
            align-items: stretch;
            gap: 1rem;
            margin-top: 1.5rem;
        }

        @media (max-width: 640px) {
            .invoice-doc-bottom-row { flex-direction: column; }
        }

        .invoice-doc-bottom-left { flex: 1 1 50%; min-width: 0; }
        .invoice-doc-bottom-right { flex: 1 1 50%; min-width: 0; }

        .invoice-doc-note {
            padding: 0.9rem 1rem;
            border-radius: 0.85rem;
            background: #f8fafc;
            border: 1px solid #eef1f5;
            height: 100%;
        }

        .dark .invoice-doc-note { background: rgba(255, 255, 255, 0.04); border-color: rgba(148, 163, 184, 0.3); }

        .invoice-doc-note-heading {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            font-size: 0.68rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #94a3b8;
        }

        .invoice-doc-note-heading svg { width: 1.1rem; height: 1.1rem; color: var(--accent); flex-shrink: 0; }

        .invoice-doc-note p {
            font-size: 0.85rem;
            color: #334155;
            margin-top: 0.4rem;
            white-space: pre-wrap;
            line-height: 1.45;
        }

        .dark .invoice-doc-note p { color: #e2e8f0; }

        .invoice-doc-totals {
            padding-top: 0;
        }

        .invoice-doc-totals-row {
            display: flex;
            justify-content: space-between;
            padding: 0.35rem 0;
            font-size: 0.85rem;
            color: #475569;
            font-variant-numeric: tabular-nums;
        }

        .invoice-doc-totals-row--discount { color: #dc2626; }

        .invoice-grand-total-banner {
            position: relative;
            margin-top: 0.6rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1.1rem 1.3rem;
            border-radius: 0.85rem;
            background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
            box-shadow: 0 12px 28px rgba(var(--accent-rgb), 0.28);
            overflow: hidden;
        }

        .invoice-grand-total-banner::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 55%);
            pointer-events: none;
        }

        .invoice-grand-total-label {
            color: rgba(255, 255, 255, 0.88);
            font-weight: 700;
            font-size: 0.85rem;
            letter-spacing: 0.03em;
            text-transform: uppercase;
        }

        .invoice-grand-total-amount {
            font-family: 'Manrope', sans-serif;
            color: #ffffff;
            font-weight: 800;
            font-size: 1.55rem;
            font-variant-numeric: tabular-nums;
            letter-spacing: -0.01em;
        }

        /* --- Trust badges row --- */
        .invoice-doc-badges-row {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 0.75rem;
            margin-top: 1.4rem;
            padding-top: 1.2rem;
            border-top: 1px solid #eef1f5;
        }

        @media (max-width: 640px) {
            .invoice-doc-badges-row { grid-template-columns: 1fr; }
        }

        .invoice-doc-badge {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            gap: 0.35rem;
        }

        .invoice-doc-badge-icon {
            width: 2.4rem;
            height: 2.4rem;
            border-radius: 999px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(var(--accent-rgb), 0.12);
            color: var(--accent);
        }

        .invoice-doc-badge-icon svg { width: 1.3rem; height: 1.3rem; }

        .invoice-doc-badge strong {
            font-size: 0.76rem;
            font-weight: 700;
            color: #0f172a;
            line-height: 1.3;
        }

        .invoice-doc-badge span {
            font-size: 0.7rem;
            color: #64748b;
            line-height: 1.3;
        }

        /* --- Signature + QR row --- */
        .invoice-doc-signoff-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            margin-top: 1.4rem;
            padding-top: 1.2rem;
            border-top: 1px solid #eef1f5;
        }

        .invoice-doc-signature-block { min-width: 0; }

        .invoice-doc-signature {
            font-family: 'Caveat', cursive;
            font-weight: 700;
            font-size: 1.9rem;
            color: var(--accent);
            line-height: 1;
        }

        .invoice-doc-footer-note {
            margin: 0.15rem 0 0;
            font-size: 0.78rem;
            color: #94a3b8;
        }

        .dark .invoice-doc-footer-note { color: #64748b; }

        .invoice-doc-qr-block {
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.3rem;
        }

        .invoice-doc-qr-box {
            width: 4.6rem;
            height: 4.6rem;
            border-radius: 0.6rem;
            border: 1px solid #eef1f5;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            background: #fff;
        }

        .invoice-doc-qr-box img { display: block; width: 100%; height: 100%; }

        .invoice-doc-qr-caption {
            font-size: 0.6rem;
            color: #94a3b8;
            text-align: center;
            line-height: 1.25;
            max-width: 5.5rem;
        }

        /* --- Footer: contact details, social links, slogan --- */
        .invoice-doc-footer {
            margin-top: 0.9rem;
            padding-top: 0.85rem;
            border-top: 1px solid #eef1f5;
        }

        .invoice-doc-footer-row {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
        }

        .invoice-doc-footer-contacts {
            display: flex;
            flex-wrap: wrap;
            gap: 0.9rem;
            font-size: 0.72rem;
            color: #64748b;
        }

        .invoice-doc-footer-contact-item {
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }

        .invoice-doc-footer-contact-item svg { width: 0.9rem; height: 0.9rem; color: var(--accent); flex-shrink: 0; }

        .invoice-doc-footer-social {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .invoice-doc-footer-social-pill {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.3rem 0.8rem 0.3rem 0.3rem;
            border-radius: 999px;
            background: rgba(var(--accent-rgb), 0.08);
        }

        .invoice-doc-footer-social-icon {
            width: 2.15rem;
            height: 2.15rem;
            border-radius: 0.6rem;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 0.74rem;
            font-weight: 800;
            line-height: 1;
            background: rgba(var(--accent-rgb), 0.12);
            color: var(--accent);
            overflow: hidden;
            padding: 3px;
        }

        .invoice-doc-footer-social-icon svg { width: 1.05rem; height: 1.05rem; }

        .invoice-doc-footer-social-handle {
            font-size: 0.78rem;
            font-weight: 600;
            color: #475569;
            white-space: nowrap;
        }

        /* Same badge look as the invoice footer's social icons, used in the Settings form so
           each URL/username row is clearly labeled by platform without a text placeholder
           being the only cue. */
        .settings-social-icon {
            width: 2rem;
            height: 2rem;
            border-radius: 0.55rem;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ffffff;
            font-size: 0.68rem;
            font-weight: 800;
            overflow: hidden;
        }

        /* Wraps a .settings-social-icon badge so tapping it opens a file picker for
           uploading that platform's own official icon image (we can't draw the real
           trademarked logos ourselves, so the user supplies their own file). */
        .settings-social-icon-btn {
            padding: 0;
            border: none;
            background: transparent;
            cursor: pointer;
            border-radius: 0.55rem;
            flex-shrink: 0;
            line-height: 0;
            position: relative;
        }
        .settings-social-icon-btn:hover .settings-social-icon {
            box-shadow: 0 0 0 2px var(--accent, #14b8a6);
        }
        .settings-social-icon-btn:focus-visible .settings-social-icon {
            box-shadow: 0 0 0 2px var(--accent, #14b8a6);
        }

        /* Small on/off switch placed in front of each social row so a platform can be
           hidden from the invoice manually, independent of whether its URL is filled in. */
        .settings-toggle {
            position: relative;
            display: inline-flex;
            flex-shrink: 0;
            cursor: pointer;
        }
        .settings-toggle input {
            position: absolute;
            opacity: 0;
            width: 0;
            height: 0;
        }
        .settings-toggle-track {
            width: 2.35rem;
            height: 1.3rem;
            background: #cbd5e1;
            border-radius: 999px;
            display: block;
            position: relative;
            transition: background 0.15s ease;
            flex-shrink: 0;
        }
        .dark .settings-toggle-track {
            background: #475569;
        }
        .settings-toggle-thumb {
            position: absolute;
            top: 0.15rem;
            left: 0.15rem;
            width: 1rem;
            height: 1rem;
            background: #fff;
            border-radius: 999px;
            box-shadow: 0 1px 2px rgba(0,0,0,0.25);
            transition: transform 0.15s ease;
        }
        .settings-toggle input:checked + .settings-toggle-track {
            background: var(--accent, #14b8a6);
        }
        .settings-toggle input:checked + .settings-toggle-track .settings-toggle-thumb {
            transform: translateX(1.05rem);
        }
        .settings-toggle input:focus-visible + .settings-toggle-track {
            box-shadow: 0 0 0 2px var(--accent, #14b8a6);
        }

        /* Applied to a social icon's upload button for every account except the platform
           owner's, the icon is shared platform-wide, so it's shown for reference but isn't
           editable here. */
        .settings-social-icon-btn--readonly {
            cursor: default;
        }
        .settings-social-icon-btn--readonly .settings-social-icon {
            opacity: 0.85;
        }
        .settings-social-icon-btn--readonly:hover .settings-social-icon {
            box-shadow: none;
        }

        .invoice-doc-footer-slogan {
            margin-top: 1rem;
            padding-top: 0.9rem;
            border-top: 1px solid #eef1f5;
            text-align: center;
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.15em;
            text-transform: uppercase;
            color: #94a3b8;
        }

        .dark .invoice-doc-footer .invoice-doc-footer-row,
        .dark .invoice-doc-footer-slogan { border-top-color: rgba(148, 163, 184, 0.3); }

        /* --- Users list --- */
        .user-card {
            background: #ffffff;
            border: 1px solid #e7ebf0;
            border-radius: 1rem;
            box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
            overflow: hidden;
            margin-bottom: 0.6rem;
        }

        .dark .user-card {
            background: #111827;
            border-color: rgba(55, 65, 81, 0.85);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
        }

        .user-card-header {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.9rem;
            text-align: left;
        }

        .user-card-chevron {
            transition: transform 0.2s ease;
            margin-top: 0.35rem;
        }

        .user-card.is-expanded .user-card-chevron {
            transform: rotate(180deg);
        }

        .user-card-expand {
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            transition: max-height 0.25s ease, opacity 0.2s ease;
            padding: 0 0.9rem;
        }

        .user-card.is-expanded .user-card-expand {
            max-height: 14rem;
            opacity: 1;
            padding: 0 0.9rem 0.9rem;
        }

        /* --- Plan usage banner (Users screen) --- */
        .plan-promo-banner {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.85rem 1rem;
            border-radius: 1rem;
            background: linear-gradient(135deg, #fef3c7, #fde68a);
            border: 1px solid #fbbf24;
        }

        .dark .plan-promo-banner {
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.14));
            border-color: rgba(245, 158, 11, 0.4);
        }

        .plan-promo-banner-icon { font-size: 1.4rem; flex-shrink: 0; }
        .plan-promo-banner-title { font-weight: 800; font-size: 0.88rem; color: #78350f; }
        .dark .plan-promo-banner-title { color: #fde68a; }
        .plan-promo-banner-sub { font-size: 0.76rem; color: #92400e; margin-top: 0.1rem; }
        .dark .plan-promo-banner-sub { color: #fcd34d; }

        .plan-pending-banner {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            padding: 0.75rem 0.9rem;
            border-radius: 1rem;
            background: #f1f5f9;
            border: 1px solid #cbd5e1;
        }
        .dark .plan-pending-banner { background: rgba(148, 163, 184, 0.1); border-color: rgba(148, 163, 184, 0.3); }
        .plan-pending-banner-icon { font-size: 1.2rem; flex-shrink: 0; }
        .plan-pending-banner-title { font-weight: 800; font-size: 0.85rem; color: #334155; }
        .dark .plan-pending-banner-title { color: #e2e8f0; }
        .plan-pending-banner-sub { font-size: 0.74rem; color: #64748b; margin-top: 0.1rem; }
        .plan-pending-banner-cancel {
            flex-shrink: 0;
            font-size: 0.72rem;
            font-weight: 800;
            padding: 0.4rem 0.7rem;
            border-radius: 0.55rem;
            background: #ffffff;
            border: 1px solid #cbd5e1;
            color: #334155;
            white-space: nowrap;
        }
        .dark .plan-pending-banner-cancel { background: #1f2937; border-color: rgba(148, 163, 184, 0.35); color: #e2e8f0; }

        .plan-offer-banner {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            padding: 0.85rem 1rem;
            border-radius: 1rem;
            background: linear-gradient(135deg, #fef3c7, #fde68a);
            border: 1px solid #fbbf24;
            flex-wrap: wrap;
        }
        .dark .plan-offer-banner {
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.14));
            border-color: rgba(245, 158, 11, 0.4);
        }
        .plan-offer-banner--urgent {
            background: linear-gradient(135deg, #fee2e2, #fecaca);
            border-color: #f87171;
        }
        .dark .plan-offer-banner--urgent {
            background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(185, 28, 28, 0.16));
            border-color: rgba(248, 113, 113, 0.45);
        }
        .plan-offer-banner-actions {
            display: flex;
            gap: 0.4rem;
            flex-shrink: 0;
        }
        .plan-offer-decline-btn,
        .plan-offer-accept-btn {
            font-size: 0.78rem;
            font-weight: 800;
            padding: 0.45rem 0.85rem;
            border-radius: 0.6rem;
            white-space: nowrap;
        }
        .plan-offer-decline-btn {
            background: rgba(255, 255, 255, 0.6);
            color: #78350f;
            border: 1px solid rgba(120, 53, 15, 0.25);
        }
        .dark .plan-offer-decline-btn { background: rgba(255, 255, 255, 0.08); color: #fde68a; border-color: rgba(253, 230, 138, 0.25); }
        .plan-offer-accept-btn {
            background: #0c766c;
            color: #ffffff;
        }
        .plan-offer-decline-btn:disabled,
        .plan-offer-accept-btn:disabled { opacity: 0.5; pointer-events: none; }

        .plan-billing-cycle {
            display: flex;
            gap: 0.75rem;
            background: #f8fafc;
            border: 1px solid #e7ebf0;
            border-radius: 1rem;
            padding: 0.75rem 0.9rem;
        }
        .dark .plan-billing-cycle { background: rgba(255, 255, 255, 0.04); border-color: rgba(55, 65, 81, 0.7); }
        .plan-billing-cycle > div { flex: 1; }
        .plan-billing-cycle span { display: block; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: #94a3b8; }
        .plan-billing-cycle strong { display: block; font-size: 0.82rem; font-weight: 800; color: #334155; margin-top: 0.1rem; }
        .dark .plan-billing-cycle strong { color: #e2e8f0; }

        .plan-usage-card {
            border-radius: 1rem;
            padding: 0.9rem 1rem;
            background: var(--plan-color);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
        }

        .plan-usage-top {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.75rem;
        }

        .plan-usage-tier {
            display: inline-block;
            font-size: 0.65rem;
            font-weight: 900;
            letter-spacing: 0.08em;
            color: rgba(255, 255, 255, 0.85);
        }

        .plan-usage-tagline {
            color: #ffffff;
            font-weight: 800;
            font-size: 1.05rem;
            margin-top: 0.1rem;
        }

        .plan-usage-upgrade-btn {
            flex-shrink: 0;
            font-size: 0.75rem;
            font-weight: 800;
            padding: 0.4rem 0.8rem;
            border-radius: 0.6rem;
            background: rgba(255, 255, 255, 0.18);
            color: #ffffff;
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .plan-usage-seats {
            margin-top: 0.6rem;
            font-size: 0.78rem;
            font-weight: 700;
            color: rgba(255, 255, 255, 0.85);
        }

        .plan-usage-seats--full {
            color: #fecaca;
        }

        /* --- Settings > Billing section --- */
        .billing-usage-row {
            margin-top: 0.55rem;
        }

        .billing-usage-label {
            display: flex;
            justify-content: space-between;
            font-size: 0.72rem;
            font-weight: 700;
            color: rgba(255, 255, 255, 0.85);
            margin-bottom: 0.2rem;
        }

        .billing-usage-track {
            height: 0.35rem;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.25);
            overflow: hidden;
        }

        .billing-usage-fill {
            height: 100%;
            border-radius: 999px;
        }

        .billing-plan-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 0.75rem;
        }

        .billing-plan-card {
            border-radius: 1rem;
            padding: 1rem;
            background: #ffffff;
            border: 2px solid #e7ebf0;
        }

        .dark .billing-plan-card {
            background: #111827;
            border-color: rgba(55, 65, 81, 0.85);
        }

        .billing-plan-card--current {
            border-color: var(--plan-color);
        }

        .billing-plan-name {
            font-weight: 900;
            font-size: 1.1rem;
            color: var(--plan-color);
        }

        .billing-plan-tagline {
            font-size: 0.72rem;
            color: #64748b;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }

        .dark .billing-plan-tagline { color: #94a3b8; }

        .billing-plan-price {
            font-size: 1.3rem;
            font-weight: 800;
            margin-bottom: 0.6rem;
        }

        .billing-plan-price span {
            font-size: 0.7rem;
            font-weight: 600;
            color: #94a3b8;
        }

        .billing-plan-features {
            list-style: none;
            padding: 0;
            margin: 0 0 0.9rem;
            font-size: 0.75rem;
            color: #475569;
            font-weight: 600;
            line-height: 1.6;
        }

        .dark .billing-plan-features { color: #cbd5e1; }

        .billing-plan-features li::before {
            content: '✓ ';
            color: var(--plan-color);
            font-weight: 900;
        }

        .org-choice-item {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.9rem 1rem;
            border-radius: 1rem;
            border: 1px solid rgba(148, 163, 184, 0.28);
            background: rgba(255, 255, 255, 0.7);
            text-align: left;
            transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
        }

        .dark .org-choice-item { background: rgba(15, 23, 42, 0.6); border-color: rgba(71, 85, 105, 0.4); }
        .org-choice-item:hover { border-color: var(--accent, #10b3a0); background: rgba(var(--accent-rgb, 16, 179, 160), 0.08); }
        .org-choice-item:active { transform: scale(0.98); }

        .org-choice-avatar {
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.7rem;
            background: linear-gradient(135deg, var(--accent, #10b3a0), var(--accent-2, #0c766c));
            color: #ffffff;
            font-weight: 800;
            font-size: 1.05rem;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .org-choice-name {
            font-weight: 700;
            color: #0f172a;
        }

        .dark .org-choice-name { color: #f1f5f9; }

        .user-status-filter-btn {
            padding: 0.5rem;
            border-radius: 0.7rem;
            font-size: 0.8rem;
            font-weight: 700;
            background: #eef1f5;
            color: #64748b;
        }

        .dark .user-status-filter-btn { background: #1f2937; color: #94a3b8; }

        .user-status-filter-btn.is-active {
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            color: #ffffff;
        }

        /* --- Theme swatches (Settings > Theme) --- */
        .theme-swatch-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.4rem;
            padding: 0.5rem 0.25rem;
            border-radius: 0.9rem;
            border: 2px solid transparent;
            background: transparent;
            min-height: 0;
        }

        .theme-swatch-btn:disabled {
            opacity: 0.45;
            pointer-events: none;
        }

        .theme-swatch-dot {
            width: 2.25rem;
            height: 2.25rem;
            border-radius: 0.7rem;
            display: grid;
            grid-template-columns: 1fr 1fr;
            grid-template-rows: 1fr 1fr;
            overflow: hidden;
            box-shadow: 0 3px 10px rgba(15, 23, 42, 0.15);
            position: relative;
        }

        .theme-swatch-dot span {
            display: block;
        }

        .theme-swatch-btn.is-active .theme-swatch-dot::after {
            content: '';
            position: absolute;
            inset: -4px;
            border-radius: 0.9rem;
            border: 2px solid var(--swatch-2);
        }

        .theme-swatch-label {
            font-size: 0.65rem;
            font-weight: 700;
            color: #64748b;
            text-align: center;
            line-height: 1.1;
        }

        .dark .theme-swatch-label { color: #94a3b8; }
        .theme-swatch-btn.is-active .theme-swatch-label { color: #0f172a; }
        .dark .theme-swatch-btn.is-active .theme-swatch-label { color: #f1f5f9; }

        .billing-plan-btn {
            width: 100%;
            padding: 0.6rem;
            border-radius: 0.65rem;
            font-weight: 800;
            font-size: 0.82rem;
            background: var(--plan-color);
            color: #ffffff;
        }

        .billing-plan-btn:disabled {
            background: #e2e8f0;
            color: #94a3b8;
        }

        .btn-inline-spinner {
            display: inline-block;
            width: 0.8em;
            height: 0.8em;
            border: 2px solid currentColor;
            border-top-color: transparent;
            border-radius: 50%;
            vertical-align: -0.15em;
            animation: btn-spin 0.7s linear infinite;
        }
        @keyframes btn-spin {
            to { transform: rotate(360deg); }
        }

        .dark .billing-plan-btn:disabled {
            background: #1f2937;
            color: #64748b;
        }

        .billing-cancel-card {
            border-radius: 1rem;
            padding: 1rem;
            background: #ffffff;
            border: 1px solid #e7ebf0;
        }

        .dark .billing-cancel-card {
            background: #111827;
            border-color: rgba(55, 65, 81, 0.85);
        }

        .billing-cancel-btn {
            width: 100%;
            padding: 0.65rem;
            border-radius: 0.65rem;
            font-weight: 800;
            font-size: 0.85rem;
            background: #fef2f2;
            color: #dc2626;
            border: 1px solid #fecaca;
        }

        .dark .billing-cancel-btn {
            background: rgba(220, 38, 38, 0.12);
            border-color: rgba(220, 38, 38, 0.3);
        }

        .payment-method-card {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.85rem;
            border-radius: 0.85rem;
            background: #f8fafc;
            border: 1px solid #e7ebf0;
        }
        .dark .payment-method-card { background: rgba(255, 255, 255, 0.04); border-color: rgba(55, 65, 81, 0.7); }
        .payment-method-card-icon { font-size: 1.3rem; flex-shrink: 0; }
        .payment-method-card-brand { font-weight: 800; font-size: 0.88rem; letter-spacing: 0.02em; }
        .payment-method-card-exp { font-size: 0.75rem; color: #94a3b8; margin-top: 0.1rem; }
        .payment-method-update-btn {
            flex-shrink: 0;
            font-size: 0.75rem;
            font-weight: 700;
            padding: 0.4rem 0.75rem;
            border-radius: 0.55rem;
            background: #eef1f5;
            color: #334155;
        }
        .dark .payment-method-update-btn { background: #1f2937; color: #cbd5e1; }

        .payment-method-empty {
            padding: 0.9rem;
            border-radius: 0.85rem;
            background: #f8fafc;
            border: 1px dashed #cbd5e1;
        }
        .dark .payment-method-empty { background: rgba(255, 255, 255, 0.03); border-color: rgba(148, 163, 184, 0.3); }

        .payment-trust-block { margin-top: 0.75rem; }
        .payment-trust-badge {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            margin-bottom: 0.75rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid #e5e7eb;
        }
        .dark .payment-trust-badge { border-bottom-color: rgba(148, 163, 184, 0.2); }
        .payment-trust-stripe-wordmark {
            font-weight: 800;
            font-size: 1.05rem;
            letter-spacing: -0.02em;
            color: #635bff;
        }
        .payment-trust-stripe-label {
            font-size: 0.72rem;
            font-weight: 600;
            color: #6b7280;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
        .dark .payment-trust-stripe-label { color: #9ca3af; }
        .payment-trust-list {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 0.6rem;
            margin: 0;
            padding: 0;
        }
        .payment-trust-list li {
            display: flex;
            align-items: flex-start;
            gap: 0.55rem;
            font-size: 0.8rem;
            line-height: 1.4;
            color: #4b5563;
        }
        .dark .payment-trust-list li { color: #d1d5db; }
        .payment-trust-icon { flex-shrink: 0; font-size: 0.95rem; line-height: 1.4; }
        .payment-method-add-btn {
            width: 100%;
            padding: 0.6rem;
            border-radius: 0.65rem;
            font-weight: 800;
            font-size: 0.85rem;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            color: #ffffff;
        }

        .user-role-badge {
            display: inline-block;
            padding: 0.2rem 0.6rem;
            border-radius: 999px;
            font-size: 0.68rem;
            font-weight: 800;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .user-role-badge--admin {
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            color: #ffffff;
        }

        .user-role-badge--owner {
            background: linear-gradient(135deg, #78350f, #b45309);
            color: #fffbeb;
        }

        .user-role-badge--restricted {
            background: #fef3c7;
            color: #92400e;
        }

        .user-role-badge--user {
            background: #eef1f5;
            color: #475569;
        }

        .dark .user-role-badge--user {
            background: #1f2937;
            color: #cbd5e1;
        }

        .user-role-badge--disabled {
            background: #fee2e2;
            color: #b91c1c;
        }

        .user-permission-row {
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem;
            margin-top: 0.6rem;
        }

        .ticket-status-badge {
            font-size: 0.65rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            padding: 0.2rem 0.55rem;
            border-radius: 999px;
        }

        .ticket-status-badge--open {
            background: #fef3c7;
            color: #92400e;
        }

        .dark .ticket-status-badge--open {
            background: rgba(245, 158, 11, 0.15);
            color: #fbbf24;
        }

        .ticket-status-badge--resolved {
            background: #dcfce7;
            color: #166534;
        }

        .dark .ticket-status-badge--resolved {
            background: rgba(34, 197, 94, 0.15);
            color: #4ade80;
        }

        .ticket-chat-bubble {
            max-width: 82%;
            padding: 0.65rem 0.85rem;
            border-radius: 1rem;
            font-size: 0.88rem;
            line-height: 1.4;
            word-break: break-word;
        }

        .ticket-chat-bubble--user {
            background: #14b8a6;
            color: #fff;
            border-bottom-right-radius: 0.3rem;
            margin-left: auto;
        }

        .ticket-chat-bubble--admin {
            background: #f1f5f9;
            color: #1e293b;
            border-bottom-left-radius: 0.3rem;
            margin-right: auto;
        }

        .dark .ticket-chat-bubble--admin {
            background: #1e293b;
            color: #e2e8f0;
        }

        .ticket-chat-bubble-meta {
            font-size: 0.66rem;
            font-weight: 700;
            opacity: 0.7;
            margin-top: 0.3rem;
        }

        .ticket-attachment-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            font-size: 0.78rem;
            font-weight: 600;
            color: #0c766c;
            cursor: pointer;
            padding: 0.4rem 0;
        }
        .dark .ticket-attachment-btn { color: #67e5cb; }

        .ledger-row {
            background: #fff;
            border-radius: 0.6rem;
            padding: 0.6rem 0.75rem;
            margin-bottom: 0.4rem;
            box-shadow: 0 1px 2px rgba(0,0,0,0.04);
        }
        .dark .ledger-row { background: #111827; }

        .cd-type-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.15rem;
            padding: 0.6rem 0.5rem;
            border-radius: 0.6rem;
            border: 2px solid #e5e7eb;
            background: #f9fafb;
            cursor: pointer;
            transition: border-color 0.15s ease, background 0.15s ease;
        }
        .dark .cd-type-btn { background: #1f2937; border-color: #374151; }
        .cd-type-btn-main { font-size: 0.875rem; font-weight: 700; }
        .cd-type-btn-sub { font-size: 0.75rem; color: #9ca3af; }
        .cd-type-btn--credit[aria-pressed="true"] { border-color: #22c55e; background: rgba(34,197,94,0.1); }
        .cd-type-btn--credit[aria-pressed="true"] .cd-type-btn-main { color: #16a34a; }
        .cd-type-btn--debit[aria-pressed="true"] { border-color: #ef4444; background: rgba(239,68,68,0.1); }
        .cd-type-btn--debit[aria-pressed="true"] .cd-type-btn-main { color: #dc2626; }

        .pos-toggle-switch {
            appearance: none;
            -webkit-appearance: none;
            width: 2.5rem;
            height: 1.4rem;
            background: #cbd5e1;
            border: 1px solid #94a3b8;
            border-radius: 999px;
            position: relative;
            cursor: pointer;
            flex-shrink: 0;
            margin: 0;
            transition: background 0.15s ease, border-color 0.15s ease;
            outline: none;
        }
        .pos-toggle-switch::before {
            content: '';
            position: absolute;
            top: 1px;
            left: 1px;
            width: 1.1rem;
            height: 1.1rem;
            background: #fff;
            border: 1px solid rgba(0,0,0,0.15);
            border-radius: 50%;
            transition: transform 0.15s ease;
            box-shadow: 0 1px 3px rgba(0,0,0,0.35);
        }
        .pos-toggle-switch:checked { background: #14b8a6; border-color: #0d9488; }
        .pos-toggle-switch:checked::before { transform: translateX(1.1rem); }
        .pos-toggle-switch:disabled { opacity: 0.45; cursor: not-allowed; }
        .dark .pos-toggle-switch { background: #64748b; border-color: #94a3b8; }
        .dark .pos-toggle-switch:checked { background: #2dd4bf; border-color: #5eead4; }
        .pos-toggle-switch--amber:checked { background: #f59e0b; border-color: #d97706; }
        .dark .pos-toggle-switch--amber:checked { background: #fbbf24; border-color: #f59e0b; }

        /* Desktop-only: Manage Access becomes a right-side slide-in panel (Microsoft-style
           flyout) instead of a centered modal, so the person can see the team list and the
           panel at the same time and edit right there. Mobile is untouched, same centered,
           opaque modal as before, since a full-width slide-in doesn't make sense on a phone. */
        @media (min-width: 768px) {
            #edit-user-modal {
                align-items: stretch;
                justify-content: flex-end;
                background: rgba(15, 23, 42, 0.5);
                padding: 0;
            }
            #edit-user-modal .edit-user-panel {
                height: 100%;
                max-height: 100%;
                border-radius: 0;
                box-shadow: -8px 0 24px rgba(0,0,0,0.15);
                transform: translateX(100%);
                transition: transform 0.25s ease;
            }
            #edit-user-modal.panel-open .edit-user-panel {
                transform: translateX(0);
            }
        }

        .account-type-card {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.85rem;
            border: 2px solid #e5e7eb;
            border-radius: 0.75rem;
            cursor: pointer;
            transition: border-color 0.15s ease, background 0.15s ease;
        }
        .dark .account-type-card { border-color: #374151; }
        .account-type-card:has(input:checked), .account-type-card.is-selected {
            border-color: #14b8a6;
            background: rgba(20, 184, 166, 0.06);
        }
        .account-type-card input[type="radio"] {
            margin-top: 0.2rem;
            width: 1.1rem;
            height: 1.1rem;
            accent-color: #14b8a6;
            flex-shrink: 0;
        }
        .account-type-card-title {
            font-weight: 700;
            font-size: 0.9rem;
        }
        .account-type-card-desc {
            font-size: 0.78rem;
            color: #6b7280;
            margin-top: 0.15rem;
            line-height: 1.35;
        }
        .dark .account-type-card-desc { color: #9ca3af; }

        .ledger-row-main {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 0.75rem;
        }
        .ledger-row-desc { min-width: 0; }
        .ledger-row-notes {
            font-size: 0.875rem;
            font-weight: 600;
            line-height: 1.3;
            overflow-wrap: break-word;
        }
        .ledger-row-meta {
            font-size: 0.75rem;
            color: #9ca3af;
            margin-top: 0.15rem;
        }
        .ledger-row-amounts {
            text-align: right;
            flex-shrink: 0;
        }
        .ledger-row-amount {
            font-size: 0.875rem;
            font-weight: 700;
            white-space: nowrap;
        }
        .ledger-row-amount-label {
            font-size: 0.75rem;
            font-weight: 600;
            opacity: 0.75;
            text-transform: uppercase;
            letter-spacing: 0.02em;
        }
        .ledger-row-balance {
            font-size: 0.75rem;
            color: #9ca3af;
            margin-top: 0.1rem;
        }
        .ledger-row-action {
            margin-top: 0.4rem;
            padding: 0.35rem 0.7rem;
            font-size: 0.75rem;
            font-weight: 600;
            border-radius: 0.5rem;
            background: #0ea5e9;
            color: #fff;
            transition: background 0.15s ease;
        }
        .ledger-row-action:hover { background: #0284c7; }
        .ledger-row-action:active { background: #0369a1; }

        .ticket-attachment-thumb {
            position: relative;
            width: 3.5rem;
            height: 3.5rem;
            border-radius: 0.5rem;
            overflow: hidden;
            border: 1px solid #e2e8f0;
            flex-shrink: 0;
        }
        .dark .ticket-attachment-thumb { border-color: rgba(55, 65, 81, 0.85); }
        .ticket-attachment-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
        .ticket-attachment-thumb .remove-btn {
            position: absolute;
            top: 0.1rem;
            right: 0.1rem;
            width: 1.1rem;
            height: 1.1rem;
            border-radius: 999px;
            background: rgba(0, 0, 0, 0.6);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            line-height: 1;
        }

        .ticket-view-thumb {
            width: 3.25rem;
            height: 3.25rem;
            border-radius: 0.5rem;
            object-fit: cover;
            border: 1px solid #e2e8f0;
            cursor: pointer;
        }
        .dark .ticket-view-thumb { border-color: rgba(55, 65, 81, 0.85); }

        .user-permission-chip {
            font-size: 0.65rem;
            font-weight: 700;
            padding: 0.25rem 0.55rem;
            border-radius: 999px;
            background: #f1f5f9;
            color: #475569;
            white-space: nowrap;
        }

        .dark .user-permission-chip {
            background: #1f2937;
            color: #cbd5e1;
        }

        .user-card-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.75rem;
            padding-top: 0.6rem;
            border-top: 1px solid #f1f5f9;
        }

        .dark .user-card-actions {
            border-top-color: rgba(55, 65, 81, 0.7);
        }

        .user-action-btn {
            font-size: 0.78rem;
            font-weight: 700;
            padding: 0.4rem 0.9rem;
            border-radius: 0.6rem;
            transition: background 0.15s ease;
        }

        .user-action-btn--edit {
            color: #0c766c;
            background: rgba(var(--accent-rgb), 0.1);
        }

        .user-action-btn--edit:hover { background: rgba(var(--accent-rgb), 0.18); }

        .user-action-btn--remove {
            color: #b91c1c;
            background: rgba(220, 38, 38, 0.08);
        }

        .user-action-btn--remove:hover { background: rgba(220, 38, 38, 0.15); }

        /* --- Product management list: two-row card so price/actions never get squeezed off-screen --- */
        .product-mgmt-card {
            background: #ffffff;
            border: 2px solid transparent;
            border-radius: 1rem;
            padding: 0.75rem;
            box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
            cursor: pointer;
            transition: box-shadow 0.15s ease, transform 0.1s ease;
        }

        .product-mgmt-card:active { transform: scale(0.98); }
        .dark .product-mgmt-card { background: #111827; }

        .product-mgmt-card-top {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .product-mgmt-thumb {
            width: 3.25rem;
            height: 3.25rem;
            border-radius: 0.65rem;
            object-fit: contain;
            background: #f1f5f9;
            flex-shrink: 0;
            padding: 0.25rem;
        }

        .dark .product-mgmt-thumb { background: #1f2937; }

        .product-mgmt-card-bottom {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 0.6rem;
            padding-top: 0.6rem;
            border-top: 1px solid #f1f5f9;
        }

        .dark .product-mgmt-card-bottom { border-top-color: rgba(55, 65, 81, 0.7); }

        .product-mgmt-action-btn {
            font-size: 0.78rem;
            font-weight: 700;
            padding: 0.4rem 0.85rem;
            border-radius: 0.6rem;
            background: rgba(var(--accent-rgb), 0.1);
            color: #0c655c;
            transition: background 0.15s ease;
        }

        .dark .product-mgmt-action-btn { background: rgba(var(--accent-rgb), 0.18); color: #67e5cb; }
        .product-mgmt-action-btn:hover { background: rgba(var(--accent-rgb), 0.18); }

        .product-mgmt-action-btn--warn {
            background: rgba(245, 158, 11, 0.12);
            color: #92400e;
        }
        .dark .product-mgmt-action-btn--warn { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }

        .product-mgmt-action-btn--danger {
            background: rgba(220, 38, 38, 0.1);
            color: #b91c1c;
        }
        .dark .product-mgmt-action-btn--danger { background: rgba(220, 38, 38, 0.18); color: #fca5a5; }

        /* --- Transaction/order summary stat card --- */
        .transaction-summary-card {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 0.5rem;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(238, 251, 249, 0.95));
            border: 1px solid rgba(112, 211, 196, 0.4);
            border-radius: 1rem;
            padding: 0.75rem;
            margin-bottom: 0.6rem;
            box-shadow: 0 4px 14px rgba(12, 101, 92, 0.06);
        }

        .dark .transaction-summary-card {
            background: linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(12, 81, 74, 0.22));
            border-color: rgba(63, 182, 168, 0.22);
        }

        .transaction-summary-card > div {
            display: flex;
            flex-direction: column;
            gap: 0.15rem;
            min-width: 0;
        }

        .transaction-summary-card span {
            font-size: 0.62rem;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            color: #64748b;
        }

        .dark .transaction-summary-card span { color: #94a3b8; }

        .transaction-summary-card strong {
            font-size: clamp(0.85rem, 4vw, 1.05rem);
            font-weight: 800;
            color: #0f172a;
            line-height: 1.2;
            word-break: break-word;
        }

        .dark .transaction-summary-card strong { color: #f1f5f9; }

        /* --- Refined action buttons for transaction/order cards (View / Cancel / Pay) --- */
        .txn-action-btn {
            font-size: 0.75rem;
            font-weight: 700;
            padding: 0.4rem 0.8rem;
            border-radius: 0.6rem;
            transition: background 0.15s ease, transform 0.1s ease;
        }

        .txn-action-btn:active { transform: scale(0.95); }

        .txn-action-btn--view {
            background: #eef1f5;
            color: #334155;
        }
        .dark .txn-action-btn--view { background: #1f2937; color: #cbd5e1; }
        .txn-action-btn--view:hover { background: #e2e8f0; }
        .dark .txn-action-btn--view:hover { background: #374151; }

        .txn-action-btn--cancel {
            background: rgba(220, 38, 38, 0.1);
            color: #b91c1c;
        }
        .dark .txn-action-btn--cancel { background: rgba(220, 38, 38, 0.2); color: #fca5a5; }
        .txn-action-btn--cancel:hover { background: rgba(220, 38, 38, 0.18); }

        .txn-action-btn--pay {
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            color: #ffffff;
        }
        .txn-action-btn--pay:hover { filter: brightness(1.08); }

        /* --- Receivables cards --- */
        .receivable-card {
            background: #ffffff;
            border: 1px solid #e7ebf0;
            border-radius: 1rem;
            padding: 0.85rem;
            margin-bottom: 0.6rem;
            cursor: pointer;
            box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
            transition: box-shadow 0.15s ease, transform 0.1s ease;
        }

        .receivable-card:active { transform: scale(0.98); }
        .dark .receivable-card { background: #111827; border-color: rgba(55, 65, 81, 0.85); }

        .receivable-card-top {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
        }

        .receivable-avatar {
            width: 2.75rem;
            height: 2.75rem;
            border-radius: 999px;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            color: #ffffff;
            font-weight: 800;
            font-size: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .receivable-balance {
            font-weight: 800;
            font-size: 1rem;
            white-space: nowrap;
        }

        .receivable-balance--owed { color: #dc2626; }
        .receivable-balance--credit { color: #16a34a; }

        .receivable-badge {
            display: inline-block;
            margin-top: 0.2rem;
            padding: 0.15rem 0.55rem;
            border-radius: 999px;
            font-size: 0.62rem;
            font-weight: 800;
            letter-spacing: 0.03em;
            text-transform: uppercase;
        }

        .receivable-badge--owed { background: #fee2e2; color: #b91c1c; }
        .receivable-badge--credit { background: #dcfce7; color: #15803d; }

        .receivable-card-bottom {
            margin-top: 0.65rem;
            padding-top: 0.6rem;
            border-top: 1px solid #f1f5f9;
            display: flex;
            justify-content: flex-end;
        }

        .dark .receivable-card-bottom { border-top-color: rgba(55, 65, 81, 0.7); }

        .receivable-total-card {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 0.75rem;
            padding: 0.9rem 1.1rem;
            border-radius: 1rem;
            background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
            box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.25);
        }

        .receivable-total-card span {
            color: rgba(255, 255, 255, 0.85);
            font-weight: 700;
            font-size: 0.85rem;
        }

        .receivable-total-card strong {
            color: #ffffff;
            font-weight: 800;
            font-size: 1.25rem;
        }

        /* --- Checkout list view (alternative to the product grid) --- */
        .product-list-row {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            background: #ffffff;
            border: 1px solid #e7ebf0;
            border-radius: 0.9rem;
            padding: 0.6rem 0.75rem;
            transition: box-shadow 0.15s ease, transform 0.1s ease;
        }

        .dark .product-list-row { background: rgba(17, 24, 39, 0.7); border-color: rgba(55, 65, 81, 0.7); }
        .product-list-row:active { transform: scale(0.98); }

        .product-list-thumb {
            width: 2.75rem;
            height: 2.75rem;
            border-radius: 0.6rem;
            object-fit: contain;
            background: #f1f5f9;
            flex-shrink: 0;
            padding: 0.2rem;
        }

        .dark .product-list-thumb { background: #1f2937; }

        /* --- Analytics dashboard: section titles and icon stat cards --- */
        .dash-section-title {
            font-size: 0.68rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #94a3b8;
            margin-bottom: 0.5rem;
            padding-left: 0.15rem;
        }

        .dash-stat-card {
            display: flex;
            align-items: flex-start;
            gap: 0.7rem;
            background: #ffffff;
            border-radius: 1rem;
            padding: 0.9rem;
            box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
        }

        .dark .dash-stat-card { background: #111827; }

        .dash-stat-icon {
            width: 2.25rem;
            height: 2.25rem;
            border-radius: 0.65rem;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .dash-stat-icon svg { width: 18px; height: 18px; }

        .dash-stat-icon--neutral { background: rgba(var(--accent-rgb), 0.12); color: #0c655c; }
        .dark .dash-stat-icon--neutral { background: rgba(var(--accent-rgb), 0.2); color: #67e5cb; }
        .dash-stat-icon--positive { background: rgba(16, 185, 129, 0.14); color: #059669; }
        .dark .dash-stat-icon--positive { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
        .dash-stat-icon--negative { background: rgba(220, 38, 38, 0.1); color: #b91c1c; }
        .dark .dash-stat-icon--negative { background: rgba(220, 38, 38, 0.2); color: #fca5a5; }

        .dash-stat-label { font-size: 0.72rem; color: #64748b; font-weight: 600; }
        .dark .dash-stat-label { color: #94a3b8; }
        .dash-stat-value { font-size: 1.4rem; font-weight: 800; line-height: 1.25; margin-top: 0.05rem; word-break: break-word; }
        .dash-stat-sub { font-size: 0.68rem; color: #94a3b8; margin-top: 0.1rem; }

        /* --- Reports hub --- */
        .report-card {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            background: #ffffff;
            border: 1px solid #e7ebf0;
            border-radius: 1rem;
            padding: 1rem;
            box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
        }

        .report-card-body {
            display: flex;
            align-items: flex-start;
            gap: 0.85rem;
        }

        @media (min-width: 640px) {
            .report-card {
                flex-direction: row;
                align-items: center;
            }
            .report-export-btn {
                margin-left: auto;
            }
        }

        .dark .report-card { background: #111827; border-color: rgba(55, 65, 81, 0.85); }

        .report-card-icon {
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.75rem;
            background: rgba(var(--accent-rgb), 0.12);
            color: #0c655c;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .dark .report-card-icon { background: rgba(var(--accent-rgb), 0.2); color: #67e5cb; }
        .report-card-icon svg { width: 20px; height: 20px; }

        .report-export-btn {
            flex-shrink: 0;
            align-self: center;
            font-size: 0.78rem;
            font-weight: 800;
            padding: 0.55rem 0.9rem;
            border-radius: 0.65rem;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            color: #ffffff;
            white-space: nowrap;
        }

        .report-export-btn:disabled {
            opacity: 0.6;
        }

        /* --- Barcode scanner --- */
        #barcode-scanner-region video {
            width: 100% !important;
            height: 100% !important;
            object-fit: cover;
        }

        #barcode-scanner-region {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* --- Orders list: collapsed by default, tap to expand --- */
        .order-card {
            cursor: pointer;
        }

        .order-card-details {
            display: grid;
            grid-template-rows: 0fr;
            overflow: hidden;
            opacity: 0;
            transition: grid-template-rows 0.22s ease, opacity 0.18s ease;
        }

        .order-card-details-inner {
            min-height: 0;
            overflow: hidden;
        }

        .order-card--expanded .order-card-details {
            grid-template-rows: 1fr;
            opacity: 1;
        }

        .order-card-chevron {
            transition: transform 0.2s ease;
        }

        .order-card--expanded .order-card-chevron {
            transform: rotate(90deg);
        }

        /* --- Environment badge (only shows outside Production) --- */
        .env-badge {
            display: inline-block;
            padding: 0.1rem 0.5rem;
            border-radius: 999px;
            font-size: 0.62rem;
            font-weight: 900;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            flex-shrink: 0;
        }

        .env-badge--dev { background: #f59e0b; color: #451a03; }
        .env-badge--uat { background: #6366f1; color: #ffffff; }

        /* --- Expenses: This Month summary banner, pinned above the list's bottom edge --- */
        .expense-monthly-banner {
            flex-shrink: 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 0 0.75rem 0.75rem;
            padding: 0.85rem 1.1rem;
            border-radius: 1rem;
            background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
            box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.25);
        }

        .expense-monthly-banner span {
            color: rgba(255, 255, 255, 0.85);
            font-weight: 700;
            font-size: 0.85rem;
        }

        .expense-monthly-banner strong {
            color: #ffffff;
            font-weight: 800;
            font-size: 1.25rem;
        }

        /* --- Cart summary strip (product/item counts + running discount) --- */
        .cart-summary-strip {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.6rem 1rem;
            font-size: 0.75rem;
            font-weight: 700;
            color: #64748b;
            background: #f8fafc;
            border-bottom: 1px solid #e7ebf0;
        }

        .dark .cart-summary-strip { background: #111827; color: #94a3b8; border-bottom-color: rgba(55, 65, 81, 0.7); }

        .cart-summary-strip-discount {
            color: #dc2626;
            font-weight: 800;
        }

        /* --- Cart item cards: collapsed by default, tap to expand --- */
        .cart-item-card {
            background: #ffffff;
            border: 1px solid #e7ebf0;
            border-radius: 1rem;
            margin-bottom: 0.75rem;
            overflow: hidden;
        }

        .dark .cart-item-card { background: #111827; border-color: rgba(55, 65, 81, 0.85); }

        .cart-item-card-top {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.82rem 0.9rem;
            text-align: left;
        }

        .cart-item-chevron {
            transition: transform 0.2s ease;
            margin-top: 0.35rem;
        }

        .cart-item-card.is-expanded .cart-item-chevron {
            transform: rotate(180deg);
        }

        .cart-item-discount-badge {
            display: inline-block;
            margin-left: 0.4rem;
            padding: 0.05rem 0.4rem;
            border-radius: 999px;
            font-size: 0.65rem;
            font-weight: 800;
            background: rgba(220, 38, 38, 0.1);
            color: #dc2626;
        }

        .cart-item-card-expand {
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            transition: max-height 0.25s ease, opacity 0.2s ease;
            padding: 0 0.9rem;
        }

        .cart-item-card.is-expanded .cart-item-card-expand {
            max-height: 11rem;
            opacity: 1;
            padding: 0 0.9rem 0.82rem;
        }

        .cart-item-stat-row {
            display: flex;
            gap: 0.5rem;
            padding-top: 0.68rem;
            border-top: 1px solid #f1f5f9;
        }

        .dark .cart-item-stat-row { border-top-color: rgba(55, 65, 81, 0.6); }

        .cart-item-stat {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.4rem;
            text-align: center;
        }

        .cart-item-stat span {
            font-size: 0.6rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            color: #94a3b8;
        }

        .cart-item-stat--discount, .cart-item-stat--discount-active {
            justify-content: center;
            border-radius: 0.75rem;
            padding: 0.5rem;
        }

        .cart-item-stat--discount {
            background: rgba(var(--accent-rgb), 0.08);
        }

        .cart-item-stat--discount strong {
            color: #0c655c;
            font-weight: 700;
            font-size: 0.85rem;
        }

        .dark .cart-item-stat--discount strong { color: #67e5cb; }

        .cart-item-stat--discount-active {
            background: rgba(220, 38, 38, 0.08);
        }

        .cart-item-stat--discount-active strong {
            color: #dc2626;
            font-weight: 800;
            font-size: 1rem;
        }

        /* Quantity stepper: bigger, clearer square buttons instead of tiny pill buttons */
        .cart-qty-stepper {
            display: flex;
            align-items: center;
            gap: 0;
            background: #f1f5f9;
            border-radius: 0.7rem;
            overflow: hidden;
            border: 1px solid #e2e8f0;
        }

        .dark .cart-qty-stepper { background: #1f2937; border-color: rgba(55, 65, 81, 0.85); }

        .cart-qty-stepper button {
            width: 2rem;
            height: 2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #0c655c;
            background: transparent;
            transition: background 0.15s ease;
        }

        .cart-qty-stepper button:active { background: rgba(var(--accent-rgb), 0.15); }
        .dark .cart-qty-stepper button { color: #67e5cb; }
        .cart-qty-stepper button svg { width: 14px; height: 14px; }

        .cart-qty-stepper span {
            min-width: 1.9rem;
            text-align: center;
            font-weight: 800;
            font-size: 0.95rem;
            color: #0f172a;
            background: #ffffff;
            align-self: stretch;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .dark .cart-qty-stepper span { color: #f1f5f9; background: #111827; }

        .cart-qty-remove {
            width: 2.4rem;
            height: 2.4rem;
            border-radius: 0.75rem;
            background: rgba(220, 38, 38, 0.1);
            color: #dc2626;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .cart-qty-remove svg { width: 16px; height: 16px; }

        /* --- Compact cart actions menu in the header --- */
        .cart-header-main {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            width: 100%;
        }

        .cart-header-title-group {
            display: flex;
            flex-direction: column;
            gap: 0.1rem;
            min-width: 0;
        }

        .cart-header-title-group h1 {
            margin: 0;
            font-size: 1.2rem;
            font-weight: 800;
            line-height: 1.2;
        }

        .cart-header-subtitle {
            font-size: 0.78rem;
            font-weight: 600;
            color: #64748b;
        }

        .dark .cart-header-subtitle { color: #94a3b8; }

        .cart-header-actions {
            position: relative;
            display: flex;
            align-items: center;
            flex-shrink: 0;
        }

        .cart-more-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            padding: 0.7rem 0.95rem;
            border-radius: 0.9rem;
            border: 1px solid rgba(148, 163, 184, 0.35);
            background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,245,249,0.96));
            color: #0f172a;
            font-size: 0.92rem;
            font-weight: 800;
            box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
            transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
        }

        .cart-more-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
        }

        .cart-more-btn:active {
            transform: translateY(0);
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
        }

        .cart-more-btn svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
        }

        .dark .cart-more-btn {
            border-color: rgba(71, 85, 105, 0.7);
            background: linear-gradient(180deg, rgba(15,23,42,0.98), rgba(17,24,39,0.96));
            color: #f8fafc;
            box-shadow: 0 12px 30px rgba(2, 6, 23, 0.35);
        }

        .cart-quick-actions-panel {
            position: absolute;
            top: calc(100% + 0.55rem);
            right: 0;
            width: min(16rem, calc(100vw - 2rem));
            padding: 0.45rem;
            border-radius: 1rem;
            border: 1px solid rgba(226, 232, 240, 0.95);
            background: rgba(255, 255, 255, 0.98);
            box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
            backdrop-filter: blur(14px);
            opacity: 0;
            pointer-events: none;
            transform: translateY(-6px) scale(0.98);
            transition: opacity 0.18s ease, transform 0.18s ease;
            z-index: 20;
        }

        .dark .cart-quick-actions-panel {
            border-color: rgba(51, 65, 85, 0.95);
            background: rgba(15, 23, 42, 0.98);
            box-shadow: 0 18px 50px rgba(2, 6, 23, 0.45);
        }

        .cart-quick-actions-panel.is-open {
            opacity: 1;
            pointer-events: auto;
            transform: translateY(0) scale(1);
        }

        .cart-quick-actions {
            display: flex;
            flex-direction: column;
            gap: 0.28rem;
        }

        .cart-quick-action-main {
            display: inline-flex;
            align-items: center;
            gap: 0.75rem;
            min-width: 0;
            flex: 1;
        }

        .cart-quick-action {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            width: 100%;
            padding: 0.82rem 0.9rem;
            border-radius: 0.85rem;
            background: transparent;
            border: 0;
            font-size: 0.92rem;
            font-weight: 700;
            color: #334155;
            text-align: left;
            transition: background 0.15s ease, transform 0.15s ease;
        }

        .cart-quick-action:hover {
            background: rgba(var(--accent-rgb), 0.08);
            transform: translateX(2px);
        }

        .dark .cart-quick-action { color: #cbd5e1; }
        .cart-quick-action svg { width: 18px; height: 18px; color: #0c655c; flex-shrink: 0; }
        .dark .cart-quick-action svg { color: #67e5cb; }
        .cart-quick-action-label {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .cart-quick-action-badge {
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 1.45rem;
            padding: 0.15rem 0.5rem;
            border-radius: 999px;
            font-size: 0.68rem;
            font-weight: 800;
            line-height: 1;
            letter-spacing: 0.01em;
        }

        .cart-quick-action-badge.hidden { display: none; }
        .cart-quick-action-badge--discount { background: rgba(234, 179, 8, 0.18); color: #a16207; }
        .dark .cart-quick-action-badge--discount { background: rgba(234, 179, 8, 0.18); color: #facc15; }
        .cart-quick-action-badge--note { background: rgba(var(--accent-rgb), 0.12); color: #0c655c; }
        .dark .cart-quick-action-badge--note { color: #67e5cb; }

        .cart-quick-action--discount svg { color: #d97706; }
        .dark .cart-quick-action--discount svg { color: #fbbf24; }
        .cart-quick-action--note svg { color: #0c655c; }
        .dark .cart-quick-action--note svg { color: #67e5cb; }
        .cart-quick-action--danger,
        .cart-quick-action--danger svg { color: #dc2626; }
        .cart-quick-action--danger { background: rgba(220, 38, 38, 0.08); }
        .cart-quick-action--danger:hover { background: rgba(220, 38, 38, 0.14); }
        .dark .cart-quick-action--danger { color: #fca5a5; background: rgba(127, 29, 29, 0.35); }

        @media (max-width: 640px) {
            .cart-header-title-group h1 { font-size: 1.1rem; }
            .cart-header-subtitle { font-size: 0.72rem; }
            .cart-more-btn { padding: 0.64rem 0.82rem; font-size: 0.86rem; }
            .cart-quick-actions-panel { width: min(15rem, calc(100vw - 1.5rem)); right: -0.15rem; }
        }

        /* --- Cart footer: proper financial invoice-style breakdown --- */
        .cart-invoice-footer {
            padding: 1rem;
        }

        .cart-invoice-lines {
            margin-bottom: 0.75rem;
        }

        .cart-invoice-line {
            display: flex;
            justify-content: space-between;
            padding: 0.3rem 0;
            font-size: 0.9rem;
            color: #475569;
        }

        .dark .cart-invoice-line { color: #cbd5e1; }

        .cart-invoice-line--discount {
            color: #dc2626;
            font-weight: 600;
        }

        .cart-invoice-total-banner {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.7rem 0.9rem;
            border-radius: 0.85rem;
            background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
            box-shadow: 0 8px 18px rgba(var(--accent-rgb), 0.22);
        }

        .cart-invoice-total-banner span {
            color: rgba(255, 255, 255, 0.85);
            font-weight: 700;
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .cart-invoice-total-banner strong {
            color: #ffffff;
            font-weight: 800;
            font-size: 1.2rem;
        }

        @media print {
            /* Chrome/Safari print: make the invoice itself the page. A zero @page margin also
               removes the large browser-created whitespace around the document. Chrome's
               optional header/footer setting is browser-controlled, but with a zero page margin
               there is no reserved header/footer band in the invoice layout. */
            @page {
                size: A4 portrait;
                margin: 0;
            }
            html, body {
                width: 210mm !important;
                min-width: 210mm !important;
                height: auto !important;
                min-height: 0 !important;
                margin: 0 !important;
                padding: 0 !important;
                overflow: visible !important;
                background: #fff !important;
            }
            body * { visibility: hidden !important; }
            #invoice-view-content, #invoice-view-content * { visibility: visible !important; }
            #invoice-view-content {
                position: absolute !important;
                inset: 0 auto auto 0 !important;
                box-sizing: border-box !important;
                width: 210mm !important;
                max-width: 210mm !important;
                min-width: 210mm !important;
                height: auto !important;
                min-height: 0 !important;
                margin: 0 !important;
                padding: 8mm !important;
                overflow: visible !important;
                background: #fff !important;
                transform: none !important;
            }
            #invoice-view-content .invoice-doc {
                box-sizing: border-box !important;
                width: 100% !important;
                max-width: none !important;
                min-width: 0 !important;
                margin: 0 !important;
                box-shadow: none !important;
                break-inside: avoid-page;
                page-break-inside: avoid;
            }
            #view-invoice.view { max-width: none !important; width: 210mm !important; }
            .invoice-action-row, #invoice-back-btn-header { display: none !important; }
        }
        /* --- Premium subscription showcase and feature comparison --- */
        .subscription-hero { position:relative; overflow:hidden; padding:1.5rem; border-radius:1.35rem; color:#fff; background:linear-gradient(135deg,#0f172a 0%,#123b46 55%,#0c766c 100%); box-shadow:0 18px 40px rgba(15,23,42,.2); margin-bottom:1rem; }
        .subscription-hero::after { content:''; position:absolute; width:13rem; height:13rem; right:-5rem; top:-7rem; border-radius:50%; background:rgba(var(--accent-light-rgb), .2); }
        .subscription-hero-kicker { display:inline-flex; align-items:center; gap:.4rem; font-size:.7rem; font-weight:900; letter-spacing:.12em; text-transform:uppercase; color:#67e5cb; }
        .subscription-hero h2 { position:relative; font-family:Manrope,sans-serif; font-size:clamp(1.55rem,4vw,2.25rem); line-height:1.1; font-weight:800; margin:.55rem 0 .45rem; max-width:32rem; }
        .subscription-hero p { position:relative; max-width:35rem; color:#cbd5e1; font-size:.88rem; line-height:1.55; }
        .subscription-trust-row { position:relative; display:flex; flex-wrap:wrap; gap:.5rem 1rem; margin-top:1rem; font-size:.72rem; font-weight:700; color:#e2e8f0; }
        .subscription-trust-row span::before { content:'✓'; color:#31cdae; margin-right:.35rem; }
        .billing-plan-grid { grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:1rem; align-items:stretch; }
        .billing-plan-card { position:relative; display:flex; flex-direction:column; min-height:100%; padding:1.2rem; box-shadow:0 8px 24px rgba(15,23,42,.07); transition:transform .2s ease,box-shadow .2s ease; }
        .billing-plan-card:hover { transform:translateY(-3px); box-shadow:0 16px 32px rgba(15,23,42,.12); }
        .billing-plan-card--recommended { border-color:var(--plan-color); box-shadow:0 14px 32px color-mix(in srgb,var(--plan-color) 20%,transparent); }
        .billing-plan-ribbon { position:absolute; top:-.7rem; right:.8rem; padding:.28rem .65rem; border-radius:999px; color:#fff; background:var(--plan-color); font-size:.62rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
        .billing-plan-description { color:#64748b; font-size:.75rem; line-height:1.5; margin:-.25rem 0 .75rem; }
        .dark .billing-plan-description { color:#94a3b8; }
        .billing-plan-features { flex:1; }
        .plan-compare { margin-top:1.25rem; border:1px solid #e2e8f0; border-radius:1.2rem; overflow:hidden; background:#fff; box-shadow:0 8px 24px rgba(15,23,42,.06); }
        .dark .plan-compare { background:#111827; border-color:#334155; }
        .plan-compare summary { cursor:pointer; list-style:none; display:flex; align-items:center; justify-content:space-between; padding:1rem 1.15rem; font-family:Manrope,sans-serif; font-weight:800; }
        .plan-compare summary::-webkit-details-marker { display:none; }
        .plan-compare summary span:last-child { color:#0b9384; font-size:.75rem; }
        .plan-compare-scroll { overflow-x:auto; border-top:1px solid #e2e8f0; }
        .dark .plan-compare-scroll { border-color:#334155; }
        .plan-compare-table { width:100%; border-collapse:collapse; table-layout:fixed; font-size:.78rem; }
        .plan-compare-table th,.plan-compare-table td { padding:.75rem; text-align:center; border-bottom:1px solid #eef2f7; }
        .dark .plan-compare-table th,.dark .plan-compare-table td { border-color:#1f2937; }
        .plan-compare-table th:first-child,.plan-compare-table td:first-child { position:sticky; left:0; z-index:1; text-align:left; background:#fff; font-weight:700; }
        .dark .plan-compare-table th:first-child,.dark .plan-compare-table td:first-child { background:#111827; }
        .plan-compare-table thead th { color:#64748b; font-size:.68rem; letter-spacing:.06em; text-transform:uppercase; background:#f8fafc; }
        .dark .plan-compare-table thead th { background:#0f172a; color:#94a3b8; }
        .plan-compare-check { display:inline-grid; place-items:center; width:1.45rem; height:1.45rem; border-radius:50%; color:#fff; background:#10b3a0; font-weight:900; }
        .subscription-legal-links { display:flex; justify-content:center; gap:1.25rem; padding:1.1rem .5rem .25rem; font-size:.75rem; color:#64748b; }
        .subscription-legal-links a:hover { color:#0b9384; text-decoration:underline; }
        /* Keep the original app drawer on phones; subscription-only layout adjustments must
           not restyle or flatten the shared navigation menu. */
        @media(max-width:767px){ .subscription-hero{padding:1.25rem;} .billing-plan-grid{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;padding:.75rem .15rem 1rem;margin:0 -.15rem;} .billing-plan-card{min-width:min(82vw,19rem);scroll-snap-align:center;} .plan-compare summary{padding:.85rem;} .plan-compare-table{font-size:.66rem;} .plan-compare-table th,.plan-compare-table td{padding:.55rem .2rem;overflow-wrap:anywhere;} .plan-compare-table th:first-child,.plan-compare-table td:first-child{width:32%;position:static;} .plan-compare-check{width:1.2rem;height:1.2rem;} }




/* Unified checkout discovery and category drawer product cards (visual only). */
#view-checkout .checkout-summary-strip { display:none; }
.checkout-discovery {display:flex; gap:.55rem; padding:.65rem .75rem; align-items:center; background:rgba(255,255,255,.9); border-bottom:1px solid #dce6eb; flex-shrink:0; min-width:0;}
.dark .checkout-discovery {background:#111c27; border-color:#293948;}
.checkout-discovery-search {display:flex; align-items:center; flex:1 1 auto; min-width:0; border:1px solid #d8e4ea; border-radius:.8rem; padding:0 .55rem; gap:.5rem; height:44px;}
.dark .checkout-discovery-search {border-color:#344656; background:#12202d;}
.checkout-discovery-search>svg {width:17px; height:17px; flex-shrink:0; color:#64748b;}
.checkout-discovery-search input {background:transparent!important; border:0!important; box-shadow:none!important; flex:1; min-width:0; height:100%; font-size:clamp(.75rem,2.7vw,.88rem); outline:0;}
.checkout-discovery-search button {min-height:34px;width:34px; height:34px; padding:7px; border-radius:9px; color:#0d9488; border:1px solid #4b817e; flex:0 0 auto;}
.checkout-discovery-search button svg {height:100%;width:100%;}
.checkout-discovery-category {display:flex; align-items:center; gap:.35rem; min-width:0; flex:0 1 185px;}
.checkout-discovery-category select {min-width:0; width:100%; padding:.45rem .4rem; height:44px; min-height:44px; font-size:.76rem; border-radius:.65rem; border:1px solid #cbd5e1; background:transparent; text-overflow:ellipsis;}
.checkout-discovery-category button {min-height:38px; padding:0 .46rem; font-size:.69rem; color:#0d9488; border:1px solid #87b9b2; border-radius:.6rem; white-space:nowrap;}
#view-checkout:not(.checkout-categories-dropdown) .checkout-discovery-category select {display:none;}
#view-checkout:not(.checkout-categories-dropdown) .checkout-discovery-category {flex:0 0 auto;}
#view-checkout.checkout-categories-dropdown #category-tabs {display:none!important;}
.category-products-list {display:grid; grid-template-columns:minmax(0,1fr); align-content:start; gap:.68rem; padding:.75rem; overflow-x:hidden; min-height:0;}
.category-products-list .product-catalog-card {width:100%; max-width:100%; min-height:0; margin:0; overflow:hidden;}
.category-products-list .product-catalog-name {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.category-products-panel {width:min(100%,540px);}
.category-products-list .product-catalog-actions {display:grid; grid-template-columns:repeat(2,minmax(0,1fr));}
.category-products-list .product-catalog-actions button {min-width:0;}
/* Reports: compact cards, descriptions retained for accessibility and comprehension. */
.reports-compact .report-card {gap:.5rem; padding:.7rem .8rem; border-radius:.85rem;}
.reports-compact .report-card-body {gap:.65rem; min-width:0; align-items:center;}
.reports-compact .report-card-icon {height:2rem;width:2rem;flex:0 0 2rem;border-radius:.6rem;}
.reports-compact .report-card-body .font-bold {font-size:.89rem;line-height:1.2;}
.reports-compact .report-card-body .text-sm {font-size:.73rem;line-height:1.35;}
.reports-compact .report-export-btn {flex:0 0 auto; align-self:flex-end; min-height:36px; padding:.4rem .75rem; white-space:nowrap;}
.checkout-desktop-cart {display:none;}
@media(max-width:430px){.checkout-discovery {padding:.5rem;gap:.35rem}.checkout-discovery-category button{padding:0 .35rem}.checkout-discovery-search{gap:.3rem;padding:0 .3rem}.checkout-discovery-search button{width:31px;height:31px;padding:5px}}
@media(min-width:1280px) {
  #view-checkout {position:relative; max-width:none;}
  #view-checkout.has-live-cart #category-tabs, #view-checkout.has-live-cart #product-grid, #view-checkout.has-live-cart .checkout-discovery {margin-right:min(340px,29%);}
  #view-checkout.has-live-cart .checkout-desktop-cart {display:flex; flex-direction:column; position:absolute; top:calc(4rem + 1px); right:0; bottom:0; width:min(340px,29%); background:#f8fafc; border-left:1px solid #8bb6b2; box-shadow:-1px 0 0 rgba(16,179,160,.15); z-index:2; padding:.75rem; gap:.5rem;}
  .dark #view-checkout.has-live-cart .checkout-desktop-cart {background:#0b1721;border-left-color:#4b817e;}
  .checkout-desktop-cart-head {display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.35rem .1rem .65rem;border-bottom:1px solid #344656;}
  .checkout-desktop-cart-head strong{font-size:.94rem;white-space:nowrap;}
  .checkout-desktop-cart-head button{font-size:.72rem;color:#0d9488;min-height:35px;}
  .checkout-desktop-cart-items{overflow-y:auto;flex:1;min-height:0;}
  .checkout-live-line{display:flex;align-items:center;gap:.35rem;padding:.72rem 0;border-bottom:1px solid #344656;font-size:.75rem;}
  .checkout-live-line-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .checkout-live-line-qty{flex-shrink:0;color:#64748b;}
  .checkout-live-line strong{flex-shrink:0;white-space:nowrap;}
  .checkout-desktop-cart-bottom{border-top:1px solid #4b817e;padding-top:.65rem;display:grid;gap:.65rem;}
  .checkout-desktop-cart-bottom>div{display:flex;justify-content:space-between;align-items:center;gap:.5rem;}
  .checkout-desktop-cart-bottom strong{font-size:clamp(.8rem,1vw,1.05rem);white-space:nowrap;}
  .checkout-desktop-cart-bottom button{border-radius:.7rem;background:linear-gradient(120deg,#10b3a0,#0c766c);color:white;padding:.7rem;font-weight:750;}
  #view-checkout.has-live-cart #checkout-footer{display:none;}
}



/* Checkout: category controls match the compact Category header language. */
#view-checkout #category-tabs { padding: .5rem .7rem; }
#view-checkout #category-tabs .category-tab {
    display:inline-flex; align-items:center; gap:.28rem;
    padding:.38rem .67rem !important; margin-right:.32rem;
    min-height:34px; font-size:.74rem !important; font-weight:700;
    line-height:1.15; white-space:nowrap;
    border-radius:999px;
}
#view-checkout #category-tabs .checkout-category-count {
    margin-left:0; min-width:1.3rem; padding:.12rem .3rem;
    font-size:.72rem; font-variant-numeric:tabular-nums;
}
.checkout-desktop-cart-head-actions { display:flex; align-items:center; gap:.6rem; flex-shrink:0; }
.checkout-desktop-cart-head #checkout-desktop-cart-clear {
    min-height:32px; padding:.24rem .52rem; border-radius:.5rem;
    color:#e35b5b; font-size:.73rem; font-weight:700;
    background:rgba(225,67,67,.10); border:1px solid rgba(225,67,67,.18);
}
.dark .checkout-desktop-cart-head #checkout-desktop-cart-clear { color:#ff9b9b; }
.checkout-desktop-cart-head #checkout-desktop-cart-clear:hover { background:rgba(225,67,67,.18); }


        /* Zuno AI orb on Analytics */
        #view-analytics { position: relative; }
        .zorb-dock { position: absolute; right: 14px; bottom: 16px; z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; max-width: calc(100% - 28px); pointer-events: none; }
        .zorb-dock[hidden] { display: none; }
        .zorb-dock > * { pointer-events: auto; }
        .zorb { position: relative; width: 54px; height: 54px; border-radius: 50%; border: 0; padding: 3px; cursor: pointer; color: #64748b;
            background: radial-gradient(circle at 35% 30%, #12304f, #0b1220 70%); box-shadow: 0 0 0 1px rgba(94,234,212,.35), 0 8px 26px rgba(20,184,166,.35), 0 0 34px rgba(37,99,235,.28); transition: transform .2s, box-shadow .2s; }
        .zorb:hover { transform: scale(1.06); }
        .zorb:focus-visible { outline: 3px solid #5eead4; outline-offset: 3px; }
        .zorb-svg { display: block; width: 100%; height: 100%; }
        .zorb-orbit { transform-origin: 50px 50px; animation: zorb-spin 28s linear infinite; }
        .zorb-spark { transform-origin: 88px 15px; animation: zorb-twinkle 3.4s ease-in-out infinite; }
        @keyframes zorb-spin { to { transform: rotate(360deg); } }
        @keyframes zorb-twinkle { 0%,100% { opacity: .25; transform: scale(.6); } 50% { opacity: 1; transform: scale(1); } }
        .zorb-tip { position: absolute; right: 62px; top: 50%; transform: translateY(-50%); background: #0b1220; color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
        .zorb:hover .zorb-tip, .zorb:focus-visible .zorb-tip { opacity: 1; }
        .zorb.is-locked { filter: grayscale(1) brightness(.85); box-shadow: 0 0 0 1px rgba(148,163,184,.4), 0 4px 14px rgba(0,0,0,.2); }
                .zorb-pop, .zorb-panel { background: #fff; color: #111827; border: 1px solid #e5e7eb; border-radius: 16px; padding: 14px; box-shadow: 0 12px 36px rgba(0,0,0,.28); }
        .dark .zorb-pop, .dark .zorb-panel { background: #111827; color: #f3f4f6; border-color: #374151; }
        .zorb-pop { width: min(300px, 100%); }
        .zorb-panel { width: min(400px, 100%); max-height: min(70vh, 560px); overflow-y: auto; }
        .zorb-pop.hidden, .zorb-panel.hidden { display: none; }

        /* Zuno AI analyst workspace */
        .zp-backdrop { position: fixed; inset: 0; z-index: 69; background: rgba(2,8,23,.5); backdrop-filter: blur(2px); } .zp-backdrop[hidden] { display: none; }
        .zorb-panel.zp { position: fixed; inset: 18px; margin: auto; width: min(960px, calc(100vw - 36px)); height: min(88vh, 880px); max-height: none; padding: 0; display: flex; flex-direction: column; overflow: hidden; z-index: 70; border-radius: 22px; box-shadow: 0 30px 80px rgba(2,8,23,.45); }
        .zorb-panel.zp.hidden { display: none; }
        .zp.zp-full { width: calc(100vw - 36px); height: calc(100vh - 36px); }
        @media (max-width: 720px) { .zorb-panel.zp, .zp.zp-full { inset: 0; margin: 0; width: 100%; height: 100%; border-radius: 0; } }
        .zp-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #e5e7eb; background: linear-gradient(135deg, rgba(20,184,166,.12), rgba(37,99,235,.10)); }
        .dark .zp-head { border-color: #1f2937; background: linear-gradient(135deg, rgba(20,184,166,.16), rgba(37,99,235,.16)); }
        .zp-logo { width: 38px; height: 38px; flex: none; border-radius: 12px; display: block; }
        .zp-titles { min-width: 0; flex: 1; } .zp-title { font-weight: 800; font-size: 1.05rem; line-height: 1.1; } .zp-sub { font-size: .74rem; opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .zp-actions { display: flex; gap: 4px; } .zp-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #64748b; border: 0; background: transparent; cursor: pointer; }
        .zp-icon:hover { background: rgba(100,116,139,.16); color: inherit; } .zp-icon:focus-visible { outline: 2px solid #14b8a6; }
        .zp-usage { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 10px 16px; border-bottom: 1px solid #e5e7eb; font-size: .72rem; }
        .dark .zp-usage { border-color: #1f2937; } @media (max-width: 560px) { .zp-usage { grid-template-columns: 1fr; gap: 8px; } }
        .zp-explain { grid-column: 1 / -1; font-size: .7rem; opacity: .65; line-height: 1.4; margin: 0; }
        .zp-meter-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; opacity: .85; } .zp-meter-top b { font-weight: 700; }
        .zp-bar { height: 8px; border-radius: 99px; background: rgba(100,116,139,.2); overflow: hidden; display: flex; }
        .zp-bar i { display: block; height: 100%; width: 0; transition: width .6s ease; background: linear-gradient(90deg,#14b8a6,#2563eb); }
        .zp-bar.is-low i { background: linear-gradient(90deg,#f59e0b,#f43f5e); }
        .zp-bar--split i:first-child { background: #2563eb; } .zp-bar--split i:last-child { background: #14b8a6; }
        .zp-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; opacity: .75; } .zp-legend u { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; text-decoration: none; } .zp-legend u.in { background: #2563eb; } .zp-legend u.out { background: #14b8a6; } .zp-legend em { font-style: normal; font-weight: 700; margin-left: 3px; }
        .zp-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 18px 8px; scroll-behavior: smooth; }
        .zp-log { display: flex; flex-direction: column; gap: 18px; max-width: 820px; margin: 0 auto; }
        .zp-disclaimer { display: flex; gap: 9px; align-items: flex-start; max-width: 820px; margin: 0 auto 14px; padding: 9px 12px; border-radius: 12px; font-size: .76rem; line-height: 1.4; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.35); color: #92400e; } .dark .zp-disclaimer { color: #fcd34d; } .zp-disclaimer svg { flex: none; margin-top: 1px; }
        .zp-hero { text-align: center; padding: 18px 8px 4px; } .zp-hero-orb { width: 96px; height: 96px; margin: 0 auto 8px; } .zp-hero h3 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; } .zp-hero p { opacity: .7; margin-top: 4px; font-size: .9rem; }
        .zp-starters { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 18px; text-align: left; }
        .zp-starter { padding: 14px; border-radius: 14px; border: 1px solid #e5e7eb; background: rgba(148,163,184,.06); cursor: pointer; text-align: left; transition: transform .15s, border-color .15s, background .15s; color: inherit; }
        .dark .zp-starter { border-color: #374151; } .zp-starter:hover { transform: translateY(-2px); border-color: #14b8a6; background: rgba(20,184,166,.08); } .zp-starter:focus-visible { outline: 2px solid #14b8a6; }
        .zp-starter b { display: block; font-size: .92rem; } .zp-starter span { display: block; font-size: .76rem; opacity: .65; margin-top: 3px; }
        .zp-user { align-self: flex-end; max-width: 85%; background: linear-gradient(135deg,#0d9488,#2563eb); color: #fff; padding: 10px 14px; border-radius: 18px 18px 4px 18px; font-size: .92rem; white-space: pre-wrap; }
        .zp-ai { display: flex; gap: 12px; align-items: flex-start; } .zp-ai-mark { width: 30px; height: 30px; flex: none; border-radius: 10px; background: linear-gradient(135deg,#14b8a6,#2563eb); display: grid; place-items: center; margin-top: 2px; } .zp-ai-mark svg { width: 17px; height: 17px; }
        .zp-ai-body { min-width: 0; flex: 1; font-size: .93rem; line-height: 1.6; }
        .zp-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: .7rem; opacity: .6; } .zp-meta button { border: 0; background: none; color: inherit; cursor: pointer; text-decoration: underline; padding: 0; font-size: inherit; } .zp-meta button:hover { opacity: 1; color: #0d9488; }
        .zp-think { display: flex; align-items: center; gap: 12px; padding: 4px 0; } .zp-think-orb { width: 54px; height: 54px; flex: none; } .zp-think-text { font-size: .9rem; opacity: .8; animation: zp-fade 2.2s ease-in-out infinite; } @keyframes zp-fade { 50% { opacity: .45; } }
        .zp-err { color: #b91c1c; } .dark .zp-err { color: #fca5a5; }
        .zp-chips { display: flex; flex-wrap: wrap; gap: 8px; max-width: 820px; margin: 12px auto 0; padding-bottom: 8px; } .zp-chips button { padding: 7px 14px; border-radius: 99px; border: 1px solid rgba(20,184,166,.5); font-size: .8rem; color: #0f766e; background: rgba(20,184,166,.07); cursor: pointer; } .dark .zp-chips button { color: #5eead4; } .zp-chips button:hover { background: rgba(20,184,166,.18); }
        .zp-composer { position: relative; display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 12px 16px 12px; border-top: 1px solid #e5e7eb; } .dark .zp-composer { border-color: #1f2937; }
        .zp-composer textarea { flex: 1; min-width: 0; resize: none; box-sizing: border-box; min-height: 46px; max-height: 140px; font-family: inherit; padding: 12px 14px; border-radius: 14px; border: 1px solid #d1d5db; background: rgba(148,163,184,.08); color: inherit; font-size: .95rem; line-height: 1.4; } .dark .zp-composer textarea { border-color: #374151; } .zp-composer textarea:focus { outline: 2px solid #14b8a6; border-color: transparent; }
        .zp-send { width: 46px; height: 46px; border-radius: 14px; border: 0; color: #fff; cursor: pointer; background: linear-gradient(135deg,#0d9488,#2563eb); display: grid; place-items: center; } .zp-send:disabled { opacity: .5; cursor: default; }
        .zp-foot { flex-basis: 100%; font-size: .68rem; opacity: .55; }
        /* answer text */
        .za > * + * { margin-top: .75rem; } .za-h { font-weight: 800; letter-spacing: -.01em; margin-top: 1.1rem !important; } h3.za-h { font-size: 1.12rem; } h4.za-h, h5.za-h { font-size: 1rem; } .za .za-first { margin-top: 0 !important; }
        .za-ul, .za-ol { padding-left: 1.3rem; } .za-ul { list-style: disc; } .za-ol { list-style: decimal; } .za li { margin: .25rem 0; } .za strong { font-weight: 700; } .za-code { background: rgba(148,163,184,.2); padding: 0 .3rem; border-radius: 4px; font-size: .85em; }
        .za-tablewrap { overflow-x: auto; border: 1px solid #e5e7eb; border-radius: 12px; } .dark .za-tablewrap { border-color: #374151; } .za-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
        .za-table th { text-align: left; background: rgba(148,163,184,.12); font-weight: 700; padding: 8px 12px; white-space: nowrap; } .za-table td { padding: 8px 12px; border-top: 1px solid rgba(148,163,184,.2); } .za-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
        /* charts */
        .zc { margin: 0; padding: 14px 16px; border-radius: 16px; border: 1px solid #e5e7eb; background: linear-gradient(180deg, rgba(148,163,184,.07), rgba(148,163,184,.02)); } .dark .zc { border-color: #374151; }
        .zc-title { font-weight: 700; font-size: .86rem; margin-bottom: 10px; }
        .zc-hrow { display: grid; grid-template-columns: minmax(70px, 28%) 1fr auto; gap: 10px; align-items: center; margin: 7px 0; font-size: .82rem; } .zc-hlabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .zc-htrack { height: 14px; border-radius: 99px; background: rgba(100,116,139,.15); overflow: hidden; } .zc-hfill { height: 100%; border-radius: 99px; transition: width .8s cubic-bezier(.2,.8,.2,1); } .zc-hval { font-weight: 700; font-variant-numeric: tabular-nums; }
        .zc-cols { display: flex; align-items: flex-end; gap: 8px; height: 200px; } .zc-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; } .zc-chold { width: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center; } .zc-cbar { width: min(46px, 80%); border-radius: 8px 8px 3px 3px; transition: height .8s cubic-bezier(.2,.8,.2,1); } .zc-cval { font-size: .68rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; } .zc-clabel { font-size: .72rem; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
        .zc-line { width: 100%; height: auto; display: block; } .zc-grid { stroke: rgba(148,163,184,.25); stroke-width: 1; } .zc-axis { font-size: 10px; fill: #94a3b8; } .zc-path { stroke: #14b8a6; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; } .zc-path--fc { stroke-dasharray: 6 5; stroke: #f59e0b; } .zc-fband { fill: rgba(245,158,11,.08); } .zc-fclabel { fill: #d97706; font-weight: 700; } .zc-dot { fill: #fff; stroke: #14b8a6; stroke-width: 2; } .dark .zc-dot { fill: #0f172a; }
        .zc-donut { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; } .zc-donut-svg { width: 160px; height: 160px; flex: none; } .zc-donut-bg { stroke: rgba(148,163,184,.18); } .zc-donut-total { font-size: 15px; font-weight: 800; fill: currentColor; } .zc-legend { flex: 1; min-width: 180px; } .zc-lrow { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: .82rem; } .zc-sw { width: 10px; height: 10px; border-radius: 3px; flex: none; } .zc-llabel { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .zc-lval { font-weight: 700; font-variant-numeric: tabular-nums; }
        @media (max-width: 560px) { .zp-ai-mark { display: none; } .zp-body { padding: 14px 12px 6px; } .zp-user { max-width: 92%; } }
        @media (prefers-reduced-motion: reduce) { .zp-think-text { animation: none; } .zc-hfill, .zc-cbar, .zp-bar i { transition: none; } }
        .zmore { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 25; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 0; border-radius: 999px; background: #0f766e; color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 6px 18px rgba(15,118,110,.4); cursor: pointer; animation: zmore-bob 1.6s ease-in-out infinite; }
        .zmore[hidden] { display: none; }
        .zmore svg { display: block; }
        @keyframes zmore-bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 4px); } }
        @media (max-width: 640px) { .zmore { bottom: 12px; padding: 6px 12px; } }
        @media (prefers-reduced-motion: reduce) { .zmore { animation: none; } }
        @media (max-width: 640px) { .zorb { width: 46px; height: 46px; } .zorb-tip { right: 54px; } .zorb-dock { right: 10px; bottom: 12px; } }
        @media (prefers-reduced-motion: reduce) { .zorb-orbit, .zorb-spark, .zorb { animation: none; transition: none; } }


    /* One clearly named export action; one-touch choice sheet on phones. */
    .zuno-download-trigger {
        align-items:center;
        justify-content:center;
        gap:.32rem;
        flex:0 0 auto;
        min-width:40px;
        min-height:40px;
        padding:.43rem .58rem;
        border:1px solid rgba(16,179,160,.32);
        border-radius:.7rem;
        background:rgba(16,179,160,.09);
        color:#0c766c;
        font-size:.72rem;
        font-weight:780;
        white-space:nowrap;
    }
    body.is-admin .zuno-download-trigger.admin-only,
    .zuno-download-trigger.admin-visible { display:inline-flex !important; }
    .zuno-download-trigger svg { width:19px;height:19px; flex-shrink:0; }
    .zuno-download-trigger:focus-visible { outline:3px solid rgba(16,179,160,.35);outline-offset:2px; }
    .dark .zuno-download-trigger {
        background:rgba(16,179,160,.12);
        border-color:rgba(45,212,191,.33);
        color:#a6f7df;
    }
    /* Inline display must not override permission-based visibility. */
    .zuno-download-trigger[style*="display: none"],
    .zuno-download-trigger:not(.admin-visible) { display:none !important; }
    @media(max-width:440px) {
        .zuno-download-trigger { width:40px;height:40px;padding:0; }
        .zuno-download-trigger span { display:none; }
        #view-products > header { gap:.3rem; }
        #view-products > header h1 { font-size:1.04rem; }
        #view-products > header > .flex { gap:.28rem; }
    }
    #zuno-export-picker.hidden { display:none !important; }
    #zuno-export-picker {
        position:fixed;inset:0;z-index:85;
        display:flex;align-items:flex-end;justify-content:center;
        padding:12px max(12px,env(safe-area-inset-right))
               max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
        background:rgba(3,10,20,.65);backdrop-filter:blur(6px);
    }
    .zuno-export-card {
        width:100%;max-width:420px;min-width:0;
        padding:18px;border-radius:21px;
        background:#fff;color:#152338;
        box-shadow:0 24px 70px rgba(0,0,0,.34);
    }
    .dark .zuno-export-card {background:#101c2b;color:#eff7fb;border:1px solid #304358;}
    .zuno-export-heading { display:flex;align-items:center;justify-content:space-between;gap:8px; }
    .zuno-export-heading h2 {font:800 1.15rem/1.2 Manrope,Inter,sans-serif;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
    .zuno-export-close {display:grid;place-items:center;width:38px;height:38px;min-height:38px;flex-shrink:0;border-radius:12px;background:#eef2f6;color:#425469;}
    .dark .zuno-export-close {background:#1d3146;color:#dbe7f2;}
    .zuno-export-options {display:grid;gap:10px;margin-top:18px;}
    .zuno-export-option {
        display:flex;align-items:center;gap:13px;text-align:left;
        padding:12px;border:1px solid #e0e7ef;border-radius:15px;
        width:100%;max-width:100%;min-width:0;min-height:72px;background:#f8fafc;color:inherit;
    }
    .dark .zuno-export-option {background:#172538;border-color:#304155;}
    .zuno-export-option:focus-visible {outline:3px solid #10b3a0;outline-offset:2px;}
    .zuno-export-option > span:nth-child(2) {display:flex;flex:1;min-width:0;flex-direction:column;gap:2px;}
    .zuno-export-option strong {font-size:.91rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
    .zuno-export-option small {font-size:.72rem;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
    .dark .zuno-export-option small {color:#a2b2c5;}
    .zuno-export-option > svg:last-child {width:17px;height:17px;color:#94a3b8;flex:0 0 auto;}
    .zuno-export-option-icon {width:42px;height:42px;border-radius:12px;display:grid;place-items:center;flex:0 0 auto;}
    .zuno-export-option-icon svg {width:23px;height:23px;}
    .zuno-export-option-icon--pdf {background:#fff0f0;color:#df4242;}
    .zuno-export-option-icon--csv {background:#e5f7ef;color:#14864f;}
    .zuno-export-option:disabled {opacity:.55;cursor:wait;}
    @media(min-width:641px){#zuno-export-picker{align-items:center}.zuno-export-card{padding:22px;}}


/* List view is a compact, one-row accordion; grid cards remain unchanged. */
#category-list.category-management-list > .category-management-card {
    display:flex !important;
    flex-direction:column;
    align-items:stretch;
    gap:0;
    padding:.52rem .62rem !important;
    min-height:0;
    overflow:visible;
    border-radius:13px;
}
#category-list.category-management-list > .category-management-card.is-expanded {
    border-color:rgba(16,179,160,.34);
    box-shadow:0 6px 22px rgba(8,61,72,.07) !important;
}
#category-list.category-management-list .category-card-primary--list {
    position:relative;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    width:100%;
    gap:.3rem;
    min-width:0;
}
#category-list.category-management-list .category-card-primary--list::before { content:none !important; display:none !important; }
#category-list.category-management-list .category-list-expand-btn {
    appearance:none;
    display:flex;
    flex:1 1 0%;
    min-width:0;
    min-height:48px;
    align-items:center;
    gap:.58rem;
    text-align:left;
    border:0;
    background:transparent;
    padding:.16rem .1rem;
    color:inherit;
    cursor:pointer;
}
#category-list.category-management-list .category-list-folder {
    display:grid;
    flex:0 0 37px;
    width:37px;
    height:37px;
    place-items:center;
    color:#0d9488;
    border:1px solid #d4f0e9;
    background:#eefbf7;
    border-radius:10px;
}
#category-list.category-management-list .category-list-folder svg { width:19px; height:19px; }
#category-list.category-management-list .category-list-expand-btn .category-card-primary-text {
    display:block;
    min-width:0;
    flex:1 1 auto;
}
#category-list.category-management-list .category-list-expand-btn .category-card-title-row {
    display:flex;
    min-width:0;
    width:100%;
    flex-wrap:nowrap;
    align-items:center;
}
#category-list.category-management-list .category-list-expand-btn .category-card-title-row p {
    display:block;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:.85rem;
    line-height:1.25;
    font-weight:800;
}
#category-list.category-management-list .category-list-expand-btn .category-card-visibility {
    display:block;
    min-width:0;
    max-width:100%;
    margin-top:.2rem;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:.64rem;
    line-height:1.25;
}
#category-list.category-management-list .category-list-chevron {
    flex:0 0 16px;
    width:16px;
    height:16px;
    color:#71869b;
    transition:transform .18s ease;
}
#category-list.category-management-list .is-expanded .category-list-chevron { transform:rotate(90deg); color:#0c766c; }
#category-list.category-management-list .category-card-primary--list > .category-name-edit.flex {
    flex:1 0 100%;
    width:100%;
    margin:.4rem 0;
}
#category-list.category-management-list .category-list-detail { display:none !important; min-width:0; width:100%; }
#category-list.category-management-list .category-list-detail.is-open {
    display:grid !important;
    grid-template-columns:minmax(0,1fr);
    row-gap:.46rem;
    align-items:start;
    border-top:1px solid #e6eef1;
    margin-top:.42rem;
    padding-top:.56rem;
}
#category-list.category-management-list .category-list-detail .category-product-summary { display:none !important; }
#category-list.category-management-list .category-list-detail .category-card-action-row,
#category-list.category-management-list .category-list-detail .category-card-manage-row.admin-visible {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:.46rem;
    width:100%;
    min-width:0;
    margin:0;
    padding:0;
}
#category-list.category-management-list .category-list-detail .category-card-action-row > button,
#category-list.category-management-list .category-list-detail .category-card-manage-row > button {
    display:inline-flex;
    min-width:0;
    width:100%;
    align-items:center;
    justify-content:center;
    min-height:38px;
    padding:.42rem .35rem;
    font-size:.69rem;
}
#category-list.category-management-list .category-list-detail .category-card-access.admin-visible {
    display:block !important;
    min-width:0;
    width:100%;
    margin:0;
    padding-top:.25rem;
    border-top:1px solid #e6eef1;
}
#category-list.category-management-list .category-card-access-summary {
    min-height:38px;
    font-size:.72rem;
}
.dark #category-list.category-management-list .category-list-folder { background:#0c2e2b; border-color:#1e544d; color:#6de2d1; }
.dark #category-list.category-management-list .category-list-detail.is-open,
.dark #category-list.category-management-list .category-list-detail .category-card-access.admin-visible { border-color:#2c4052; }
@media(min-width:720px) {
    #category-list.category-management-list .category-list-detail.is-open:has(.category-card-manage-row.admin-visible) {
        grid-template-columns:repeat(2,minmax(0,1fr));
        column-gap:.6rem;
    }
    #category-list.category-management-list .category-list-detail .category-card-access.admin-visible { grid-column:1 / -1; }
}
@media(max-width:359px) {
    #category-list.category-management-list > .category-management-card { padding:.43rem .55rem !important; }
    #category-list.category-management-list .category-list-expand-btn { gap:.43rem; }
    #category-list.category-management-list .category-list-folder { flex-basis:33px; width:33px; height:33px; }
}


/* Explicit vertical flow replaces old grid-area rules inherited from the pre-accordion
   category layout. Those implicit grid areas stacked settings on top of Edit/Delete. */
#category-list.category-management-list > .category-management-card {
    display:flex !important;
    flex-direction:column;
    align-items:stretch;
    gap:0;
    overflow:hidden;
    height:auto;
}
#category-list.category-management-list > .category-management-card > .category-card-primary--list {
    display:flex;
    flex:0 0 auto;
    min-width:0;
    width:100%;
}
#category-list.category-management-list .category-list-detail {display:none !important;}
#category-list.category-management-list .category-list-detail.is-open {
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch;
    gap:.52rem;
    width:100%;
    min-width:0;
    border-top:1px solid #e4edf1;
    margin-top:.44rem;
    padding-top:.58rem;
}
#category-list.category-management-list .category-list-detail.is-open > .category-card-action-row,
#category-list.category-management-list .category-list-detail.is-open > .category-card-manage-row.admin-visible,
#category-list.category-management-list .category-list-detail.is-open > .category-card-access.admin-visible {
    grid-area:auto !important;
    grid-column:auto !important;
    grid-row:auto !important;
    order:unset !important;
    min-width:0;
    max-width:100%;
    width:100%;
    margin:0 !important;
    position:static;
}
#category-list.category-management-list .category-list-detail.is-open > .category-card-action-row,
#category-list.category-management-list .category-list-detail.is-open > .category-card-manage-row.admin-visible {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:.42rem;
    padding:0;
}
#category-list.category-management-list .category-list-detail .category-card-action-row > button,
#category-list.category-management-list .category-list-detail .category-card-manage-row > button {
    width:100%; min-width:0; min-height:39px;
    padding:.45rem .25rem;
    white-space:nowrap;
}
#category-list .category-card-access.admin-visible {
    display:block !important;
    flex:0 0 auto;
    min-width:0;
    width:100%;
    margin-top:.52rem !important;
    padding-top:.32rem;
    border-top:1px solid #e7eef2;
}
#category-list.category-management-list .category-list-detail .category-card-access.admin-visible {
    margin-top:.12rem !important;
}
#category-list .category-card-access-summary {
    width:100%; min-width:0; gap:.4rem;
    white-space:nowrap;
    overflow:hidden;
}
#category-list .category-access-count {
    color:#0b9384; font-size:.62rem; font-weight:700;
    margin-left:auto; white-space:nowrap;
}
#category-list .category-access-form {display:flex; flex-direction:column; align-items:stretch; gap:.52rem; min-width:0; padding:.58rem .1rem .12rem;}
#category-list .category-access-form > label {display:flex; align-items:center; gap:.45rem; font-size:.75rem; min-width:0;}
#category-list .category-member-caption {font-size:.65rem; font-weight:800; color:#667c8c; margin:.17rem 0 -.27rem; white-space:nowrap;}
#category-list .category-allowed-members {display:flex; flex-wrap:wrap; gap:.35rem; width:100%; min-width:0;}
#category-list .category-allowed-member {display:inline-flex; align-items:center; min-width:0; max-width:100%; gap:.35rem; padding:.32rem .42rem; border-radius:9px; color:#0f766e; background:#eafbf5; font-size:.69rem; font-weight:700;}
#category-list .category-allowed-member span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
#category-list .category-allowed-member button {flex:0 0 auto;min-height:27px;width:27px;padding:0;border-radius:7px;color:#0c766c;border:1px solid #bde6df;}
#category-list .category-member-picker {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.4rem;min-width:0;width:100%;}
#category-list .category-member-select {min-height:41px;min-width:0;width:100%;font-size:.73rem;text-overflow:ellipsis;}
#category-list .cat-allow-btn {min-width:60px;min-height:41px;padding:.48rem .62rem;background:#0b9384;border-radius:10px;color:white;font-size:.72rem;font-weight:800;white-space:nowrap;}
#category-list .category-member-hint {font-size:.67rem;color:#72859b;line-height:1.35;margin:0;}
#category-list .category-member-error {color:#b45309;overflow-wrap:anywhere;}
.dark #category-list .category-list-detail.is-open,.dark #category-list .category-card-access.admin-visible {border-color:#2c4052;}
.dark #category-list .category-allowed-member {background:#0f3b35;color:#9ceada;}
.dark #category-list .category-member-hint {color:#aabbd0;}
.dark #category-list .category-member-error {color:#fbbf24;}


/* Only the Subscription view is restyled; no other card or action is changed. */
#view-subscription .subscription-assurance-details {display:block; min-width:0; margin:0 0 .9rem;}
#view-subscription .subscription-assurance-summary {display:none;}
#view-subscription .subscription-assurance-details:not([open]) > .subscription-assurance-summary {display:flex;}
#view-subscription .subscription-plan-picker-label {display:none;}
#view-subscription .billing-plan-benefits {min-width:0; flex:1;}
#view-subscription .billing-plan-benefits > summary {display:none;}
#view-subscription .billing-plan-benefits:not([open]) > summary {display:flex;}
#view-subscription .payment-trust-block > summary {list-style:none; cursor:pointer;}
#view-subscription .payment-trust-block > summary::-webkit-details-marker,
#view-subscription .billing-plan-benefits > summary::-webkit-details-marker,
#view-subscription .subscription-assurance-summary::-webkit-details-marker {display:none;}
#view-subscription .subscription-disclosure-chevron {display:inline-block; flex:0 0 auto; font-size:1.2rem; line-height:1; transition:transform .15s ease;}
#view-subscription details[open] > summary .subscription-disclosure-chevron {transform:rotate(180deg);}
#view-subscription .billing-plan-benefits summary > span {margin-left:auto;}
@media (max-width:767px) {
    #view-subscription > .scroll-area {padding:.62rem .68rem max(1rem,env(safe-area-inset-bottom)) !important;}
    #view-subscription > .scroll-area.space-y-4 > * + * {margin-top:.58rem !important;}
    #view-subscription header {min-height:58px; padding:.57rem .8rem !important;}
    #view-subscription header h1 {font-size:1.1rem !important;}
    #view-subscription .subscription-hero {
        margin:0 0 .58rem !important; padding:.85rem .95rem !important;
        border-radius:16px !important; box-shadow:0 8px 22px rgba(15,23,42,.12);
    }
    #view-subscription .subscription-hero-kicker {
        font-size:.56rem !important; padding:.25rem .42rem; margin:0 0 .4rem !important;
    }
    #view-subscription .subscription-hero h2 {
        font-size:clamp(1.1rem,4.7vw,1.42rem) !important;
        line-height:1.14; letter-spacing:-.032em; max-width:25rem;
    }
    #view-subscription .subscription-hero > p {
        font-size:.72rem !important; line-height:1.38; margin:.37rem 0 0;
        display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
    }
    /* The three assurances remain available via one compact, keyboard-accessible disclosure. */
    #view-subscription .subscription-hero .subscription-trust-row {display:none;}
    #view-subscription .subscription-assurance-details {margin-bottom:.6rem;}
    #view-subscription .subscription-assurance-summary {
        display:flex; align-items:center; gap:.55rem; min-height:43px; padding:.51rem .72rem;
        border:1px solid #d6e9e7; border-radius:13px; background:#f1fbf9;
        color:#115c57; list-style:none; cursor:pointer; min-width:0;
    }
    #view-subscription .subscription-assurance-summary strong {min-width:0; flex:1; font-size:.72rem; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
    #view-subscription .subscription-assurance-mark {display:grid;place-items:center;width:25px;height:25px;flex:0 0 25px;border-radius:8px;background:#d5f3ed;font-size:.72rem;}
    #view-subscription .subscription-assurance-hint {font-size:.65rem;white-space:nowrap;color:#0c766c;}
    #view-subscription .subscription-assurance-details > .subscription-assurance-strip {margin:.4rem 0 0;gap:.37rem;}
    #view-subscription .subscription-assurance-item {padding:.53rem .62rem; gap:.53rem; border-radius:11px;}
    #view-subscription .subscription-assurance-icon {width:29px;height:29px;flex-basis:29px;border-radius:9px;}
    #view-subscription .subscription-assurance-icon svg {width:16px;height:16px;}
    #view-subscription .subscription-assurance-item strong {font-size:.69rem;}
    #view-subscription .subscription-assurance-item span {font-size:.65rem;}
    /* The account-status panel is one shallow row + three compact usage counters. */
    #view-subscription .plan-usage-card {
        display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.48rem .4rem;
        margin:0 0 .54rem !important;padding:.72rem .78rem !important;border-radius:14px !important;
        box-shadow:0 7px 18px rgba(15,23,42,.09);
    }
    #view-subscription .plan-usage-top {grid-column:1/-1;align-items:center;gap:.45rem;min-width:0;}
    #view-subscription .plan-usage-top > div {min-width:0; flex:1;}
    #view-subscription .plan-usage-tier {display:block;font-size:.55rem;}
    #view-subscription .plan-usage-tagline {margin:.09rem 0 0;font-size:.86rem;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
    #view-subscription .plan-usage-upgrade-btn {max-width:43%;padding:.33rem .46rem;font-size:.69rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
    #view-subscription .billing-usage-row {min-width:0;margin:.22rem 0 0;}
    #view-subscription .billing-usage-row + .billing-usage-row {padding-left:.4rem;border-left:1px solid rgba(255,255,255,.28);}
    #view-subscription .billing-usage-label {flex-direction:column;align-items:flex-start;gap:.1rem;margin:0;min-width:0;line-height:1.2;}
    #view-subscription .billing-usage-label span:first-child {min-width:0;max-width:100%;font-size:.56rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
    #view-subscription .billing-usage-label span:last-child {font-size:.76rem;color:#fff;font-weight:850;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis;}
    #view-subscription .billing-usage-track {height:3px;margin-top:.28rem;}
    #view-subscription .plan-billing-cycle {margin:0 0 .55rem !important;padding:.55rem .65rem;gap:.3rem;border-radius:12px;}
    #view-subscription .plan-billing-cycle > div {min-width:0;}
    #view-subscription .plan-billing-cycle span {font-size:.54rem;}
    #view-subscription .plan-billing-cycle strong {font-size:.69rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
    #view-subscription .subscription-plan-picker-label {
        display:flex;justify-content:space-between;gap:.5rem;align-items:center;
        margin:.72rem 0 .32rem !important;padding:0 .17rem;
        font-family:'Manrope','Inter',sans-serif;font-size:.85rem;font-weight:800;
        color:#1b2e39;
    }
    #view-subscription .subscription-plan-picker-label span {font-family:Inter,sans-serif; font-size:.64rem; font-weight:650; color:#0c766c;white-space:nowrap;}
    #view-subscription .billing-plan-grid {
        display:flex !important;grid-template-columns:none !important;gap:.55rem !important;
        max-width:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;
        scroll-padding-left:.1rem;-webkit-overflow-scrolling:touch;
        overscroll-behavior-x:contain; margin:0 0 .58rem !important;
        padding:.13rem .1rem .68rem !important;scrollbar-width:thin;
    }
    #view-subscription .billing-plan-card {
        flex:0 0 min(78vw,288px);min-width:0;max-width:calc(100vw - 1.7rem);
        min-height:0 !important;height:auto;padding:.68rem .72rem !important;
        border-radius:15px !important;scroll-snap-align:start;
        animation:none !important;transform:none !important;opacity:1 !important;
    }
    #view-subscription .billing-plan-ribbon {top:.39rem !important;right:.45rem !important;font-size:.52rem !important;padding:.19rem .34rem !important;}
    #view-subscription .billing-plan-card:has(.billing-plan-ribbon) .billing-plan-name {padding-right:5.7rem;}
    #view-subscription .billing-plan-name {font-size:.93rem !important;line-height:1.25;min-width:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
    #view-subscription .billing-plan-tagline {font-size:.65rem;line-height:1.25;margin:.15rem 0 0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
    #view-subscription .billing-plan-price {font-size:1.27rem !important;margin:.44rem 0 .19rem !important;line-height:1.22;white-space:nowrap;}
    #view-subscription .billing-plan-price span {font-size:.61rem;}
    #view-subscription .billing-plan-description {
        min-height:0 !important;margin:.09rem 0 .52rem !important;font-size:.66rem;
        display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;
    }
    #view-subscription .billing-plan-benefits {flex:0 0 auto;min-height:0; margin:0 0 .43rem;border:1px solid #e3eaf0;border-radius:10px;}
    #view-subscription .billing-plan-benefits > summary {
        display:flex;justify-content:space-between;align-items:center;gap:.5rem;
        cursor:pointer;list-style:none;padding:.45rem .58rem;min-height:36px;
        color:#31556b;font-size:.7rem;font-weight:780;
    }
    #view-subscription .billing-plan-benefits[open] > summary > span {transform:rotate(180deg);}
    #view-subscription .billing-plan-benefits .billing-plan-features {
        padding:.13rem .58rem .5rem !important;margin:0 !important;font-size:.67rem;
        gap:.18rem;line-height:1.28 !important;max-width:100%;
    }
    #view-subscription .billing-plan-benefits .billing-plan-features li {padding-left:1.08rem;min-width:0;overflow-wrap:break-word;}
    #view-subscription .billing-plan-btn {min-height:43px !important;margin-top:auto;padding:.5rem !important;font-size:.76rem !important;border-radius:11px !important;}
    #view-subscription .billing-plan-cta-note {margin:.3rem 0 0 !important;min-height:0;font-size:.58rem;line-height:1.28;}
    #view-subscription .plan-compare {margin-top:.26rem !important;border-radius:13px !important;}
    #view-subscription .plan-compare summary {min-height:44px;padding:.55rem .68rem !important;font-size:.76rem;}
    #view-subscription .plan-compare summary span:last-child {font-size:.59rem;}
    #view-subscription .plan-compare-scroll {overflow-x:auto;max-width:100%;}
    #view-subscription .plan-compare-table {min-width:380px;}
    #view-subscription .payment-trust-block {margin:.48rem 0 0;padding:.68rem .73rem !important;border-radius:13px !important;}
    #view-subscription .payment-trust-badge {margin:0 !important;padding:0 !important;border:0 !important;display:flex;min-height:33px;align-items:center;gap:.5rem;}
    #view-subscription .payment-trust-badge .subscription-disclosure-chevron {margin-left:auto;color:#0c766c;}
    #view-subscription .payment-trust-list {margin-top:.58rem;gap:.25rem;}
    #view-subscription .payment-trust-list li {padding:.32rem .4rem;font-size:.68rem;line-height:1.32;}
    #view-subscription #payment-method-section > .surface-card {padding:.72rem !important;border-radius:13px;}
    #view-subscription .subscription-legal-links {padding:.22rem 0 .2rem;gap:.35rem .85rem;}
    #view-subscription .subscription-legal-links a {font-size:.64rem;}
    #view-subscription .billing-cancel-card {padding:.76rem;border-radius:13px;}
    .dark #view-subscription .subscription-assurance-summary {background:#102f31;border-color:#254b4e;color:#d7f9f4;}
    .dark #view-subscription .subscription-assurance-hint {color:#66e8d6;}
    .dark #view-subscription .subscription-plan-picker-label {color:#eaf6f7;}
    .dark #view-subscription .billing-plan-benefits {border-color:#36485a;}
    .dark #view-subscription .billing-plan-benefits > summary {color:#b9ece3;}
}
@media (prefers-reduced-motion:reduce) {
    #view-subscription .subscription-disclosure-chevron {transition:none;}
}


#category-list .category-member-feedback {
    display:flex; flex-wrap:wrap; align-items:center; gap:.4rem;
    min-width:0; margin-top:.25rem;
}
#category-list .category-member-feedback > p { flex:1 1 160px; min-width:0; }
#category-list .category-roster-retry {
    flex:0 0 auto; min-height:34px; padding:.4rem .65rem;
    border:1px solid #92d8ce; border-radius:9px;
    background:#e8faf5; color:#0c766c; font-size:.72rem; font-weight:750;
}
.dark #category-list .category-roster-retry {
    border-color:#315a55; background:#173a35; color:#9ceada;
}


    /* Scoped to category rename; existing shared modals and cards are unchanged. */
    #category-rename-modal { position:fixed; inset:0; z-index:85; display:flex; align-items:center; justify-content:center;
        padding:max(16px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));
        background:rgba(4,13,23,.72); backdrop-filter:blur(5px); -webkit-backdrop-filter:blur(5px); }
    #category-rename-modal.hidden { display:none !important; }
    .category-rename-dialog { width:min(100%,420px); min-width:0; max-height:calc(100dvh - 36px); overflow-y:auto;
        border-radius:20px; border:1px solid #e3ebf1; padding:22px; background:#fff; color:#152235;
        box-shadow:0 25px 80px rgba(0,0,0,.27); }
    .category-rename-heading { display:flex; align-items:flex-start; gap:12px; min-width:0; }
    .category-rename-symbol { display:grid; place-items:center; flex:0 0 43px; width:43px; height:43px;
        border-radius:13px; color:#0c766c; background:#e8faf5; border:1px solid #c3e9df; }
    .category-rename-symbol svg { width:21px; height:21px; }
    .category-rename-heading-copy { flex:1; min-width:0; }
    #category-rename-title { margin:1px 0 5px; color:inherit; font-size:clamp(1.06rem,4.6vw,1.22rem); font-weight:800; line-height:1.28; }
    #category-rename-description { color:#66798c; font-size:.77rem; line-height:1.5; margin:0; }
    .category-rename-close { flex:0 0 34px; width:34px; height:34px; min-height:34px; border:0; border-radius:10px;
        background:#f0f4f7; color:#64748b; display:grid; place-items:center; }
    .category-rename-close svg { width:17px; height:17px; }
    #category-rename-form { display:flex; flex-direction:column; gap:9px; margin-top:22px; min-width:0; }
    #category-rename-form label { font-size:.78rem; font-weight:750; color:#4e6074; }
    #category-rename-input { width:100%; min-width:0; max-width:100%; height:48px; min-height:48px; padding:0 13px;
        border:1px solid #bfd1da; border-radius:11px; background:#f9fcfd; color:#192534; font-size:16px;
        outline:none; box-shadow:none; }
    #category-rename-input:focus { border-color:#10b3a0; box-shadow:0 0 0 3px rgba(16,179,160,.15); }
    .category-rename-error { min-width:0; margin:1px 0; font-size:.75rem; line-height:1.4; color:#c4343e; }
    .category-rename-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:15px; }
    .category-rename-actions button { width:100%; min-width:0; min-height:44px; border-radius:11px;
        padding:10px 9px; font-size:.82rem; line-height:1.2; font-weight:780; white-space:nowrap; }
    .category-rename-cancel { color:#405569; background:#eef3f6; border:1px solid #e1e9ef; }
    .category-rename-save { color:#fff; background:linear-gradient(135deg,#10b3a0,#0c766c); border:1px solid transparent; }
    .category-rename-save:disabled { opacity:.48; cursor:not-allowed; }
    .category-rename-close:focus-visible, .category-rename-actions button:focus-visible { outline:3px solid rgba(16,179,160,.35); outline-offset:2px; }
    .dark .category-rename-dialog { background:#111e2b; border-color:#293c4a; color:#f3f8fc; }
    .dark .category-rename-symbol { color:#69dfcb; background:#15342f; border-color:#27564f; }
    .dark #category-rename-description, .dark #category-rename-form label { color:#aab9c9; }
    .dark .category-rename-close, .dark .category-rename-cancel { color:#d0dce8; background:#223446; border-color:#32475a; }
    .dark #category-rename-input { background:#0d1924 !important; color:#f8fafc !important; border-color:#324858 !important; }
    .dark #category-rename-input:focus { border-color:#22c7b3 !important; }
    .dark .category-rename-error { color:#ffadb6; }
    @media (max-width:360px) { .category-rename-dialog { padding:17px; border-radius:16px; } .category-rename-heading { gap:9px; }
        .category-rename-symbol { flex-basis:38px; width:38px; height:38px; } .category-rename-actions { gap:8px; } }
    @media (prefers-reduced-motion:no-preference) { .category-rename-dialog { animation:zuno-category-rename-in .2s ease-out both; }
        @keyframes zuno-category-rename-in { from { opacity:0; transform:translateY(9px) scale(.98); } to { opacity:1; transform:none; } } }


#product-management-category-filter {display:flex;align-items:center;gap:.55rem;flex:0 0 auto;min-width:0;padding:.55rem .75rem;border-bottom:1px solid #dbe7eb;background:#effdfb;}
#product-management-category-filter.hidden {display:none!important;}
.dark #product-management-category-filter {background:#102b30;border-color:#27464c;}
.product-filter-back {width:34px;height:34px;min-height:34px;flex:0 0 34px;display:grid;place-items:center;border:1px solid #b5ded9;border-radius:10px;color:#0d766f;background:#fff;}
.product-filter-back svg {width:18px;height:18px;}
.dark .product-filter-back {background:#132d34;color:#5eead4;border-color:#28615e;}
.product-filter-identity {flex:1 1 auto;min-width:0;display:grid;gap:.08rem;line-height:1.2;}
.product-filter-identity span {font-size:.64rem;color:#64748b;}
.dark .product-filter-identity span {color:#9db2bd;}
.product-filter-identity strong {font-size:.85rem;color:#143342;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dark .product-filter-identity strong {color:#dff8f3;}
.product-filter-count {flex:0 0 auto;font-size:.66rem;font-weight:700;color:#0f766e;white-space:nowrap;}
.product-filter-clear {flex:0 0 auto;min-height:33px;padding:.35rem .58rem;border-radius:9px;background:#0d9488;color:#fff;font-size:.69rem;font-weight:700;white-space:nowrap;}
@media(max-width:360px){#product-management-category-filter{gap:.35rem;padding:.45rem .5rem}.product-filter-identity strong{font-size:.77rem}.product-filter-count{font-size:.61rem}.product-filter-clear{font-size:.62rem;padding:.35rem .42rem}}


/* End of Day (Z report) summary. The report card is always white (like invoices), so
   colours are fixed rather than theme-dependent; this also keeps the PDF export identical. */
#eod-cash-toolbar .eod-seg { display:flex; gap:4px; margin:10px auto 0; padding:4px; max-width:360px; border-radius:12px; background:rgba(255,255,255,.7); border:1px solid rgba(15,23,42,.08); }
.dark #eod-cash-toolbar .eod-seg { background:rgba(15,23,42,.5); border-color:rgba(148,163,184,.2); }
#eod-cash-toolbar .eod-seg-btn { flex:1; padding:7px 10px; border-radius:9px; font-size:.8rem; font-weight:600; color:#475569; background:transparent; border:0; cursor:pointer; transition:background .15s,color .15s; }
.dark #eod-cash-toolbar .eod-seg-btn { color:#cbd5e1; }
#eod-cash-toolbar .eod-seg-btn.is-active { background:linear-gradient(90deg,var(--accent),var(--accent-2)); color:#fff; box-shadow:0 2px 8px rgba(15,23,42,.12); }
.eod-doc .eod-report-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 16px; margin:14px 0 0; padding:8px 12px; border-radius:10px; background:#f8fafc; border:1px solid #eef1f5; font-size:.74rem; color:#64748b; }
.eod-doc .eod-report-meta b { color:#0f172a; font-weight:700; letter-spacing:.02em; }
.eod-doc .eod-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:12px 0 18px; }
.eod-doc .eod-kpi { padding:10px 12px; border-radius:12px; border:1px solid #e7ebf0; background:linear-gradient(180deg,#ffffff,#f8fafc); min-width:0; }
.eod-doc .eod-kpi span { display:block; font-size:.6rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:#94a3b8; }
.eod-doc .eod-kpi strong { display:block; margin-top:3px; font-size:1.02rem; font-weight:800; color:#0f172a; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.eod-doc .eod-kpi em { display:block; margin-top:2px; font-style:normal; font-size:.68rem; color:#64748b; }
.eod-doc .eod-table { margin-top:14px; border-radius:10px; overflow:hidden; }
.eod-doc .eod-table + .eod-table { margin-top:14px; }
.eod-doc .eod-table thead th:first-child { white-space:normal; }
.eod-doc .eod-table .eod-col-mid { width:4.6rem; text-align:right !important; font-variant-numeric:tabular-nums; white-space:nowrap; color:#475569; }
.eod-doc .eod-table thead th.eod-col-mid { color:#fff; }
.eod-doc .eod-table tbody td { color:#0f172a; }
.eod-doc .eod-table td:last-child { white-space:nowrap; font-weight:600; }
.eod-doc .eod-label { display:block; font-weight:500; color:#0f172a; overflow-wrap:anywhere; }
.eod-doc .eod-sub { display:block; margin-top:1px; font-size:.7rem; color:#64748b; overflow-wrap:anywhere; }
.eod-doc .eod-row--neg td:last-child { color:#dc2626; }
.eod-doc .eod-row--total td { background:#f8fafc; border-top:1px solid #e2e8f0; }
.eod-doc .eod-row--total .eod-label, .eod-doc .eod-row--total td:last-child { font-weight:700; }
.eod-doc .eod-row--grand td { background:rgba(var(--accent-rgb,16,179,160),.08); border-top:2px solid rgba(var(--accent-rgb,16,179,160),.45); }
.eod-doc .eod-row--grand .eod-label, .eod-doc .eod-row--grand td:last-child { font-weight:800; font-size:.92rem; }
.eod-doc .eod-row--muted td { color:#64748b; }
.eod-doc .eod-row--muted .eod-label { color:#64748b; }
.eod-doc .eod-row--muted td:last-child { font-weight:500; color:#64748b; }
.eod-doc .eod-row--peak td { background:rgba(var(--accent-rgb,16,179,160),.06); }
.eod-doc .eod-row--void td:last-child { color:#dc2626; text-decoration:line-through; }
.eod-doc .eod-blank { display:inline-block; width:6.5rem; max-width:100%; height:1.05rem; border-bottom:1.5px dashed #94a3b8; vertical-align:bottom; }
.eod-doc .eod-hero { background:#ffffff; overflow:visible; }
.eod-doc .eod-signoff { display:grid; grid-template-columns:1fr 1fr; gap:28px; margin:30px 0 18px; }
.eod-doc .eod-signoff span { display:block; height:28px; border-bottom:1px solid #94a3b8; }
.eod-doc .eod-signoff small { display:block; margin-top:4px; font-size:.68rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:#94a3b8; }
@media (max-width: 560px) {
  .eod-doc .eod-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .eod-doc .eod-table .eod-col-mid { width:3.9rem; }
  .eod-doc .eod-table thead th { letter-spacing:.03em; }
  .eod-doc .eod-table.invoice-doc-table--simple td:last-child, .eod-doc .eod-table.invoice-doc-table--simple th:last-child { width:7.2rem; }
  .eod-doc .eod-report-meta { flex-direction:column; }
}

        /* Create business: step-by-step */
        .cs-bar { height:6px; border-radius:999px; background:#e2e8f0; overflow:hidden; }
        .dark .cs-bar { background:#334155; }
        .cs-bar span { display:block; height:100%; width:33.33%; background:#10b3a0; border-radius:999px; transition:width .25s ease; }
        .cs-label { margin:6px 0 0; font-size:12px; font-weight:600; opacity:.7; }
        .cs-title { font-size:20px; font-weight:700; margin:0 0 2px; color:#0f172a; }
        .dark .cs-title { color:#f8fafc; }
        .cs-sub { font-size:13px; margin:0 0 12px; opacity:.7; }
        .cs-lock { font-size:12px; line-height:1.4; margin:12px 0 0; padding:9px 12px; border-radius:12px; background:#f1f5f9; color:#475569; }
        .dark .cs-lock { background:#1e293b; color:#cbd5e1; }
        .cs-nav { display:flex; gap:10px; margin-top:16px; }
        .cs-nav .primary-action { font-size:16px; }
        .cs-back { flex:none; padding-left:22px; padding-right:22px; border:1.5px solid #cbd5e1; background:#fff; color:#334155; }
        .dark .cs-back { background:#111827; border-color:#475569; color:#e2e8f0; }
        .cs-review { margin:0 0 4px; border:1px solid #e2e8f0; border-radius:14px; overflow:hidden; }
        .dark .cs-review { border-color:#334155; }
        .cs-review > div { display:flex; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid #e2e8f0; }
        .dark .cs-review > div { border-color:#334155; }
        .cs-review > div:last-child { border-bottom:0; }
        .cs-review dt { flex:none; width:68px; font-size:12px; font-weight:600; opacity:.65; }
        .cs-review dd { flex:1; margin:0; min-width:0; font-size:14px; font-weight:600; overflow-wrap:anywhere; }
        .cs-review button { flex:none; font-size:12px; font-weight:600; color:#0d9488; background:none; border:0; padding:4px 0; }
        /* Create business: everything fits one screen, no scrolling. Tiles show icon + name only; the chosen type's description sits below. */
        #create-org-type-picker .zbt-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
        #create-org-type-picker .zbt-card { flex-direction:column; justify-content:center; align-items:center; gap:6px; padding:10px 8px; text-align:center; border-radius:14px; }
        #create-org-type-picker .zbt-ico { width:38px; height:38px; border-radius:12px; }
        #create-org-type-picker .zbt-ico svg { width:22px; height:22px; }
        #create-org-type-picker .zbt-txt { flex:none; align-items:center; }
        #create-org-type-picker .zbt-txt b { font-size:14px; line-height:1.2; }
        #create-org-type-picker .zbt-txt small { display:none; }
        #create-org-type-picker .zbt-tick { position:absolute; top:8px; right:8px; width:18px; height:18px; font-size:10px; }
        @media (min-width:640px) { #create-org-type-picker .zbt-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
        #view-signup.cs-fit .cs-review > div { padding:4px 12px; }
        #view-signup.cs-fit .cs-review button { font-size:13px; padding:2px 0; }
        #create-org-sub-picker .zbt-sub { margin-top:0; }
        #create-org-sub-picker .zbt-sub > p { display:none; }
        #create-org-sub-picker .zbt-sub > div { gap:8px; }
        #view-signup.cs-fit #create-org-sub-picker .zbt-chip { padding:6px 11px; font-size:13px; line-height:1.2; }
        #view-signup.cs-fit #create-org-sub-picker .zbt-sub > div { gap:6px; }
        .cs-hint { min-height:2.6em; margin:10px 0 0; font-size:13px; line-height:1.35; color:#475569; }
        .dark .cs-hint { color:#cbd5e1; }
        #view-signup.cs-fit { min-height:100dvh; max-height:100dvh; overflow-y:auto; padding-top:8px; padding-bottom:8px; }
        #view-signup.cs-fit .auth-layout { display:block; max-width:640px; }
        #view-signup.cs-fit .hero-gradient, #view-signup.cs-fit #cs-intro, #view-signup.cs-fit #cs-pill { display:none !important; }
        #view-signup.cs-fit .auth-card { width:100%; max-width:640px; padding:16px 22px; }
        #view-signup.cs-fit .main-brand-logo { width:44px; margin:0 auto 6px; }
        #view-signup.cs-fit .auth-card h1 { font-size:20px; line-height:26px; text-align:center; }
        #view-signup.cs-fit #create-org-form { margin-top:8px; }
        #view-signup.cs-fit #create-org-form > * + * { margin-top:10px; }
        #view-signup.cs-fit .cs-title { font-size:17px; }
        #view-signup.cs-fit .cs-sub { margin-bottom:8px; }
        #view-signup.cs-fit .cs-nav { margin-top:12px; }
        #view-signup.cs-fit .cs-nav button { padding-top:10px; padding-bottom:10px; }
        #view-signup.cs-fit .cs-lock { margin-top:8px; padding:7px 10px; font-size:11.5px; }
        #view-signup.cs-fit .auth-card > p.text-center { margin-top:8px; font-size:13px; }
        @media (max-height:700px) { #view-signup.cs-fit .main-brand-logo { display:none; } #view-signup.cs-fit .cs-sub { display:none; } }
        @media (max-width:640px) {
            #view-signup.cs-fit { padding-left:8px; padding-right:8px; }
            #view-signup.cs-fit .auth-card { padding:12px 14px; }
            #view-signup.cs-fit .main-brand-logo, #view-signup.cs-fit .cs-sub { display:none; }
            #view-signup.cs-fit #create-org-form > div.border-teal-300 { padding:8px 10px; font-size:12px; line-height:1.35; }
            #view-signup.cs-fit .cs-hint { font-size:12px; margin-top:8px; }
        }
        /* AI writing: a soft shimmer while it thinks, then the words type in with a glowing edge. */
        .zuno-ai-writing { background-image:linear-gradient(110deg, rgba(16,179,160,.07) 10%, rgba(99,102,241,.2) 22%, rgba(16,179,160,.07) 36%) !important; background-size:220% 100%; animation:zunoAiShimmer 1.3s linear infinite; }
        .zuno-ai-typing { box-shadow:0 0 0 2px rgba(99,102,241,.4), 0 0 20px rgba(16,179,160,.4) !important; transition:box-shadow .4s; caret-color:#6366f1; }
        @keyframes zunoAiShimmer { from { background-position:120% 0; } to { background-position:-120% 0; } }
        @media (prefers-reduced-motion: reduce) { .zuno-ai-writing { animation:none; } .zuno-ai-typing { transition:none; } }
        .zbt-grid { display:grid; gap:10px; }
        .zbt-card { display:flex; align-items:center; gap:12px; width:100%; text-align:left; padding:12px 14px; border-radius:16px; border:1.5px solid #e5e7eb; background:#fff; color:#0f172a; transition:border-color .15s, box-shadow .15s, transform .1s; position:relative; }
        .dark .zbt-card { background:#111827; border-color:#374151; color:#f1f5f9; }
        .zbt-card:active { transform:scale(.99); }
        .zbt-card.is-on { border-color:#10b3a0; box-shadow:0 0 0 3px rgba(16,179,160,.16); background:#f0fdfa; }
        .dark .zbt-card.is-on { background:rgba(16,179,160,.12); }
        .zbt-ico { flex:none; width:46px; height:46px; border-radius:14px; display:flex; align-items:center; justify-content:center; background:#ecfeff; color:#0d9488; }
        .dark .zbt-ico { background:rgba(16,179,160,.16); color:#5eead4; }
        .zbt-card.is-on .zbt-ico { background:#10b3a0; color:#fff; }
        .zbt-ico svg { width:26px; height:26px; }
        .zbt-txt { display:flex; flex-direction:column; min-width:0; flex:1; }
        .zbt-txt b { font-size:15px; font-weight:700; }
        .zbt-txt small { font-size:12px; line-height:1.35; opacity:.7; margin-top:2px; }
        .zbt-tick { flex:none; width:22px; height:22px; border-radius:999px; border:1.5px solid #cbd5e1; display:flex; align-items:center; justify-content:center; font-size:12px; color:transparent; font-weight:800; }
        .zbt-card.is-on .zbt-tick { background:#10b3a0; border-color:#10b3a0; color:#fff; }
        .zbt-sub { margin-top:12px; }
        .zbt-sub p { font-size:12px; font-weight:600; margin:0 0 6px; opacity:.75; }
        .zbt-sub > div { display:flex; flex-wrap:wrap; gap:8px; }
        .zbt-chip { display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border-radius:999px; border:1.5px solid #e5e7eb; background:#fff; font-size:13px; font-weight:600; color:#0f172a; }
        .dark .zbt-chip { background:#111827; border-color:#374151; color:#f1f5f9; }
        .zbt-chip.is-on { border-color:#10b3a0; background:#10b3a0; color:#fff; }
        .zbt-badge { display:inline-flex; width:28px; height:28px; border-radius:9px; align-items:center; justify-content:center; background:#ecfeff; color:#0d9488; vertical-align:middle; }
        .zbt-badge svg { width:66%; height:66%; }
        #view-signup .zbt-card { background:rgba(255,255,255,.92); color:#0f172a; }
        #view-signup .zbt-card.is-on { background:#f0fdfa; }
        #view-signup .zbt-txt b, #view-signup .zbt-txt small { color:#0f172a; }
        #view-signup .zbt-chip { background:rgba(255,255,255,.92); color:#0f172a; }
        #view-signup .zbt-chip.is-on { background:#10b3a0; color:#fff; }
    

body.zuno-details-locked #logo-ai-box{display:none !important}
#zuno-view-only-banner{position:fixed;inset:0 0 auto;z-index:9999;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 14px;background:#102d36;color:#fff;box-shadow:0 1px 8px #0002;font:13px/1.3 system-ui}
#zuno-view-only-banner[hidden]{display:none}#zuno-view-only-banner strong,#zuno-view-only-banner span{display:block}#zuno-view-only-banner strong{font-size:13px}#zuno-view-only-banner span{font-size:11.5px;opacity:.8;margin-top:1px}
#zuno-view-only-banner>div:last-child{display:flex;gap:6px;flex-shrink:0}
#zuno-view-only-banner button{background:#5eead4;color:#0f2930;border:0;border-radius:8px;padding:7px 11px;font-weight:600;font-size:12.5px;white-space:nowrap;margin:0}
body.zuno-view-only #app-container{padding-top:54px} @media(max-width:600px){#zuno-view-only-banner{flex-direction:column;align-items:stretch;gap:6px;padding:8px 12px}#zuno-view-only-banner>div:last-child{justify-content:flex-start}body.zuno-view-only #app-container{padding-top:92px}}


/* Studio Light uses the existing light layout; saved Dark mode remains available. */
html[data-accent-theme="studio"]:not(.dark) body{background:#f0f3ed;color:#203d32}
html[data-accent-theme="studio"]:not(.dark) .bg-white{background-color:#fffefa!important}
html[data-accent-theme="studio"]:not(.dark) .bg-gray-100,html[data-accent-theme="studio"]:not(.dark) .bg-gray-50{background-color:#f0f3ed!important}
html[data-accent-theme="studio"]:not(.dark) .border-gray-200{border-color:#dce4dd!important}

body.zuno-studio-disabled [onclick*="mnVisualOpen"],body.zuno-studio-disabled [onclick*="mnCampaignOpen"],body.zuno-studio-disabled [onclick*="mnHeaderOpen"]{display:none!important}

.tc-enhanced .tc-heading{padding:18px 20px;border:1px solid var(--border-color,#64748b33);border-radius:16px;background:linear-gradient(135deg,#14b8a611,transparent)}
.tc-enhanced .tc-nav{gap:8px;padding-block:6px}.tc-enhanced .tc-tab{min-height:44px;border-radius:12px}.tc-enhanced .tc-setup-progress{padding:20px;border-radius:16px}.tc-enhanced .tc-body{gap:16px}.tc-enhanced button{min-height:40px}.tc-enhanced input[type=radio]{margin-top:5px;flex-shrink:0}.tc-enhanced .tc-body>div{min-width:0}@media(max-width:640px){.tc-enhanced .tc-setup-progress{padding:14px}.tc-enhanced .tc-heading{padding:14px}.tc-enhanced .tc-body{grid-template-columns:minmax(0,1fr)}}


                /* Unified Zuno verification language: clean, modern banking-style feedback. */
                @keyframes verify-spin { to { transform: rotate(360deg); } }
                @keyframes verify-pop { 0% { transform: scale(.72); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
                @keyframes verify-ring { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.24); } 100% { box-shadow: 0 0 0 12px rgba(34,197,94,0); } }
                .verify-orb { width:64px; height:64px; border-radius:999px; display:flex; align-items:center; justify-content:center; margin:0 auto; flex:0 0 auto; }
                .verify-orb--waiting { border:4px solid #dcfce7; border-top-color:#14b8a6; animation:verify-spin .8s linear infinite; background:#fff; }
                .dark .verify-orb--waiting { background:#111827; border-color:#134e4a; border-top-color:#2dd4bf; }
                .verify-orb--success { background:#22c55e; color:#fff; animation:verify-pop .34s cubic-bezier(.2,.8,.2,1), verify-ring .7s ease-out .15s; }
                .verify-orb--success svg { width:30px; height:30px; }
                .verify-stage { text-align:center; padding:4px 0 2px; }
                .verify-stage-title { margin-top:14px; font-size:1.05rem; line-height:1.3; font-weight:750; color:#111827; }
                .dark .verify-stage-title { color:#f9fafb; }
                .verify-stage-copy { margin-top:5px; font-size:.84rem; line-height:1.5; color:#6b7280; }
                .dark .verify-stage-copy { color:#9ca3af; }
                .verify-info-card { border:1px solid #e5e7eb; background:#f9fafb; border-radius:16px; padding:14px; text-align:left; }
                .dark .verify-info-card { border-color:#374151; background:rgba(31,41,55,.62); }
                .verify-live-pill { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:30px; padding:6px 10px; border-radius:999px; background:#f3f4f6; color:#6b7280; font-size:.75rem; font-weight:600; }
                .dark .verify-live-pill { background:#1f2937; color:#d1d5db; }
                .verify-live-pill::before { content:''; width:7px; height:7px; border-radius:999px; background:#14b8a6; box-shadow:0 0 0 4px rgba(20,184,166,.10); }
                .verify-guide { min-height:38px; display:flex; align-items:center; justify-content:center; gap:8px; padding:8px 12px; border-radius:12px; background:rgba(20,184,166,.06); color:#475569; font-size:.78rem; line-height:1.45; text-align:center; transition:opacity .18s ease, transform .18s ease; }
                .dark .verify-guide { background:rgba(45,212,191,.08); color:#cbd5e1; }
                .verify-guide.is-changing { opacity:.25; transform:translateY(2px); }
                .verify-guide-dots { display:inline-flex; gap:3px; flex:0 0 auto; }
                .verify-guide-dots i { width:4px; height:4px; border-radius:999px; background:#14b8a6; animation:verify-guide-dot 1.15s infinite ease-in-out; }
                .verify-guide-dots i:nth-child(2) { animation-delay:.14s; }
                .verify-guide-dots i:nth-child(3) { animation-delay:.28s; }
                @keyframes verify-guide-dot { 0%,70%,100% { transform:translateY(0); opacity:.35; } 35% { transform:translateY(-3px); opacity:1; } }
                .verify-resend { width:100%; min-height:36px; border-radius:10px; font-size:.78rem; font-weight:650; transition:background-color .15s ease,color .15s ease; }
                .verify-resend:disabled { color:#9ca3af; cursor:not-allowed; }
                .verify-resend:not(:disabled) { color:#0f766e; }
                .verify-resend:not(:disabled):hover { background:rgba(20,184,166,.08); }
                .signup-inline-check { width:20px; height:20px; border-radius:999px; background:#22c55e; color:#fff; display:flex; align-items:center; justify-content:center; font-size:12px; line-height:1; font-weight:900; box-shadow:0 0 0 3px rgba(34,197,94,.10); }
                .signup-inline-check.hidden { display:none !important; }
                .phone-code-box.is-verified { border-color:#22c55e !important; background:#f0fdf4 !important; color:#16a34a !important; transform:scale(1.04); }
                .dark .phone-code-box.is-verified { background:rgba(20,83,45,.32) !important; color:#86efac !important; }
            

                    .phone-code-box { width:44px; height:52px; text-align:center; font-size:1.35rem; font-weight:700; border:1.5px solid #d1d5db; border-radius:12px; transition:border-color .15s ease, background-color .15s ease, transform .15s ease; }
                    .phone-code-box:focus { outline:none; border-color:#0d9488; box-shadow:0 0 0 3px rgba(13,148,136,.15); }
                    .phone-code-box.is-invalid { border-color:#ef4444; background:#fef2f2; color:#dc2626; animation:phone-code-shake .24s ease-in-out; }
                    @keyframes phone-code-shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-3px)} 75%{transform:translateX(3px)} }
                    .dark .phone-code-box { background:#1f2937; border-color:#374151; color:#fff; }
                    .dark .phone-code-box.is-invalid { background:rgba(127,29,29,.22); border-color:#f87171; color:#fecaca; }
                
#save-settings-btn[hidden]{display:none!important}

                        @keyframes device-verify-spin { to { transform: rotate(360deg); } }
                        @keyframes device-verify-pop { 0% { transform: scale(0.5); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
                        .device-verify-spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #d1fae5; border-top-color: #0d9488; animation: device-verify-spin .8s linear infinite; }
                        .device-verify-check { width: 40px; height: 40px; border-radius: 50%; background: #16a34a; display: flex; align-items: center; justify-content: center; animation: device-verify-pop .4s ease-out; }
                    
${css}
${css}
${css}
html,body{margin:0;padding:0;background:#cbd5e1;-webkit-print-color-adjust:exact;print-color-adjust:exact}${r.css}.mn-page{font-size:15px;margin:0 0 16px}.mn-page:last-child{margin:0}${bw ? 'body{filter:grayscale(1) contrast(1.05)}' : ''}
@page{size:A4;margin:0}html,body{margin:0;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact}${css}.mn-page{font-size:${px}}
${css}
${thermalStyles()}
@keyframes spin { to { transform: rotate(360deg); } }

                        @keyframes email-link-spin { to { transform: rotate(360deg); } }
                        @keyframes email-link-pop { 0% { transform: scale(.72); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
                        .email-link-orb { width:64px;height:64px;border-radius:999px;margin:0 auto;display:flex;align-items:center;justify-content:center; }
                        .email-link-spinner { border:4px solid #dcfce7;border-top-color:#14b8a6;animation:email-link-spin .8s linear infinite; }
                        .email-link-check { background:#22c55e;color:#fff;animation:email-link-pop .34s cubic-bezier(.2,.8,.2,1); }
                        .email-link-check svg { width:30px;height:30px; }
                        .email-link-info { background:#f9fafb;border:1px solid #e5e7eb;border-radius:14px;padding:12px;text-align:left;margin:14px 0; }
                        .email-link-resend { width:100%;min-height:36px;color:#0f766e;background:none;border:0;border-radius:10px;font-size:.8rem;font-weight:650; }
                        .email-link-resend:disabled { color:#9ca3af;cursor:not-allowed; }
                    

/* Checkout layout picker: web must be visibly interactive. */
#product-layout-menu,
#product-layout-menu .product-layout-options,
#product-layout-menu .product-layout-option {
    pointer-events: auto !important;
}
#product-layout-menu .product-layout-option {
    cursor: pointer !important;
    opacity: 1 !important;
    filter: none !important;
}
#product-layout-menu .product-layout-option[aria-checked="true"] {
    opacity: 1 !important;
}

/* PHONE SCREEN PREVIEW ONLY.
   This is deliberately outside @media print, and the export code clones the invoice at 900px,
   so PDF / Print / Share keep their existing full invoice layout. */
@media screen and (max-width: 520px) {
    #view-invoice > #invoice-view-content {
        padding: 8px !important;
        overflow-x: hidden !important;
    }
    #view-invoice > #invoice-view-content .invoice-doc {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        border-radius: 18px !important;
        overflow: hidden !important;
    }
    #view-invoice > #invoice-view-content .invoice-doc-header {
        padding: .72rem .72rem .62rem !important;
        gap: .55rem !important;
    }
    #view-invoice > #invoice-view-content .invoice-doc-brand {
        gap: .55rem !important;
        width: 100% !important;
    }
    #view-invoice > #invoice-view-content .invoice-doc-logo-frame {
        width: 4.6rem !important;
        height: 4.6rem !important;
        border-radius: .8rem !important;
    }
    #view-invoice > #invoice-view-content .invoice-doc-brand-name { font-size: .88rem !important; line-height: 1.15 !important; }
    #view-invoice > #invoice-view-content .invoice-doc-brand-name-slogan { font-size: .58rem !important; }
    #view-invoice > #invoice-view-content .invoice-doc-brand-contacts,
    #view-invoice > #invoice-view-content .invoice-doc-brand-line { font-size: .58rem !important; line-height: 1.35 !important; }
    #view-invoice > #invoice-view-content .invoice-doc-number-block { width: 100% !important; }
    #view-invoice > #invoice-view-content .invoice-doc-number { font-size: 1.05rem !important; }
    #view-invoice > #invoice-view-content .relative.p-6 { padding: .7rem !important; }
    #view-invoice > #invoice-view-content .invoice-doc-meta-grid { gap: .5rem !important; }
    #view-invoice > #invoice-view-content .invoice-doc-meta-card { padding: .62rem !important; }
    #view-invoice > #invoice-view-content .invoice-doc-meta-item-text span { font-size: .58rem !important; }
    #view-invoice > #invoice-view-content .invoice-doc-meta-item-text strong { font-size: .72rem !important; line-height: 1.25 !important; }

    #view-invoice > #invoice-view-content .invoice-doc-table-wrap {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        border-radius: .65rem !important;
    }
    #view-invoice > #invoice-view-content .invoice-doc-table--full {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
        font-size: .61rem !important;
    }
    /* The row number adds little value on a phone and was stealing width from Item. */
    #view-invoice > #invoice-view-content .invoice-doc-table--full .invoice-doc-col-index { display: none !important; }
    #view-invoice > #invoice-view-content .invoice-doc-table--full th:nth-child(2),
    #view-invoice > #invoice-view-content .invoice-doc-table--full td:nth-child(2) { width: 34% !important; }
    #view-invoice > #invoice-view-content .invoice-doc-table--full .invoice-doc-col-qty { width: 9% !important; }
    #view-invoice > #invoice-view-content .invoice-doc-table--full .invoice-doc-col-unit { width: 20% !important; }
    #view-invoice > #invoice-view-content .invoice-doc-table--full .invoice-doc-col-discount { width: 18% !important; }
    #view-invoice > #invoice-view-content .invoice-doc-table--full .invoice-doc-col-amount { width: 19% !important; }
    #view-invoice > #invoice-view-content .invoice-doc-table--full th,
    #view-invoice > #invoice-view-content .invoice-doc-table--full td {
        padding: .42rem .22rem !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    #view-invoice > #invoice-view-content .invoice-doc-table--full thead th {
        font-size: .50rem !important;
        letter-spacing: .015em !important;
        white-space: normal !important;
        line-height: 1.15 !important;
    }
    #view-invoice > #invoice-view-content .invoice-doc-item-name {
        font-size: .64rem !important;
        line-height: 1.25 !important;
        overflow-wrap: break-word !important;
        word-break: normal !important;
        hyphens: auto;
    }
    #view-invoice > #invoice-view-content .invoice-doc-item-qty { font-size: .54rem !important; }
    #view-invoice > #invoice-view-content .invoice-doc-item-unit-price,
    #view-invoice > #invoice-view-content .invoice-doc-item-line-discount,
    #view-invoice > #invoice-view-content .invoice-doc-item-amount {
        font-size: .59rem !important;
        line-height: 1.2 !important;
        white-space: normal !important;
        overflow-wrap: normal !important;
        word-break: keep-all !important;
    }
    #view-invoice > #invoice-view-content .invoice-doc-bottom-row { gap: .55rem !important; }
    #view-invoice > #invoice-view-content .invoice-doc-totals-row { font-size: .72rem !important; }
    #view-invoice > #invoice-view-content .invoice-doc-total-paid { font-size: 1.05rem !important; }
}


/* TARGETED ONLY: on-screen invoice at phone width. Export/PDF/print/share clones render at 900px,
   so none of these rules apply to those paths. Keep the top section in the same left/right
   composition as desktop instead of stacking it vertically. */
@media (max-width: 520px) {
  #view-invoice > #invoice-view-content { padding: 8px !important; overflow-x: hidden !important; }
  #view-invoice > #invoice-view-content .invoice-doc { width:100% !important; max-width:100% !important; min-width:0 !important; margin:0 !important; }
  #view-invoice > #invoice-view-content .invoice-doc-header {
    flex-direction: row !important; flex-wrap: nowrap !important; align-items:flex-start !important;
    justify-content:space-between !important; gap:.5rem !important; padding:.72rem .78rem .65rem !important;
  }
  #view-invoice > #invoice-view-content .invoice-doc-brand { width:auto !important; min-width:0 !important; flex:1 1 auto !important; gap:.55rem !important; }
  #view-invoice > #invoice-view-content .invoice-doc-logo-frame { width:4.25rem !important; height:4.25rem !important; border-radius:.72rem !important; }
  #view-invoice > #invoice-view-content .invoice-doc-brand-copy { min-width:0 !important; }
  #view-invoice > #invoice-view-content .invoice-doc-brand-name { font-size:.82rem !important; line-height:1.12 !important; }
  #view-invoice > #invoice-view-content .invoice-doc-brand-name-slogan { font-size:.52rem !important; }
  #view-invoice > #invoice-view-content .invoice-doc-brand-contacts,
  #view-invoice > #invoice-view-content .invoice-doc-brand-line { font-size:.50rem !important; line-height:1.3 !important; }
  #view-invoice > #invoice-view-content .invoice-doc-number-block { width:auto !important; flex:0 0 34% !important; text-align:right !important; min-width:0 !important; }
  #view-invoice > #invoice-view-content .invoice-doc-number { font-size:1rem !important; line-height:1.05 !important; }
  #view-invoice > #invoice-view-content .invoice-doc-number-block .uppercase { font-size:.50rem !important; }
  #view-invoice > #invoice-view-content .relative.p-6 { padding:.72rem !important; }
  #view-invoice > #invoice-view-content .invoice-doc-meta-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important; gap:.5rem !important; }
  #view-invoice > #invoice-view-content .invoice-doc-meta-card { padding:.58rem !important; min-width:0 !important; }
  #view-invoice > #invoice-view-content .invoice-doc-meta-row { gap:.45rem !important; }
  #view-invoice > #invoice-view-content .invoice-doc-meta-icon { width:1.8rem !important; height:1.8rem !important; flex:0 0 1.8rem !important; }
  #view-invoice > #invoice-view-content .invoice-doc-meta-item-text { min-width:0 !important; }
  #view-invoice > #invoice-view-content .invoice-doc-meta-item-text span { font-size:.50rem !important; }
  #view-invoice > #invoice-view-content .invoice-doc-meta-item-text strong { font-size:.66rem !important; line-height:1.18 !important; overflow-wrap:anywhere !important; }

  /* Keep only the prior phone table readability correction; no export styles are touched. */
  #view-invoice > #invoice-view-content .invoice-doc-table-wrap { width:100% !important; max-width:100% !important; overflow:hidden !important; }
  #view-invoice > #invoice-view-content .invoice-doc-table--full { width:100% !important; min-width:0 !important; table-layout:fixed !important; font-size:.61rem !important; }
  #view-invoice > #invoice-view-content .invoice-doc-table--full .invoice-doc-col-index { display:none !important; }
  #view-invoice > #invoice-view-content .invoice-doc-table--full th:nth-child(2), #view-invoice > #invoice-view-content .invoice-doc-table--full td:nth-child(2) { width:34% !important; }
  #view-invoice > #invoice-view-content .invoice-doc-table--full .invoice-doc-col-qty { width:9% !important; }
  #view-invoice > #invoice-view-content .invoice-doc-table--full .invoice-doc-col-unit { width:20% !important; }
  #view-invoice > #invoice-view-content .invoice-doc-table--full .invoice-doc-col-discount { width:18% !important; }
  #view-invoice > #invoice-view-content .invoice-doc-table--full .invoice-doc-col-amount { width:19% !important; }
  #view-invoice > #invoice-view-content .invoice-doc-table--full th, #view-invoice > #invoice-view-content .invoice-doc-table--full td { padding:.42rem .22rem !important; min-width:0 !important; overflow:hidden !important; }
  #view-invoice > #invoice-view-content .invoice-doc-table--full thead th { font-size:.50rem !important; letter-spacing:.015em !important; white-space:normal !important; line-height:1.15 !important; }
  #view-invoice > #invoice-view-content .invoice-doc-item-name { font-size:.64rem !important; line-height:1.25 !important; overflow-wrap:break-word !important; word-break:normal !important; }
  #view-invoice > #invoice-view-content .invoice-doc-item-unit-price, #view-invoice > #invoice-view-content .invoice-doc-item-line-discount, #view-invoice > #invoice-view-content .invoice-doc-item-amount { font-size:.59rem !important; line-height:1.2 !important; white-space:normal !important; word-break:keep-all !important; }
}


@media (max-width:520px){
  /* Screen invoice only. Export clones are 900px, so PDF/Print/Share remain unchanged. */
  #view-invoice > #invoice-view-content .invoice-doc-header{padding-top:.48rem!important;padding-bottom:1.55rem!important;position:relative!important;}
  #view-invoice > #invoice-view-content .invoice-doc-logo-frame{transform:translateY(-.22rem)!important;}
  /* FIX: this row was flex-wrap:nowrap with the name forced to white-space:nowrap +
     ellipsis, on a real phone width, with a normal-length business name and slogan
     both fighting for one line, that squeezed the name down to a couple of characters
     plus "…" (the same failure mode the PDF/Print/Share export had, fixed separately
     in the export code, this is the on-screen phone view's own copy of the same bug).
     Letting the row wrap and the name break onto a second line if it must means the
     full business name is always visible here, matching the desktop view, instead of
     being silently cut down to nothing. */
  #view-invoice > #invoice-view-content .invoice-doc-brand-title-row{flex-wrap:wrap!important;column-gap:.28rem!important;align-items:baseline!important;}
  #view-invoice > #invoice-view-content .invoice-doc-brand-name{white-space:normal!important;overflow-wrap:break-word!important;font-size:.78rem!important;overflow:visible!important;text-overflow:clip!important;min-width:0!important;max-width:100%!important;}
  #view-invoice > #invoice-view-content .invoice-doc-brand-name-divider{font-size:.72rem!important;flex:0 0 auto!important;}
  #view-invoice > #invoice-view-content .invoice-doc-brand-name-slogan{white-space:nowrap!important;font-size:.46rem!important;flex:0 1 auto!important;overflow:hidden!important;text-overflow:ellipsis!important;}
  #view-invoice > #invoice-view-content .invoice-doc-number-block{align-self:flex-end!important;transform:translateY(1.05rem)!important;flex-basis:31%!important;}
  #view-invoice > #invoice-view-content .invoice-doc-tagline{margin-bottom:.25rem!important;padding-bottom:.25rem!important;}
  #view-invoice > #invoice-view-content .invoice-doc-brand-contacts{padding-right:.15rem!important;}
  #view-invoice > #invoice-view-content .invoice-doc-brand-contact-item{font-size:.47rem!important;}
}


/* Checkout layout popover only: keep it above the desktop header/search layers. */
.product-layout-menu-wrap { z-index: 1000 !important; }
#product-layout-menu { z-index: 1001 !important; isolation: isolate; }
#product-layout-menu .product-layout-option { pointer-events: auto !important; touch-action: manipulation; }


/* Targeted checkout-only fix: keep the open layout chooser above category/product cards. */
#view-checkout > header {
  position: relative !important;
  z-index: 2000 !important;
  overflow: visible !important;
}
#view-checkout > header .product-layout-menu-wrap {
  position: relative !important;
  z-index: 2001 !important;
}
#view-checkout > header #product-layout-menu {
  z-index: 2002 !important;
}


/* Invoice header refinement only.
   Desktop live view and the 900px PDF/Print/Share clone share the same geometry.
   Existing phone live-view rules remain authoritative below 520px. */
@media (min-width: 521px) {
  #view-invoice > #invoice-view-content .invoice-doc-header {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start;
    gap:1.5rem;
    padding:1.2rem 1.4rem 1.1rem;
  }
  #view-invoice > #invoice-view-content .invoice-doc-brand {
    min-width:0;
    align-items:center;
    gap:1.05rem;
  }
  #view-invoice > #invoice-view-content .invoice-doc-brand-copy { min-width:0; }
  #view-invoice > #invoice-view-content .invoice-doc-brand-title-row {
    align-items:baseline;
    column-gap:.5rem;
    row-gap:.18rem;
  }
  #view-invoice > #invoice-view-content .invoice-doc-brand-name {
    font-size:1.4rem;
    line-height:1.2;
  }
  #view-invoice > #invoice-view-content .invoice-doc-brand-name-slogan {
    font-size:.92rem;
    line-height:1.2;
  }
  #view-invoice > #invoice-view-content .invoice-doc-brand-contacts {
    margin-top:.42rem;
    row-gap:.28rem;
  }
  #view-invoice > #invoice-view-content .invoice-doc-brand-contacts-row {
    align-items:center;
    column-gap:1rem;
  }
  #view-invoice > #invoice-view-content .invoice-doc-brand-contact-item {
    align-items:center;
    line-height:1.35;
  }
  #view-invoice > #invoice-view-content .invoice-doc-number-block {
    min-width:9.5rem;
    padding-top:.08rem;
  }
}

/* Same header geometry for PDF, Print and Share even when export starts on a phone.
   This class exists only on the temporary off-screen export clone. */
.invoice-export-render .invoice-doc-header {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:start !important;
  gap:1.5rem !important;
  padding:1.2rem 1.4rem 1.1rem !important;
}
.invoice-export-render .invoice-doc-brand {
  min-width:0 !important;
  align-items:center !important;
  gap:1.05rem !important;
}
.invoice-export-render .invoice-doc-brand-copy { min-width:0 !important; }
.invoice-export-render .invoice-doc-brand-title-row {
  align-items:baseline !important;
  column-gap:.5rem !important;
  row-gap:.18rem !important;
}
.invoice-export-render .invoice-doc-brand-contacts {
  margin-top:.42rem !important;
  row-gap:.28rem !important;
}
.invoice-export-render .invoice-doc-brand-contacts-row {
  align-items:center !important;
  column-gap:1rem !important;
}
.invoice-export-render .invoice-doc-number-block {
  min-width:9.5rem !important;
  padding-top:.08rem !important;
}


/* Presentation layer for Transactions, Orders, Expenses, and Stock Movement.
   No data model, filter, payment, navigation or download logic is changed. */
#transactions-list, #orders-list, #expenses-list, #stock-history-list {
  padding: .7rem !important;
  min-width: 0;
}
#transactions-list > .order-card, #orders-list > .order-card,
#expenses-list > .order-card, #stock-history-list > .stock-movement-card {
  margin: 0 0 .6rem !important;
  border: 1px solid #e3eaf2 !important;
  border-radius: 17px !important;
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .045) !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.dark #transactions-list > .order-card,
.dark #orders-list > .order-card,
.dark #expenses-list > .order-card,
.dark #stock-history-list > .stock-movement-card {
  background: #111d29;
  border-color: #263849 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.13) !important;
}
/* Old templates insert sibling spacers; margins now belong to the cards. */
#transactions-list > .my-2, #orders-list > .my-2, #expenses-list > .my-2 { display:none; }
#transactions-list > .zuno-record-card,
#orders-list > .zuno-record-card,
#expenses-list > .zuno-record-card { padding: .78rem .82rem !important; }
/* The chevron, title, status and amount occupy fixed grid lanes at every width. */
.zuno-record-head {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) max-content max-content;
  align-items: center;
  column-gap: clamp(.3rem, 1.45vw, .65rem);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 28px;
  white-space: nowrap;
}
.zuno-record-head--no-status { grid-template-columns: 16px minmax(0, 1fr) max-content; }
.zuno-record-head .order-card-chevron { margin:0; width:16px; height:16px; }
.zuno-record-title {
  display:block;
  min-width:0;
  max-width:100%;
  margin:0;
  color:#172237;
  font-weight:800;
  font-size:clamp(.73rem, 3.45vw, .92rem);
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
  overflow:hidden;
}
.dark .zuno-record-title { color:#f2f6fa; }
.zuno-record-status {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  max-width:100%;
  margin:0;
  padding:.29rem .5rem;
  border-radius:999px;
  color:#0f766e;
  background:#e1f6f0;
  font-size:clamp(.6rem,2.5vw,.73rem);
  font-weight:760;
  line-height:1.15;
  text-overflow:ellipsis;
  white-space:nowrap;
  overflow:hidden;
}
.zuno-record-status--later, .zuno-record-card .zuno-order-status--pending,
.zuno-record-card .zuno-order-status--held { background:#fff3da; color:#976018 !important; }
.zuno-record-status--cancelled { background:#ffe8ea; color:#c92d39; }
.zuno-record-status--paid { background:#e1f6ea; color:#188152; }
.dark .zuno-record-status { background:#123f39; color:#65dece; }
.dark .zuno-record-status--later, .dark .zuno-record-card .zuno-order-status--pending,
.dark .zuno-record-card .zuno-order-status--held { background:#503917; color:#fbd38d !important; }
.dark .zuno-record-status--cancelled { background:#4d242d; color:#ff9aa0; }
.dark .zuno-record-status--paid { background:#174332; color:#8bedb2; }
.zuno-record-amount, .zuno-record-head .zuno-order-amount {
  display:block;
  min-width:0;
  max-width:clamp(5rem,39vw,13rem);
  margin:0;
  color:#182338;
  text-align:right;
  font-family:'Manrope','Inter',sans-serif;
  font-size:clamp(.72rem,3.5vw,1rem);
  font-weight:830;
  font-variant-numeric:tabular-nums;
  line-height:1.3;
  text-overflow:ellipsis;
  white-space:nowrap;
  overflow:hidden;
}
.dark .zuno-record-amount { color:#f1f5f9; }
/* Collapsed cards retain a tidy row; the existing onclick toggles the body. */
.zuno-record-card .order-card-details { min-width:0; }
.zuno-record-card .order-card-details-inner { min-width:0; }
.zuno-record-card .order-card--expanded .order-card-chevron,
.zuno-record-card.order-card--expanded .order-card-chevron { transform:rotate(90deg); }
.zuno-record-card .order-card-details-inner > .text-sm.text-gray-500,
.zuno-record-meta { color:#718096; font-size:.78rem; }
.zuno-record-meta { margin-top:.34rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* Only expanded details gain extra visual space. Avoid changing collapse behavior. */
.zuno-record-card .order-card-details-inner { padding-top:.06rem; }
.zuno-record-card .order-card-details-inner > p { max-width:100%; }
.zuno-record-card .order-card-details-inner > p:not(.zuno-record-meta) { overflow-wrap:anywhere; }
.zuno-record-card--order .zuno-order-actions { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
.zuno-record-card .zuno-order-action { min-width:0; padding:.65rem .25rem; }
.zuno-record-card .zuno-order-action span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.zuno-txn-breakdown {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0;
  margin-top:.7rem;
  padding:.65rem 0 .15rem;
  border-top:1px solid #e5edf5;
}
.zuno-txn-breakdown > span { display:flex; flex-direction:column; min-width:0; padding:0 .45rem; }
.zuno-txn-breakdown > span:first-child { padding-left:0; }
.zuno-txn-breakdown > span + span { border-left:1px solid #e5edf5; }
.zuno-txn-breakdown small { color:#8392a8; font-size:.68rem; font-weight:700; white-space:nowrap; }
.zuno-txn-breakdown strong { display:block; margin-top:.22rem; min-width:0; max-width:100%; font-weight:800; color:#182338; font-size:clamp(.66rem,2.8vw,.83rem); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-variant-numeric:tabular-nums; }
.zuno-txn-breakdown strong.text-red-500 {color:#df4751;}
.dark .zuno-txn-breakdown,.dark .zuno-txn-breakdown > span + span { border-color:#2a3c4a; }
.dark .zuno-txn-breakdown strong { color:#f0f5f9; }
.dark .zuno-txn-breakdown strong.text-red-500 { color:#ff8290; }
.zuno-txn-footer { display:flex; align-items:center; justify-content:space-between; gap:.4rem; min-width:0; margin-top:.72rem; }
.zuno-txn-footer > p, .zuno-txn-footer > div:not(:has(button)) { min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.76rem; flex:1 1 auto; }
.zuno-txn-footer > div:has(button) { display:flex; flex:0 1 auto; gap:.36rem; min-width:0; max-width:100%; }
.zuno-txn-footer > button, .zuno-txn-footer > div > button { flex:0 1 auto; min-width:0; white-space:nowrap; }
.zuno-txn-footer .txn-action-btn { min-height:40px; padding:.43rem .62rem; font-size:.73rem; white-space:nowrap; }
/* On narrow phones put expanded card actions on one complete row, never wrap the buttons. */
@media(max-width:430px) {
  .zuno-record-head { column-gap:.3rem; }
  .zuno-record-title { font-size:clamp(.67rem,3.3vw,.81rem); }
  .zuno-record-amount { font-size:clamp(.68rem,3.35vw,.86rem); }
  .zuno-record-status { padding:.26rem .36rem; font-size:.62rem; }
  .zuno-txn-footer { display:grid; grid-template-columns:minmax(0,1fr); gap:.55rem; }
  .zuno-txn-footer > div:has(button) { width:100%; display:flex; justify-content:flex-end; }
  .zuno-txn-footer > div:has(button) > button { flex:1 1 0; }
  .zuno-txn-footer > button { justify-self:end; }
  .zuno-record-card--order .zuno-order-actions { gap:.34rem !important; }
  .zuno-record-card--order .zuno-order-action { font-size:.71rem; }
}
/* Mobile stock movements use the same card borders, accent and typographic scale. */
.stock-movement-page-header { display:grid !important; grid-template-columns:44px minmax(0,1fr) 44px; align-items:center; column-gap:.2rem; min-height:91px; }
.stock-movement-page-header > .nav-back-btn { width:44px; height:44px; min-height:44px; margin:0 !important; display:grid; place-items:center; }
.stock-movement-page-title { min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.24rem; text-align:center; }
.stock-movement-page-title > span { display:block; width:100%; color:#172237; font-family:'Manrope','Inter',sans-serif; font-size:clamp(1rem,3.8vw,1.27rem); font-weight:850; letter-spacing:-.025em; line-height:1.15; white-space:nowrap; }
.stock-movement-page-title h1 { display:block; margin:0; width:100%; min-width:0; max-width:100%; color:#75859b; font-family:'Inter',sans-serif; font-size:clamp(.69rem,2.75vw,.83rem); font-weight:620; line-height:1.3; letter-spacing:0; text-overflow:ellipsis; white-space:nowrap; overflow:hidden; }
.dark .stock-movement-page-title > span { color:#f6f9fc; }
.dark .stock-movement-page-title h1 { color:#a0b4c7; }
#stock-history-list > .stock-movement-card { display:block; padding:0 !important; }
.stock-movement-card summary { list-style:none; }
.stock-movement-card summary::-webkit-details-marker { display:none; }
.stock-movement-summary {
  display:grid;
  grid-template-columns:16px minmax(0,1fr) max-content;
  align-items:center;
  gap:.55rem;
  width:100%;
  min-width:0;
  min-height:60px;
  padding:.76rem .85rem;
  cursor:pointer;
  white-space:nowrap;
}
.stock-movement-summary:focus-visible { outline:2px solid #10b3a0; outline-offset:-3px; border-radius:14px; }
.stock-movement-chevron { width:16px; height:16px; flex-shrink:0; color:#8494a9; transition:transform .2s ease; }
.stock-movement-card[open] .stock-movement-chevron { transform:rotate(90deg); }
.stock-movement-note { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#172237; font-size:clamp(.74rem,3.3vw,.9rem); font-weight:800; }
.stock-movement-delta { display:inline-flex; align-items:center; gap:.21rem; min-width:0; max-width:clamp(5rem,34vw,9rem); font-size:clamp(.73rem,3.1vw,.9rem); font-weight:830; white-space:nowrap; }
.stock-movement-delta svg { width:15px; height:15px; flex-shrink:0; }
.stock-movement-delta span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.stock-movement-details { border-top:1px solid #e8eef5; padding:.76rem .85rem .9rem 2.4rem; display:grid; gap:.56rem; min-width:0; }
.stock-movement-full-note { margin:0; color:#506178; font-weight:650; font-size:.75rem; line-height:1.4; overflow-wrap:anywhere; }
.stock-movement-meta { display:flex; gap:.58rem; align-items:flex-start; min-width:0; margin:0; color:#77889d; font-size:.75rem; line-height:1.4; }
.stock-movement-meta svg { width:16px; height:16px; flex:0 0 16px; }
.stock-movement-meta span { display:block; min-width:0; overflow-wrap:anywhere; }
.stock-movement-details > .text-xs { margin:0; color:#77889d; font-size:.75rem; }
.stock-movement-details > button {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:0; width:100%; max-width:100%;
  min-height:42px;
  margin:0 !important;
  padding:.7rem;
  border-radius:11px;
  color:#066eaa;
  background:#e6f4ff;
  font-size:.78rem;
  font-weight:780;
  line-height:1.2;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.dark .stock-movement-note { color:#f5f8fb; }
.dark .stock-movement-details { border-color:#293b4b; }
.dark .stock-movement-full-note { color:#c4d0dd; }
.dark .stock-movement-meta,.dark .stock-movement-details > .text-xs { color:#a7b5c5; }
.dark .stock-movement-details > button { background:#143750; color:#8dd9ff; }
/* Prevent summary metrics overflowing on phones without changing values. */
#transactions-list > .transaction-summary-card { margin-bottom:.75rem; gap:0; padding:.72rem .54rem; border-radius:16px; }
#transactions-list > .transaction-summary-card > div { min-width:0; padding:0 .48rem; }
#transactions-list > .transaction-summary-card > div + div { border-left:1px solid rgba(148,163,184,.22); }
#transactions-list > .transaction-summary-card span { white-space:nowrap; font-size:clamp(.51rem,2vw,.66rem); letter-spacing:.015em; overflow:hidden; text-overflow:ellipsis; }
#transactions-list > .transaction-summary-card strong { font-size:clamp(.72rem,3vw,1rem); word-break:normal; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#view-orders > .p-2.flex-shrink-0, #view-transactions > .p-2.flex-shrink-0 { padding:.6rem .7rem !important; }
#view-orders input#order-search-input, #view-transactions input#transaction-search-input, #view-expenses input#expense-search-input { border-radius:13px; min-width:0; }
@media (prefers-reduced-motion: reduce) {
 .stock-movement-chevron, .zuno-record-card .order-card-chevron { transition:none; }
}


.zuno-record-head {
  grid-template-columns:16px minmax(0,1fr) auto minmax(0,min(33vw,10.5rem));
  align-items:center;
  gap:clamp(.22rem,1vw,.55rem);
}
.zuno-record-head--no-status { grid-template-columns:16px minmax(0,1fr) minmax(0,min(34vw,10.5rem)); }
.zuno-record-status {
  max-width:min(23vw,6.8rem);
  font-size:clamp(.58rem,2.35vw,.72rem);
  flex-shrink:0;
  line-height:1.15;
}
.zuno-record-title { text-overflow:ellipsis; white-space:nowrap; overflow:hidden; }
.zuno-record-amount { width:100%; max-width:100%; text-overflow:ellipsis; overflow:hidden; white-space:nowrap; }
/* Keep the collapsed stock movement line from growing in height with long notes. */
.stock-movement-summary { grid-template-columns:16px minmax(0,1fr) minmax(0,min(32vw,8rem)); align-items:center; }
.stock-movement-delta { justify-content:flex-end; max-width:100%; overflow:hidden; text-overflow:ellipsis; }
.stock-movement-summary .stock-movement-note { white-space:nowrap; text-overflow:ellipsis; }
@media(max-width:360px) {
  .zuno-record-head { gap:.22rem; }
  .zuno-record-status { padding:.22rem .3rem; font-size:.59rem; max-width:23vw; }
  .zuno-record-amount { font-size:.69rem; }
  .zuno-record-title { font-size:.69rem; }
}


/* Category management matches the product controls without a sticky add form. */
#view-categories > header { gap:.45rem; }
#view-categories > header h1 { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.category-add-top-btn { display:grid; place-items:center; flex:0 0 42px; width:42px; height:42px; min-height:42px; border-radius:12px; color:#0c766c; background:#edfaf6; border:1px solid #b5e8de; }
.category-add-top-btn.admin-visible { display:grid !important; place-items:center; }
.category-add-top-btn svg { width:22px; height:22px; }
.dark .category-add-top-btn { color:#5eead4; background:#102c2a; border-color:#195e59; }
#view-add-category .category-create-card { width:100%; max-width:520px; margin:0 auto; padding:1rem; border:1px solid #e1e9ef; border-radius:17px; background:#fff; box-shadow:0 6px 24px rgba(15,23,42,.05); }
#view-add-category .category-create-card.admin-visible { display:flex !important; flex-direction:column; gap:.75rem; }
.dark #view-add-category .category-create-card { background:#101c28; border-color:#273747; }
.category-create-card input { min-width:0; }
.category-create-tip { font-size:.73rem; line-height:1.4; color:#73869a; }
.category-create-submit { background:linear-gradient(135deg,#10b3a0,#0c766c); color:#fff; min-height:46px; padding:.6rem 1rem; border-radius:12px; font-weight:800; }
#category-list.category-management-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)) !important; grid-auto-rows:max-content !important; align-content:start; align-items:start; }
#category-list:not(.category-management-grid) .category-management-card { width:100%; }
#category-list .category-management-card { min-width:0; min-height:0; padding:.8rem !important; gap:0; overflow:hidden; }
.category-card-primary { display:flex; align-items:center; gap:.65rem; width:100%; min-width:0; }
.category-card-primary-text { flex:1 1 auto; min-width:0; }
#category-list .category-card-title-row { min-width:0; width:100%; align-items:center; gap:.35rem; }
#category-list .category-card-title-row p { font-size:.9rem; line-height:1.35; min-width:0; flex:1; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; overflow-wrap:normal; }
.category-card-title-row > span { flex:0 0 auto; max-width:45%; min-width:0; margin-left:0; font-size:.6rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.category-card-visibility { font-size:.67rem; color:#7b8998; margin-top:.25rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.category-card-primary > button { flex:0 0 auto; white-space:nowrap; font-size:.67rem; }
#category-list .category-product-summary { min-width:0; gap:.35rem; padding:.55rem .6rem; margin-top:.65rem; }
#category-list .category-product-summary > span { min-width:0; }
#category-list .category-product-summary > span:last-child { text-align:right; max-width:46%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:.66rem; }
#category-list .category-card-action-row { grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; min-width:0; }
#category-list .category-card-action { min-width:0; max-width:100%; gap:.3rem; padding:.48rem .3rem; white-space:nowrap; overflow:hidden; font-size:clamp(.66rem,2.4vw,.73rem); }
#category-list .category-card-action span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#category-list .category-card-manage-row.admin-visible { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.45rem; width:100%; min-width:0; margin-top:.5rem; }
#category-list .category-card-manage-row button { display:inline-flex; align-items:center; justify-content:center; min-width:0; gap:.35rem; width:100%; min-height:39px; padding:.47rem .35rem; white-space:nowrap; font-size:.72rem; font-weight:780; border-radius:10px; }
.category-card-manage-row svg { width:15px; height:15px; flex:0 0 auto; }
#category-list .category-card-edit { color:#0f766e; background:#f0faf7; border:1px solid #cbeae4; }
.dark #category-list .category-card-edit { color:#75dfd1; background:#112f2b; border-color:#25534e; }
#category-list .category-card-delete { color:#cf3131; background:#fff5f5; border:1px solid #fbd2d2; }
.dark #category-list .category-card-delete { color:#fca5a5; background:#392029; border-color:#65343b; }
#category-list .category-name-edit.flex { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.42rem; margin:.55rem 0 0; min-width:0; }
.category-name-edit .cat-rename-input { grid-column:1 / -1; min-width:0; width:100%; }
.category-name-edit > button { min-width:0; min-height:38px; padding:.45rem; border-radius:9px; font-size:.73rem; font-weight:750; white-space:nowrap; }
.category-name-edit .cat-rename-save { color:#fff; background:#0b9384; }
.category-name-edit .cat-rename-cancel { color:#475569; background:#ecf1f5; }
.dark .category-name-edit .cat-rename-cancel { background:#283849; color:#d7e2ec; }
#category-list .category-card-access.admin-visible { display:block !important; margin-top:.58rem; border-top:1px solid #eaf0f4; padding-top:.2rem; min-width:0; }
.category-card-access-summary { list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:.4rem; padding:.4rem .12rem; color:#65778a; font-size:.7rem; font-weight:720; min-height:36px; }
.category-card-access-summary::-webkit-details-marker { display:none; }
.category-card-access-summary svg { width:15px; height:15px; flex:0 0 auto; transition:transform .2s ease; }
.category-card-access[open] .category-card-access-summary svg { transform:rotate(180deg); }
.category-card-access-content { padding:.3rem 0 .2rem; }
.dark .category-card-access { border-color:#2d4050 !important; }
#category-list .product-mgmt-card-bottom { min-width:0; margin-top:.6rem; padding-top:.65rem; }
#category-list .product-mgmt-card-bottom > div { min-width:0; width:100%; }
#category-list .product-mgmt-card-bottom select { min-width:0; width:100%; }
#category-list .product-mgmt-card-bottom .flex:has(> select) { min-width:0; }
#view-transactions .transactions-own-scope-note { text-align:center; padding:0 .75rem .45rem; font-size:.67rem; font-weight:650; color:#64748b; line-height:1.25; }
.dark #view-transactions .transactions-own-scope-note { color:#a7b8ca; }
#transactions-month-nav.hidden { display:none !important; }
@media(max-width:350px) {
 #view-categories > header { padding:.7rem !important; }
 #view-categories > header h1 { font-size:1rem; }
 #category-list .category-card-action { font-size:.65rem; }
}


/* CATEGORY LIST: compact horizontal rows, unlike the detailed grid cards.
   Keep the existing child controls and permissions in both modes. */
#category-list.category-management-list {
    display:flex !important;
    flex-direction:column;
    align-items:stretch;
    gap:.45rem;
    min-width:0;
    padding:.65rem;
}
#category-list.category-management-list > .category-management-card {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-areas:
        "identity identity"
        "quick manage"
        "access access";
    align-items:center;
    column-gap:.5rem;
    row-gap:.38rem;
    width:100%;
    min-width:0;
    min-height:0;
    margin:0 !important;
    padding:.67rem .72rem !important;
    border-radius:13px !important;
    box-shadow:0 2px 10px rgba(15,23,42,.03) !important;
}
#category-list.category-management-list .category-card-primary {
    grid-area:identity;
    gap:.52rem;
    min-width:0;
    align-self:center;
}
#category-list.category-management-list .category-card-primary::before {
    content:"";
    display:block;
    flex:0 0 40px;
    width:40px;
    height:40px;
    border-radius:11px;
    border:1px solid #d1eee7;
    background-color:#edfaf6;
    background-repeat:no-repeat;
    background-position:center;
    background-size:21px 21px;
    background-image:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%230c766c" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z"/%3E%3C/svg%3E');
}
.dark #category-list.category-management-list .category-card-primary::before {
    background-color:#12332e;
    border-color:#235950;
}
#category-list.category-management-list .category-card-primary-text {
    min-width:0;
    flex:1 1 auto;
}
#category-list .category-list-count { display:none; }
#category-list.category-management-list .category-list-count { display:inline; font-weight:750; color:#0c766c; }
.dark #category-list.category-management-list .category-list-count { color:#5eead4; }
#category-list.category-management-list .category-card-title-row p {
    font-size:.82rem;
    font-weight:790;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
#category-list.category-management-list .category-card-title-row > span {
    max-width:38%;
    padding:.12rem .2rem;
    font-size:.57rem;
}
#category-list.category-management-list .category-card-visibility {
    margin-top:.14rem;
    font-size:.62rem;
    line-height:1.25;
}
#category-list.category-management-list .category-card-primary > button {
    padding:.3rem;
    font-size:.6rem;
    min-height:32px;
}
#category-list.category-management-list .category-product-summary {
    grid-area:count;
    display:none !important;
    justify-content:flex-end;
    align-items:center;
    min-width:0;
    max-width:100%;
    border:0;
    margin:0;
    padding:0;
    background:transparent;
    text-align:right;
}
#category-list.category-management-list .category-product-count {
    display:flex;
    align-items:flex-end;
    min-width:0;
    gap:0;
}
#category-list.category-management-list .category-product-count strong {
    font-size:.96rem;
    line-height:1.1;
}
#category-list.category-management-list .category-product-count span {
    font-size:.59rem;
    line-height:1.25;
    max-width:76px;
    text-align:right;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
#category-list.category-management-list .category-product-summary > span:last-child {
    display:none;
}
#category-list.category-management-list .category-card-action-row {
    grid-area:quick;
    display:flex;
    align-items:center;
    gap:.35rem;
    min-width:0;
    margin:0;
    padding:0;
}
#category-list.category-management-list .category-card-action-row > button {
    flex:1 1 0;
    width:auto;
    min-width:0;
    min-height:36px;
    padding:.34rem .35rem;
    border-radius:9px;
    font-size:.68rem;
}
#category-list.category-management-list .category-card-manage-row.admin-visible {
    grid-area:manage;
    display:flex !important;
    align-items:center;
    justify-content:stretch;
    width:100%;
    gap:.35rem;
    margin:0;
    padding:0;
    min-width:0;
}
#category-list.category-management-list .category-card-manage-row > button {
    flex:1 1 0;
    width:auto;
    min-width:0;
    min-height:35px;
    padding:.33rem .35rem;
    border-radius:9px;
    font-size:.67rem;
}
#category-list.category-management-list .category-management-card:not(:has(> .category-card-manage-row.admin-visible)) > .category-card-action-row {
    grid-column:1 / -1;
}
#category-list.category-management-list .category-card-access.admin-visible {
    grid-area:access;
    margin:.07rem 0 0;
    padding-top:.12rem;
}
#category-list.category-management-list .category-card-access-summary {
    min-height:28px;
    padding:.17rem .1rem;
    font-size:.64rem;
}
#category-list.category-management-list .category-name-edit.flex {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:.3rem;
    width:100%;
    margin-top:.35rem;
}
/* The horizontal product-list layout at wider sizes: controls on the same row. */
@media(min-width:720px) {
    #category-list.category-management-list > .category-management-card {
        grid-template-columns:minmax(0,1fr) minmax(150px,200px) minmax(130px,175px);
        grid-template-areas:
            "identity quick manage"
            "access access access";
        column-gap:.5rem;
    }
    #category-list.category-management-list .category-card-access.admin-visible {
        max-width:100%;
    }
    #category-list.category-management-list .category-card-action-row,
    #category-list.category-management-list .category-card-manage-row.admin-visible {
        gap:.28rem;
    }
    #category-list.category-management-list .category-card-action-row > button,
    #category-list.category-management-list .category-card-manage-row > button {
        font-size:.62rem;
        padding:.35rem .23rem;
    }
}
@media(max-width:359px) {
    #category-list.category-management-list { padding:.48rem; gap:.35rem; }
    #category-list.category-management-list > .category-management-card { padding:.58rem !important; grid-template-columns:repeat(2,minmax(0,1fr)); }
    #category-list.category-management-list .category-card-primary::before { flex-basis:35px; width:35px; height:35px; }
    #category-list.category-management-list .category-product-count span { max-width:60px; }
}

/* STOCK MOVEMENT: product name is supporting microcopy, never a second large title. */
#view-stock-history .stock-movement-page-header {
    min-height:75px;
    padding-top:.6rem !important;
    padding-bottom:.6rem !important;
}
#view-stock-history .stock-movement-page-title {
    gap:.16rem;
}
#view-stock-history .stock-movement-page-title #history-product-name {
    font-size:clamp(.625rem,2.3vw,.72rem) !important;
    line-height:1.2;
    font-weight:550;
    letter-spacing:0;
    color:#8190a5;
    max-width:100%;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    overflow-wrap:normal;
}
.dark #view-stock-history .stock-movement-page-title #history-product-name {
    color:#93a8bb;
}


/* The accordion's details must consume their own height (especially Android WebView).
   Previous layered grid-area rules could clip the picker to the height of the toggle. */
#category-list.category-management-list > .category-management-card.is-expanded {
    height:auto !important; max-height:none !important; overflow:visible !important;
}
#category-list.category-management-list .category-list-detail.is-open {
    display:flex !important; flex-flow:column nowrap !important;
    height:auto !important; max-height:none !important;
    overflow:visible !important; align-items:stretch; gap:.52rem;
}
#category-list.category-management-list .category-list-detail.is-open > .category-card-access.admin-visible {
    display:block !important; height:auto !important; max-height:none !important;
    min-width:0; flex:0 0 auto; overflow:visible !important;
    grid-area:auto !important; order:3;
}
#category-list .category-card-access[open] > .category-access-form {
    display:flex !important; flex-direction:column !important; align-items:stretch;
    height:auto !important; max-height:none !important; overflow:visible !important;
    padding-bottom:.6rem;
}
#category-list .category-card-access[open] .category-allowed-members,
#category-list .category-card-access[open] .category-member-picker { min-width:0; width:100%; }
#category-list .category-card-access[open] .category-member-picker { margin-top:.18rem; }
#category-list .category-card-access .category-member-error { line-height:1.45; }
/* The customer directory shares the same one-row card proportions as Products. */
#view-customers > header { gap:.55rem; min-height:63px; }
#view-customers > header h1 { flex:1; min-width:0; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#view-customers #add-customer-view-btn {
    flex:0 0 42px; width:42px; height:42px; min-height:42px;
    display:grid; place-items:center; border-radius:12px;
    border:1px solid #b5e8de; background:#edfaf6; color:#0c766c;
}
.dark #view-customers #add-customer-view-btn { color:#6de2d1; background:#102c2a; border-color:#235950; }
#view-customers #customer-search-input { min-height:46px; border-radius:12px; font-size:.9rem; padding:.7rem .85rem .7rem 2.55rem; }
#view-customers .customer-search-wrap { position:relative; min-width:0; }
#view-customers .customer-search-wrap > svg { position:absolute; left:.85rem; top:50%; transform:translateY(-50%); pointer-events:none; width:17px; height:17px; color:#8292a6; }
#customers-list-management { display:flex; flex-direction:column; gap:.55rem; padding:.62rem !important; min-width:0; }
#customers-list-management > .customer-directory-row {
    appearance:none; display:flex; align-items:center; gap:.65rem;
    width:100%; min-width:0; min-height:72px; padding:.7rem .78rem;
    border-radius:14px; border:1px solid #e3edf2; background:#fff;
    color:#19283c; text-align:left;
    box-shadow:0 5px 18px rgba(15,23,42,.035);
    transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease;
}
#customers-list-management > .customer-directory-row:focus-visible { outline:3px solid rgba(16,179,160,.28); outline-offset:2px; }
#customers-list-management > .customer-directory-row:active { transform:scale(.99); }
@media(hover:hover) {#customers-list-management > .customer-directory-row:hover {border-color:#90d9ce;box-shadow:0 8px 22px rgba(15,23,42,.07);}}
#customers-list-management .customer-directory-avatar {
    display:grid; place-items:center; flex:0 0 39px; width:39px; height:39px;
    border:1px solid #caeae3; border-radius:12px; background:#eaf9f5;
    color:#087e73; font-size:1rem; font-weight:850; line-height:1;
}
#customers-list-management .customer-directory-body {display:block; flex:1 1 auto; min-width:0; overflow:hidden;}
#customers-list-management .customer-directory-name,
#customers-list-management .customer-directory-contact {
    display:block; min-width:0; max-width:100%; overflow:hidden;
    text-overflow:ellipsis; white-space:nowrap;
}
#customers-list-management .customer-directory-name { font-size:.84rem; font-weight:800; line-height:1.3; }
#customers-list-management .customer-directory-contact { margin-top:.2rem; font-size:.69rem; line-height:1.3; color:#74859a; }
#customers-list-management .customer-directory-chevron { flex:0 0 17px; width:17px; height:17px; color:#8a9aad; }
#customers-list-management .customer-directory-view-only { flex:0 0 auto; font-size:.59rem; color:#76859a; background:#eff3f7; padding:.19rem .36rem; border-radius:7px; white-space:nowrap; }
#customers-list-management .customer-directory-empty { padding:1.65rem 1rem; text-align:center; border-radius:15px; border:1px dashed #d8e4eb; color:#74859a; background:#fff; font-size:.78rem; }
.dark #customers-list-management > .customer-directory-row {background:#172231;color:#edf5f8;border-color:#2d3d4d;box-shadow:0 6px 18px rgba(0,0,0,.15);}
.dark #customers-list-management .customer-directory-avatar { background:#123630;color:#6de2d1;border-color:#286159; }
.dark #customers-list-management .customer-directory-contact {color:#9cabc0;}
.dark #customers-list-management .customer-directory-view-only {background:#233345;color:#b1c0d0;}
.dark #customers-list-management .customer-directory-empty {background:#172231;color:#aebed0;border-color:#314457;}
@media(max-width:360px) {
 #customers-list-management {padding:.46rem !important;gap:.4rem;}
 #customers-list-management > .customer-directory-row {padding:.57rem .6rem;gap:.48rem;}
 #customers-list-management .customer-directory-avatar {flex-basis:35px;width:35px;height:35px;}
 #customers-list-management .customer-directory-view-only {font-size:.53rem;}
}


#view-categories { min-height:0; }
#view-categories #category-list.category-management-list {
    flex:1 1 auto;
    min-height:0 !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior-y:contain;
    -webkit-overflow-scrolling:touch;
    align-content:start;
    padding-bottom:max(1.25rem, env(safe-area-inset-bottom)) !important;
    scroll-padding-bottom:1.25rem;
}
/* Override the legacy two-column grid applied to the entire list card. That grid
   assigned implicit rows to the accordion's content and clipped the access picker. */
#category-list.category-management-list > .category-management-card {
    display:flex !important;
    flex:0 0 auto !important;
    flex-direction:column !important;
    align-items:stretch !important;
    grid-template:none !important;
    gap:0 !important;
    width:100%;
    min-width:0;
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    padding:.68rem .74rem !important;
}
#category-list.category-management-list > .category-management-card.is-expanded {
    padding-bottom:.85rem !important;
    border-color:rgba(16,179,160,.37);
}
#category-list.category-management-list > .category-management-card > .category-card-primary--list {
    display:flex !important;
    flex:0 0 auto !important;
    width:100%;
    min-width:0;
    align-items:center;
    grid-area:auto !important;
}
#category-list.category-management-list .category-card-primary--list::before {
    display:none !important;
    content:none !important;
}
#category-list.category-management-list .category-list-expand-btn { width:100%; min-width:0; }
#category-list.category-management-list .category-card-primary--list .category-card-primary-text {
    min-width:0;
    overflow:hidden;
}
#category-list.category-management-list .category-list-detail:not(.is-open) { display:none !important; }
/* The expanded contents use the same vertical sections as a grid-view category. */
#category-list.category-management-list .category-list-detail.is-open {
    display:flex !important;
    flex:0 0 auto !important;
    flex-direction:column !important;
    align-items:stretch !important;
    grid-area:auto !important;
    grid-column:auto !important;
    grid-template:none !important;
    gap:.56rem !important;
    position:static !important;
    width:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    border-top:1px solid #e5edf1;
    margin:.58rem 0 0 !important;
    padding:.65rem 0 0 !important;
}
/* The product-count tile was explicitly suppressed in older list styles. Restore it
   ONLY when expanded so a list item opens like the corresponding grid card. */
#category-list.category-management-list .category-list-detail.is-open > .category-product-summary {
    display:flex !important;
    flex:0 0 auto !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:.6rem !important;
    grid-area:auto !important;
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    margin:0 !important;
    padding:.58rem .67rem !important;
    border:1px solid #e5edf1 !important;
    border-radius:11px !important;
    background:#f7fafc !important;
    text-align:left !important;
}
#category-list.category-management-list .category-list-detail.is-open .category-product-count {
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    min-width:0;
}
#category-list.category-management-list .category-list-detail.is-open .category-product-count span {
    max-width:none !important;
    white-space:normal !important;
    text-align:left !important;
}
#category-list.category-management-list .category-list-detail.is-open > .category-product-summary > span:last-child {
    display:block !important;
    flex:0 1 auto;
    min-width:0;
    max-width:50%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:.68rem;
    text-align:right;
}
#category-list.category-management-list .category-list-detail.is-open > .category-card-action-row,
#category-list.category-management-list .category-list-detail.is-open > .category-card-manage-row.admin-visible {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    align-items:stretch !important;
    gap:.48rem !important;
    grid-area:auto !important;
    grid-column:auto !important;
    width:100% !important;
    max-width:none !important;
    min-width:0;
    height:auto !important;
    margin:0 !important;
    padding:0 !important;
}
#category-list.category-management-list .category-list-detail.is-open > .category-card-action-row > button,
#category-list.category-management-list .category-list-detail.is-open > .category-card-manage-row.admin-visible > button {
    justify-content:center !important;
    align-items:center !important;
    width:100% !important;
    min-width:0;
    min-height:41px !important;
    padding:.5rem .35rem !important;
    font-size:clamp(.67rem,2.6vw,.74rem) !important;
    gap:.35rem !important;
    white-space:nowrap;
    overflow:hidden;
}
#category-list.category-management-list .category-list-detail.is-open > .category-card-action-row > button > span,
#category-list.category-management-list .category-list-detail.is-open > .category-card-manage-row.admin-visible > button > span {
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
#category-list.category-management-list .category-list-detail.is-open > .category-card-access.admin-visible {
    display:block !important;
    position:static !important;
    flex:0 0 auto !important;
    order:initial !important;
    grid-area:auto !important;
    grid-column:auto !important;
    min-width:0;
    width:100% !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    margin:.12rem 0 0 !important;
    border-top:1px solid #e5edf1;
    padding:.4rem 0 0 !important;
}
#category-list.category-management-list .category-list-detail.is-open > .category-card-access[open] > .category-access-form {
    display:flex !important;
    flex-direction:column !important;
    gap:.55rem !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    padding:.45rem 0 .5rem !important;
}
#category-list.category-management-list .category-list-detail.is-open .category-allowed-members,
#category-list.category-management-list .category-list-detail.is-open .category-member-picker {
    min-width:0 !important;
    width:100% !important;
}
#category-list.category-management-list .category-list-detail.is-open .category-member-picker {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
}
#category-list.category-management-list .category-list-detail.is-open .category-member-feedback {
    width:100%;
    max-width:100%;
    min-width:0;
}
.dark #category-list.category-management-list .category-list-detail.is-open { border-color:#2c4052; }
.dark #category-list.category-management-list .category-list-detail.is-open > .category-product-summary {
    background:#101d28 !important;
    border-color:#2b3b4a !important;
}
.dark #category-list.category-management-list .category-list-detail.is-open > .category-card-access.admin-visible { border-color:#2c4052; }
@media(max-width:359px) {
    #category-list.category-management-list > .category-management-card {padding:.57rem .58rem !important;}
    #category-list.category-management-list .category-list-detail.is-open {gap:.45rem !important;}
    #category-list.category-management-list .category-list-detail.is-open > .category-product-summary {padding:.5rem .52rem !important;}
}


/* Scoped refinements: no invoice, checkout, permissions or database changes. */
/* Products: Category-style compact and keyboard-accessible list. */
#product-management-list.product-catalog-accordion {display:block; min-width:0;}
#product-management-list .product-catalog-list-heading {margin:.4rem .2rem .48rem;min-width:0;}
#product-management-list .product-catalog-list-heading h3 {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;overflow-wrap:normal;}
#product-management-list .product-catalog-list-heading > span {flex-shrink:0;}
.product-catalog-list-entry {min-width:0;margin-bottom:.55rem;background:#fff;border:1px solid #e5eaf0;border-radius:16px;box-shadow:0 6px 22px rgba(15,23,42,.035);overflow:hidden;}
.dark .product-catalog-list-entry {background:#0e1924;border-color:#263544;}
.product-catalog-list-entry[open] {border-color:rgba(20,184,166,.28);box-shadow:0 10px 26px rgba(15,23,42,.055);}
.product-catalog-list-summary {display:grid;grid-template-columns:42px minmax(0,1fr) minmax(0,max-content) 18px;gap:.62rem;align-items:center;min-width:0;list-style:none;cursor:pointer;min-height:67px;padding:.65rem .75rem;}
.product-catalog-list-summary::-webkit-details-marker {display:none;}
.product-catalog-list-summary:focus-visible {outline:2px solid var(--accent);outline-offset:-2px;}
.product-catalog-list-thumb {width:42px;height:42px;object-fit:contain;padding:.18rem;border-radius:11px;background:#f1f5f9;border:1px solid #e5eaf0;}
.dark .product-catalog-list-thumb {background:#1b2b39;border-color:#304356;}
.product-catalog-list-text {min-width:0;display:grid;gap:.18rem;}
.product-catalog-list-text strong {font-size:clamp(.76rem,2.5vw,.85rem);line-height:1.2;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#172033;}
.dark .product-catalog-list-text strong {color:#f0f7fa;}
.product-catalog-list-text > span {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.68rem;line-height:1.2;color:#718096;}
.product-catalog-list-price {color:#172033;font-size:clamp(.65rem,2.25vw,.82rem);font-weight:820;text-align:right;min-width:0;max-width:37vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums;}
.dark .product-catalog-list-price {color:#f1f8fa;}
.product-catalog-list-chevron {width:17px;height:17px;color:#8b9aaa;transition:transform .18s;}
.product-catalog-list-entry[open] .product-catalog-list-chevron {transform:rotate(90deg);color:var(--accent);}
.product-catalog-list-detail {border-top:1px solid #e6edf1;padding:.65rem;min-width:0;}
.dark .product-catalog-list-detail {border-top-color:#2a3e4b;}
.product-catalog-list-detail > .product-catalog-card {max-width:100%;min-width:0;box-shadow:none!important;transform:none!important;margin:0;border-radius:12px;background:#f8fafb;}
.dark .product-catalog-list-detail > .product-catalog-card {background:#111f2b;}
@media(max-width:360px){.product-catalog-list-summary{grid-template-columns:38px minmax(0,1fr) minmax(0,max-content) 15px;gap:.42rem;padding:.53rem}.product-catalog-list-thumb{width:38px;height:38px}.product-catalog-list-detail{padding:.5rem}}

/* Expenses: move the existing plus action to the header; editor is a focused mobile screen. */
#view-expenses > header {min-width:0;}
#view-expenses > header > div:first-child {min-width:0;}
#view-expenses > header h1 {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#view-expenses #toggle-expense-form-btn.zuno-expense-add-icon {display:flex;align-items:center;justify-content:center;flex:0 0 42px;width:42px;height:42px;min-height:42px;max-width:42px;padding:0!important;border-radius:13px!important;color:var(--accent-2)!important;background:rgba(16,179,160,.07)!important;border:1px solid rgba(16,179,160,.30);box-shadow:none!important;}
#view-expenses #toggle-expense-form-btn.zuno-expense-add-icon:not(.admin-visible) {display:none!important;}
.dark #view-expenses #toggle-expense-form-btn.zuno-expense-add-icon {color:#5eead4!important;background:#142e32!important;border-color:#285e57;}
#toggle-expense-form-btn.zuno-expense-add-icon svg {width:22px;height:22px;flex-shrink:0;}
#view-expenses > div .p-3:has(> #expense-search-input) {padding:.7rem .8rem!important;}
#expense-panel-overlay {z-index:85!important;align-items:flex-start!important;overflow:hidden!important;padding:clamp(.4rem,2vh,1rem)!important;}
#add-expense-panel {width:100%;max-width:650px;max-height:calc(100dvh - 2rem);margin:0 auto!important;display:flex;flex-direction:column;overflow:hidden!important;}
#add-expense-panel .expense-editor-head {flex-shrink:0;padding:.82rem 1rem;}
#add-expense-panel .expense-editor-head > div {min-width:0;}
#add-expense-panel .expense-editor-head p {max-width:100%;overflow:hidden;text-overflow:ellipsis;}
#add-expense-panel .expense-editor-head .expense-editor-icon {width:38px;height:38px;flex:0 0 38px;border-radius:11px;}
#add-expense-panel > .max-h-\[80vh\] {min-height:0;flex:1;max-height:none!important;overflow-y:auto!important;overscroll-behavior:contain;}
#add-expense-panel #add-expense-form {padding:.9rem 1rem 1.2rem!important;gap:.6rem;}
#add-expense-panel #add-expense-form input,#add-expense-panel #add-expense-form select,#add-expense-panel #add-expense-form textarea {min-width:0;max-width:100%;border-radius:11px;}
#add-expense-panel #add-expense-form label {font-size:.78rem;}
#add-expense-panel #add-expense-form > div:last-child {position:sticky;bottom:0;background:inherit;padding:.7rem 0 .2rem!important;z-index:1;}
#add-expense-panel #add-expense-form > div:last-child button {min-width:0;white-space:nowrap;font-size:.85rem!important;min-height:43px;border-radius:11px;}
@media(max-width:640px){#expense-panel-overlay {padding:0!important;}#add-expense-panel {width:100%;height:100dvh;max-height:100dvh;max-width:none!important;border-radius:0!important;border:0!important;}#add-expense-panel > .max-h-\[80vh\] {padding-bottom:max(1.1rem,env(safe-area-inset-bottom))!important;}#add-expense-panel #add-expense-form {padding:.76rem!important;}#add-expense-panel #add-expense-form .grid {gap:.5rem!important;}#add-expense-panel .expense-editor-head {padding:.7rem .8rem;}}

/* Receivables: compact account ledger with a clear expanded state. */
#receivables-list {padding:.65rem!important;min-width:0;}
#receivables-list .receivable-card {margin:0 0 .62rem;padding:.8rem .78rem!important;min-width:0;overflow:hidden;border-radius:16px!important;}
#receivables-list .receivable-card.is-expanded {border-color:rgba(16,179,160,.31)!important;box-shadow:0 10px 28px rgba(15,23,42,.08)!important;}
#receivables-list .receivable-card-top {display:grid!important;grid-template-columns:40px minmax(0,1fr) minmax(0,max-content) 14px;gap:.58rem;align-items:center;min-width:0;}
#receivables-list .receivable-avatar {width:40px;height:40px;font-size:.86rem;background:linear-gradient(145deg,#08786e,#134c57);border-radius:12px;}
#receivables-list .receivable-card-top > .min-w-0 {min-width:0;overflow:hidden;}
#receivables-list .receivable-card-top > .min-w-0 > p {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
#receivables-list .receivable-card-top > .min-w-0 > p:first-child {font-size:.86rem;font-weight:800;}
#receivables-list .receivable-card-top > .min-w-0 > p:nth-child(2) {font-size:.69rem!important;}
#receivables-list .receivable-card-top > .min-w-0 > p:nth-child(3) {font-size:.64rem!important;}
#receivables-list .receivable-card-top > .text-right {min-width:0;max-width:38vw;align-self:center;overflow:hidden;}
#receivables-list .receivable-balance {font-size:clamp(.73rem,2.75vw,.98rem)!important;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#receivables-list .receivable-badge {margin-top:.25rem;min-height:19px;line-height:1.3;}
#receivables-list .receivable-chevron {width:14px;height:14px;color:#94a3b8;transition:transform .16s;}
#receivables-list .receivable-card.is-expanded .receivable-chevron {transform:rotate(90deg);color:var(--accent);}
#receivables-list .receivable-card-bottom {display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,120px),1fr));gap:.5rem!important;margin-top:.65rem;padding-top:.65rem;}
#receivables-list .receivable-card-bottom > button {margin:0;min-width:0;min-height:42px;font-size:.76rem;border-radius:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#receivables-list .receivable-total-card {display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,max-content);gap:.65rem;min-width:0;padding:.8rem .9rem!important;border-radius:15px!important;}
#receivables-list .receivable-total-card span {min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.72rem;}
#receivables-list .receivable-total-card strong {min-width:0;max-width:58vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:clamp(.85rem,3.5vw,1.17rem);font-variant-numeric:tabular-nums;text-align:right;}
@media(max-width:360px){#receivables-list .receivable-card-top {grid-template-columns:35px minmax(0,1fr) minmax(0,max-content) 12px;gap:.42rem}#receivables-list .receivable-avatar {width:35px;height:35px;}#receivables-list .receivable-card-top > .text-right{max-width:35vw}}

/* Original Analytics dashboard restored; improve only numeric containment. */
#analytics-content .analytics-kpi-grid > .dash-stat-card { min-width:0; }
#analytics-content .dash-stat-card > .min-w-0 { flex:1 1 auto; min-width:0; max-width:100%; }
#analytics-content .dash-stat-value {
    display:block;
    width:100%;
    min-width:0;
    max-width:100%;
    white-space:nowrap !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
    overflow:hidden;
    text-overflow:ellipsis;
    font-size:clamp(.78rem,2.7vw,1.13rem) !important;
    font-variant-numeric:tabular-nums;
    line-height:1.2 !important;
}
#analytics-content .analytics-pl-row { min-width:0; gap:.4rem; }
#analytics-content .analytics-pl-row > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#analytics-content .analytics-pl-row > strong,
#analytics-content .analytics-panel-head > strong {
    min-width:0;
    max-width:min(62vw,100%);
    flex:0 1 auto;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-variant-numeric:tabular-nums;
    font-size:clamp(.75rem,2.75vw,.95rem);
    text-align:right;
}
@media (min-width:861px) and (max-width:1199px) {
    /* Five cards would be too narrow inside the desktop sidebar at these widths. */
    #analytics-content .analytics-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
}
@media (max-width:400px) {
    #analytics-content .dash-stat-card { gap:.35rem !important; }
    #analytics-content .dash-stat-icon { width:1.5rem !important; height:1.5rem !important; }
    #analytics-content .dash-stat-value { font-size:clamp(.71rem,3.15vw,.87rem) !important; letter-spacing:-.03em; }
}


/* Keep the original Analytics dashboard. Do not compress a currency figure because
   its description is using the same row. Descriptions get their own full-width row. */
#analytics-content .analytics-panel--operating .analytics-panel-head {
    display:grid;
    grid-template-columns:minmax(0,1fr) max-content;
    grid-template-areas:"title amount" "note note";
    align-items:baseline;
    column-gap:.55rem;
    row-gap:.38rem;
}
#analytics-content .analytics-panel--operating .analytics-panel-head > div {
    display:contents;
}
#analytics-content .analytics-panel--operating .analytics-panel-title {
    grid-area:title;
    min-width:0;
    white-space:nowrap;
    font-size:clamp(.83rem,3.4vw,.96rem);
}
#analytics-content .analytics-panel--operating .analytics-panel-note {
    grid-area:note;
    width:100%;
    min-width:0;
    max-width:100%;
    margin:0;
}
#analytics-content .analytics-panel--operating .analytics-panel-head > strong {
    grid-area:amount;
    justify-self:end;
    width:auto;
    min-width:max-content;
    max-width:none;
    flex:none;
    font-size:clamp(.69rem,2.6vw,.91rem);
    line-height:1.35;
    overflow:visible;
    text-overflow:clip;
    white-space:nowrap;
    font-variant-numeric:tabular-nums;
    letter-spacing:-.025em;
}
/* Keep the percent and its label on one line without touching the P&L data. */
#analytics-content .analytics-pl-head {gap:.55rem;}
#analytics-content .analytics-pl-head > div {min-width:0;flex:1 1 auto;}
#analytics-content .analytics-pl-head > span {
    flex:0 0 auto;
    min-width:max-content;
    white-space:nowrap;
    font-size:clamp(.67rem,2.65vw,.84rem);
}
/* Transaction summaries prioritise the right-aligned amount rather than
   allocating the same cramped width to a short count and a long currency. */
#transactions-list > .transaction-summary-card {
    display:grid;
    grid-template-columns:minmax(0,.77fr) minmax(0,.67fr) minmax(0,1.56fr);
    width:100%;
    min-width:0;
}
#transactions-list > .transaction-summary-card > div:last-child {text-align:right;}
#transactions-list > .transaction-summary-card > div:last-child strong {
    font-size:clamp(.7rem,2.8vw,.97rem);
    font-variant-numeric:tabular-nums;
}
#transactions-list .zuno-record-card--transaction .zuno-record-head {
    grid-template-columns:16px minmax(0,1fr) max-content minmax(0,min(35vw,10.5rem));
}
#transactions-list .zuno-record-card--transaction .zuno-record-title,
#transactions-list .zuno-record-card--transaction .zuno-record-amount {
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
@media(max-width:370px){
    #analytics-content .analytics-panel--operating .analytics-panel-head {column-gap:.3rem;}
    #analytics-content .analytics-panel--operating .analytics-panel-title {font-size:.78rem;}
    #analytics-content .analytics-panel--operating .analytics-panel-head > strong {font-size:.7rem;}
    #transactions-list > .transaction-summary-card > div {padding:0 .25rem;}
    #transactions-list .zuno-record-card--transaction .zuno-record-head {
        grid-template-columns:16px minmax(0,1fr) max-content minmax(0,min(34vw,10.5rem));
    }
}

/* Category-standard primary add buttons; consistent light/dark across primary pages. */
#view-products #add-product-btn, #view-customers #add-customer-view-btn,
#view-expenses #toggle-expense-form-btn.zuno-expense-add-icon {
    display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;
    min-height:42px;max-width:42px;padding:0!important;border-radius:12px!important;
    background:#edfaf6!important;border:1px solid #b5e8de!important;
    color:#0c766c!important;box-shadow:none!important;
}
.dark #view-products #add-product-btn,.dark #view-customers #add-customer-view-btn,
.dark #view-expenses #toggle-expense-form-btn.zuno-expense-add-icon {
    background:#102c2a!important;border-color:#195e59!important;color:#5eead4!important;
}
#view-products #add-product-btn svg,#view-customers #add-customer-view-btn svg,
#view-expenses #toggle-expense-form-btn.zuno-expense-add-icon svg {width:22px;height:22px;flex-shrink:0;}
#view-receivables #open-receivable-filter-btn, #receivable-filter-overlay {display:none!important;}
#transactions-active-filter-bar.hidden {display:none!important;}

/* Exact checkout search geometry: one surface, not a second dark input tile. */
#view-checkout .checkout-discovery-search,
.dark #view-checkout .checkout-discovery-search {
    background: transparent !important;
    box-shadow: none !important;
    overflow: hidden;
    min-width: 0;
    isolation: isolate;
}
#view-checkout .checkout-discovery-search input[type="search"],
.dark #view-checkout .checkout-discovery-search input[type="search"],
#view-checkout .checkout-discovery-search input[type="search"]:focus,
.dark #view-checkout .checkout-discovery-search input[type="search"]:focus {
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    min-height: 0 !important;
    height: 100%;
    min-width: 0;
    width: 100%;
    padding: 0 !important;
    margin: 0;
    font-size: 16px;
    color: inherit !important;
}
#view-checkout .checkout-discovery-search:focus-within { border-color: #10b3a0; box-shadow: 0 0 0 2px rgba(16,179,160,.15) !important; }
#view-checkout .checkout-discovery-search > svg { flex: 0 0 17px; }
#view-checkout .checkout-discovery-search > button { flex: 0 0 34px; }

/* Checkout category count leads the strip; understated separator only here. */
#view-checkout #category-tabs .checkout-category-total {
    display:inline-flex; align-items:center; gap:.28rem; vertical-align:middle;
    padding:.38rem .67rem; min-height:34px; border-radius:.65rem;
    font-size:.74rem; font-weight:750; white-space:nowrap;
    border:1px solid rgba(16,179,160,.32);
    color:#0f766e; background:rgba(16,179,160,.07);
}
.dark #view-checkout #category-tabs .checkout-category-total { color:#7be4d6; background:rgba(16,179,160,.12); }
#view-checkout #category-tabs .checkout-category-divider {
    display:inline-block; vertical-align:middle; height:20px; width:1px;
    margin:0 .57rem 0 .42rem; background:rgba(148,163,184,.5);
}
#view-checkout #category-tabs .checkout-category-total .checkout-category-count {
    margin:0; min-width:1.3rem; font-size:.72rem;
}
#view-checkout > header #zuno-checkout-alert-bell { margin-right:.12rem; }

/* Header actions: keep the Users title centered as the bell is shown/hidden. */
#view-users > header {position:relative;display:flex!important;align-items:center;justify-content:space-between;gap:10px;width:100%;}
#view-users > header > .menu-btn {flex:0 0 auto;margin-right:auto;}
#view-users > header > h1 {position:absolute;left:50%;transform:translateX(-50%);margin:0;white-space:nowrap;pointer-events:none;}
#view-users > header > .zuno-users-header-actions {display:flex;flex:0 0 auto;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;}
/* Live team activity notifications, shared between desktop and foreground mobile. */
.zuno-alert-bell { position:relative; flex:0 0 auto; display:grid; place-items:center; width:40px; min-width:40px; height:40px; min-height:40px; padding:8px; border:1px solid rgba(148,163,184,.28); border-radius:12px; color:inherit; background:rgba(148,163,184,.08); }
.zuno-alert-bell svg {width:20px;height:20px;}
.zuno-alert-dot { position:absolute; top:-4px; right:-4px; min-width:19px; height:19px; border:2px solid #fff; display:grid; place-items:center; background:#ef4444; color:white; border-radius:20px; font-size:10px; font-weight:800; padding:0 3px; }
.zuno-alert-dot[hidden],.zuno-alert-bell[hidden],#zuno-product-alert-panel[hidden] {display:none!important;}
#zuno-product-alert-panel {position:fixed;z-index:950;inset:0;background:rgba(2,6,23,.6);display:flex;justify-content:center;align-items:flex-start;padding:calc(env(safe-area-inset-top,0px) + 70px) 12px 20px;}
.zuno-alert-sheet {width:min(100%,425px);max-height:min(75dvh,650px);display:flex;flex-direction:column;border-radius:18px;overflow:hidden;background:#fff;color:#172033;border:1px solid #dce5ed;box-shadow:0 22px 65px rgba(0,0,0,.25);}
.dark .zuno-alert-sheet {background:#142130;color:#f8fafc;border-color:#354657;}
.zuno-alert-head {display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px;border-bottom:1px solid rgba(148,163,184,.22);}
.zuno-alert-list {overflow-y:auto;padding:12px;display:grid;gap:8px;}
.zuno-alert-row {border:1px solid rgba(148,163,184,.2);border-radius:12px;padding:12px;display:grid;gap:3px;}
.zuno-alert-row strong {font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.zuno-alert-row small {font-size:11px;color:#64748b;}
.dark .zuno-alert-row small {color:#94a3b8;}
.zuno-alert-close {min-width:36px;min-height:36px;padding:6px;border:0;border-radius:8px;background:rgba(148,163,184,.16);}
 .zuno-order-alert-toast {position:fixed;z-index:951;right:16px;top:calc(76px + env(safe-area-inset-top, 0px));max-width:min(420px,calc(100vw - 32px));border:1px solid #50d6bd;border-radius:14px;background:#112c34;color:#e9fffa;box-shadow:0 14px 40px rgba(0,0,0,.28);padding:14px 18px;text-align:left;font-size:14px;font-weight:700;cursor:pointer;}
.zuno-order-alert-toast[hidden]{display:none!important;}
@media(max-width:430px){
    .zuno-alert-bell{width:36px;min-width:36px;height:36px;min-height:36px;padding:7px;flex-shrink:0;order:-1}
    #view-checkout > header{gap:4px;min-width:0}
    #view-checkout > header .app-header-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    #view-checkout > header > div{gap:1px;flex:0 0 auto}
    #view-checkout > header #zuno-checkout-alert-bell{display:grid}
    #view-checkout > header #zuno-checkout-alert-bell[hidden]{display:none!important}
}


/* Polished Team Activity popover and compact readable rows, light and dark. */
#zuno-product-alert-panel .zuno-alert-sheet{border-radius:18px!important;box-shadow:0 22px 56px #02061775!important}
#zuno-product-alert-panel .zuno-alert-head{padding:14px 16px;border-bottom:1px solid #64748b45}
#zuno-product-alert-panel .zuno-alert-head strong{font-size:17px;letter-spacing:-.025em}
#zuno-product-alert-panel .zuno-alert-tools{padding:10px 14px 2px;justify-content:flex-end;gap:8px}
#zuno-product-alert-panel .zuno-alert-tool{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:6px 11px;border-radius:9px;border:1px solid #6b859a70;background:#324557!important;color:#f0fafb!important;font-size:12px;font-weight:750;letter-spacing:0;opacity:1;}
#zuno-product-alert-panel .zuno-alert-tool--danger{background:#4f2939!important;color:#ffd2d9!important;border-color:#9a5367}
.dark #zuno-product-alert-panel .zuno-alert-tool{background:#e9f2f5!important;color:#163046!important;border-color:#cadce5}
.dark #zuno-product-alert-panel .zuno-alert-tool--danger{background:#fff0f1!important;color:#b42343!important;border-color:#ffc1cd}
#zuno-product-alert-panel .zuno-alert-tool:disabled{opacity:.38;cursor:not-allowed}
#zuno-product-alert-panel .zuno-alert-list{gap:9px;padding:12px 14px 16px}
#zuno-product-alert-panel .zuno-alert-row{display:grid!important;grid-template-columns:36px minmax(0,1fr) 12px!important;align-items:center;gap:11px!important;padding:13px!important;min-height:96px;border-radius:13px!important;background:#243849!important;border-color:#516a7c!important;box-shadow:none;text-align:left;transition:border-color .16s,transform .16s,background .16s}
#zuno-product-alert-panel .zuno-alert-row:hover{border-color:#4adbc4!important;background:#2c4555!important;transform:translateY(-1px)}
#zuno-product-alert-panel .zuno-alert-row.is-unread{border-left:3px solid #4adbc4!important}
.dark #zuno-product-alert-panel .zuno-alert-row{background:#fff!important;border-color:#dce4ef!important}
.dark #zuno-product-alert-panel .zuno-alert-row:hover{background:#f0faf8!important;border-color:#13a999!important}
#zuno-product-alert-panel .zuno-alert-kind-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;color:#8df2e3;background:#10b3a022;font-size:22px;line-height:1}
.dark #zuno-product-alert-panel .zuno-alert-kind-icon{color:#087d75;background:#e3f8f2}
#zuno-product-alert-panel .zuno-alert-content{min-width:0;display:flex;flex-direction:column;gap:4px}
#zuno-product-alert-panel .zuno-alert-record{display:block;min-width:0;color:#fff;font-size:13px;font-weight:800;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dark #zuno-product-alert-panel .zuno-alert-record{color:#142337}
#zuno-product-alert-panel .zuno-alert-actor{min-width:0;display:flex;align-items:baseline;gap:5px;flex-wrap:wrap;color:#d8e6ed;font-size:12px;line-height:1.3}
.dark #zuno-product-alert-panel .zuno-alert-actor{color:#455d6d}
#zuno-product-alert-panel .zuno-alert-email{min-width:0;max-width:100%;font-size:11px;opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#zuno-product-alert-panel .zuno-alert-date{color:#9fb4c2;font-size:11px;line-height:1.3}
.dark #zuno-product-alert-panel .zuno-alert-date{color:#687d8d}
#zuno-product-alert-panel .zuno-alert-row-arrow{grid-column:3!important;grid-row:1!important;font-size:23px;color:#67e3d2;opacity:1}
.dark #zuno-product-alert-panel .zuno-alert-row-arrow{color:#078f83}
@keyframes zuno-notification-target{0%,100%{box-shadow:0 0 0 0 #10b3a000;transform:translateX(0)}12%{transform:translateX(-3px)}25%{transform:translateX(3px)}38%{transform:translateX(-2px)}50%{transform:translateX(0);box-shadow:0 0 0 5px #10b3a055}80%{box-shadow:0 0 0 6px #10b3a022}}
.zuno-activity-focus{position:relative;z-index:2;outline:3px solid #16c6ad!important;border-color:#18b8a4!important;background-color:#10b3a022!important;animation:zuno-notification-target 1s ease-in-out 2!important;scroll-margin-top:100px;}
@media(prefers-reduced-motion:reduce){.zuno-activity-focus{animation:none!important}}
@media(max-width:420px){#zuno-product-alert-panel .zuno-alert-row{grid-template-columns:32px minmax(0,1fr) 12px!important;gap:8px!important;padding:10px!important}}

/* Activity controls: one contextual Clear beside Close (never show on an empty feed). */
#zuno-product-alert-panel .zuno-alert-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
#zuno-product-alert-panel .zuno-alert-head-actions{display:flex;align-items:center;gap:8px;margin-left:auto}
#zuno-product-alert-panel #zuno-alert-clear{font-weight:750;min-height:34px;padding:5px 11px;border-radius:10px}
#zuno-product-alert-panel #zuno-alert-clear[hidden]{display:none!important}
#zuno-product-alert-panel .zuno-alert-close{flex-shrink:0}

/* Customer directory: understated, readable total and search result count. */
#view-customers .zuno-customer-count-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 14px;border-bottom:1px solid #dce7ea;background:#f8fbfc;color:#536475;font-size:.76rem;font-weight:650;flex-shrink:0}
#view-customers .zuno-customer-count-bar strong{display:inline-flex;align-items:center;justify-content:center;min-width:28px;padding:3px 7px;margin-left:5px;border-radius:8px;background:#e0f5f0;color:#127969;font-weight:800}
#view-customers .zuno-customer-count-bar [hidden]{display:none}
.dark #view-customers .zuno-customer-count-bar{background:#16232e;border-color:#2b414c;color:#b9c9d1}
.dark #view-customers .zuno-customer-count-bar strong{background:#17463e;color:#88ecd2}


#view-users > header .zuno-users-header-actions .zuno-alert-bell{order:0;}
#view-users > header .zuno-users-header-actions #users-header-invite-btn{order:1;}
@media(max-width:430px){#view-users > header .zuno-users-header-actions{gap:6px}#view-users > header h1{font-size:1.05rem}#view-users > header .zuno-users-header-actions .zuno-alert-bell{order:0}}


/* Checkout redesign: photo-forward product cards + persistent "Current order" panel.
   Scoped to #view-checkout (and the floating line menu); layout logic lives in JS. */
#view-checkout, #view-cart, .zco-line-menu {
    --zco-surface:#ffffff; --zco-surface-2:#f6f9fb; --zco-border:#e3eaf0; --zco-border-strong:#d3dde5;
    --zco-text:#16212e; --zco-muted:#66768a; --zco-accent:#0e9f96; --zco-accent-soft:rgba(16,179,160,.10);
    --zco-danger:#e0414b; --zco-danger-soft:rgba(224,65,75,.09); --zco-ok:#16a34a; --zco-ok-soft:rgba(22,163,74,.09);
    --zco-shadow:0 1px 2px rgba(15,23,42,.05),0 6px 18px rgba(15,23,42,.06);
    --zco-tab-h:calc(60px + env(safe-area-inset-bottom,0px));
}
.dark #view-checkout, .dark #view-cart, .dark .zco-line-menu {
    --zco-surface:#121e2a; --zco-surface-2:#0e1822; --zco-border:#223242; --zco-border-strong:#2d4052;
    --zco-text:#eef4f8; --zco-muted:#8fa1b3; --zco-accent:#2dd4bf; --zco-accent-soft:rgba(45,212,191,.12);
    --zco-danger:#ff7a82; --zco-danger-soft:rgba(255,122,130,.12); --zco-ok:#4ade80; --zco-ok-soft:rgba(74,222,128,.10);
    --zco-shadow:0 1px 2px rgba(0,0,0,.3),0 8px 22px rgba(0,0,0,.25);
}

/* ---------- Search + category pills ---------- */
#view-checkout .checkout-discovery-search {
    height:48px; border-radius:14px; background:var(--zco-surface) !important;
    border:1px solid var(--zco-border) !important; box-shadow:var(--zco-shadow); padding:0 .5rem 0 .85rem;
}
#view-checkout .checkout-discovery-search > svg { color:var(--zco-muted); }
#view-checkout .checkout-discovery-search > button { border:0 !important; color:var(--zco-text) !important; background:transparent; }
#view-checkout .checkout-discovery-search > button:hover { background:var(--zco-accent-soft); color:var(--zco-accent) !important; }
#view-checkout #category-tabs { background:transparent !important; padding:.35rem .9rem .6rem !important; }
#view-checkout #category-tabs .category-tab {
    min-height:38px !important; padding:.45rem 1rem !important; font-size:.84rem !important; font-weight:600 !important;
    border-radius:999px !important; background:var(--zco-surface) !important; color:var(--zco-text) !important;
    border:1px solid var(--zco-border) !important; box-shadow:none !important; margin-right:.45rem;
}
#view-checkout #category-tabs .category-tab:hover { border-color:var(--zco-accent) !important; }
#view-checkout #category-tabs .category-tab.active {
    background:linear-gradient(135deg,#12b5a3,#0b8c86) !important; color:#fff !important; border-color:transparent !important;
    box-shadow:0 6px 16px rgba(16,179,160,.28) !important;
}

/* ---------- Product cards ---------- */
#view-checkout #product-grid { padding:.35rem .9rem 1rem; }
#view-checkout #product-grid > .grid { gap:10px !important; }
#view-checkout .zco-card {
    position:relative; display:flex; flex-direction:column; overflow:hidden; cursor:pointer; text-align:left;
    background:var(--zco-surface); border:1px solid var(--zco-border); border-radius:13px; box-shadow:var(--zco-shadow);
    transition:transform .14s ease, box-shadow .14s ease, border-color .14s ease; -webkit-tap-highlight-color:transparent; min-width:0;
}
#view-checkout .zco-card:hover { transform:translateY(-2px); border-color:rgba(16,179,160,.45); box-shadow:0 10px 26px rgba(15,23,42,.12); }
#view-checkout .zco-card:active { transform:scale(.97); }
#view-checkout .zco-card:focus-visible { outline:2px solid var(--zco-accent); outline-offset:2px; }
#view-checkout .zco-card.is-out { cursor:not-allowed; opacity:.55; }
#view-checkout .zco-card.is-out:hover { transform:none; }
#view-checkout .zco-card-media { position:relative; aspect-ratio:4 / 3; background:var(--zco-surface-2); overflow:hidden; }
#view-checkout .zco-card-media img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .25s ease; }
#view-checkout .zco-card:hover .zco-card-media img { transform:scale(1.04); }
#view-checkout .zco-card-hot { position:absolute !important; top:8px; left:8px; margin:0 !important; box-shadow:0 2px 8px rgba(0,0,0,.18); }
#view-checkout .zco-card-flag {
    position:absolute; left:8px; bottom:8px; padding:.2rem .5rem; border-radius:999px; font-size:.68rem; font-weight:700;
    color:#fff; background:rgba(220,38,38,.9);
}
#view-checkout .zco-card-body { padding:.45rem .6rem .55rem; display:grid; gap:.1rem; min-width:0; }
#view-checkout .zco-card-body h3 {
    margin:0; font-size:.8rem; font-weight:600; line-height:1.25; color:var(--zco-text);
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
#view-checkout .zco-card-meta { display:flex; align-items:baseline; justify-content:space-between; gap:.4rem; min-width:0; }
#view-checkout .zco-card-price { margin:0; font-size:.78rem; font-weight:600; color:var(--zco-muted); white-space:nowrap; }
#view-checkout .zco-card-stock { font-size:.68rem; font-weight:600; color:var(--zco-muted); opacity:.8; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#view-checkout .zco-card-stock.is-low { color:#d97706; opacity:1; }
#view-checkout #product-grid > .grid[data-mobile-columns="4"] .zco-card-body { padding:.4rem .45rem .5rem; }
#view-checkout #product-grid > .grid[data-mobile-columns="4"] .zco-card-body h3,
#view-checkout #product-grid > .grid[data-mobile-columns="4"] .zco-card-price { font-size:.72rem; }
#view-checkout #product-grid > .grid[data-mobile-columns="4"] .zco-card-stock { display:none; }
#view-checkout #product-grid > .grid[data-mobile-columns="3"] .zco-card-body h3 { font-size:.78rem; }

/* ---------- Current order panel ---------- */
#view-checkout .zco-panel {
    display:none; flex-direction:column; gap:0; padding:0 !important; color:var(--zco-text);
    background:var(--zco-surface) !important; border-left:1px solid var(--zco-border) !important; box-shadow:none !important;
}
.zco-panel button, .zco-line-menu button { font-family:inherit; line-height:inherit; }
.zco-panel svg { flex-shrink:0; }
.zco-head { display:flex; align-items:center; gap:.65rem; padding:.95rem 1.15rem; border-bottom:1px solid var(--zco-border); flex-shrink:0; }
.zco-head-icon { width:19px; height:19px; color:var(--zco-text); }
.zco-title { flex:1; min-width:0; margin:0; font-size:.95rem; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.zco-title span { font-weight:500; color:var(--zco-muted); }
.zco-sheet-close { display:none; width:36px; height:36px; margin-left:-.35rem; border-radius:10px; place-items:center; color:var(--zco-text); }
.zco-sheet-close svg { width:22px; height:22px; }
.zco-more-wrap { position:relative; flex-shrink:0; }
.zco-more-btn {
    display:inline-flex; align-items:center; gap:.35rem; height:32px; padding:0 .65rem; border-radius:9px;
    background:var(--zco-surface-2); border:1px solid var(--zco-border); font-size:.78rem; font-weight:600; color:var(--zco-text);
}
.zco-more-btn svg { width:16px; height:16px; }
.zco-more-btn:hover, .zco-more-btn[aria-expanded="true"] { border-color:var(--zco-accent); }
.zco-menu {
    position:absolute; right:0; top:calc(100% + 6px); z-index:30; min-width:190px; padding:6px; display:grid; gap:2px;
    background:var(--zco-surface); border:1px solid var(--zco-border); border-radius:12px; box-shadow:0 14px 36px rgba(15,23,42,.18);
}
.zco-menu[hidden] { display:none !important; }
.zco-menu button {
    display:flex; align-items:center; gap:.6rem; width:100%; padding:.55rem .65rem; border-radius:8px;
    font-size:.86rem; font-weight:500; color:var(--zco-text); text-align:left; white-space:nowrap; background:transparent;
}
.zco-menu button[hidden] { display:none; }
.zco-menu button svg { width:18px; height:18px; color:var(--zco-muted); }
.zco-menu button:hover { background:var(--zco-surface-2); }
.zco-menu .zco-menu-danger { color:var(--zco-danger); }
.zco-menu .zco-menu-danger svg { color:var(--zco-danger); }
.zco-menu .zco-menu-danger:hover { background:var(--zco-danger-soft); }
.zco-line-menu { position:fixed; top:0; left:0; right:auto; z-index:60; color:var(--zco-text); font-family:inherit; }

.zco-scroll { flex:1; min-height:0; overflow-y:auto; padding:.85rem 1.15rem .6rem; display:flex; flex-direction:column; gap:.5rem; }
.zco-customer {
    display:flex; align-items:center; gap:.45rem; padding:.35rem .4rem .35rem .55rem;
    background:var(--zco-surface-2); border:1px solid var(--zco-border); border-radius:10px;
}
.zco-customer-icon { width:26px; height:26px; display:grid; place-items:center; color:var(--zco-text); }
.zco-customer-icon svg { width:18px; height:18px; }
.zco-customer-main { flex:1; min-width:0; display:grid; text-align:left; line-height:1.25; background:transparent; }
.zco-customer-main small { font-size:.66rem; color:var(--zco-muted); }
.zco-customer-main strong { font-size:.82rem; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.zco-customer-main .zco-muted { color:var(--zco-muted); font-weight:500; }
.zco-customer-remove, .zco-customer-search { width:28px; height:28px; display:grid; place-items:center; border-radius:8px; background:transparent; }
.zco-customer-remove { color:var(--zco-muted); }
.zco-customer-remove svg { width:15px; height:15px; }
.zco-customer-remove:hover { color:var(--zco-danger); background:var(--zco-danger-soft); }
.zco-customer-search { color:var(--zco-accent); }
.zco-customer-search svg { width:17px; height:17px; }
.zco-customer-search:hover { background:var(--zco-accent-soft); }
.cart-seat-rows { display:grid; gap:.5rem; color:var(--zco-text); }
@media (min-width: 640px) { .cart-seat-rows { grid-template-columns:1fr 1fr; } }
.cart-seat-rows .zco-customer { padding:.5rem .55rem .5rem .65rem; }
.cart-seat-rows .zco-customer-main strong { font-size:.9rem; }

.zco-items { display:flex; flex-direction:column; overflow:visible !important; flex:none !important; }
.zco-line { display:flex; align-items:center; gap:.6rem; padding:.5rem 0; border-bottom:1px solid var(--zco-border); }
.zco-line:last-child { border-bottom:0; }
.zco-thumb { width:40px; height:40px; flex:0 0 40px; border-radius:9px; object-fit:cover; background:var(--zco-surface-2); border:1px solid var(--zco-border); }
.zco-thumb--custom { display:grid; place-items:center; color:var(--zco-accent); background:var(--zco-accent-soft); }
.zco-thumb--custom svg { width:20px; height:20px; }
.zco-line-body { flex:1; min-width:0; display:grid; gap:.2rem; }
.zco-line-top { display:flex; align-items:center; gap:.3rem; min-width:0; }
.zco-line-name { flex:1; min-width:0; margin:0; font-size:.84rem; font-weight:600; line-height:1.25; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.zco-line-bottom { display:flex; align-items:center; gap:.5rem; min-width:0; }
.zco-line-unit { flex:1; min-width:0; display:flex; align-items:center; gap:.3rem; font-size:.76rem; color:var(--zco-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-variant-numeric:tabular-nums; }
.zco-line-discount { font-style:normal; font-size:.64rem; font-weight:700; color:var(--zco-accent); background:var(--zco-accent-soft); padding:.03rem .32rem; border-radius:999px; flex-shrink:0; }
.zco-stepper { flex-shrink:0; display:inline-flex; align-items:center; gap:0; padding:1px; border:1px solid var(--zco-border); border-radius:8px; background:var(--zco-surface-2); }
.zco-stepper button { width:24px; height:24px; display:grid; place-items:center; border-radius:6px; color:var(--zco-text); background:transparent; }
.zco-stepper button svg { width:11px; height:11px; }
.zco-stepper button:hover { background:var(--zco-surface); color:var(--zco-accent); }
.zco-stepper span { min-width:20px; text-align:center; font-size:.8rem; font-weight:600; font-variant-numeric:tabular-nums; }
.zco-line-total { flex-shrink:0; min-width:4.6rem; font-size:.84rem; font-weight:700; text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; display:grid; line-height:1.15; }
.zco-line-total s { font-size:.66rem; font-weight:500; color:var(--zco-muted); }
.zco-kebab { flex-shrink:0; width:24px; height:24px; margin-right:-4px; display:grid; place-items:center; border-radius:6px; color:var(--zco-muted); background:transparent; }
.zco-kebab svg { width:16px; height:16px; }
.zco-line-note{display:flex;align-items:flex-start;gap:5px;margin-top:3px;max-width:100%;padding:2px 6px;border-radius:6px;background:#fef3c7;color:#92400e;font-size:12px;font-weight:600;text-align:left;line-height:1.25}.zco-line-note svg{width:13px;height:13px;flex:none;margin-top:1px}.zco-line-note span{min-width:0;overflow-wrap:anywhere}
.dark .zco-line-note{background:#451a03;color:#fcd34d}
.kds-inote{display:block;font-size:.8em;font-weight:700;color:#b45309}.kds-itemnote{background:#fef3c7;border-radius:6px;padding:4px 6px}.kds-itemnote b{color:#b45309}
.zco-kebab:hover { background:var(--zco-surface-2); color:var(--zco-text); }
.zco-empty { display:grid; justify-items:center; gap:.25rem; text-align:center; padding:1.1rem .5rem; color:var(--zco-muted); font-size:.82rem; }
.zco-empty svg { width:32px; height:32px; opacity:.55; margin-bottom:.2rem; }
.zco-empty strong { color:var(--zco-text); font-size:.92rem; }

.zco-quick { display:flex; justify-content:space-between; gap:.6rem; }
.zco-quick-btn {
    font-weight:600 !important; display:inline-flex; align-items:center; gap:.4rem; height:34px; padding:0 .75rem; border-radius:9px;
    border:1px solid var(--zco-border-strong); background:var(--zco-surface); font-size:.78rem; font-weight:600; color:var(--zco-text);
}
.zco-quick-btn:first-child { color:var(--zco-accent); }
.zco-quick-btn svg { width:16px; height:16px; }
.zco-quick-btn .zco-plus { color:var(--zco-accent); }
.zco-quick-btn:hover { border-color:var(--zco-accent); background:var(--zco-accent-soft); }
.zco-note { display:grid; gap:.1rem; padding:.55rem .7rem; border-radius:10px; background:var(--zco-surface-2); border:1px dashed var(--zco-border-strong); font-size:.8rem; }
.zco-note[hidden] { display:none; }
.zco-note strong { font-size:.7rem; text-transform:uppercase; letter-spacing:.05em; color:var(--zco-muted); }
.zco-note span { white-space:pre-wrap; word-break:break-word; }

.zco-foot { flex-shrink:0; padding:.55rem .85rem calc(.65rem + env(safe-area-inset-bottom,0px)); border-top:1px solid var(--zco-border); display:grid; gap:.45rem; background:var(--zco-surface); }
.zco-totals { display:grid; gap:.3rem; padding:.5rem .65rem; border-radius:10px; background:var(--zco-surface-2); border:1px solid var(--zco-border); }
.zco-totals:empty { display:none; }
.zco-row { display:flex; justify-content:space-between; align-items:center; gap:.5rem; font-size:.78rem; color:var(--zco-muted); }
.zco-row > span:last-child { color:var(--zco-text); font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap; }
.zco-row > span:first-child { display:flex; align-items:center; gap:.5rem; min-width:0; }
.zco-row--discount > span:first-child { color:var(--zco-accent); font-weight:600; }
.zco-discount-tag { display:inline-flex; align-items:center; gap:.25rem; color:var(--zco-accent); font-weight:600; font-size:.78rem; padding:0 .2rem; border-radius:6px; background:transparent; }
.zco-discount-tag svg { width:15px; height:15px; }
.zco-discount-tag:hover { background:var(--zco-accent-soft); }
.zco-authorised { display:flex; align-items:center; gap:.45rem; padding:.35rem .5rem; border-radius:8px; background:var(--zco-ok-soft); color:var(--zco-ok); font-size:.74rem; font-weight:600; }
.zco-authorised-icon { display:grid; place-items:center; }
.zco-authorised-icon svg { width:15px; height:15px; }
.zco-authorised em { margin-left:auto; font-style:normal; font-weight:500; color:var(--zco-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.zco-grand { display:flex; justify-content:space-between; align-items:baseline; padding:0 .2rem; }
.zco-grand span { font-size:.95rem; font-weight:700; }
.zco-grand strong { font-size:1.3rem; font-weight:800; letter-spacing:-.01em; font-variant-numeric:tabular-nums; white-space:nowrap; }
.zco-actions { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:.6rem; }
.zco-save-btn, .zco-pay-btn { min-height:48px; border-radius:11px; display:flex; align-items:center; gap:.45rem; padding:0 .7rem; transition:transform .12s ease, filter .12s ease, opacity .12s; }
.zco-save-btn { border:1px solid var(--zco-border-strong); background:var(--zco-surface); color:var(--zco-accent); text-align:left; }
.zco-save-btn svg { width:18px; height:18px; }
.zco-save-btn span { display:grid; line-height:1.2; min-width:0; }
.zco-save-btn b { font-size:.84rem; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.zco-save-btn small { display:none;font-size:.64rem; color:var(--zco-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.zco-save-btn:hover:not(:disabled) { border-color:var(--zco-accent); background:var(--zco-accent-soft); }
.zco-pay-btn { justify-content:center; gap:.45rem; white-space:nowrap; color:#fff; font-size:.86rem; font-weight:700; background:linear-gradient(135deg,#12b5a3,#0a7f86); box-shadow:0 8px 20px rgba(16,179,160,.3); }
.zco-pay-btn svg { width:18px; height:18px; }
.zco-pay-btn:hover:not(:disabled) { filter:brightness(1.06); }
.zco-save-btn:active:not(:disabled), .zco-pay-btn:active:not(:disabled) { transform:scale(.98); }
#view-checkout .zco-panel .zco-save-btn:disabled, #view-checkout .zco-panel .zco-pay-btn:disabled { opacity:.45 !important; cursor:not-allowed; box-shadow:none !important; filter:saturate(.6); }
.zco-panel.is-empty .zco-totals { display:none; }

/* ---------- Mobile tab bar + footer ---------- */
.zco-tabbar {
    display:grid; grid-template-columns:repeat(3,1fr); flex-shrink:0; height:var(--zco-tab-h); padding-bottom:env(safe-area-inset-bottom,0px);
    background:var(--zco-surface); border-top:1px solid var(--zco-border); position:relative; z-index:36;
}
.zco-tab { display:grid; justify-items:center; align-content:center; gap:3px; font-size:.7rem; font-weight:600; color:var(--zco-muted); background:transparent; }
.zco-tab svg { width:22px; height:22px; }
.zco-tab.is-active { color:var(--zco-accent); }
#view-checkout #checkout-footer { background:var(--zco-surface) !important; border-top:1px solid var(--zco-border) !important; }
#view-checkout #go-to-cart-btn { border-radius:14px !important; background:linear-gradient(135deg,#12b5a3,#0a7f86) !important; box-shadow:0 8px 20px rgba(16,179,160,.28); padding-top:.85rem !important; padding-bottom:.85rem !important; font-size:1rem !important; }

@media (max-width:1023.98px) {
    #view-checkout.zco-sheet-open .zco-panel {
        display:flex !important; position:fixed !important; inset:0 0 var(--zco-tab-h) 0 !important; width:auto !important;
        z-index:35 !important; border-left:0 !important; padding-top:env(safe-area-inset-top,0px) !important;
        animation:zco-sheet-in .2s ease-out;
    }
    #view-checkout.zco-sheet-open .zco-sheet-close { display:grid; }
    #view-checkout.zco-sheet-open #checkout-footer,
    #view-checkout.zco-sheet-open > header { visibility:hidden; }
    .zco-head { padding:.7rem .85rem; }
    .zco-scroll { padding:.75rem .85rem .5rem; }
    .zco-foot { padding:.65rem .85rem .75rem; }
}
@media (max-width:380px) {
    .zco-save-btn small { display:none; }
    .zco-line-total { min-width:0; }
}
@keyframes zco-sheet-in { from { transform:translateY(14px); opacity:.6; } to { transform:none; opacity:1; } }

/* ---------- Desktop: persistent side panel ---------- */
@media (min-width:1024px) {
    #view-checkout.zco-layout { position:relative; max-width:none !important; --zco-w:clamp(340px,38%,400px); }
    #view-checkout.zco-layout #category-tabs,
    #view-checkout.zco-layout #product-grid,
    #view-checkout.zco-layout .checkout-discovery,
    #view-checkout.zco-layout #checkout-editing-banner,
    #view-checkout.zco-layout #checkout-search-row { margin-right:var(--zco-w) !important; }
    #view-checkout.zco-layout .zco-panel {
        display:flex !important; position:absolute !important; top:calc(4rem + 1px) !important; right:0 !important; bottom:0 !important;
        width:var(--zco-w) !important; z-index:5 !important;
    }
    #view-checkout.zco-layout #checkout-footer, #view-checkout .zco-tabbar { display:none !important; }
    #view-checkout.zco-layout #product-grid > .grid[data-mobile-columns="auto"] { grid-template-columns:repeat(auto-fill,minmax(9.5rem,1fr)) !important; }
}
@media (min-width:1280px) {
    #view-checkout.zco-layout { --zco-w:clamp(360px,32%,420px); }
}
@media (min-width:1600px) {
    #view-checkout.zco-layout #product-grid > .grid[data-mobile-columns="auto"] { grid-template-columns:repeat(auto-fill,minmax(10.5rem,1fr)) !important; }
}

/* The app's global touch-target rules (min-height 44-48px on buttons) would inflate these compact controls. */
#view-checkout .zco-panel .zco-stepper button, #view-checkout .zco-panel .zco-kebab,
#view-checkout .zco-panel .zco-customer-remove, #view-checkout .zco-panel .zco-customer-search,
#view-checkout .zco-panel .zco-discount-tag, #view-checkout .zco-panel .zco-sheet-close {
    min-height:0 !important; min-width:0 !important; padding:0 !important;
}
#view-checkout .zco-panel .zco-more-btn, #view-checkout .zco-panel .zco-quick-btn,
#view-checkout .zco-panel .zco-customer-main, .zco-menu button { min-height:0 !important; }
#view-checkout .zco-panel .zco-customer-main { padding:0 !important; }
@media print { .zco-tabbar, .zco-line-menu { display:none !important; } }


/* Invoice fit corrections (presentation only). Applies to the on-screen invoice and to the
   PDF / Print / Share export copy. */
/* Grand total: the amount column sizes to the number, so it stays on one line. */
.invoice-grand-total-banner { grid-template-columns: minmax(0, 1fr) auto !important; }
.invoice-grand-total-label { min-width: 0; }
.invoice-grand-total-amount--long { font-size: 1.25rem !important; }
/* Order number: full number on one line (no break at the hyphen), slightly smaller. */
.invoice-doc-number { white-space: nowrap !important; font-size: 1.35rem; }
.invoice-doc-number-block { min-width: max-content !important; }
@media (max-width: 520px) {
  #view-invoice > #invoice-view-content .invoice-doc-number { font-size: .92rem !important; }
  #view-invoice > #invoice-view-content .invoice-doc-number-block { min-width: max-content !important; }
  #view-invoice > #invoice-view-content .invoice-grand-total-amount--long { font-size: 1.1rem !important; }
}


/* Invoice note: the invoice card is always white, so keep the note text dark in both themes
   (it was light grey in dark mode). Also applies to the PDF / Print / Share export copy. */
.invoice-doc-note,
.dark .invoice-doc-note {
  background: rgba(var(--accent-rgb, 16, 179, 160), .06);
  border-color: rgba(var(--accent-rgb, 16, 179, 160), .25);
}
.invoice-doc-note-heading,
.dark .invoice-doc-note-heading { color: #64748b; }
.invoice-doc-note p,
.dark .invoice-doc-note p { color: #1e293b; }

/* Forgot password panels (inside the sign-in box). */
.zuno-reset-sub { font-size: .85rem; line-height: 1.45; color: #475569; }
.dark .zuno-reset-sub { color: #cbd5e1; }
.zuno-reset-address { color: #0f172a; word-break: break-all; }
.dark .zuno-reset-address { color: #f8fafc; }
.zuno-reset-icon { width: 56px; height: 56px; margin: 0 auto; border-radius: 999px; display: grid; place-items: center;
  color: #0d9488; background: rgba(20, 184, 166, .12); }
.dark .zuno-reset-icon { color: #2dd4bf; background: rgba(45, 212, 191, .14); }
.zuno-reset-icon svg { width: 26px; height: 26px; }
.zuno-reset-rules { text-align: left; font-size: .78rem; line-height: 1.5; color: #334155; padding: .7rem .85rem;
  border-radius: .8rem; background: #f8fafc; border: 1px solid #e2e8f0; }
.dark .zuno-reset-rules { color: #e2e8f0; background: rgba(255, 255, 255, .04); border-color: rgba(148, 163, 184, .28); }
.zuno-reset-rules-title { font-weight: 700; margin-bottom: .2rem; }
.zuno-reset-rules ul { list-style: disc; padding-left: 1.1rem; margin: 0; }
.zuno-reset-example { margin-top: .35rem; }
.zuno-reset-example span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; }
.zuno-reset-hint { font-size: .72rem; line-height: 1.4; color: #64748b; text-align: center; }
.dark .zuno-reset-hint { color: #94a3b8; }


/* ── Analytics: one-screen card dashboard ──────────────────────────────────────
   Desktop fits on one screen: header → 6 key numbers → a 2-row card grid.
   Phones/tablets switch sections with tabs, always within the screen. */
#analytics-content:has(> .adash) { padding: 14px !important; }
#analytics-content .adash { --ad-card:#ffffff; --ad-border:#e6ebf2; --ad-text:#0f172a; --ad-muted:#64748b; --ad-soft:#f3f6fa; --ad-shadow:0 4px 18px rgba(15,23,42,.045);
    display:flex; flex-direction:column; gap:12px; color:var(--ad-text); }
.dark #analytics-content .adash { --ad-card:#0d1b2a; --ad-border:rgba(148,163,184,.13); --ad-text:#f1f5f9; --ad-muted:#94a3b8; --ad-soft:rgba(148,163,184,.08); --ad-shadow:0 10px 30px rgba(0,0,0,.25); }
#analytics-content .adash .hidden, #analytics-content .adash [hidden] { display:none !important; }
#analytics-content .adash-tabs { display:none; }
#analytics-content .adash-card { background:var(--ad-card); border:1px solid var(--ad-border); border-radius:16px; box-shadow:var(--ad-shadow); padding:14px 16px; min-width:0; min-height:0; display:flex; flex-direction:column; }

/* Header */
#analytics-content .adash-bar-top { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
#analytics-content .adash-title p { margin:0; font-size:1.05rem; font-weight:800; letter-spacing:-.01em; }
#analytics-content .adash-range { display:inline-flex; align-items:center; gap:6px; margin-top:3px; font-size:.75rem; color:var(--ad-muted); }
#analytics-content .adash-range svg { width:13px; height:13px; }
#analytics-content .adash-controls { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
#analytics-content .adash-quick { display:flex; gap:4px; padding:4px; border-radius:12px; background:var(--ad-card); border:1px solid var(--ad-border); }
#analytics-content .adash-quick button { padding:6px 11px; border:0; border-radius:8px; background:transparent; color:var(--ad-muted); font-size:.76rem; font-weight:700; cursor:pointer; white-space:nowrap; }
#analytics-content .adash-quick button:hover { color:var(--ad-text); }
#analytics-content .adash-quick button.is-active { background:var(--accent,#0372c0); color:#fff; }

/* Key numbers */
#analytics-content .adash-kpis { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)) !important; gap:12px; }
#analytics-content .adash-kpi { padding:13px 14px; gap:6px; }
#analytics-content .adash-kpi--teal { --kpi:var(--accent,#0372c0); }
#analytics-content .adash-kpi--rose { --kpi:#f43f5e; }
#analytics-content .adash-kpi--green { --kpi:#10b981; }
#analytics-content .adash-kpi--blue { --kpi:#3b82f6; }
#analytics-content .adash-kpi--amber { --kpi:#f59e0b; }
#analytics-content .adash-kpi--violet { --kpi:#8b5cf6; }
#analytics-content .adash-kpi-top { display:flex; align-items:center; gap:8px; min-width:0; }
#analytics-content .adash-kpi-icon { width:26px; height:26px; flex:none; border-radius:8px; display:grid; place-items:center; color:var(--kpi); background:color-mix(in srgb, var(--kpi) 14%, transparent); }
#analytics-content .adash-kpi-icon svg { width:15px; height:15px; }
#analytics-content .adash-kpi-label { font-size:.78rem; font-weight:600; color:var(--ad-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#analytics-content .adash-kpi-value { margin:2px 0 0; font-size:1.38rem; font-weight:800; letter-spacing:-.02em; line-height:1.15; font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#analytics-content .adash-kpi-foot { min-width:0; }
#analytics-content .adash-delta { display:block; font-size:.72rem; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-variant-numeric:tabular-nums; }
#analytics-content .adash-delta em { font-style:normal; font-weight:500; opacity:.85; }
#analytics-content .adash-delta--good { color:#059669; }
#analytics-content .adash-delta--bad { color:#e11d48; }
#analytics-content .adash-delta--flat { color:var(--ad-muted); font-weight:500; }
.dark #analytics-content .adash-delta--good { color:#34d399; }
.dark #analytics-content .adash-delta--bad { color:#fb7185; }

/* Card grid */
#analytics-content .adash-grid { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); grid-template-rows:minmax(262px,1.05fr) minmax(250px,1fr); gap:12px; flex:1 1 auto; min-height:0; }
#analytics-content .adash-trend { grid-column:1 / 6; grid-row:1; }
#analytics-content .adash-plcard { grid-column:6 / 9; grid-row:1; }
#analytics-content .adash-pay { grid-column:9 / 13; grid-row:1; }
#analytics-content .adash-cats { grid-column:1 / 5; grid-row:2; }
#analytics-content .adash-products { grid-column:5 / 8; grid-row:2; }
#analytics-content .adash-recent { grid-column:8 / 13; grid-row:2; }
#analytics-content .adash-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:8px; }
#analytics-content .adash-h { margin:0; font-size:.92rem; font-weight:700; }
#analytics-content .adash-sub { margin:2px 0 0; font-size:.72rem; color:var(--ad-muted); }
#analytics-content .adash-chart { position:relative; flex:1 1 auto; min-height:140px; }
#analytics-content .adash-chart canvas { position:absolute; inset:0; width:100% !important; height:100% !important; }
#analytics-content .adash-empty { margin:auto; padding:18px 0; text-align:center; font-size:.8rem; color:var(--ad-muted); }
#analytics-content .adash-pos { color:#059669; }
#analytics-content .adash-neg { color:#e11d48; }
.dark #analytics-content .adash-pos { color:#34d399; }
.dark #analytics-content .adash-neg { color:#fb7185; }
#analytics-content .adash-seg { display:flex; flex:none; gap:2px; padding:3px; border-radius:9px; background:var(--ad-soft); border:1px solid var(--ad-border); }
#analytics-content .adash-seg button { padding:4px 9px; border:0; border-radius:6px; background:transparent; color:var(--ad-muted); font-size:.7rem; font-weight:700; cursor:pointer; white-space:nowrap; }
#analytics-content .adash-seg button.is-active { background:var(--ad-card); color:var(--ad-text); box-shadow:0 1px 3px rgba(15,23,42,.12); }
#analytics-content .adash-link { flex:none; border:0; background:none; padding:2px 0; color:var(--accent,#0372c0); font-size:.76rem; font-weight:700; cursor:pointer; }
.dark #analytics-content .adash-link { color:#38bdf8; }

/* Profit & loss */
#analytics-content .adash-pl { display:grid; gap:2px; }
#analytics-content .adash-pl-row { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:6px 0; font-size:.84rem; }
#analytics-content .adash-pl-row > span { display:inline-flex; align-items:center; gap:9px; min-width:0; color:var(--ad-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#analytics-content .adash-pl-row > span i { width:9px; height:9px; flex:none; border-radius:50%; }
#analytics-content .adash-pl-row > strong { font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap; }
#analytics-content .adash-net { margin-top:auto; padding-top:12px; border-top:1px solid var(--ad-border); display:flex; justify-content:space-between; align-items:flex-end; gap:10px; }
#analytics-content .adash-net > span { font-size:.95rem; font-weight:800; }
#analytics-content .adash-net > div { text-align:right; }
#analytics-content .adash-net strong { display:block; font-size:1.45rem; font-weight:800; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
#analytics-content .adash-net em { font-style:normal; font-size:.74rem; font-weight:600; }

/* Expense categories */
#analytics-content .adash-cats-body { flex:1 1 auto; min-height:0; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:center; gap:14px; }
#analytics-content .adash-donut { position:relative; height:100%; min-height:150px; }
#analytics-content .adash-donut canvas { position:absolute; inset:0; width:100% !important; height:100% !important; }
#analytics-content .adash-donut-centre { position:absolute; inset:0; display:grid; place-content:center; text-align:center; pointer-events:none; }
#analytics-content .adash-donut-centre b { font-size:.95rem; font-weight:800; font-variant-numeric:tabular-nums; }
#analytics-content .adash-donut-centre span { font-size:.7rem; color:var(--ad-muted); }
#analytics-content .adash-reset { display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border-radius:10px; border:1px solid var(--ad-border); background:var(--ad-card); color:var(--ad-text); font-size:.76rem; font-weight:700; cursor:pointer; white-space:nowrap; }
#analytics-content .adash-reset svg { width:14px; height:14px; }
#analytics-content .adash-reset:hover:not(:disabled) { border-color:var(--accent,#0372c0); color:var(--accent,#0372c0); }
#analytics-content .adash-reset:disabled { opacity:.45; cursor:default; }
#analytics-content .adash-pay-body { flex:1 1 auto; min-height:0; display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); align-items:center; gap:14px; }
#analytics-content .adash-pay-body .adash-donut { min-height:110px; }
#analytics-content .adash-legend--pay { gap:7px; }
#analytics-content .adash-legend--pay li { font-size:.76rem; }
#analytics-content .adash-legend-more { color:var(--ad-muted); }
#analytics-content .adash-legend-more i { background:var(--ad-border); }
#analytics-content .adash-table th { white-space:nowrap; }
/* P&L: compact rows so Net profit is never cut off; scroll inside the card as a last resort */
#analytics-content .adash-plcard { overflow-y:auto; scrollbar-width:thin; }
#analytics-content .adash-plcard .adash-pl-row { padding:4px 0; font-size:.82rem; }
#analytics-content .adash-plcard .adash-net { padding-top:9px; align-items:center; }
#analytics-content .adash-plcard .adash-net strong { font-size:1.25rem; line-height:1.15; }
#analytics-content .adash-legend { list-style:none; margin:0; padding:0; display:grid; gap:7px; }
#analytics-content .adash-legend li { display:flex; align-items:center; gap:8px; font-size:.78rem; min-width:0; }
#analytics-content .adash-legend i { width:9px; height:9px; flex:none; border-radius:50%; }
#analytics-content .adash-legend span { flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#analytics-content .adash-legend b { font-weight:700; font-variant-numeric:tabular-nums; }

/* Recent expenses */
#analytics-content .adash-table-wrap { flex:1 1 auto; min-height:0; overflow:auto; margin:0 -4px; }
#analytics-content .adash-table { width:100%; border-collapse:collapse; font-size:.8rem; }
#analytics-content .adash-table th { position:sticky; top:0; background:var(--ad-card); text-align:left; padding:6px 4px; font-size:.7rem; font-weight:600; color:var(--ad-muted); border-bottom:1px solid var(--ad-border); }
#analytics-content .adash-table td { padding:7px 4px; border-bottom:1px solid var(--ad-border); white-space:nowrap; }
#analytics-content .adash-table tr:last-child td { border-bottom:0; }
#analytics-content .adash-table td:first-child { display:flex; align-items:center; gap:9px; max-width:220px; }
#analytics-content .adash-exp-ic { width:24px; height:24px; flex:none; border-radius:50%; display:grid; place-items:center; font-size:.68rem; font-weight:800; color:hsl(var(--h) 70% 38%); background:hsl(var(--h) 85% 92%); }
.dark #analytics-content .adash-exp-ic { color:hsl(var(--h) 85% 72%); background:hsl(var(--h) 45% 20%); }
#analytics-content .adash-exp-name { overflow:hidden; text-overflow:ellipsis; font-weight:600; }
#analytics-content .adash-col-cat, #analytics-content .adash-col-date { color:var(--ad-muted); }
#analytics-content .adash-col-amt { text-align:right !important; font-weight:700; font-variant-numeric:tabular-nums; }

/* Table view fills the same space */
#analytics-content .adash-tablecard { flex:1 1 auto; overflow:auto; padding:0; }

/* Desktop: fit the window */
@media (min-width:821px) {
    #analytics-content .adash { height:100%; min-height:640px; }
}
/* Narrow desktop */
@media (max-width:1240px) and (min-width:821px) {
    #analytics-content .adash-kpis { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
    #analytics-content .adash-kpi { padding:10px 12px; gap:3px; }
    #analytics-content .adash-kpi-value { font-size:1.2rem; }
    #analytics-content .adash { min-height:760px; }
    #analytics-content .adash-trend { grid-column:1 / 9; }
    #analytics-content .adash-plcard { grid-column:9 / 13; }
    #analytics-content .adash-pay { display:none !important; }
    #analytics-content .adash-cats { grid-column:1 / 5; }
    #analytics-content .adash-products { grid-column:5 / 9; }
    #analytics-content .adash-recent { grid-column:9 / 13; }
    #analytics-content .adash-col-cat, #analytics-content .adash-col-date { display:none; }
    #analytics-content .adash-cats-body { grid-template-columns:1fr; grid-template-rows:minmax(0,1fr) auto; }
}
@media (max-width:1240px) and (min-width:821px) and (max-height:900px) { #analytics-content .adash-legend { display:none; } }

/* Phone & tablet: one section at a time, switched with tabs, within the screen */
@media (max-width:820px) {
    #analytics-content:has(> .adash) { padding:10px !important; overflow:hidden !important; }
    #analytics-content .adash { height:100%; min-height:0; gap:10px; }
    #analytics-content .adash-bar-top { gap:8px; }
    #analytics-content .adash-title { display:none; }
    #analytics-content .adash-controls { width:100%; }
    #analytics-content .adash-quick { flex:1 1 auto; overflow-x:auto; scrollbar-width:none; }
    #analytics-content .adash-quick button { flex:1 0 auto; padding:6px 8px; }
    #analytics-content .adash-tabs { display:flex; gap:4px; padding:4px; border-radius:12px; background:var(--ad-soft); overflow-x:auto; scrollbar-width:none; flex:none; }
    #analytics-content .adash-tabs::-webkit-scrollbar, #analytics-content .adash-quick::-webkit-scrollbar { display:none; }
    #analytics-content .adash-tabs button { flex:1 1 0; min-width:max-content; padding:8px 5px; border:0; border-radius:9px; background:transparent; color:var(--ad-muted); font-size:.72rem; font-weight:700; white-space:nowrap; cursor:pointer; }
    #analytics-content .adash-tabs button.is-active { background:var(--ad-card); color:var(--ad-text); box-shadow:0 1px 4px rgba(15,23,42,.1); }
    #analytics-content .adash--table .adash-tabs { display:none; }
    #analytics-content .adash:not(.adash--table) [data-tab-panel] { display:none !important; }
    #analytics-content .adash[data-tab="overview"]:not(.adash--table) [data-tab-panel="overview"],
    #analytics-content .adash[data-tab="trend"]:not(.adash--table) [data-tab-panel="trend"],
    #analytics-content .adash[data-tab="products"]:not(.adash--table) [data-tab-panel="products"],
    #analytics-content .adash[data-tab="payments"]:not(.adash--table) [data-tab-panel="payments"],
    #analytics-content .adash[data-tab="expenses"]:not(.adash--table) [data-tab-panel="expenses"],
    #analytics-content .adash[data-tab="pl"]:not(.adash--table) [data-tab-panel="pl"] { display:flex !important; }
    #analytics-content .adash[data-tab="overview"]:not(.adash--table) .adash-kpis { display:grid !important; }
    #analytics-content .adash[data-tab="overview"] .adash-grid { display:none !important; }
    #analytics-content .adash-kpis { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:10px; align-content:start; flex:1 1 auto; overflow:auto; }
    #analytics-content .adash-kpi { padding:12px; }
    #analytics-content .adash-kpi-value { font-size:1.2rem; }
    #analytics-content .adash-delta em { display:none; }
    #analytics-content .adash-grid { display:flex !important; flex-direction:column; gap:10px; flex:1 1 auto; min-height:0; grid-template-rows:none; }
    #analytics-content .adash-grid > .adash-card { flex:1 1 0; min-height:0; }
    #analytics-content .adash-recent { overflow:hidden; }
    #analytics-content .adash-chart { min-height:0; }
    #analytics-content .adash-col-cat { display:none; }
}
@media (max-width:380px) {
    #analytics-content .adash-kpi-value { font-size:1.05rem; }
    #analytics-content .adash-col-date { display:none; }
}

/* Compact analytics: tighter spacing so more fits on one screen */
#analytics-content:has(> .adash) { padding:10px !important; }
#analytics-content .adash-card { padding:10px 12px; border-radius:14px; }
#analytics-content .adash-bar-top { gap:8px; }
#analytics-content .adash-title p { font-size:.95rem; }
#analytics-content .adash-quick { padding:3px; }
#analytics-content .adash-quick button { padding:4px 9px; font-size:.72rem; }
#analytics-content .adash-kpis { gap:8px; }
#analytics-content .adash-kpi { padding:8px 10px; gap:3px; }
#analytics-content .adash-kpi-icon { width:22px; height:22px; border-radius:7px; }
#analytics-content .adash-kpi-icon svg { width:13px; height:13px; }
#analytics-content .adash-kpi-label { font-size:.72rem; }
#analytics-content .adash-kpi-value { margin:0; }
#analytics-content .adash-delta { font-size:.68rem; }
#analytics-content .adash-head { margin-bottom:4px; }
#analytics-content .adash-h { font-size:.85rem; }
@media (min-width:821px) {
    #analytics-content .adash-chart { min-height:110px; }
    #analytics-content .adash-kpi-value { font-size:1.12rem; }
    #analytics-content .adash { min-height:500px; gap:8px; }
    #analytics-content .adash-grid { grid-template-rows:minmax(200px,1.05fr) minmax(180px,1fr); gap:8px; }
}
@media (max-width:820px) {
    #analytics-content .adash-grid { gap:8px; }
    /* Phone: all five periods fit; Reset and Dashboard/Table share one row */
    #analytics-content .adash-controls { display:flex; flex-wrap:wrap; gap:6px; }
    #analytics-content .adash-quick { flex:1 1 100%; overflow:visible; }
    #analytics-content .adash-quick button { flex:1 1 auto; min-width:0; padding:6px 4px; font-size:.7rem; white-space:nowrap; }
    #analytics-content .adash-reset { flex:0 0 auto; }
    #analytics-content .analytics-view-toggle { flex:1 1 0; display:flex; }
    #analytics-content .analytics-view-toggle button { flex:1 1 0; }
    #analytics-content .adash-tabs { overflow-x:visible; gap:2px; padding:3px; }
    #analytics-content .adash-tabs button { flex:1 1 auto; min-width:0; padding:7px 2px; font-size:.66rem; }
    #analytics-content .adash-kpis { gap:8px; }
    #analytics-content .adash-kpi-value { font-size:1.15rem; }
    /* Overview: the tiles plus the main chart, so the screen is not half empty */
    #analytics-content .adash[data-tab="overview"]:not(.adash--table) .adash-grid { display:flex !important; }
    #analytics-content .adash[data-tab="overview"]:not(.adash--table) .adash-trend { display:flex !important; }
    #analytics-content .adash[data-tab="overview"]:not(.adash--table) .adash-kpis { flex:none; overflow:visible; }
    #analytics-content .adash[data-tab="overview"]:not(.adash--table) .adash-chart { min-height:120px; }
    .zorb { width: 42px; height: 42px; }
}



.zi-back { position:fixed; inset:0; z-index:90; background:rgba(2,6,23,.55); display:flex; align-items:flex-end; justify-content:center; backdrop-filter:blur(2px); }
.zi-back[hidden] { display:none; }
.zi-sheet { width:min(520px,100%); max-height:86vh; overflow-y:auto; background:#fff; color:#0f172a; border-radius:22px 22px 0 0; padding:8px 18px 22px; box-shadow:0 -12px 40px rgba(0,0,0,.35); animation:zi-up .26s cubic-bezier(.2,.8,.2,1); }
.dark .zi-sheet { background:#0d1b2a; color:#f1f5f9; }
@keyframes zi-up { from { transform:translateY(40px); opacity:.4; } to { transform:none; opacity:1; } }
.zi-grab { width:40px; height:4px; border-radius:4px; background:#cbd5e1; margin:4px auto 12px; }
.zi-head { display:flex; gap:10px; align-items:flex-start; justify-content:space-between; }
.zi-head h3 { margin:0; font-size:1.12rem; font-weight:800; line-height:1.25; }
.zi-x { flex:none; width:32px; height:32px; border:0; border-radius:50%; background:rgba(148,163,184,.18); color:inherit; font-size:18px; cursor:pointer; }
.zi-dot { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:8px; background:#64748b; }
.zi-good .zi-dot { background:#10b981; } .zi-bad .zi-dot { background:#ef4444; } .zi-warn .zi-dot { background:#f59e0b; }
.zi-why { margin:8px 0 14px; font-size:.88rem; line-height:1.5; color:#475569; }
.dark .zi-why { color:#94a3b8; }
.zi-rows { display:flex; flex-direction:column; gap:10px; }
.zi-row { display:grid; grid-template-columns:1fr auto; gap:3px 10px; font-size:.86rem; }
.zi-row b { font-variant-numeric:tabular-nums; }
.zi-bar { grid-column:1 / -1; height:6px; border-radius:6px; background:rgba(148,163,184,.2); overflow:hidden; }
.zi-bar i { display:block; height:100%; border-radius:6px; background:var(--accent,#0372c0); }
.zi-tip { margin:16px 0 0; padding:12px 14px; border-radius:12px; background:rgba(16,185,129,.1); font-size:.86rem; line-height:1.45; }
.zi-tip strong { display:block; font-size:.74rem; margin-bottom:2px; color:#059669; }
.zi-act { display:flex; gap:10px; margin-top:16px; }
.zi-act button { flex:1; min-height:44px; border:0; border-radius:12px; font-weight:700; font-size:.88rem; cursor:pointer; }
.zi-ai { background:#0f766e; color:#fff; } .zi-close { background:rgba(148,163,184,.18); color:inherit; }
@media (prefers-reduced-motion: reduce) { .zi-sheet { animation:none; } }

.zempty { max-width:420px; margin:28px auto; padding:30px 22px; text-align:center; border-radius:22px; border:1px solid #e6ebf2; background:#fff; box-shadow:0 8px 30px rgba(15,23,42,.06); }
.dark .zempty { background:#0d1b2a; border-color:rgba(148,163,184,.15); box-shadow:none; }
.zempty-ic { width:62px; height:62px; margin:0 auto 14px; border-radius:50%; display:grid; place-items:center; color:#0f766e; background:rgba(20,184,166,.12); }
.zempty h3 { margin:0; font-size:1.1rem; font-weight:800; }
.zempty p { margin:6px auto 0; max-width:300px; font-size:.86rem; line-height:1.45; color:#64748b; }
.zempty-chips { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:16px; }
.zempty-chip { padding:8px 14px; border:0; border-radius:999px; background:rgba(148,163,184,.16); color:inherit; font-size:.82rem; font-weight:700; cursor:pointer; }
.zempty-chip.is-now { background:rgba(148,163,184,.1); opacity:.6; }
.zempty-chip:hover { background:#14b8a6; color:#fff; }
.zempty-go { margin-top:14px; min-height:44px; padding:0 22px; border:0; border-radius:12px; background:#0f766e; color:#fff; font-weight:700; font-size:.88rem; cursor:pointer; }
/* Phone: one smooth scroll — summary first, then every chart, instead of hidden tabs */
#analytics-content .adash-hero { display:none; }
@media (max-width:820px) {
    #analytics-content:has(> .adash) { overflow-y:auto !important; overflow-x:hidden !important; padding:10px 10px 84px !important; }
    #analytics-content .adash { height:auto; min-height:0; }
    #analytics-content .adash-tabs { display:none !important; }
    #analytics-content .adash-bar-top { position:sticky; top:-10px; z-index:5; margin:-10px -10px 0; padding:8px 10px; background:var(--ad-soft); backdrop-filter:blur(6px); }
    .dark #analytics-content .adash-bar-top { background:#0b1220; }
    #analytics-content .adash:not(.adash--table) [data-tab-panel] { display:flex !important; }
    #analytics-content .adash:not(.adash--table) .adash-kpis { display:grid !important; flex:none; overflow:visible; }
    #analytics-content .adash[data-tab]:not(.adash--table) .adash-grid { display:flex !important; flex:none; }
    #analytics-content .adash-grid > .adash-card { flex:none; }
    #analytics-content .adash-card { flex-direction:column; }
    #analytics-content .adash .adash-chart, #analytics-content .adash[data-tab]:not(.adash--table) .adash-chart { flex:none; height:210px; min-height:210px; }
    #analytics-content .adash:not(.adash--table) .adash-kpis > .adash-kpi:first-child { display:none; }
    #analytics-content .adash:not(.adash--table) .adash-kpis > .adash-kpi:last-child { grid-column:1 / -1; }
    #analytics-content .adash-hero { display:flex !important; gap:2px; }
    #analytics-content .adash-hero-label { margin:0; font-size:.74rem; font-weight:700; color:var(--ad-muted); }
    #analytics-content .adash-hero-value { margin:0; font-size:2rem; font-weight:800; letter-spacing:-.03em; line-height:1.1; font-variant-numeric:tabular-nums; color:var(--ad-text); }
    #analytics-content .adash-hero-delta .adash-delta { font-size:.78rem; }
    #analytics-content .adash-hero-delta .adash-delta em { display:inline; }
    #analytics-content .adash-spark { display:block; width:100%; height:46px; margin-top:6px; }
    #analytics-content .adash-spark-line { fill:none; stroke:var(--accent,#0372c0); stroke-width:2; vector-effect:non-scaling-stroke; stroke-linejoin:round; }
    #analytics-content .adash-spark-fill { fill:color-mix(in srgb, var(--accent,#0372c0) 14%, transparent); }
    #analytics-content .adash-insights { margin:12px -12px -4px; padding-top:12px; border-top:1px solid var(--ad-border); }
    #analytics-content .adash-insights-h { margin:0 12px 8px; font-size:.78rem; font-weight:800; color:var(--ad-text); display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
    #analytics-content .adash-insights-h small { font-size:.68rem; font-weight:600; color:var(--ad-muted); }
    #analytics-content .adash-ins-row { display:flex; gap:10px; overflow-x:auto; scroll-snap-type:x mandatory; padding:2px 12px 10px; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
    #analytics-content .adash-ins-row::-webkit-scrollbar { display:none; }
    #analytics-content .adash-ins { flex:0 0 76%; scroll-snap-align:start; display:flex; align-items:center; gap:10px; text-align:left; padding:11px 10px 11px 12px; border:1px solid var(--ad-border); border-left:4px solid #64748b; border-radius:14px; background:var(--ad-soft); color:var(--ad-text); cursor:pointer; font:inherit; min-height:74px; }
    #analytics-content .adash-ins:active { transform:scale(.985); }
    #analytics-content .adash-ins:focus-visible { outline:2px solid var(--accent,#0372c0); outline-offset:2px; }
    #analytics-content .adash-ins--good { border-left-color:#10b981; } #analytics-content .adash-ins--bad { border-left-color:#ef4444; } #analytics-content .adash-ins--warn { border-left-color:#f59e0b; }
    #analytics-content .adash-ins i { display:none; }
    #analytics-content .adash-ins-body { flex:1 1 auto; min-width:0; }
    #analytics-content .adash-ins b { display:block; font-size:.84rem; line-height:1.25; }
    #analytics-content .adash-ins em { display:block; margin-top:2px; font-style:normal; font-size:.74rem; color:var(--ad-muted); line-height:1.3; }
    #analytics-content .adash-ins-go { flex:none; width:26px; height:26px; border-radius:50%; display:grid; place-items:center; background:var(--ad-card); color:var(--accent,#0372c0); box-shadow:0 1px 4px rgba(15,23,42,.12); }
    #analytics-content .adash-ins.is-nudge .adash-ins-go { animation:zi-nudge 1.3s ease-in-out 3; }
    @keyframes zi-nudge { 0%,100% { transform:translateX(0); } 40% { transform:translateX(6px); } 70% { transform:translateX(-1px); } }
    @media (prefers-reduced-motion: reduce) { #analytics-content .adash-ins.is-nudge .adash-ins-go { animation:none; } }
    #analytics-content .adash-cats-body { grid-template-columns:1fr; grid-template-rows:auto auto; }
    #analytics-content .adash-products .adash-chart, #analytics-content .adash-cats .adash-chart { height:230px; }
    #analytics-content .adash-recent { overflow:visible; }
}


/* Phone: compact analyst view. Later rules win over the earlier phone rules above. */
@media (max-width:820px) {
    #analytics-content .adash { gap:8px; }
    #analytics-content .adash-bar-top { padding:6px 10px; }
    #analytics-content .adash-controls { flex-wrap:wrap; gap:6px; align-items:center; }
    #analytics-content .adash-quick { flex:1 1 100%; min-width:0; padding:2px; }
    #analytics-content .adash-quick button { flex:1 1 auto; padding:5px 4px; font-size:.7rem; }
    #analytics-content .adash-reset { flex:none; width:30px; height:30px; padding:0; font-size:0; display:grid; place-items:center; gap:0; }
    #analytics-content .adash-reset svg { width:15px; height:15px; margin:0; }
    #analytics-content .analytics-view-toggle { flex:1 1 0; display:flex; }
    #analytics-content .analytics-view-toggle button { flex:1 1 0; padding:5px 8px; font-size:.7rem; }
    #analytics-content .adash-card { padding:9px 10px; }
    #analytics-content .adash:not(.adash--table) .adash-kpis > .adash-kpi:first-child { display:flex; }
    #analytics-content .adash:not(.adash--table) .adash-kpis > .adash-kpi:last-child { grid-column:auto; }
    #analytics-content .adash-kpis { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:6px; }
    #analytics-content .adash-kpi { padding:7px 8px; gap:1px; }
    #analytics-content .adash-kpi-top { gap:5px; }
    #analytics-content .adash-kpi-icon { display:none; }
    #analytics-content .adash-kpi-label { font-size:.64rem; }
    #analytics-content .adash-kpi-value { font-size:1.05rem; }
    #analytics-content .adash-delta { font-size:.66rem; }
    #analytics-content .adash-delta em { display:none; }
    #analytics-content .adash-hero { gap:0; }
    #analytics-content .adash-hero-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
    #analytics-content .adash-hero-txt { flex:none; }
    #analytics-content .adash-hero-delta .adash-delta { font-size:.9rem; }
    #analytics-content .adash-hero-delta .adash-delta em { display:inline; font-size:.7rem; }
    #analytics-content .adash-spark { flex:1 1 auto; width:auto; min-width:0; height:40px; margin:0; }
    #analytics-content .adash-insights { margin:8px -10px -2px; padding-top:8px; }
    #analytics-content .adash-insights-h { margin:0 10px 4px; }
    #analytics-content .adash-ins-row { flex-direction:column; gap:0; overflow:visible; padding:0 4px; scroll-snap-type:none; }
    #analytics-content .adash-ins { flex:none; width:100%; min-height:0; padding:8px 6px 8px 8px; border:0; border-left:0; border-bottom:1px solid var(--ad-border); border-radius:0; background:transparent; gap:8px; }
    #analytics-content .adash-ins:last-child { border-bottom:0; }
    #analytics-content .adash-ins i { display:block; flex:none; width:8px; height:8px; border-radius:50%; background:#64748b; }
    #analytics-content .adash-ins--good i { background:#10b981; } #analytics-content .adash-ins--bad i { background:#ef4444; } #analytics-content .adash-ins--warn i { background:#f59e0b; }
    #analytics-content .adash-ins b { font-size:.8rem; }
    #analytics-content .adash-ins em { font-size:.7rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    #analytics-content .adash-ins-go { width:22px; height:22px; box-shadow:none; background:var(--ad-soft); }
    #analytics-content .adash .adash-chart, #analytics-content .adash[data-tab]:not(.adash--table) .adash-chart { height:170px; min-height:170px; }
    #analytics-content .adash-products .adash-chart, #analytics-content .adash-cats .adash-chart { height:190px; }
    #analytics-content .adash-grid { gap:6px; }
}

/* Phone: verdict summary, grouped findings with a value on the right, profit headline first */
@media (max-width:820px) {
    #analytics-content .adash-hero-top { align-items:flex-start; gap:10px; }
    #analytics-content .adash-hero-txt { flex:1 1 auto; min-width:0; }
    #analytics-content .adash-verdict { display:inline-block; padding:3px 10px; border-radius:999px; font-size:.72rem; font-weight:800; background:rgba(100,116,139,.15); color:var(--ad-text); }
    #analytics-content .adash-verdict--good { background:rgba(16,185,129,.16); color:#059669; }
    #analytics-content .adash-verdict--warn { background:rgba(245,158,11,.18); color:#b45309; }
    #analytics-content .adash-verdict--bad { background:rgba(239,68,68,.16); color:#dc2626; }
    .dark #analytics-content .adash-verdict--good { color:#34d399; } .dark #analytics-content .adash-verdict--warn { color:#fbbf24; } .dark #analytics-content .adash-verdict--bad { color:#f87171; }
    #analytics-content .adash-verdict-text { margin:6px 0 0; font-size:.86rem; line-height:1.35; font-weight:600; color:var(--ad-text); }
    #analytics-content .adash-hero-side { flex:none; width:112px; display:flex; flex-direction:column; align-items:flex-end; gap:2px; }
    #analytics-content .adash-hero-side .adash-delta { font-size:.86rem; }
    #analytics-content .adash-hero-side .adash-delta em { display:none; }
    #analytics-content .adash-hero-side .adash-spark { width:112px; height:36px; flex:none; }
    #analytics-content .adash-insights { margin-top:6px; }
    #analytics-content .adash-insights-h { margin:8px 10px 0; font-size:.68rem; font-weight:800; letter-spacing:.02em; text-transform:none; }
    #analytics-content .adash-insights-h--good { color:#059669; } #analytics-content .adash-insights-h--bad { color:#dc2626; } #analytics-content .adash-insights-h--info { color:var(--ad-muted); }
    .dark #analytics-content .adash-insights-h--good { color:#34d399; } .dark #analytics-content .adash-insights-h--bad { color:#f87171; }
    #analytics-content .adash-ins-val { flex:none; margin-left:auto; padding-left:6px; font-size:.86rem; font-weight:800; font-variant-numeric:tabular-nums; color:var(--ad-text); text-align:right; }
    #analytics-content .adash-ins--good .adash-ins-val { color:#059669; } #analytics-content .adash-ins--bad .adash-ins-val { color:#dc2626; }
    #analytics-content .adash-ins-body { flex:1 1 auto; }
    #analytics-content .adash-hint { margin:6px 10px 0; font-size:.66rem; color:var(--ad-muted); text-align:center; }
    #analytics-content .adash-plcard { display:flex; flex-direction:column; }
    #analytics-content .adash-plcard .adash-net { order:-1; margin:0 0 8px; border:0; padding:8px 10px; border-radius:12px; background:var(--ad-soft); }
    #analytics-content .adash-plcard .adash-head { order:-2; }
    #analytics-content .adash-plcard .adash-net strong { font-size:1.35rem; }
    #analytics-content .adash-plcard .adash-pl { order:0; }
}
/* PDF export clone: natural height, fixed width */
.adash-export .adash { height:auto !important; min-height:0 !important; }
.adash-export .adash-grid { grid-template-rows:280px 280px !important; }
.adash-export .adash-hero { display:none !important; }
.adash-export .adash-bar-top { position:static !important; }
.adash-export .adash-quick, .adash-export .analytics-view-toggle, .adash-export .adash-seg, .adash-export .adash-link { display:none !important; }


/* Sign-in page (v2). One design for every case: form on the left, a brand panel on the right.
   The panel shows the photo from Admin portal → Branding when one is set, otherwise a Zuno brand scene. */
#view-login .auth-hero-photo, #view-login .lh-float { display: none; }
@media (min-width: 900px) {
    #view-login.active { max-width: none;
        background: radial-gradient(700px 480px at 88% 8%, rgba(4, 162, 222, .14), transparent 62%), radial-gradient(620px 520px at 0% 100%, rgba(7, 232, 210, .09), transparent 65%), #f4f7fb !important; }
    .dark #view-login.active { background: radial-gradient(700px 480px at 88% 8%, rgba(3, 114, 192, .28), transparent 62%), radial-gradient(620px 520px at 0% 100%, rgba(7, 232, 210, .1), transparent 65%), linear-gradient(180deg, #061426, #030b16) !important; }
    #view-login .auth-layout { width: 100%; max-width: 70rem; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 0; align-items: stretch;
        border-radius: 28px; overflow: hidden; background: rgba(255, 255, 255, .8); border: 1px solid rgba(1, 34, 93, .08); box-shadow: 0 30px 80px rgba(1, 34, 93, .14); }
    .dark #view-login .auth-layout { background: rgba(10, 24, 40, .86); border-color: rgba(255, 255, 255, .1); box-shadow: 0 34px 90px rgba(0, 0, 0, .45); }
    #view-login .auth-card { order: 1; width: auto; display: flex; flex-direction: column; justify-content: center; padding: 3rem 3.25rem !important; border-radius: 0; box-shadow: none !important; background: transparent !important; border: 0 !important; backdrop-filter: none !important; }

    /* The panel */
    #view-login .auth-hero { order: 2; position: relative; isolation: isolate; overflow: hidden; min-height: min(640px, calc(100dvh - 3rem));
        display: flex !important; flex-direction: column; justify-content: flex-end; gap: .85rem; padding: 2.5rem 2.6rem !important;
        border-radius: 0 !important; border: 0 !important; box-shadow: none !important; backdrop-filter: none !important; color: #fff !important; background: #01225d !important; }
    #view-login .auth-hero-photo { display: block; position: absolute; inset: 0; z-index: -2;
        background: radial-gradient(520px 380px at 90% 0%, rgba(7, 232, 210, .3), transparent 60%), radial-gradient(520px 460px at 0% 100%, rgba(4, 162, 222, .38), transparent 62%), linear-gradient(155deg, #01225d 0%, #014599 48%, #0372c0 100%); }
    /* Faint grid for the brand scene */
    #view-login .auth-hero-photo::before { content: ''; position: absolute; inset: 0; opacity: .55;
        background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 36px 36px;
        -webkit-mask-image: radial-gradient(circle at 60% 35%, #000, transparent 72%); mask-image: radial-gradient(circle at 60% 35%, #000, transparent 72%); }
    /* Bottom shade so the caption always reads */
    #view-login .auth-hero-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(1, 16, 40, .78) 0%, rgba(1, 16, 40, .35) 34%, transparent 58%); }
    /* With a photo: the photo replaces the brand scene, slightly toned to the brand */
    #view-login.has-login-bg .auth-hero-photo { background: linear-gradient(160deg, rgba(1, 34, 93, .35), rgba(1, 34, 93, 0) 45%), var(--login-bg-image) center / cover no-repeat, #0b1726; }
    #view-login.has-login-bg .auth-hero-photo::before { display: none; }
    #view-login.has-login-bg .auth-hero-photo::after { background: linear-gradient(0deg, rgba(3, 12, 26, .86) 0%, rgba(3, 12, 26, .45) 36%, transparent 62%); }
    /* A real photo speaks for itself: no mock-up cards or circles on top of it */
    #view-login.has-login-bg .lh-float, #view-login.has-login-bg .lb-orb { display: none !important; }

    /* Brand discs */
    #view-login .lb-orb { position: absolute; border-radius: 50%; aspect-ratio: 1; z-index: 1; pointer-events: none; mix-blend-mode: normal; opacity: 1;
        border: 1px solid rgba(255, 255, 255, .26); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 18px 40px rgba(0, 0, 0, .16);
        -webkit-backdrop-filter: blur(6px) saturate(1.2); backdrop-filter: blur(6px) saturate(1.2); }
    #view-login .lb-orb-a { width: 16%; right: 8%; top: 8%; background: radial-gradient(circle at 35% 30%, rgba(30, 127, 214, .7), rgba(1, 69, 153, .55) 72%); }
    #view-login .lb-orb-b { width: 10%; right: 5%; top: 24%; background: radial-gradient(circle at 35% 30%, rgba(34, 225, 200, .6), rgba(4, 162, 222, .35) 72%); }
    #view-login .lb-orb-c { width: 6%; right: 24%; top: 23%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), rgba(190, 230, 255, .2) 72%); }

    /* Floating glass cards */
    #view-login .lh-float { display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none; }
    #view-login .lh-card { position: absolute; color: #0f172a; background: rgba(255, 255, 255, .9); border: 1px solid rgba(255, 255, 255, .7); border-radius: 18px;
        box-shadow: 0 20px 44px rgba(1, 16, 40, .28); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
    #view-login .lh-card--sales { left: 8%; top: 9%; width: min(46%, 230px); padding: 14px 16px 0; overflow: hidden; animation: lh-float 7s ease-in-out infinite alternate; }
    #view-login .lh-card-top { display: flex; justify-content: space-between; align-items: center; font-size: .68rem; font-weight: 700; color: #64748b; }
    #view-login .lh-live { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; background: rgba(16, 185, 129, .12); color: #047857; }
    #view-login .lh-live i { width: 6px; height: 6px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .25); animation: lh-pulse 2s ease-in-out infinite; }
    #view-login .lh-card--sales b { display: block; margin-top: 8px; font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
    #view-login .lh-card--sales small { display: block; font-size: .7rem; color: #64748b; }
    #view-login .lh-card--sales em { font-style: normal; font-weight: 800; color: #059669; }
    #view-login .lh-card--sales svg { display: block; width: calc(100% + 32px); height: 46px; margin: 6px -16px 0; }
    #view-login .lh-card--paid { right: 9%; top: 44%; display: flex; align-items: center; gap: 10px; padding: 11px 16px 11px 12px; animation: lh-float 8s ease-in-out -2s infinite alternate; }
    #view-login .lh-check { width: 32px; height: 32px; flex: none; border-radius: 50%; background: #10b981 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 15px no-repeat; box-shadow: 0 6px 14px rgba(16, 185, 129, .4); }
    #view-login .lh-card--paid b { display: block; font-size: .85rem; font-weight: 800; }
    #view-login .lh-card--paid small { display: block; font-size: .7rem; color: #64748b; }
    #view-login .lh-card--sync { left: 14%; top: 44%; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); color: #fff; box-shadow: none; animation: lh-float 9s ease-in-out -4s infinite alternate; }
    #view-login .lh-card--sync small { font-size: .7rem; font-weight: 700; }
    #view-login .lh-dots { display: inline-flex; }
    #view-login .lh-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85); margin-left: -6px; background: linear-gradient(135deg, #22d3ee, #0372c0); }
    #view-login .lh-dots i:first-child { margin-left: 0; background: linear-gradient(135deg, #f59e0b, #ec4899); }
    #view-login .lh-dots i:last-child { background: linear-gradient(135deg, #a78bfa, #6366f1); }
    /* Wordless UI: placeholder lines and bars instead of text or figures */
    #view-login .lh-line { display: block; height: 8px; border-radius: 6px; background: #e2e8f0; }
    #view-login .lh-line--sm { width: 42px; height: 6px; }
    #view-login .lh-line--title { width: 62%; height: 11px; margin-top: 12px; background: #1e293b; opacity: .85; }
    #view-login .lh-line--short { width: 60%; }
    #view-login .lh-line--light { width: 64px; background: rgba(255, 255, 255, .55); }
    #view-login .lh-live { width: 26px; height: 14px; padding: 0; justify-content: center; }
    #view-login .lh-bars { display: flex; align-items: flex-end; gap: 7px; height: 64px; margin: 14px 0 16px; }
    #view-login .lh-bars i { flex: 1; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #22d3ee, #0372c0); opacity: .9; }
    #view-login .lh-bars i:nth-child(odd) { background: linear-gradient(180deg, #7dd3fc, #38bdf8); opacity: .65; }
    #view-login .lh-card--sales { padding-bottom: 0 !important; }
    #view-login .lh-lines { display: grid; gap: 7px; width: 110px; }
    #view-login .lh-lines .lh-line:first-child { background: #1e293b; opacity: .8; }
    @keyframes lh-float { to { transform: translateY(-8px); } }
    @keyframes lh-pulse { 50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); } }

    /* Caption (the existing message) */
    #view-login .auth-hero > .pill-badge, #view-login .auth-hero > h2, #view-login .auth-hero > p, #view-login .auth-hero > .grid { position: relative; z-index: 2; color: #fff !important; }
    #view-login .auth-hero > .pill-badge { align-self: flex-start; padding: .3rem .75rem; font-size: .72rem; letter-spacing: .02em; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
    #view-login .auth-hero > .pill-badge span { background: #22d3ee !important; }
    #view-login .auth-hero > h2 { font-size: clamp(1.45rem, 2.1vw, 1.85rem) !important; line-height: 1.18 !important; letter-spacing: -.025em; max-width: 22ch; margin: 0; text-shadow: 0 2px 16px rgba(0, 0, 0, .25); }
    #view-login .auth-hero > p { margin: 0; max-width: 44ch; font-size: .9rem; color: rgba(255, 255, 255, .8) !important; }
    #view-login .auth-hero > .grid { margin-top: .35rem; gap: .5rem 1rem; font-size: .78rem !important; font-weight: 600; color: rgba(255, 255, 255, .92) !important; }
    #view-login .auth-hero > .grid > div { color: inherit !important; }
}
@media (min-width: 900px) and (max-height: 700px) {
    #view-login .lh-card--sync, #view-login .auth-hero > p { display: none; }
}
@media (prefers-reduced-motion: reduce) { #view-login .lh-card, #view-login .lh-live i { animation: none !important; } }
/* Signed out there is no sidebar, so don't keep its space reserved on wide screens */
@media (min-width: 1024px) {
    body:has(#view-login.active) .app-shell, body:has(#view-signup.active) .app-shell { padding-left: 0; }
    body:has(#view-login.active) #update-available-banner, body:has(#view-login.active) #offline-banner { left: 0; }
}
/* Phones and narrow windows: the photo (or the Zuno brand scene) fills the screen, the form floats on top */
@media (max-width: 899px) {
    #view-login.active { position: relative; isolation: isolate; padding: max(20px, env(safe-area-inset-top)) 14px max(20px, env(safe-area-inset-bottom)) !important;
        justify-content: center !important; align-items: center !important; max-width: none; background: #01225d !important; }
    #view-login .auth-layout { display: block !important; width: 100%; max-width: 440px; margin: 0 auto; min-height: 0 !important; }
    /* Full-screen background layer */
    #view-login .auth-hero { display: block !important; position: fixed; inset: 0; z-index: -1; margin: 0; padding: 0 !important; height: auto; border: 0 !important; border-radius: 0 !important;
        box-shadow: none !important; backdrop-filter: none !important; background: #01225d !important; overflow: hidden; pointer-events: none; }
    #view-login .auth-hero > .pill-badge, #view-login .auth-hero > h2, #view-login .auth-hero > p, #view-login .auth-hero > .grid, #view-login .lh-float { display: none !important; }
    #view-login .auth-hero-photo { display: block; position: absolute; inset: 0;
        background: radial-gradient(420px 320px at 100% 0%, rgba(7, 232, 210, .32), transparent 62%), radial-gradient(460px 380px at 0% 100%, rgba(4, 162, 222, .42), transparent 62%), linear-gradient(160deg, #01225d 0%, #014599 52%, #0372c0 100%); }
    #view-login .auth-hero-photo::before { content: ''; position: absolute; inset: 0; opacity: .5;
        background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 30px 30px;
        -webkit-mask-image: radial-gradient(circle at 50% 20%, #000, transparent 70%); mask-image: radial-gradient(circle at 50% 20%, #000, transparent 70%); }
    #view-login.has-login-bg .auth-hero-photo { background: linear-gradient(180deg, rgba(1, 16, 40, .2) 0%, rgba(1, 16, 40, .35) 55%, rgba(1, 16, 40, .6) 100%), var(--login-bg-image) center / cover no-repeat, #0b1726; }
    #view-login.has-login-bg .auth-hero-photo::before { display: none; }
    #view-login.has-login-bg .lb-orb { display: none !important; }
    /* Brand circles, top corner only */
    #view-login .lb-orb { position: absolute; border-radius: 50%; aspect-ratio: 1; border: 1px solid rgba(255, 255, 255, .26); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
        -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
    #view-login .lb-orb-a { width: 96px; right: -18px; top: calc(14px + env(safe-area-inset-top)); background: radial-gradient(circle at 35% 30%, rgba(30, 127, 214, .7), rgba(1, 69, 153, .55) 72%); }
    #view-login .lb-orb-b { width: 54px; right: 64px; top: calc(70px + env(safe-area-inset-top)); background: radial-gradient(circle at 35% 30%, rgba(34, 225, 200, .6), rgba(4, 162, 222, .35) 72%); }
    #view-login .lb-orb-c { width: 26px; left: 22px; top: calc(30px + env(safe-area-inset-top)); background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), rgba(190, 230, 255, .2) 72%); }
    /* The form card, floating */
    #view-login .auth-card { position: relative; z-index: 1; width: 100% !important; max-width: 440px; margin: 0 auto !important; min-height: 0 !important;
        padding: 28px 22px 22px !important; border-radius: 26px !important; background: rgba(255, 255, 255, .94) !important; border: 1px solid rgba(255, 255, 255, .6) !important;
        box-shadow: 0 24px 60px rgba(1, 16, 40, .35) !important; -webkit-backdrop-filter: blur(16px) saturate(1.2) !important; backdrop-filter: blur(16px) saturate(1.2) !important; }
    .dark #view-login .auth-card { background: rgba(8, 20, 34, .88) !important; border-color: rgba(255, 255, 255, .1) !important; box-shadow: 0 24px 60px rgba(0, 0, 0, .5) !important; }
    #view-login .auth-card .main-brand-logo { width: 72px !important; height: 72px !important; max-width: 72px; object-fit: contain; margin: 0 auto 14px !important; }
    #view-login .auth-card .login-subtitle { margin-bottom: 1.5rem !important; }
}
@media (prefers-reduced-motion: reduce) { #view-login .lh-card, #view-login .lh-live i { animation: none !important; } }


/* "Choose your business": tidier card, and the admin's sign-in photo beside it when one is set */
#view-choose-org .auth-card { border-radius: 24px; }
#view-choose-org .main-brand-logo { width: 76px !important; height: 76px !important; max-width: 76px; object-fit: contain; margin-bottom: 1.1rem !important; }
#view-choose-org .org-eyebrow { display: block; text-align: center; margin-bottom: .35rem; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent, #0372c0); }
#view-choose-org h1 { font-size: clamp(1.6rem, 4vw, 2rem) !important; line-height: 1.15 !important; letter-spacing: -.025em; }
#view-choose-org h1 + p { max-width: 42ch; margin-left: auto; margin-right: auto; font-size: .9rem; }
#view-choose-org #choose-org-list { display: grid; gap: .6rem; }
#view-choose-org #choose-org-list > * + * { margin-top: 0 !important; }
#view-choose-org .org-choice-item { position: relative; min-height: 68px; padding: .85rem 1rem; border-radius: 16px; background: #fff; border: 1px solid rgba(15, 23, 42, .09); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, background .15s ease; }
.dark #view-choose-org .org-choice-item { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .1); box-shadow: none; }
#view-choose-org .org-choice-item:hover:not(:disabled) { border-color: rgba(var(--accent-rgb, 3, 114, 192), .55); box-shadow: 0 10px 26px rgba(var(--accent-rgb, 3, 114, 192), .14); transform: translateY(-1px); background: #fff; }
.dark #view-choose-org .org-choice-item:hover:not(:disabled) { background: rgba(var(--accent-rgb, 3, 114, 192), .1); }
#view-choose-org .org-choice-item:focus-visible { outline: 2px solid var(--accent, #0372c0); outline-offset: 2px; }
#view-choose-org .org-choice-avatar--logo { background:#fff !important; border:1px solid rgba(148,163,184,.4); padding:4px; overflow:hidden; }
#view-choose-org .org-choice-avatar--logo img { width:100%; height:100%; object-fit:contain; border-radius:10px; display:block; }
#view-choose-org .org-choice-avatar { width: 2.75rem; height: 2.75rem; border-radius: 14px; font-size: 1.1rem; box-shadow: 0 6px 14px rgba(var(--accent-rgb, 3, 114, 192), .25); }
#view-choose-org .org-choice-name { font-size: 1rem; }
/* Arrow on each business; replaced by the existing "Opening" spinner while it loads */
#view-choose-org .org-choice-item::after { content: ''; flex: none; width: 30px; height: 30px; margin-left: auto; border-radius: 50%;
    background: rgba(var(--accent-rgb, 3, 114, 192), .08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / 15px no-repeat;
    transition: transform .15s ease, background-color .15s ease; }
#view-choose-org .org-choice-item:hover:not(:disabled)::after { transform: translateX(3px); background-color: rgba(var(--accent-rgb, 3, 114, 192), .16); }
#view-choose-org .org-choice-item.is-opening::after { display: none; }
#view-choose-org .org-create-own{margin-top:.75rem;padding-top:.75rem;border-top:1px dashed rgba(148,163,184,.5)}
#view-choose-org .org-create-own-btn{width:100%;display:flex;flex-direction:column;gap:2px;text-align:left;min-height:60px;padding:.75rem 1rem;border-radius:16px;border:1.5px solid var(--accent,#0372c0);background:transparent;color:inherit;cursor:pointer}
#view-choose-org .org-create-own-title{font-weight:700;font-size:1rem;color:var(--accent,#0372c0)}
#view-choose-org .org-create-own-sub{font-size:.78rem;opacity:.7}
@media (max-width:899px){#view-choose-org .org-create-own{flex:none}}
#view-choose-org .org-signout { padding-top: 1rem; border-top: 1px solid rgba(15, 23, 42, .07); }
.dark #view-choose-org .org-signout { border-top-color: rgba(255, 255, 255, .08); }
#view-choose-org .org-signout a { color: var(--accent, #0372c0) !important; }

/* Phones and tablets: the screen never scrolls. The logo, the title and "Sign out" stay put and ONLY the list of businesses scrolls, however many there are. */
@media (max-width: 899px) {
    #view-choose-org.active { display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden;
        padding: max(.75rem, env(safe-area-inset-top)) .75rem calc(3.75rem + env(safe-area-inset-bottom)); }   /* the bottom gap keeps the card clear of the environment badge and the phone's bar */
    #view-choose-org .org-layout { width: 100%; max-width: 28rem; max-height: 100%; min-height: 0; margin: 0; display: flex; flex-direction: column; }
    #view-choose-org .auth-card { display: flex; flex-direction: column; min-height: 0; max-height: 100%; overflow: hidden; padding: 1.25rem 1rem !important; }
    #view-choose-org .auth-card > * { flex: none; }
    #view-choose-org #choose-org-list { flex: 1 1 auto; min-height: 7.5rem; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: .15rem .1rem .35rem; margin: 0 -.1rem;
        scrollbar-width: thin; }
    #view-choose-org .org-signout { margin-top: .5rem !important; padding-top: .8rem; }
    #view-choose-org .main-brand-logo { width: 60px !important; height: 60px !important; max-width: 60px; margin-bottom: .6rem !important; }
    #view-choose-org h1 { font-size: 1.5rem !important; }
    #view-choose-org h1 + p { font-size: .84rem; margin-bottom: .9rem !important; }
    #view-choose-org .org-choice-item { min-height: 60px; padding: .7rem .8rem; gap: .7rem; }
    #view-choose-org .org-choice-name { font-size: .95rem; line-height: 1.25; overflow-wrap: anywhere; }
}
/* A short screen (phone on its side): shrink the header so the list still gets room; if it is still too small the whole card scrolls instead. */
@media (max-width: 899px) and (max-height: 520px) {
    #view-choose-org .main-brand-logo, #view-choose-org .org-eyebrow, #view-choose-org h1 + p { display: none !important; }
    #view-choose-org h1 { font-size: 1.15rem !important; margin-bottom: .5rem !important; }
    #view-choose-org .auth-card { overflow-y: auto; }
    #view-choose-org #choose-org-list { overflow: visible; min-height: 0; flex: none; }
}
/* Neutral brand panel beside the list (wide screens). Not tied to any one business. */
#view-choose-org .org-art { display: none; }
@media (min-width: 900px) {
    #view-choose-org .org-layout { max-width: 62rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch;
        border-radius: 28px; overflow: hidden; background: rgba(255, 255, 255, .82); border: 1px solid rgba(1, 34, 93, .08); box-shadow: 0 30px 80px rgba(1, 34, 93, .12); }
    .dark #view-choose-org .org-layout { background: rgba(10, 24, 40, .85); border-color: rgba(255, 255, 255, .1); box-shadow: 0 34px 90px rgba(0, 0, 0, .45); }
    #view-choose-org .auth-card { display: flex; flex-direction: column; justify-content: center; padding: 2.75rem 2.5rem !important; border-radius: 0; box-shadow: none !important; background: transparent !important; border: 0 !important; backdrop-filter: none !important; }
    #view-choose-org .org-art { display: block; position: relative; min-height: min(560px, calc(100dvh - 3rem)); overflow: hidden; isolation: isolate;
        background: radial-gradient(520px 380px at 85% 0%, rgba(7, 232, 210, .28), transparent 60%), radial-gradient(480px 420px at 0% 100%, rgba(4, 162, 222, .35), transparent 62%), linear-gradient(155deg, #01225d 0%, #014599 45%, #0372c0 100%); }
    #view-choose-org .org-art::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5;
        background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 34px 34px;
        -webkit-mask-image: radial-gradient(circle at 60% 45%, #000, transparent 75%); mask-image: radial-gradient(circle at 60% 45%, #000, transparent 75%); }
    /* Emblem circles */
    #view-choose-org .oa-orb { position: absolute; border-radius: 50%; aspect-ratio: 1; border: 1px solid rgba(255, 255, 255, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
    #view-choose-org .oa-a { width: 22%; right: 27%; top: 5%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .28), rgba(255, 255, 255, .06) 70%); }
    #view-choose-org .oa-b { width: 16%; right: 10%; top: 8%; background: radial-gradient(circle at 35% 30%, rgba(34, 225, 200, .55), rgba(4, 162, 222, .25) 72%); }
    #view-choose-org .oa-c { width: 9%; right: 23%; top: 22%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .4), rgba(255, 255, 255, .1) 72%); }
    #view-choose-org .oa-d { width: 40%; left: -16%; top: -14%; background: radial-gradient(circle at 60% 40%, rgba(255, 255, 255, .1), transparent 70%); }
    /* Abstract business switcher */
    #view-choose-org .oa-stack { position: absolute; left: 12%; right: 12%; top: 52%; transform: translateY(-50%); display: grid; gap: 10px; }
    #view-choose-org .oa-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
        -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transform: scale(.94); opacity: .75; }
    #view-choose-org .oa-tile b { width: 34px; height: 34px; flex: none; border-radius: 10px; background: rgba(255, 255, 255, .28); }
    #view-choose-org .oa-tile span { flex: 1; display: grid; gap: 7px; }
    #view-choose-org .oa-tile span i { display: block; height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .35); width: 62%; }
    #view-choose-org .oa-tile span i + i { width: 38%; opacity: .6; }
    #view-choose-org .oa-tile.is-on { transform: scale(1) translateX(14px); opacity: 1; background: rgba(255, 255, 255, .95); box-shadow: 0 18px 40px rgba(1, 20, 60, .35); }
    #view-choose-org .oa-tile.is-on b { background: linear-gradient(135deg, #0372c0, #014599); }
    #view-choose-org .oa-tile.is-on span i { background: #cbd5e1; }
    #view-choose-org .oa-tile.is-on span i:first-child { background: #0f172a; opacity: .85; }
    #view-choose-org .oa-tile.is-on em { width: 26px; height: 26px; flex: none; border-radius: 50%; background: #0372c0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 13px no-repeat; }
    #view-choose-org .oa-cap { position: absolute; left: 10%; right: 10%; bottom: 9%; color: #fff; }
    #view-choose-org .oa-cap strong { display: block; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
    #view-choose-org .oa-cap span { display: block; margin-top: .35rem; font-size: .88rem; color: rgba(255, 255, 255, .75); }
}


/* Dining: tables, service charge, tips, split bill */
.zd-overlay { position: fixed; inset: 0; z-index: 120050; display: flex; align-items: flex-end; justify-content: center; background: rgba(2, 12, 27, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .18s ease; }
.zd-overlay.is-open { opacity: 1; }
.zd-sheet { width: 100%; max-width: 560px; max-height: min(92dvh, 820px); display: flex; flex-direction: column; background: #fff; color: #0f172a; border-radius: 26px 26px 0 0; box-shadow: 0 -20px 60px rgba(2, 12, 27, .25); transform: translateY(16px); transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.zd-overlay.is-open .zd-sheet { transform: none; }
@media (min-width: 768px) { .zd-overlay { align-items: center; } .zd-sheet { border-radius: 24px; max-height: min(88vh, 820px); } }
.dark .zd-sheet { background: #0b1a2b; color: #e2e8f0; }
.zd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 12px; border-bottom: 1px solid rgba(15, 23, 42, .07); }
.dark .zd-head { border-color: rgba(255, 255, 255, .08); }
.zd-head h3 { margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.zd-head p { margin: 3px 0 0; font-size: .8rem; color: #64748b; }
.dark .zd-head p { color: #94a3b8; }
.zd-x { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: rgba(15, 23, 42, .05); color: inherit; }
.zd-x svg { width: 18px; height: 18px; }
.dark .zd-x { background: rgba(255, 255, 255, .07); }
.zd-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 20px; display: grid; gap: 14px; align-content: start; }
.zd-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(15, 23, 42, .07); }
.dark .zd-foot { border-color: rgba(255, 255, 255, .08); }
.zd-foot-gap { flex: 1; }
.zd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 700; font-size: .92rem; border: 1px solid transparent; transition: transform .1s ease, opacity .15s ease; }
.zd-btn svg { width: 17px; height: 17px; }
.zd-btn:active:not(:disabled) { transform: scale(.98); }
.zd-btn:disabled { opacity: .45; cursor: not-allowed; }
.zd-btn--primary { flex: 1; color: #fff; background: linear-gradient(120deg, var(--accent, #0372c0), var(--accent-2, #014599)); box-shadow: 0 10px 24px rgba(var(--accent-rgb, 3, 114, 192), .25); }
.zd-btn--ghost { color: inherit; background: #fff; border-color: rgba(15, 23, 42, .14); }
.dark .zd-btn--ghost { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .14); }
.zd-btn--danger { color: #b91c1c; background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .2); }
.zd-guests { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(var(--accent-rgb, 3, 114, 192), .06); border: 1px solid rgba(var(--accent-rgb, 3, 114, 192), .14); }
.zd-guests > span { display: grid; grid-template-columns: 22px auto; column-gap: 8px; align-items: center; }
.zd-guests > span svg { width: 20px; height: 20px; color: var(--accent, #0372c0); grid-row: span 2; }
.zd-guests b { font-size: .92rem; }
.zd-guests small { font-size: .72rem; color: #64748b; }
.zd-big { font-size: 1.4rem; font-weight: 800; }
.zd-stepper { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 12px; background: #fff; border: 1px solid rgba(15, 23, 42, .12); }
.dark .zd-stepper { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .14); }
.zd-stepper button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--accent, #0372c0); }
.zd-stepper button:disabled { opacity: .3; }
.zd-stepper button svg { width: 16px; height: 16px; }
.zd-stepper b { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }
.zd-area h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #64748b; }
.zd-area h4 span { padding: 1px 7px; border-radius: 999px; background: rgba(100, 116, 139, .12); letter-spacing: 0; }
.zd-sheet--tables { max-width: 900px; }
@media (min-width: 768px) { .zd-sheet--tables { max-height: min(92vh, 900px); } .zd-sheet--tables .zd-body { min-height: min(60vh, 560px); } }
.zd-table-top strong small { display: block; font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748b; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; }
.zd-fchip--area { min-height: 30px; font-size: .76rem; background: transparent; }
.zd-floor--areas { margin-top: -4px; }
.zd-floor { display: flex; flex: none; min-height: 40px; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 2px; }
.zd-floor::-webkit-scrollbar { display: none; }
.zd-fchip { flex: none; }
.zd-fchip { display: inline-flex !important; align-items: center; gap: 7px; width: auto !important; min-height: 34px; padding: 0 12px !important; border-radius: 999px; border: 1px solid rgba(15, 23, 42, .12); background: #fff; color: #334155; font-size: .8rem; font-weight: 700; }
.zd-fchip b { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: rgba(100, 116, 139, .12); font-size: .72rem; text-align: center; }
.zd-fchip[data-kind="free"] b { color: #047857; background: rgba(16, 185, 129, .14); }
.zd-fchip[data-kind="busy"] b { color: #b45309; background: rgba(245, 158, 11, .16); }
.zd-fchip[data-kind="over"] b { color: #b91c1c; background: rgba(239, 68, 68, .14); }
.zd-fchip.is-on { border-color: var(--accent, #0372c0); color: var(--accent, #0372c0); background: rgba(var(--accent-rgb, 3, 114, 192), .07); }
.dark .zd-fchip { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .14); color: #cbd5e1; }
.zd-tables { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
@media (min-width: 560px) { .zd-tables { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px; } }
.zd-table { position: relative; min-width: 0; --zd-tone: #10b981; }
.zd-table.is-busy { --zd-tone: #f59e0b; }
.zd-table.is-over { --zd-tone: #ef4444; }
.zd-table.is-off { --zd-tone: #94a3b8; }
.zd-table.is-selected { --zd-tone: var(--accent, #0372c0); }
.zd-table-main { position: relative; width: 100% !important; min-height: 0 !important; display: grid !important; gap: 7px; padding: 10px 11px 10px 14px !important; border-radius: 14px; text-align: left; background: #fff; border: 1px solid rgba(15, 23, 42, .1); overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease; }
.zd-table-main::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--zd-tone); }
.dark .zd-table-main { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .12); }
.zd-table-main:hover:not(:disabled) { border-color: rgba(var(--accent-rgb, 3, 114, 192), .5); box-shadow: 0 8px 20px rgba(var(--accent-rgb, 3, 114, 192), .12); }
.zd-table-main:active:not(:disabled) { transform: scale(.98); }
.zd-table-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.zd-table-top strong { font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zd-status { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: .66rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--zd-tone); }
.zd-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--zd-tone); box-shadow: 0 0 0 3px color-mix(in srgb, var(--zd-tone) 18%, transparent); }
.zd-table.is-over .zd-status i { animation: zdPulse 1.6s ease-in-out infinite; }
@keyframes zdPulse { 50% { opacity: .35; } }
.zd-table-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 18px; }
.zd-table:has(.zd-table-edit) .zd-table-top { padding-right: 30px; }
.zd-amount { font-size: .78rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.zd-seats { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; color: #64748b; font-variant-numeric: tabular-nums; }
.zd-seats svg { width: 14px; height: 14px; }
.zd-timer { display: grid; gap: 4px; --zd-t: #10b981; }
.zd-timer[data-state="soon"] { --zd-t: #f59e0b; }
.zd-timer[data-state="over"] { --zd-t: #ef4444; }
.zd-timer--idle { --zd-t: #cbd5e1; opacity: .8; }
.zd-timer-bar { height: 5px; border-radius: 999px; background: rgba(100, 116, 139, .15); overflow: hidden; }
.zd-timer-bar i { display: block; height: 100%; border-radius: inherit; background: var(--zd-t); }
.zd-timer-text { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-size: .7rem; color: #64748b; font-variant-numeric: tabular-nums; }
.zd-timer-text b { font-size: .78rem; color: #0f172a; }
.dark .zd-timer-text b { color: #e2e8f0; }
.zd-timer-text em { font-style: normal; font-weight: 700; white-space: nowrap; }
.zd-timer[data-state="soon"] em { color: #b45309; }
.zd-timer[data-state="over"] em { color: #dc2626; }
.zd-table.is-selected .zd-table-main { border-color: var(--accent, #0372c0); box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 3, 114, 192), .15); }
.zd-table.is-busy .zd-table-main { background: rgba(245, 158, 11, .045); }
.zd-table.is-over .zd-table-main { background: rgba(239, 68, 68, .05); border-color: rgba(239, 68, 68, .35); }
.zd-table.is-off .zd-table-main { opacity: .55; }
.zd-table-edit { position: absolute; right: 7px; top: 8px; width: 26px !important; height: 26px !important; min-height: 0 !important; min-width: 0 !important; padding: 0 !important; display: grid; place-items: center; border-radius: 8px; color: #64748b; background: rgba(15, 23, 42, .05); }
.dark .zd-table-edit { background: rgba(255, 255, 255, .07); }
.zd-table-edit svg { width: 14px; height: 14px; }
.zd-row-timer { font-weight: 700; color: #047857; }
.zd-row-timer[data-state="soon"] { color: #b45309; }
.zd-row-timer[data-state="over"] { color: #dc2626; }
.zd-hint { font-size: .72rem; color: #64748b; }
.zd-empty--sm { padding: 14px; }
.zd-pill { display: inline-flex; padding: 2px 8px; border-radius: 999px; font-size: .64rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.zd-pill--free { color: #047857; background: rgba(16, 185, 129, .12); }
.zd-pill--busy { color: #b45309; background: rgba(245, 158, 11, .16); text-transform: none; letter-spacing: 0; }
.zd-pill--sel { color: var(--accent, #0372c0); background: rgba(var(--accent-rgb, 3, 114, 192), .12); }
.zd-pill--off { color: #64748b; background: rgba(100, 116, 139, .12); }
.zd-empty { display: grid; justify-items: center; gap: 6px; padding: 26px 10px; text-align: center; color: #64748b; }
.zd-empty svg { width: 34px; height: 34px; color: var(--accent, #0372c0); }
.zd-empty strong { color: inherit; font-size: 1rem; }
.zd-empty span { max-width: 36ch; font-size: .84rem; }
.zd-form { display: grid; gap: 12px; }
.zd-form label { display: grid; gap: 5px; }
.zd-form label > span { font-size: .8rem; font-weight: 700; }
.zd-form label > span b { color: #dc2626; }
.zd-form input[type="text"], .zd-form input[type="number"] { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid rgba(15, 23, 42, .14); background: #f8fafc; color: inherit; font-size: .95rem; }
.dark .zd-form input[type="text"], .dark .zd-form input[type="number"] { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .14); }
.zd-form-row { display: grid; grid-template-columns: 1fr 110px; gap: 10px; }
.zd-switch-row { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid rgba(15, 23, 42, .1); }
.zd-switch-row small { display: block; font-size: .72rem; font-weight: 500; color: #64748b; }
.zd-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(239, 68, 68, .08); color: #b91c1c; font-size: .82rem; font-weight: 600; }
.zd-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(15, 23, 42, .06); }
.dark .zd-seg { background: rgba(255, 255, 255, .06); }
.zd-seg button { min-height: 40px; border-radius: 11px; font-weight: 700; font-size: .88rem; color: #64748b; }
.zd-seg button[aria-selected="true"] { background: #fff; color: var(--accent, #0372c0); box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }
.dark .zd-seg button[aria-selected="true"] { background: rgba(255, 255, 255, .1); color: #fff; }
.zd-seg button:disabled { opacity: .45; }
.zd-hint { margin: 0; font-size: .82rem; color: #64748b; }
.zd-lines { display: grid; gap: 8px; }
.zd-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(15, 23, 42, .1); }
.dark .zd-line { border-color: rgba(255, 255, 255, .1); }
.zd-line.is-on { border-color: rgba(var(--accent-rgb, 3, 114, 192), .45); background: rgba(var(--accent-rgb, 3, 114, 192), .05); }
.zd-line strong { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zd-line small { font-size: .74rem; color: #64748b; }
.zd-link { font-size: .78rem; font-weight: 700; color: var(--accent, #0372c0); min-width: 36px; }
.zd-parts { display: grid; gap: 6px; padding: 10px 12px; border-radius: 14px; background: rgba(16, 185, 129, .07); border: 1px solid rgba(16, 185, 129, .2); }
.zd-parts div { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: .8rem; }
.zd-part-no { font-weight: 800; }
.zd-parts span:nth-child(2) { color: #64748b; }
.zd-equal { display: grid; gap: 12px; }
.zd-share { display: grid; justify-items: center; gap: 2px; padding: 18px; border-radius: 18px; background: linear-gradient(160deg, rgba(var(--accent-rgb, 3, 114, 192), .08), rgba(var(--accent-rgb, 3, 114, 192), .02)); border: 1px solid rgba(var(--accent-rgb, 3, 114, 192), .16); }
.zd-share span { font-size: .78rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .06em; }
.zd-share strong { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.zd-share small { font-size: .78rem; color: #64748b; }
.zd-pay-sum { flex: 1 1 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.zd-pay-sum span { font-size: .82rem; color: #64748b; font-weight: 600; }
.zd-pay-sum strong { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.zd-pay-sum small { flex-basis: 100%; text-align: right; font-size: .72rem; color: #64748b; margin-top: -4px; }
.zd-pay-btns { flex: 1 1 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zd-tip { display: grid; gap: 8px; padding: 12px; border-radius: 16px; border: 1px solid rgba(15, 23, 42, .1); text-align: left; width: 100%; }
.dark .zd-tip { border-color: rgba(255, 255, 255, .1); }
.zd-tip-head { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; }
.zd-muted { color: #94a3b8; font-weight: 500; font-size: .78rem; }
.zd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.zd-chip { display: inline-grid; justify-items: center; gap: 0; min-height: 40px; min-width: 64px; padding: 6px 12px; border-radius: 12px; font-size: .84rem; font-weight: 700; border: 1px solid rgba(15, 23, 42, .14); background: #fff; color: inherit; }
.dark .zd-chip { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .14); }
.zd-chip small { font-size: .66rem; font-weight: 600; color: #64748b; }
.zd-chip.is-on { border-color: var(--accent, #0372c0); background: rgba(var(--accent-rgb, 3, 114, 192), .1); color: var(--accent, #0372c0); }
.zd-tip-custom { display: grid; gap: 4px; font-size: .78rem; font-weight: 700; }
.zd-tip-custom input { padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(15, 23, 42, .14); background: #f8fafc; color: inherit; font-size: 1rem; }
.dark .zd-tip-custom input { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .14); }
.zd-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 120200; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 14px; background: #0f172a; color: #fff; font-size: .88rem; font-weight: 600; box-shadow: 0 16px 40px rgba(2, 12, 27, .35); transform: translate(-50%, 20px); opacity: 0; transition: all .2s ease; }
.zd-toast.is-in { transform: translate(-50%, 0); opacity: 1; }
.zd-toast svg { width: 18px; height: 18px; color: #34d399; }
/* Payment screen */
.zpay-split-btn svg { width: 18px; height: 18px; }
.zpay-split-btn[hidden] { display: none; }
.zpay-extras { width: 100%; max-width: 24rem; display: grid; gap: 10px; justify-items: center; margin: -4px 0 18px; }
.zd-pay-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(var(--accent-rgb, 3, 114, 192), .08); color: var(--accent, #0372c0); font-size: .82rem; font-weight: 700; }
.zd-pay-chip svg { width: 16px; height: 16px; }
.zd-pay-break { margin: -8px 0 0; font-size: .82rem; color: #64748b; }
.zd-pay-parts { width: 100%; display: grid; gap: 4px; padding: 10px 12px; border-radius: 14px; background: rgba(16, 185, 129, .07); border: 1px solid rgba(16, 185, 129, .2); font-size: .8rem; text-align: left; }
.zd-pay-parts button { justify-self: start; margin-top: 4px; font-weight: 700; color: var(--accent, #0372c0); }
/* Service charge toggle row */
.zsc-label { display: inline-flex; align-items: center; gap: 6px; }
.zsc-label em { font-style: normal; color: #94a3b8; font-size: .85em; }
.zsc-toggle { position: relative; display: inline-block; width: 34px !important; height: 20px !important; min-width: 34px !important; min-height: 20px !important; max-height: 20px; padding: 0 !important; margin: 0; border: 0 !important; border-radius: 999px !important; background: #cbd5e1 !important; box-shadow: none !important; flex: none; transition: background .15s ease; }
.zsc-toggle i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s ease; }
.zsc-toggle.is-on { background: var(--accent, #0372c0) !important; }
.zsc-toggle.is-on i { transform: translateX(14px); }
.zsc-off { color: #94a3b8; font-weight: 500; }
#service-charge-summary { display: flex; justify-content: space-between; align-items: center; }
#service-charge-summary.hidden { display: none; }
.zco-table[hidden] { display: none !important; }
.zco-table { margin-bottom: 6px; }

.invoice-doc-dining { display: grid; gap: 3px; margin-bottom: 10px; padding: 8px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid #eef1f5; font-size: .74rem; color: #475569; }
.invoice-doc-totals--after { margin-top: 10px; }

/* Split bill: two-panel layout */
.zd-sheet--wide { max-width: 980px; }
@media (min-width: 768px) { .zd-sheet--wide { max-height: min(92vh, 900px); } }
.zd-split-top { display: grid; gap: 10px; padding: 12px 14px; border-radius: 16px; background: rgba(15, 23, 42, .03); border: 1px solid rgba(15, 23, 42, .07); }
.dark .zd-split-top { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .08); }
.zd-split-figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.zd-split-figs span { display: grid; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.zd-split-figs b { font-size: 1.05rem; letter-spacing: -.01em; text-transform: none; color: inherit; font-variant-numeric: tabular-nums; }
.dark .zd-split-figs b { color: #f1f5f9; }
.zd-split-figs span:last-child b { color: var(--accent, #0372c0); }
.zd-progress { height: 6px; border-radius: 99px; background: rgba(15, 23, 42, .08); overflow: hidden; }
.dark .zd-progress { background: rgba(255, 255, 255, .1); }
.zd-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #10b981, #34d399); transition: width .3s ease; }
.zd-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.zd-steps::-webkit-scrollbar { display: none; }
.zd-steps li { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 12px; border: 1px solid rgba(15, 23, 42, .1); background: #fff; }
.dark .zd-steps li { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .1); }
.zd-step-dot { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: .78rem; font-weight: 800; background: rgba(15, 23, 42, .06); color: #64748b; }
.zd-step-dot svg { width: 14px; height: 14px; }
.zd-step-txt { display: grid; line-height: 1.2; }
.zd-step-txt b { font-size: .8rem; }
.zd-step-txt small { font-size: .68rem; color: #64748b; }
.zd-steps li.is-done .zd-step-dot { background: #10b981; color: #fff; }
.zd-steps li.is-done { border-color: rgba(16, 185, 129, .3); background: rgba(16, 185, 129, .06); }
.zd-steps li.is-current { border-color: var(--accent, #0372c0); box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 3, 114, 192), .12); }
.zd-steps li.is-current .zd-step-dot { background: var(--accent, #0372c0); color: #fff; }
.zd-split-cols { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); gap: 10px; align-items: stretch; }
.zd-col { display: flex; flex-direction: column; min-width: 0; border-radius: 18px; border: 1px solid rgba(15, 23, 42, .1); background: #fff; overflow: hidden; }
.dark .zd-col { background: rgba(255, 255, 255, .02); border-color: rgba(255, 255, 255, .1); }
.zd-col > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(15, 23, 42, .07); background: rgba(15, 23, 42, .025); }
.dark .zd-col > header { border-color: rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .03); }
.zd-col > header h4 { margin: 0; font-size: .92rem; font-weight: 800; display: flex; align-items: baseline; gap: 8px; }
.zd-col > header h4 em { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--accent, #0372c0); }
.zd-col > header > span { font-size: .74rem; color: #64748b; font-weight: 600; }
.zd-col--bill { border-color: rgba(var(--accent-rgb, 3, 114, 192), .35); box-shadow: 0 10px 30px rgba(var(--accent-rgb, 3, 114, 192), .08); }
.zd-col--bill > header { background: rgba(var(--accent-rgb, 3, 114, 192), .06); }
.zd-col-body { flex: 1 1 auto; display: grid; gap: 6px; align-content: start; padding: 10px; max-height: 340px; overflow-y: auto; }
.zd-col-arrow { display: grid; place-items: center; color: #94a3b8; }
.zd-col-arrow svg { width: 22px; height: 22px; }
.zd-oline, .zd-pline { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(15, 23, 42, .07); }
.dark .zd-oline, .dark .zd-pline { border-color: rgba(255, 255, 255, .08); }
.zd-pline { grid-template-columns: minmax(0, 1fr) auto auto; background: rgba(var(--accent-rgb, 3, 114, 192), .04); }
.zd-oline.is-static { grid-template-columns: minmax(0, 1fr) auto; }
.zd-oline.is-empty { opacity: .45; }
.zd-oline-main, .zd-pline-main { min-width: 0; }
.zd-oline strong, .zd-pline strong { display: block; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zd-oline small, .zd-pline small { font-size: .72rem; color: #64748b; }
.zd-pline b, .zd-oline b { font-size: .86rem; font-variant-numeric: tabular-nums; }
.zd-oline-qty { min-width: 38px; text-align: center; font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; }
.zd-oline-qty small { font-weight: 600; color: #94a3b8; font-size: .7rem; }
.zd-add { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px; border-radius: 10px; font-size: .8rem; font-weight: 800; color: #fff; background: var(--accent, #0372c0); }
.zd-add svg { width: 14px; height: 14px; }
.zd-add:disabled { background: rgba(15, 23, 42, .12); color: #94a3b8; }
.zd-link:disabled { opacity: .35; }
.zd-drop { display: grid; justify-items: center; gap: 4px; padding: 28px 12px; text-align: center; border: 1.5px dashed rgba(var(--accent-rgb, 3, 114, 192), .35); border-radius: 14px; color: #64748b; font-size: .8rem; }
.zd-drop svg { width: 22px; height: 22px; color: var(--accent, #0372c0); }
.zd-drop strong { color: inherit; font-size: .9rem; }
.zd-bill-totals { display: grid; gap: 4px; padding: 10px 14px 12px; border-top: 1px dashed rgba(15, 23, 42, .14); font-size: .82rem; }
.dark .zd-bill-totals { border-color: rgba(255, 255, 255, .14); }
.zd-bill-totals > div { display: flex; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
.zd-bill-totals .is-neg span:last-child { color: #dc2626; }
.zd-bill-totals .is-total { margin-top: 4px; padding-top: 6px; border-top: 1px solid rgba(15, 23, 42, .1); font-weight: 800; font-size: .98rem; }
.zd-share-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0 2px; }
.zd-share-dot { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-size: .78rem; font-weight: 800; background: rgba(15, 23, 42, .06); color: #64748b; }
.zd-share-dot svg { width: 14px; height: 14px; }
.zd-share-dot.is-done { background: #10b981; color: #fff; }
.zd-share-dot.is-current { background: var(--accent, #0372c0); color: #fff; box-shadow: 0 0 0 4px rgba(var(--accent-rgb, 3, 114, 192), .18); }
.zd-pane-switch { display: none; }
@media (max-width: 760px) {
  .zd-sheet--wide { max-height: 94dvh; }
  .zd-sheet--wide .zd-body { padding: 12px 14px; gap: 10px; }
  .zd-split-top { padding: 10px 12px; gap: 8px; }
  .zd-split-figs b { font-size: .95rem; }
  .zd-pane-switch { position: sticky; top: -12px; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(15, 23, 42, .06); }
  .dark .zd-pane-switch { background: rgba(255, 255, 255, .07); }
  .zd-pane-switch button { position: relative; display: grid; justify-items: center; gap: 1px; min-height: 48px; padding: 6px; border-radius: 11px; font-weight: 800; font-size: .86rem; color: #64748b; }
  .zd-pane-switch button small { font-size: .7rem; font-weight: 600; }
  .zd-pane-switch button[aria-selected="true"] { background: #fff; color: var(--accent, #0372c0); box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }
  .dark .zd-pane-switch button[aria-selected="true"] { background: rgba(255, 255, 255, .1); color: #fff; }
  .zd-pane-switch button i { position: absolute; top: 4px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent, #0372c0); color: #fff; font-style: normal; font-size: .66rem; line-height: 18px; }
  .zd-split-cols { grid-template-columns: 1fr; }
  .zd-col-arrow { display: none; }
  .zd-split-cols[data-pane="order"] .zd-col--bill, .zd-split-cols[data-pane="bill"] .zd-col--order { display: none; }
  .zd-col-body { max-height: none; }
  .zd-oline { grid-template-columns: minmax(0, 1fr) auto auto; }
  .zd-oline .zd-link { display: none; }
  .zd-pay-sum strong { font-size: 1.2rem; }
}

.zd-paid-banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: rgba(16, 185, 129, .09); border: 1px solid rgba(16, 185, 129, .3); }
.zd-paid-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #10b981; color: #fff; }
.zd-paid-ic svg { width: 16px; height: 16px; }
.zd-paid-banner > span:nth-child(2) { flex: 1; display: grid; line-height: 1.25; }
.zd-paid-banner b { font-size: .9rem; }
.zd-paid-banner small { font-size: .74rem; color: #64748b; }
.zd-btn--sm { min-height: 38px; padding: 0 12px; font-size: .82rem; flex: none; }
.zd-step-print { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: #047857; background: rgba(16, 185, 129, .12); margin-left: 2px; }
.zd-step-print svg { width: 15px; height: 15px; }
@media (max-width: 760px) { .zd-paid-banner { flex-wrap: wrap; } .zd-paid-banner .zd-btn--sm { flex: 1 1 100%; } }

.zd-col-foot { padding: 10px; border-top: 1px solid rgba(15, 23, 42, .07); }
.dark .zd-col-foot { border-color: rgba(255, 255, 255, .08); }
.zd-add-rest { width: 100%; color: var(--accent, #0372c0) !important; border-color: rgba(var(--accent-rgb, 3, 114, 192), .35) !important; }

/* Payment screen: Save / Pay Later / Split as matching action cards */
#view-payment .zuno-payment-top-actions { width: min(100%, 640px) !important; display: grid !important; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important; gap: 10px !important; margin-bottom: 1.6rem !important; flex-wrap: initial !important; }
#view-payment .zuno-payment-top-actions > button { display: grid !important; grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; justify-items: start; text-align: left; min-height: 74px !important; padding: 12px 14px !important; border-radius: 18px !important; border: 1px solid rgba(15, 23, 42, .1) !important; background: #fff !important; color: #0f172a !important; font-size: .98rem !important; font-weight: 800 !important; line-height: 1.2; box-shadow: 0 6px 18px rgba(15, 23, 42, .05) !important; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.dark #view-payment .zuno-payment-top-actions > button { background: rgba(255, 255, 255, .04) !important; border-color: rgba(255, 255, 255, .12) !important; color: #f1f5f9 !important; box-shadow: none !important; }
#view-payment .zuno-payment-top-actions > button svg { display: none !important; }
#view-payment .zuno-payment-top-actions > button[hidden], #view-payment .zuno-payment-top-actions > button.hidden { display: none !important; }
#view-payment .zuno-payment-top-actions > button::before { content: ''; grid-column: 1; grid-row: 1 / 3; width: 42px; height: 42px; border-radius: 13px; background: var(--zpa-tint) var(--zpa-icon) center / 21px no-repeat; }
#view-payment .zuno-payment-top-actions > button::after { content: attr(data-sub); grid-column: 2; grid-row: 2; font-size: .74rem; font-weight: 600; color: #64748b; margin-top: 2px; }
.dark #view-payment .zuno-payment-top-actions > button::after { color: #94a3b8; }
#view-payment .zuno-payment-top-actions > button:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--zpa-edge) !important; box-shadow: 0 12px 26px rgba(15, 23, 42, .08) !important; }
#save-order-btn { --zpa-tint: rgba(245, 158, 11, .14); --zpa-edge: rgba(245, 158, 11, .55); --zpa-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d97706' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M6 3h12v18l-6-4-6 4z'/%3E%3C/svg%3E"); }
#pay-later-btn { --zpa-tint: rgba(239, 68, 68, .12); --zpa-edge: rgba(239, 68, 68, .5); --zpa-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
#split-bill-btn { --zpa-tint: rgba(3, 114, 192, .12); --zpa-edge: rgba(3, 114, 192, .5); --zpa-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230372c0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 3h5v5M8 3H3v5M21 3l-7 7M3 3l7 7M12 14v7'/%3E%3C/svg%3E"); }
@media (max-width: 640px) {
  #view-payment .zuno-payment-top-actions { grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px !important; margin-bottom: 1.1rem !important; }
  #view-payment .zuno-payment-top-actions > button { grid-template-columns: 1fr; grid-template-rows: auto auto; justify-items: center; text-align: center; row-gap: 6px; min-height: 84px !important; padding: 10px 6px !important; font-size: .82rem !important; border-radius: 16px !important; }
  #view-payment .zuno-payment-top-actions > button::before { grid-column: 1; grid-row: 1; width: 36px; height: 36px; border-radius: 11px; background-size: 18px; }
  #view-payment .zuno-payment-top-actions > button::after { display: none; }
}
/* Split bill opens full screen */
.zd-overlay:has(.zd-sheet--wide) { align-items: stretch; background: rgba(2, 12, 27, .35); }
.zd-sheet.zd-sheet--wide { width: 100%; max-width: none; height: 100dvh; max-height: none; border-radius: 0; transform: none; }
.zd-sheet--wide > .zd-head, .zd-sheet--wide > .zd-body, .zd-sheet--wide > .zd-foot { padding-left: max(20px, calc((100% - 1180px) / 2)); padding-right: max(20px, calc((100% - 1180px) / 2)); }
.zd-sheet--wide > .zd-head { padding-top: calc(18px + env(safe-area-inset-top)); }
.zd-sheet--wide > .zd-head h3 { font-size: 1.35rem; }
.zd-sheet--wide .zd-col-body { max-height: none; }
.zd-sheet--wide .zd-pay-btns .zd-btn { min-height: 54px; font-size: 1rem; }
@media (min-width: 761px) { .zd-sheet--wide .zd-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; } .zd-sheet--wide .zd-pay-sum, .zd-sheet--wide .zd-pay-btns { flex: none; } }
/* ---- Table bookings (Restaurant plan) ---- */
.zd-seg button.is-on { background: #fff; color: var(--accent, #0372c0); box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }
.dark .zd-seg button.is-on { background: rgba(255, 255, 255, .1); }
.zd-next { display: flex; align-items: center; gap: 5px; min-width: 0; padding-top: 6px; border-top: 1px dashed rgba(100, 116, 139, .25); font-size: .7rem; font-weight: 700; color: #4f46e5; }
.zd-next svg { width: 13px; height: 13px; flex: none; }
.zd-next span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zd-next.is-warn { color: #b45309; }
.zd-next--walkin { color: #64748b; }
.bk-row--walkin .bk-lane { cursor: default; background: repeating-linear-gradient(135deg, rgba(100, 116, 139, .05) 0 8px, transparent 8px 16px); }
.zd-btn svg { width: 17px; height: 17px; }
.dark .zd-next { color: #a5b4fc; }
.bk-new { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 12px; font-weight: 700; font-size: .88rem; color: #fff; background: linear-gradient(120deg, var(--accent, #0372c0), var(--accent-2, #014599)); box-shadow: 0 8px 20px rgba(var(--accent-rgb, 3, 114, 192), .22); }
.bk-new svg { width: 16px; height: 16px; }
@media (max-width: 420px) { .bk-new span { display: none; } .bk-new { width: 40px; padding: 0; justify-content: center; } }
.bk-root { padding: 16px; display: flex; flex-direction: column; gap: 14px; color: #0f172a; }
.dark .bk-root { color: #e2e8f0; }
.bk-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.bk-nav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bk-icon, .bk-today { min-height: 38px; border-radius: 11px; border: 1px solid rgba(15, 23, 42, .12); background: #fff; font-weight: 700; color: inherit; }
.bk-icon { width: 38px; font-size: 1.3rem; line-height: 1; }
.bk-today { padding: 0 14px; font-size: .85rem; }
.bk-today.is-on { color: var(--accent, #0372c0); border-color: rgba(var(--accent-rgb, 3, 114, 192), .45); }
.dark .bk-icon, .dark .bk-today { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .14); }
.bk-date { position: relative; display: inline-flex; align-items: center; min-height: 38px; padding: 0 10px; border-radius: 11px; font-weight: 800; font-size: 1.02rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-date input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.bk-date:hover { background: rgba(var(--accent-rgb, 3, 114, 192), .06); }
.bk-tabs { grid-template-columns: repeat(3, 1fr) !important; min-width: 280px; background: rgba(15, 23, 42, .06); }
.bk-tabs button { padding: 0 12px; font-size: .84rem; }
@media (max-width: 640px) { .bk-tabs { width: 100%; min-width: 0; } .bk-nav { width: 100%; } .bk-date { flex: 1; font-size: .95rem; } }
.bk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.bk-stat { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid rgba(15, 23, 42, .08); }
.dark .bk-stat { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .1); }
.bk-stat b { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bk-stat span { font-size: .72rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 640px) { .bk-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .bk-stat { padding: 8px 9px; border-radius: 12px; } .bk-stat b { font-size: 1.1rem; } .bk-stat span { font-size: .56rem; letter-spacing: .02em; line-height: 1.2; } }
.bk-stat.is-booked b { color: #4f46e5; } .bk-stat.is-seated b { color: #d97706; } .bk-stat.is-noshow b { color: #dc2626; }
.dark .bk-stat.is-booked b { color: #a5b4fc; }
/* day plan */
.bk-timeline { overflow-x: auto; border-radius: 16px; background: #fff; border: 1px solid rgba(15, 23, 42, .08); padding: 6px 0 10px; }
.dark .bk-timeline { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .1); }
.bk-row { display: grid; grid-template-columns: 112px minmax(calc(var(--bk-cols, 11) * 72px), 1fr); align-items: stretch; min-height: 52px; border-top: 1px solid rgba(15, 23, 42, .06); }
.dark .bk-row { border-color: rgba(255, 255, 255, .06); }
.bk-row--head { min-height: 30px; border-top: 0; }
.bk-row-name { position: sticky; left: 0; z-index: 3; display: grid; align-content: center; gap: 1px; padding: 0 12px; background: inherit; background: #fff; border-right: 1px solid rgba(15, 23, 42, .06); }
.dark .bk-row-name { background: #0b1a2b; border-color: rgba(255, 255, 255, .08); }
.bk-row-name b { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-row-name small { display: flex; align-items: center; gap: 4px; font-size: .68rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-row-name small svg { width: 12px; height: 12px; flex: none; }
.bk-row--un .bk-row-name b { color: #b45309; }
.bk-hours { position: relative; }
.bk-hours span { position: absolute; top: 6px; transform: translateX(-50%); font-size: .68rem; font-weight: 700; color: #64748b; font-variant-numeric: tabular-nums; }
.bk-hours span:first-child { transform: none; padding-left: 4px; }
.bk-lane { position: relative; cursor: copy; }
.bk-lane > i { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(15, 23, 42, .06); }
.dark .bk-lane > i { background: rgba(255, 255, 255, .06); }
.bk-lane:hover { background: rgba(var(--accent-rgb, 3, 114, 192), .03); }
.bk-now { position: absolute; top: -1px; bottom: -1px; width: 2px; background: #ef4444; z-index: 2; pointer-events: none; }
.bk-now::before { content: ""; position: absolute; top: -3px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; }
.bk-block { position: absolute; top: 7px; bottom: 7px; z-index: 1; display: grid; align-content: center; gap: 0; min-width: 34px; padding: 0 9px !important; border-radius: 10px; text-align: left; overflow: hidden; color: #fff; background: #6366f1; box-shadow: 0 4px 12px rgba(15, 23, 42, .12); cursor: pointer; }
.bk-block b { font-size: .76rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.bk-block span { font-size: .66rem; font-weight: 600; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-block--booked { background: transparent; color: #4f46e5; border: 1.5px dashed #6366f1; box-shadow: none; }
.dark .bk-block--booked { color: #c7d2fe; }
.bk-block--confirmed { background: #6366f1; }
.bk-block--seated { background: #f59e0b; color: #3b2500; }
.bk-block--over, .bk-block--walkin.is-over { background: #ef4444; color: #fff; }
.bk-block--late { background: #fee2e2; color: #b91c1c; border: 1.5px solid #f87171; box-shadow: none; }
.bk-block--done { background: rgba(100, 116, 139, .18); color: #475569; box-shadow: none; }
.bk-block--noshow { background: repeating-linear-gradient(45deg, rgba(239, 68, 68, .08) 0 6px, transparent 6px 12px); color: #b91c1c; border: 1px solid rgba(239, 68, 68, .3); box-shadow: none; }
.bk-block--walkin { background: rgba(245, 158, 11, .2); color: #92400e; box-shadow: none; cursor: default; border: 1px solid rgba(245, 158, 11, .5); }
.dark .bk-block--done { color: #cbd5e1; }
.bk-hint { margin: 0; font-size: .75rem; color: #64748b; }
/* agenda */
.bk-agenda { display: grid; gap: 8px; }
.bk-item { display: flex; align-items: stretch; gap: 6px; padding: 6px; border-radius: 16px; background: #fff; border: 1px solid rgba(15, 23, 42, .08); border-left: 4px solid #6366f1; }
.dark .bk-item { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .1); border-left-color: #6366f1; }
.bk-item--seated { border-left-color: #f59e0b !important; }
.bk-item--done, .bk-item--cancelled { border-left-color: #94a3b8 !important; opacity: .75; }
.bk-item--noshow { border-left-color: #ef4444 !important; opacity: .8; }
.bk-item-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 6px 8px !important; text-align: left; border-radius: 12px; background: transparent; color: inherit; }
.bk-item-main:hover { background: rgba(var(--accent-rgb, 3, 114, 192), .05); }
.bk-time { display: grid; flex: none; width: 58px; font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.bk-time small { font-size: .66rem; font-weight: 600; color: #64748b; }
.bk-who { flex: 1; min-width: 0; display: grid; gap: 2px; }
.bk-who b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-who small { display: flex; align-items: center; gap: 4px; font-size: .76rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-who small svg { width: 13px; height: 13px; flex: none; }
.zrf-overlay { position: fixed; inset: 0; z-index: 130000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(2, 6, 23, .6); }
.zrf-card { width: min(100%, 420px); max-height: 92dvh; overflow: auto; padding: 20px; border-radius: 18px; background: #fff; color: #172033; box-shadow: 0 22px 60px rgba(0, 0, 0, .3); display: grid; gap: 12px; }
.dark .zrf-card { background: #142130; color: #f8fafc; }
.zrf-card h3 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.zrf-sub { margin: 0; font-size: .85rem; color: #64748b; } .dark .zrf-sub { color: #9fb4c2; }
.zrf-opt, .zrf-chk { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid #d5dee8; border-radius: 12px; font-size: .92rem; cursor: pointer; }
.dark .zrf-opt, .dark .zrf-chk { border-color: #354657; }
.zrf-opt > span { display: flex; align-items: center; gap: 10px; flex: 1; flex-wrap: wrap; }
.zrf-opt em { display: inline-flex; align-items: center; gap: 4px; font-style: normal; margin-left: auto; }
.zrf-opt em i { font-style: normal; font-weight: 700; }
.zrf-opt em input { width: 96px; padding: 7px 9px; border: 1px solid #cbd5e1; border-radius: 9px; font-size: 1rem; background: transparent; color: inherit; }
.zrf-opt em input:disabled { opacity: .45; }
.zrf-chk { border-style: dashed; }
.zrf-set { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; } .zrf-set legend { font-size: .8rem; font-weight: 700; color: #64748b; padding: 0 0 6px; }
.zrf-sum { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fff7ed; color: #9a3412; font-size: .85rem; font-weight: 600; } .dark .zrf-sum { background: #3b2a1a; color: #fdba74; }
.zrf-err { margin: 0; color: #b91c1c; font-size: .85rem; font-weight: 600; } .zrf-err[hidden] { display: none; }
.zrf-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.zrf-btn { min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid #cbd5e1; background: transparent; color: inherit; font-weight: 700; cursor: pointer; }
.zrf-btn--go { background: #0e9f96; border-color: #0e9f96; color: #fff; }

.zrf-lines { display: grid; gap: 8px; } .zrf-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #d5dee8; border-radius: 12px; } .dark .zrf-line { border-color: #354657; }
.zrf-ln { display: grid; min-width: 0; } .zrf-ln small { color: #64748b; font-size: .78rem; }
.zrf-step { display: inline-flex; align-items: center; gap: 4px; } .zrf-step button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid #cbd5e1; background: transparent; color: inherit; font-size: 1.3rem; font-weight: 700; cursor: pointer; } .zrf-step output { min-width: 32px; text-align: center; font-weight: 800; font-size: 1.05rem; }
.zrf-sel { margin-left: auto; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 9px; background: transparent; color: inherit; max-width: 100%; }
.zrf-btn:disabled { opacity: .45; cursor: not-allowed; }
.zrf-card :focus-visible { outline: 3px solid #14b8a6; outline-offset: 2px; }
.bk-toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.bk-cx { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid #fca5a5; background: transparent; color: #b91c1c; font-weight: 700; font-size: .8rem; cursor: pointer; }
.bk-cx i { width: 30px; height: 18px; border-radius: 999px; background: #cbd5e1; position: relative; transition: background .15s; }
.bk-cx i:after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.bk-cx.is-on i { background: #dc2626; } .bk-cx.is-on i:after { transform: translateX(12px); }
.bk-block--cancelled { background: repeating-linear-gradient(45deg, rgba(220, 38, 38, .14) 0 6px, rgba(220, 38, 38, .05) 6px 12px) !important; color: #b91c1c !important; border: 1px solid #f87171 !important; box-shadow: none !important; }
.bk-block--cancelled b { text-decoration: line-through; }
.bk-item--cancelled { border-left-color: #dc2626 !important; opacity: 1 !important; background: rgba(220, 38, 38, .05); }
.bk-item--cancelled .bk-who b { text-decoration: line-through; color: #b91c1c; }
.bk-item--cancelled .bk-pill--cancelled { color: #b91c1c; background: rgba(239, 68, 68, .12); text-decoration: none; }
.ap-pay { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 3px 9px; border-radius: 999px; font-size: .68rem; font-weight: 800; line-height: 1.2; white-space: nowrap; border: 1px solid transparent; }
.ap-pay b { font-weight: 900; }
.ap-pay--paid { color: #fff; background: #16a34a; }
.ap-pay--part { color: #78350f; background: #fef3c7; border-color: #16a34a; }
.ap-pay--due { color: #64748b; background: transparent; border: 1px dashed #94a3b8; }
.ap-pay--bad { color: #b91c1c; background: #fee2e2; border-color: #fca5a5; }
.ap-pay--dot { margin-left: 6px; padding: 1px 6px; font-size: .62rem; vertical-align: middle; }
.dark .ap-pay--due { color: #94a3b8; border-color: #64748b; }
.dark .ap-pay--part { color: #78350f; }
.bk-item-main .ap-pay { margin-right: 6px; align-self: center; }
.bk-pill { flex: none; padding: 3px 9px; border-radius: 999px; font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.bk-pill--booked { color: #4f46e5; background: rgba(99, 102, 241, .12); }
.bk-pill--confirmed { color: #fff; background: #6366f1; }
.bk-pill--seated { color: #92400e; background: rgba(245, 158, 11, .2); }
.bk-pill--done { color: #475569; background: rgba(100, 116, 139, .14); }
.bk-pill--noshow, .bk-pill--late { color: #b91c1c; background: rgba(239, 68, 68, .12); }
.bk-pill--cancelled { color: #64748b; background: rgba(100, 116, 139, .1); text-decoration: line-through; }
.bk-seat, .bk-call { flex: none; display: grid; place-items: center; align-content: center; gap: 1px; width: 58px; border-radius: 12px; font-size: .68rem; font-weight: 800; }
.bk-seat { color: #fff; background: linear-gradient(120deg, var(--accent, #0372c0), var(--accent-2, #014599)); }
.bk-call { color: var(--accent, #0372c0); background: rgba(var(--accent-rgb, 3, 114, 192), .08); }
.bk-seat svg, .bk-call svg { width: 18px; height: 18px; }
@media (max-width: 520px) { .bk-pill { display: none; } .bk-item--seated .bk-pill, .bk-item--noshow .bk-pill { display: inline-flex; } .bk-seat, .bk-call { width: 48px; } }
/* month */
.bk-month { border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid rgba(15, 23, 42, .08); }
.dark .bk-month { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .1); }
.bk-month-head, .bk-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.bk-month-head span { padding: 8px; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #64748b; text-align: center; }
.bk-day { min-height: 92px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px !important; border-top: 1px solid rgba(15, 23, 42, .06); border-left: 1px solid rgba(15, 23, 42, .06); text-align: left; background: transparent; color: inherit; border-radius: 0; }
.dark .bk-day { border-color: rgba(255, 255, 255, .06); }
.bk-day:nth-child(7n + 1) { border-left: 0; }
.bk-day:hover { background: rgba(var(--accent-rgb, 3, 114, 192), .05); }
.bk-day.is-out { opacity: .4; }
.bk-day-n { font-size: .82rem; font-weight: 800; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.bk-day.is-today .bk-day-n { color: #fff; background: var(--accent, #0372c0); }
.bk-day.is-sel { box-shadow: inset 0 0 0 2px rgba(var(--accent-rgb, 3, 114, 192), .45); }
.bk-day-c { display: grid; font-size: .7rem; color: #4f46e5; line-height: 1.3; }
.bk-day-c b { font-size: .95rem; }
.bk-day-c small { color: #64748b; font-size: .66rem; }
.bk-day[data-heat="2"] { background: rgba(99, 102, 241, .05); } .bk-day[data-heat="3"] { background: rgba(99, 102, 241, .09); } .bk-day[data-heat="4"] { background: rgba(99, 102, 241, .14); }
@media (max-width: 640px) { .bk-day { min-height: 64px; padding: 5px !important; } .bk-day-c small, .bk-day-c { font-size: 0; } .bk-day-c b { font-size: .8rem; } }
/* empty + upsell */
.bk-empty, .bk-upsell { display: grid; justify-items: center; gap: 8px; padding: 36px 16px; text-align: center; color: #64748b; border-radius: 18px; background: #fff; border: 1px dashed rgba(15, 23, 42, .14); }
.dark .bk-empty, .dark .bk-upsell { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .14); }
.bk-empty svg { width: 34px; height: 34px; color: var(--accent, #0372c0); }
.bk-empty b { color: #0f172a; font-size: 1rem; } .dark .bk-empty b { color: #e2e8f0; }
.bk-empty span { max-width: 44ch; font-size: .86rem; }
.bk-upsell { max-width: 620px; margin: 24px auto; padding: 36px 24px; border-style: solid; }
.bk-upsell-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #0e7490, #0891b2); box-shadow: 0 14px 30px rgba(14, 116, 144, .3); }
.bk-upsell-icon svg { width: 30px; height: 30px; }
.bk-upsell h2 { margin: 6px 0 0; font-size: 1.3rem; font-weight: 800; color: #0f172a; text-wrap: balance; } .dark .bk-upsell h2 { color: #e2e8f0; }
.bk-upsell p { margin: 0; max-width: 52ch; font-size: .9rem; }
.bk-upsell ul { margin: 6px 0 10px; padding: 0; list-style: none; display: grid; gap: 6px; text-align: left; font-size: .86rem; color: inherit; }
.bk-upsell li::before { content: "✓"; margin-right: 8px; font-weight: 800; color: #0e7490; }
.bk-upsell .zd-btn { flex: none; min-width: 240px; }
.bk-muted { margin: 0; font-size: .76rem; color: #64748b; }
.bk-warn { color: #b45309; }
/* booking form */
.zd-sheet--booking { max-width: 640px; }
.bk-when { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.bk-when label { display: grid; gap: 5px; }
.bk-when input, .bk-when select { width: 100%; min-height: 46px; padding: 0 10px; border-radius: 12px; border: 1px solid rgba(15, 23, 42, .14); background: #f8fafc; color: inherit; font-size: .95rem; font-weight: 600; }
.dark .bk-when input, .dark .bk-when select { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .14); }
.bk-party { display: grid; gap: 5px; } .bk-party > span, .bk-when label > span { font-size: .8rem; font-weight: 700; }
@media (max-width: 480px) { .bk-when { grid-template-columns: 1fr 1fr; } .bk-party { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; } }
.bk-section { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(15, 23, 42, .03); border: 1px solid rgba(15, 23, 42, .07); }
.dark .bk-section { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .08); }
.bk-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bk-section-head b { font-size: .85rem; } .bk-section-head small { font-size: .74rem; color: #64748b; font-variant-numeric: tabular-nums; }
.bk-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.bk-tchip { display: grid; gap: 1px; padding: 8px 10px !important; border-radius: 12px; text-align: left; background: #fff; border: 1.5px solid rgba(15, 23, 42, .1); color: inherit; min-width: 0; }
.dark .bk-tchip { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .12); }
.bk-tchip b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-tchip span { display: flex; align-items: center; gap: 4px; font-size: .68rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-tchip span svg { width: 12px; height: 12px; flex: none; }
.bk-tchip em { font-style: normal; font-size: .66rem; font-weight: 800; color: #047857; }
.bk-tchip.is-best { border-color: rgba(16, 185, 129, .55); }
.bk-tchip.is-clash { opacity: .55; } .bk-tchip.is-clash em { color: #b91c1c; }
.bk-tchip.is-on { border-color: var(--accent, #0372c0); background: rgba(var(--accent-rgb, 3, 114, 192), .08); box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 3, 114, 192), .12); opacity: 1; }
.bk-tchip.is-on em::before { content: "✓ "; }
.bk-guest { position: relative; display: grid; gap: 5px; min-width: 0; }
.bk-suggest { display: none; position: absolute; left: 0; right: 0; top: 74px; z-index: 5; padding: 4px; border-radius: 12px; background: #fff; border: 1px solid rgba(15, 23, 42, .12); box-shadow: 0 16px 36px rgba(15, 23, 42, .16); }
.bk-suggest.is-open { display: grid; }
.bk-contact { position: relative; }
.bk-suggest--contact { top: 74px; }
.dark .bk-suggest { background: #10243a; border-color: rgba(255, 255, 255, .14); }
.bk-suggest button { display: grid; gap: 1px; padding: 9px 10px !important; border-radius: 9px; text-align: left; background: transparent; color: inherit; }
.bk-suggest button:hover, .bk-suggest button:focus { background: rgba(var(--accent-rgb, 3, 114, 192), .08); }
.bk-suggest b { font-size: .9rem; } .bk-suggest small { font-size: .72rem; color: #64748b; }
.bk-cust-tag { display: flex; align-items: center; gap: 5px; margin: 0; font-size: .72rem; font-weight: 700; color: #047857; }
.bk-cust-tag svg { width: 13px; height: 13px; }
.bk-cust-tag button { margin-left: auto; font-size: .72rem; font-weight: 700; color: #64748b; text-decoration: underline; background: transparent; padding: 0 !important; }
.bk-cust-tag--new { color: var(--accent, #0372c0); }
.bk-msgs { display: grid; gap: 6px; padding: 10px 12px; border-radius: 14px; background: rgba(var(--accent-rgb, 3, 114, 192), .05); border: 1px solid rgba(var(--accent-rgb, 3, 114, 192), .12); }
.bk-msg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 36px; }
.bk-msg + .bk-msg { padding-top: 6px; border-top: 1px dashed rgba(100, 116, 139, .25); }
.bk-msg-ico { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 9px; background: rgba(var(--accent-rgb, 3, 114, 192), .12); color: var(--accent, #0372c0); font-size: .95rem; }
.bk-msg-ico--wa { background: rgba(37, 211, 102, .14); color: #128c4a; }
.bk-msg-ico svg { width: 17px; height: 17px; }
.bk-msg-label { flex: 1 1 160px; font-size: .82rem; }
.bk-msg .bk-check em { font-style: normal; color: #64748b; }
.bk-wa { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 10px; background: #25d366; color: #053d1f; font-weight: 800; font-size: .8rem; text-decoration: none; }
.bk-wa:hover { background: #20bd5a; }
.bk-tick { display: inline-block; margin-right: 4px; font-weight: 900; letter-spacing: -.12em; color: #64748b; }
.bk-tick--ok { color: #0ea5e9; } .bk-tick--err { color: #dc2626; } .bk-tick--wait { color: #d97706; }
.bk-mail--sent { color: #475569; } .bk-mail--wait { color: #b45309; }
.bk-saved { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; font-size: .82rem; font-weight: 800; color: #047857; }
.bk-saved svg { width: 15px; height: 15px; }
.bk-agenda-ticks { display: inline-flex; gap: 6px; margin-left: 6px; font-size: .68rem; font-weight: 800; color: #64748b; }
.bk-mailrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 12px; border-radius: 12px; background: rgba(var(--accent-rgb, 3, 114, 192), .05); }
.zd-form label.bk-check { display: flex !important; flex-direction: row; align-items: center; gap: 10px; flex: 1 1 260px; font-size: .82rem; font-weight: 500; }
.zd-form label.bk-check > span { font-size: .82rem; font-weight: 500; }
.zd-form label.bk-check b { color: inherit; font-weight: 800; }
.bk-row2 { align-items: start; }
.bk-check input { order: -1; width: 18px !important; height: 18px; margin: 0; accent-color: var(--accent, #0372c0); flex: none; }
.bk-mail { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; color: #047857; }
.bk-mail svg { width: 13px; height: 13px; }
.bk-mail--err { color: #b91c1c; }
@keyframes bkPop { 0% { transform: scale(.6); opacity: 0; } 55% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes bkGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb, 3, 114, 192), 0); } 30% { box-shadow: 0 0 0 6px rgba(var(--accent-rgb, 3, 114, 192), .35); } }
.bk-notification-focus{outline:3px solid #ef4444!important;outline-offset:3px;box-shadow:0 0 0 7px rgba(239,68,68,.16)!important}
.bk-new-pop { animation: bkPop .55s cubic-bezier(.2, .9, .3, 1.3) both, bkGlow 1.8s ease .5s 2; z-index: 3; }
@media (prefers-reduced-motion: reduce) { .bk-new-pop { animation: none; outline: 3px solid rgba(var(--accent-rgb, 3, 114, 192), .45); } }
.bk-toast { gap: 10px; }
.bk-toast-act { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; padding: 6px 10px; border-radius: 9px; background: #25d366; color: #053d1f; font-weight: 800; font-size: .8rem; text-decoration: none; }
.bk-toast-act svg { width: 14px; height: 14px; }
.bk-block--gcancel { top: 4px !important; bottom: auto !important; height: 20px; min-width: 90px; padding: 0 8px !important; border-radius: 7px; background: #fee2e2 !important; color: #b91c1c !important; border: 1px solid #f87171; box-shadow: none; animation: bkAlertPulse 2s ease-in-out infinite; }
.bk-block--gcancel b { font-size: .68rem; }
@keyframes bkAlertPulse { 50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, .18); } }
.bk-item--alert { border-color: rgba(239, 68, 68, .45) !important; border-left-color: #ef4444 !important; background: rgba(239, 68, 68, .05) !important; opacity: 1 !important; }
.bk-item--alert .bk-who small { color: #b91c1c; }
.bk-ack { flex: none; display: grid; place-items: center; align-content: center; gap: 1px; width: 64px; border-radius: 12px; font-size: .68rem; font-weight: 800; color: #fff; background: #ef4444; }
.bk-ack svg { width: 18px; height: 18px; }
.bk-btn-ack { color: #fff; background: #ef4444; }
.bk-btn-ack svg { width: 16px; height: 16px; }
.bk-stat.is-alert { border-color: rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .06); }
.bk-stat.is-alert b { color: #dc2626; }
.bk-nav-alert { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.bk-showall { justify-self: start; padding: 4px 2px !important; font-size: .78rem; font-weight: 700; color: var(--accent, #0372c0); background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.bk-row2 { grid-template-columns: 1fr 150px !important; } .bk-row2b { grid-template-columns: 1fr 1fr !important; }
@media (max-width: 480px) { .bk-row2, .bk-row2b { grid-template-columns: 1fr !important; } }
.bk-form input[type="tel"], .bk-form input[type="email"] { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid rgba(15, 23, 42, .14); background: #f8fafc; color: inherit; font-size: .95rem; }
.dark .bk-form input[type="tel"], .dark .bk-form input[type="email"] { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .14); }
.bk-seg { grid-template-columns: 1fr 1fr; }
.bk-banner { margin: 0; padding: 10px 12px; border-radius: 12px; font-weight: 700; font-size: .85rem; background: rgba(100, 116, 139, .1); }
.bk-banner--seated { background: rgba(245, 158, 11, .14); color: #92400e; }
.bk-banner--noshow { background: rgba(239, 68, 68, .1); color: #b91c1c; }
.bk-btn-seat { color: #fff; background: linear-gradient(120deg, #f59e0b, #d97706); }
.bk-btn-seat svg { width: 17px; height: 17px; }
.zd-sheet--booking .zd-foot { flex-wrap: wrap; }
.zd-sheet--booking .zd-foot .zd-btn { white-space: nowrap; }
@media (max-width: 520px) { .zd-sheet--booking .zd-foot .zd-btn:not(.zd-btn--primary) { flex: 1 1 auto; padding: 0 12px; } .zd-sheet--booking .zd-foot .zd-btn--primary { flex: 1 1 100%; } .zd-sheet--booking .zd-foot-gap { display: none; } }

/* ---- Appointments ---- */
.ap-dot { display: inline-block; width: 9px; height: 9px; border-radius: 999px; margin-right: 6px; vertical-align: baseline; }
.ap-off { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(100, 116, 139, .12) 0 6px, transparent 6px 12px); pointer-events: none; }
.ap-list { display: grid; gap: 8px; }
.ap-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid rgba(148, 163, 184, .35); border-radius: 14px; background: rgba(148, 163, 184, .06); }
.ap-row b { display: block; font-size: .95rem; }
.ap-row small { display: block; font-size: .78rem; color: #64748b; margin-top: 2px; }
.ap-wide { width: 100%; justify-content: center; margin-top: 12px; }
.ap-days { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-days .bk-tchip { min-width: 56px; align-items: center; }
.ap-swatch { width: 32px; height: 32px; border-radius: 999px; border: 3px solid transparent; box-shadow: 0 0 0 1px rgba(15, 23, 42, .15); }
.ap-swatch.is-on { border-color: #fff; box-shadow: 0 0 0 2px #0f172a; }
.ap-tabs { margin-bottom: 12px; }
.ap-tabs small { opacity: .6; margin-left: 4px; }
.ap-setup-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 0 0 12px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(120deg, rgba(124, 58, 237, .10), rgba(14, 148, 136, .10)); border: 1px solid rgba(124, 58, 237, .25); }
.ap-setup-card b { font-size: 1rem; }
.ap-setup-card p { margin: 2px 0 8px; font-size: .85rem; color: #475569; }
.dark .ap-setup-card p { color: #cbd5e1; }
.ap-steps { display: flex; gap: 8px; }
.ap-step { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: rgba(148, 163, 184, .2); color: #475569; }
.ap-step svg { width: 12px; height: 12px; }
.ap-step.is-done { background: #dcfce7; color: #166534; }
/* Menu links are display:flex, which beat the .hidden helper, so hidden tabs (Bookings, Appointments) still showed. */
#menu-drawer .menu-link.hidden { display: none !important; }

/* ---- Free month: celebration and countdown ---- */
#zuno-phone-banner { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; padding: 2px 10px; background: #fef3c7; color: #78350f; font-size: 12px; line-height: 1.25; border-bottom: 1px solid #fcd34d; }
#zuno-phone-banner .zpb-text { flex: 1 1 140px; min-width: 0; }
#zuno-phone-banner button { padding: 1px 8px; border-radius: 6px; font-weight: 600; font-size: 12px; line-height: 1.3; white-space: nowrap; border: 1px solid #b45309; }
#zuno-phone-banner .zpb-go { background: #b45309; color: #fff; }
.dark #zuno-phone-banner { background: #422006; color: #fde68a; border-color: #92400e; }
#zuno-owner-phone { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(2, 8, 23, .62); }
#zuno-owner-phone .zop-card { width: 100%; max-width: 420px; max-height: 92vh; overflow: auto; border-radius: 20px; padding: 22px; background: #fff; color: #0f172a; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.dark #zuno-owner-phone .zop-card { background: #111827; color: #f8fafc; }
#zuno-owner-phone .zop-sub { color: #475569; }
.dark #zuno-owner-phone .zop-sub { color: #9fb0bf; }
#zuno-trial-celebration { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(2, 8, 23, .62); backdrop-filter: blur(3px); opacity: 0; transition: opacity .3s ease; }
#zuno-trial-celebration.is-open { opacity: 1; }
.ztc-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ztc-confetti i { position: absolute; top: -24px; display: block; opacity: .95; animation-name: ztcFall; animation-timing-function: linear; animation-iteration-count: 2; }
@keyframes ztcFall { 0% { transform: translateY(-5vh) rotate(var(--r)) translateX(0); } 50% { transform: translateY(55vh) rotate(calc(var(--r) + 360deg)) translateX(28px); } 100% { transform: translateY(112vh) rotate(calc(var(--r) + 720deg)) translateX(-20px); opacity: .8; } }
.ztc-card { position: relative; width: 100%; max-width: 420px; text-align: center; padding: 30px 26px 24px; border-radius: 28px; background: #fff; color: #0f172a; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); transform: translateY(24px) scale(.92); transition: transform .5s cubic-bezier(.2, .9, .3, 1.25); }
#zuno-trial-celebration.is-open .ztc-card { transform: none; }
.dark .ztc-card { background: #0f172a; color: #f1f5f9; }
.ztc-burst { font-size: 64px; line-height: 1; animation: ztcPop 1.1s ease-out both; }
@keyframes ztcPop { 0% { transform: scale(.2) rotate(-25deg); } 55% { transform: scale(1.25) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
.ztc-kicker { margin: 12px 0 2px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #10b3a0; }
.ztc-card h2 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 800; }
.ztc-big { margin: 14px 0 10px; padding: 12px 14px; border-radius: 16px; font-size: 17px; background: linear-gradient(120deg, rgba(16, 179, 160, .14), rgba(124, 58, 237, .14)); }
.ztc-big b:first-child { font-size: 30px; color: #0d9488; }
.ztc-perks { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; text-align: left; font-size: 14px; }
.ztc-perks li::before { content: '✓'; display: inline-block; width: 20px; height: 20px; margin-right: 8px; border-radius: 999px; background: #10b3a0; color: #fff; text-align: center; line-height: 20px; font-size: 12px; font-weight: 800; }
.ztc-note { margin: 4px 0 16px; font-size: 13px; line-height: 1.55; color: #64748b; }
.ztc-go { width: 100%; padding: 15px; border: 0; border-radius: 16px; font-size: 16px; font-weight: 800; color: #fff; background: linear-gradient(120deg, #10b3a0, #0d8f80); box-shadow: 0 10px 24px rgba(16, 179, 160, .35); }
.ztc-go:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) { .ztc-burst, .ztc-card { animation: none; transition: none; } }
.plan-trial-card { padding: 16px; border-radius: 20px; background: linear-gradient(120deg, rgba(16, 179, 160, .14), rgba(124, 58, 237, .12)); border: 1px solid rgba(16, 179, 160, .35); }
.plan-trial-top { display: flex; align-items: center; gap: 12px; }
.plan-trial-icon { font-size: 30px; }
.plan-trial-title { margin: 0; font-weight: 800; font-size: 1rem; }
.plan-trial-sub { margin: 2px 0 0; font-size: .8rem; color: #475569; line-height: 1.45; }
.dark .plan-trial-sub { color: #cbd5e1; }
.plan-trial-days { flex: none; text-align: center; padding: 6px 12px; border-radius: 14px; background: #fff; color: #0f172a; box-shadow: 0 2px 8px rgba(15, 23, 42, .1); }
.plan-trial-days b { display: block; font-size: 1.6rem; line-height: 1; color: #0d9488; }
.plan-trial-days span { font-size: .7rem; font-weight: 700; color: #64748b; }
.plan-trial-track { height: 8px; margin-top: 14px; border-radius: 999px; background: rgba(148, 163, 184, .3); overflow: hidden; }
.plan-trial-track > div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #10b3a0, #7c3aed); }
.plan-trial-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: .75rem; font-weight: 600; color: #475569; }
.dark .plan-trial-foot { color: #cbd5e1; }


/* Settings tabs: one section at a time instead of a long scroll */
#settings-tabs,#settings-subtabs{display:flex;gap:4px;overflow-x:auto;border-bottom:1px solid #e5e7eb;scrollbar-width:none}
.dark #settings-tabs,.dark #settings-subtabs{border-color:#1f2937}
#settings-tabs:empty,#settings-subtabs:empty{display:none}
#settings-subtabs{display:block;margin-top:12px;border-bottom:0;overflow:visible}#settings-subtabs:empty{display:none}
.zs-back{appearance:none;background:none;border:0;padding:6px 0;font-size:14px;font-weight:600;color:#0f766e;cursor:pointer}.dark .zs-back{color:#2dd4bf}
.zs-banner{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border-radius:10px;background:#ecfdf5;color:#065f46;font-size:14px;margin-bottom:10px}.zs-banner.is-warn{background:#fef2f2;color:#991b1b}.zs-banner span{font-size:13px;opacity:.85}
.zs-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.zs-step{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid #e5e7eb;border-radius:10px;background:#fff}.dark .zs-step{background:#111827;border-color:#374151}.zs-step.is-todo{border-color:#fca5a5;background:#fef2f2}.dark .zs-step.is-todo{background:#2a1215;border-color:#7f1d1d}
.zs-dot{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-size:14px;font-weight:700;background:#dcfce7;color:#166534}.zs-step.is-todo .zs-dot{background:#dc2626;color:#fff}
.zs-step-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.zs-step-tx b{font-size:14px}.zs-step-tx span{font-size:12px;color:#6b7280}.dark .zs-step-tx span{color:#9ca3af}.zs-step.is-todo .zs-step-tx b{color:#b91c1c}
.zs-step-go{flex:none;appearance:none;border:0;border-radius:8px;background:#0d9488;color:#fff;font-size:13px;font-weight:600;padding:8px 14px;cursor:pointer}.zs-step.is-todo .zs-step-go{background:#dc2626}
.zs-sub-off{display:none!important}
.zs-tab.zs-todo{color:#dc2626}.zs-tab.zs-todo::after{content:'';display:inline-block;width:8px;height:8px;border-radius:50%;background:#dc2626;margin-left:7px;vertical-align:middle}.zs-tab.zs-todo[aria-selected="true"]{border-bottom-color:#dc2626;color:#b91c1c}.dark .zs-tab.zs-todo{color:#f87171}
.zs-tab{appearance:none;background:none;border:0;border-bottom:2px solid transparent;padding:12px 14px;font-size:14px;font-weight:600;white-space:nowrap;color:#6b7280;cursor:pointer;margin-bottom:-1px}
.zs-tab:hover{color:#0f766e}
.zs-tab[aria-selected="true"]{border-bottom-color:#0d9488;color:#0f766e}
.dark .zs-tab{color:#9ca3af}.dark .zs-tab[aria-selected="true"],.dark .zs-tab:hover{color:#2dd4bf}
.zs-subtab{appearance:none;border:1px solid #d1d5db;background:transparent;border-radius:999px;padding:6px 12px;font-size:13px;font-weight:600;white-space:nowrap;color:#4b5563;cursor:pointer}
.zs-subtab[aria-selected="true"]{background:#0d9488;border-color:#0d9488;color:#fff}
.dark .zs-subtab{border-color:#374151;color:#d1d5db}
.zs-tab-off{display:none!important}
#settings-form.zs-tabs-on details.zs-group>summary.zs-sum{display:none}
#settings-form.zs-tabs-on details.zs-group>.zs-body{border-top:1px solid #e5e7eb;border-radius:12px;margin-top:12px}
.dark #settings-form.zs-tabs-on details.zs-group>.zs-body{border-top-color:#1f2937}
#settings-form.zs-tabs-on details.zs-pilled>.zs-body>div>h2:first-child{display:none}
.zs-group{background:transparent}
.zs-sum{list-style:none;display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:12px;background:#fff;border:1px solid #e5e7eb;cursor:pointer;user-select:none}
.dark .zs-sum{background:#111827;border-color:#1f2937}
.zs-sum::-webkit-details-marker{display:none}
.zs-ico{width:36px;height:36px;border-radius:10px;background:#ccfbf1;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0}
.zs-txt{flex:1;min-width:0;display:flex;flex-direction:column}
.zs-txt b{font-size:15px}.zs-txt small{font-size:12px;color:#6b7280}
.zs-chev{transition:transform .2s;color:#9ca3af;flex-shrink:0}
.zs-group[open] .zs-chev{transform:rotate(180deg)}
.zs-group[open] .zs-sum{border-bottom-left-radius:0;border-bottom-right-radius:0}
.zs-body{display:flex;flex-direction:column;gap:14px;padding:14px;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 12px 12px;background:rgba(0,0,0,.02)}
.dark .zs-body{border-color:#1f2937;background:rgba(255,255,255,.02)}
.zs-body h2{font-size:14px!important;margin-bottom:6px!important}
.mn-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px;position:sticky;top:0;z-index:2;background:inherit;padding:4px 0}.mn-share{margin-bottom:14px;padding:12px;border:1px solid rgba(127,127,127,.25);border-radius:12px}.mn-share h3{margin-top:0}.mn-share-row{margin:8px 0}.mn-share-row small{display:block;opacity:.7;margin-bottom:3px}.mn-share-row div{display:flex;gap:6px}.mn-share-row input{flex:1;min-width:0;font-size:.78rem}
/* Zuno Table Booking (bookings only): hide every till screen and setting */
body.zuno-team-only #nav-checkout,body.zuno-team-only #nav-orders,body.zuno-team-only #nav-tables,body.zuno-team-only #nav-kitchen,body.zuno-team-only #nav-drivers,body.zuno-team-only #nav-weborders,body.zuno-team-only #nav-bookings,body.zuno-team-only #nav-appointments,body.zuno-team-only #nav-transactions,body.zuno-team-only #nav-expenses,body.zuno-team-only #nav-receivables,body.zuno-team-only #nav-analytics,body.zuno-team-only #nav-reports,body.zuno-team-only #nav-services,body.zuno-team-only #nav-products,body.zuno-team-only #nav-categories,body.zuno-team-only #nav-menu,body.zuno-team-only #nav-ai-studio,body.zuno-team-only #nav-customers,body.zuno-team-only #nav-zuno-web,
body.zuno-team-only #settings-group-menu,body.zuno-team-only #settings-group-sales,body.zuno-team-only #settings-group-service,body.zuno-team-only #settings-group-online-ordering,body.zuno-team-only #settings-group-online-booking,body.zuno-team-only #settings-group-online-tables,body.zuno-team-only #settings-group-receipts,body.zuno-team-only #settings-group-industry,body.zuno-team-only #settings-kitchen-card,body.zuno-team-only #settings-service-orders-card,body.zuno-team-only #settings-group-business div:has(> #business-tax-id),body.zuno-team-only #settings-group-business div:has(> #invoice-preferred-name),body.zuno-team-only #business-use-saved-pin,body.zuno-team-only #settings-group-business div:has(> #business-google-maps-url),body.zuno-team-only #settings-group-business div:has(> #phone-show),body.zuno-team-only #settings-group-business div:has(> #phone-mobile-shown){display:none!important}
body.zuno-tables-only #nav-checkout,body.zuno-tables-only #nav-orders,body.zuno-tables-only #nav-kitchen,body.zuno-tables-only #nav-drivers,body.zuno-tables-only #nav-weborders,body.zuno-tables-only #nav-transactions,body.zuno-tables-only #nav-expenses,body.zuno-tables-only #nav-receivables,body.zuno-tables-only #nav-analytics,body.zuno-tables-only #nav-reports,body.zuno-tables-only #nav-products,body.zuno-tables-only #nav-categories,body.zuno-tables-only #nav-menu,body.zuno-tables-only #nav-appointments,body.zuno-tables-only #nav-services,
body.zuno-tables-only #business-use-saved-pin,body.zuno-tables-only #settings-group-business div:has(> #invoice-preferred-name),body.zuno-tables-only #settings-group-business div:has(> #business-tax-id),body.zuno-tables-only #settings-group-business div:has(> #business-website) > p,body.zuno-tables-only label[for="customer-address-form"] span,body.zuno-tables-only #settings-group-menu,body.zuno-tables-only #settings-group-sales,body.zuno-tables-only #settings-group-service,body.zuno-tables-only #settings-group-online-ordering,body.zuno-tables-only #settings-group-online-booking,body.zuno-tables-only #settings-group-receipts,body.zuno-tables-only #settings-kitchen-card,body.zuno-tables-only #settings-service-orders-card{display:none!important}
#settings-group-industry:not(:has(#settings-appointments-card:not(.hidden),#settings-tables-card:not(.hidden),#settings-guest-messages-card:not(.hidden))){display:none}
.wo-badge{margin-left:auto;background:#dc2626;color:#fff;border-radius:999px;min-width:20px;height:20px;padding:0 6px;font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.wo-badge.hidden{display:none}
.wo-wrap{max-width:900px;margin:0 auto;padding:16px;display:grid;gap:18px}
.wo-sec h2{font-size:1rem;font-weight:700;margin:0 0 8px}.wo-empty{color:#6b7280;font-size:.9rem;margin:0}
.wo-err{background:#fef2f2;border:1px solid #fca5a5;color:#991b1b;border-radius:10px;padding:10px 12px;font-size:.9rem;margin:0}
.wo-card{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:14px;margin-bottom:12px;display:grid;gap:8px}
.dark .wo-card{background:#111827;border-color:#374151}
.wo-card.st-new{border-color:#f59e0b;box-shadow:0 0 0 2px rgba(245,158,11,.25)}.wo-card.flash{animation:wopulse 1.2s ease-in-out 3}
@keyframes wopulse{50%{box-shadow:0 0 0 6px rgba(245,158,11,.45)}}
.wo-h{display:flex;justify-content:space-between;align-items:baseline}.wo-no{font-size:1.25rem}.wo-ago{font-size:.8rem;color:#6b7280}
.wo-chips{display:flex;flex-wrap:wrap;gap:6px}.wo-chip{font-size:.78rem;font-weight:600;padding:3px 9px;border-radius:999px;background:#f3f4f6;color:#374151}
.wo-chip.ok{background:#dcfce7;color:#166534}.wo-chip.warn{background:#fee2e2;color:#991b1b}.wo-chip.kit{background:#ede9fe;color:#5b21b6}.wo-info{background:#eff6ff;border:1px solid #93c5fd;color:#1e3a8a;border-radius:10px;padding:10px 12px;font-size:.9rem;margin:0}.wo-chip.paid{background:#dcfce7;color:#166534}.wo-chip.due{background:#fef3c7;color:#92400e}.wo-chip.del{background:#dbeafe;color:#1e40af}
.wo-who a,.wo-addr a{color:#0f766e;text-decoration:underline}.wo-addr{font-size:.92rem}
.wo-lines{list-style:none;margin:0;padding:0;display:grid;gap:6px}.wo-line{display:flex;justify-content:space-between;gap:10px}.wo-pick{font-size:.82rem;color:#6b7280}
.wo-note{background:#fffbeb;border:1px solid #fcd34d;border-radius:8px;padding:6px 10px;font-size:.88rem}
.wo-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:12px 0}.wo-tile{display:flex;flex-direction:column;justify-content:space-between;min-height:88px;padding:10px 12px;border:1px solid var(--line,#ddd);border-radius:12px;background:var(--card,#fff)}.wo-tile-l{font-size:.75rem;opacity:.7;line-height:1.2}.wo-tile-v{font-size:1.1rem;font-weight:800;white-space:nowrap;margin:4px 0}.wo-tile-s{font-size:.74rem;opacity:.7;line-height:1.2}
.wo-tot{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end;font-size:.9rem;border-top:1px solid #e5e7eb;padding-top:8px}
.wo-label{font-size:.85rem;font-weight:600;color:#374151;margin-bottom:6px}.dark .wo-label{color:#d1d5db}
.wo-row{display:flex;flex-wrap:wrap;gap:8px}.wo-go{background:#0f766e;border-color:#0f766e;color:#fff}.wo-bad{border-color:#dc2626;color:#dc2626}
.wo-input{width:100%;padding:10px;border:1px solid #d1d5db;border-radius:8px;margin-bottom:8px;background:transparent}
.wo-toast{position:fixed;left:50%;transform:translateX(-50%);bottom:24px;z-index:2147483300;display:flex;align-items:center;gap:12px;max-width:min(560px,calc(100vw - 24px));padding:14px 16px;border-radius:14px;background:#0f766e;color:#fff;font-weight:600;box-shadow:0 12px 40px rgba(0,0,0,.35);animation:woToast .25s ease-out}.wo-toast.bad{background:#b91c1c}.wo-toast button{border:0;background:rgba(255,255,255,.2);color:#fff;border-radius:999px;width:28px;height:28px;font-size:1.1rem;cursor:pointer;flex:none}@keyframes woToast{from{opacity:0;transform:translate(-50%,12px)}to{opacity:1;transform:translate(-50%,0)}}
.wo-working{display:flex;align-items:center;gap:8px;font-weight:600;color:#0f766e}.wo-working:before{content:"";width:14px;height:14px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:woSpin .7s linear infinite}@keyframes woSpin{to{transform:rotate(360deg)}}
.wo-card.busy .wo-go{opacity:.55}.wo-hl{animation:woHl 1.6s ease-out 2}@keyframes woHl{0%,100%{box-shadow:0 0 0 0 rgba(15,118,110,0)}50%{box-shadow:0 0 0 6px rgba(15,118,110,.35)}}
.wo-pick-box{margin:10px 0;padding:12px;border:1.5px solid #0f766e;border-radius:12px;background:rgba(15,118,110,.06)}.wo-pick-h{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:8px}.wo-pick-n{font-size:12px;font-weight:700;padding:3px 9px;border-radius:999px;background:rgba(0,0,0,.08)}.wo-pick-n.ok{background:#0f766e;color:#fff}.wo-pick-l{list-style:none;margin:0;padding:0}.wo-pick-l li{display:flex;align-items:flex-start;gap:10px;padding:8px 0;border-top:1px solid rgba(127,127,127,.25)}.wo-pick-l input{width:22px;height:22px;flex:none;margin-top:1px}.wo-pick-l label{flex:1;cursor:pointer}.wo-pick-l label.got{opacity:.55;text-decoration:line-through}
.wo-disp{margin:10px 0 12px;padding:12px;border:1px solid #d1d5db;border-radius:12px}.wo-disp .wo-row{margin-bottom:10px}.wo-dl{display:block}.wo-dl>span{display:block;font-size:12px;font-weight:600;margin-bottom:4px;opacity:.75}.dark .wo-disp{border-color:#374151}.dark .wo-input option{color:#111}
#settings-group-service:not(:has(#settings-service-orders-card:not(.hidden),#settings-kitchen-card:not(.hidden))){display:none}
#settings-group-online-booking:not(:has(#settings-online-booking-card:not(.hidden))){display:none}
#settings-group-online-tables:not(:has(#settings-online-tables-card:not(.hidden))){display:none}
#settings-group-online-ordering:not(:has(#settings-online-menu-card:not(.hidden))){display:none}
#settings-group-menu:not(:has(#settings-menu-sections-card:not(.hidden),#settings-menu-choices-card:not(.hidden),#settings-menu-look-card:not(.hidden))){display:none}
/* Kitchen: line chips, send button, and the kitchen board */
.zco-kstat{font-style:normal;font-size:11px;font-weight:700;margin-left:6px;color:#0f766e}.zco-kstat--new{color:#b45309}
.zco-kbar{grid-column:1/-1;display:flex;gap:.4rem;align-items:stretch}.zco-kbar:not(:has(button:not([hidden]))){display:none}.zco-kitchen-btn{flex:1;min-width:0;min-height:40px;padding:0 .8rem;border-radius:.65rem;border:0;background:#f59e0b;color:#fff;font-weight:800;font-size:.86rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.zco-kitchen-btn.is-done{background:#f1f5f9;color:#64748b;font-weight:600}.dark .zco-kitchen-btn.is-done{background:#1f2937;color:#9ca3af}
.zco-kitchen-btn[hidden]{display:none}
.zco-knote{grid-column:1/-1;margin:0;font-size:12px;color:#64748b;text-align:center}.zco-rush-btn{flex:0 0 auto;min-height:40px;padding:0 .75rem;border-radius:.65rem;border:1px solid #fca5a5;background:#fff;color:#b91c1c;font-weight:700;font-size:.8rem}.zco-rush-btn[hidden]{display:none}.zco-rush-btn.is-on{background:#dc2626;border-color:#dc2626;color:#fff}.zco-rush-btn:disabled{opacity:.5}.zco-kitchen-btn:disabled:not(.is-done){opacity:.55}
.dark .zco-kitchen-btn:not(.is-done){background:#b45309;color:#fff}
.zco-kpill{margin-left:6px;font-size:11px;font-weight:700;padding:.1rem .5rem;border-radius:999px;border:1px solid #cbd5e1;background:#f1f5f9;color:#64748b}
.zco-kpill.is-on{border-color:#0d9488;background:#ccfbf1;color:#0f766e}
.zco-kstat--new{color:#b45309}.zco-kstat--preparing{color:#2563eb}.zco-kstat--ready{color:#15803d}.zco-kstat--served{color:#334155;background:#e2e8f0;border-radius:6px;padding:0 6px}
.zco-kstrip{display:flex;flex-direction:column;gap:2px;margin:0 0 8px;padding:8px 12px;border-radius:12px;border:1px solid #cbd5e1;background:#f8fafc;font-size:13px}
.zco-kstrip b{font-size:14px}.zco-kstrip span{color:#64748b;font-size:12px}.zco-kstrip[hidden]{display:none}
.zco-kstrip--new{border-color:#f59e0b;background:#fffbeb}.zco-kstrip--preparing{border-color:#3b82f6;background:#eff6ff}.zco-kstrip--ready{border-color:#16a34a;background:#f0fdf4}.zco-kstrip--served{background:#f1f5f9}
.dark .zco-kstrip{background:#111827;border-color:#374151}.dark .zco-kstrip span{color:#9ca3af}
.zco-knote-btn{flex:0 0 auto;min-height:40px;padding:0 .75rem;border:1px solid #cbd5e1;border-radius:.65rem;background:#fff;color:#334155;font-weight:700;font-size:.8rem}.zco-knote-btn[hidden]{display:none}.zco-knote-btn.is-on{border-style:solid;border-color:#0d9488;background:#f0fdfa;color:#0f766e}.kds-knote{background:#fef9c3;border:1.5px solid #facc15;color:#713f12;font-weight:800;border-radius:8px;padding:6px 8px;margin:6px 0}.kds-badge{display:inline-block;font-size:11px;font-weight:800;padding:.15rem .5rem;border-radius:999px;margin:2px 4px;white-space:nowrap}
.kds-badge--new{background:#fef3c7;color:#92400e}.kds-badge--preparing{background:#dbeafe;color:#1d4ed8}.kds-badge--ready{background:#dcfce7;color:#166534}.kds-badge--served{background:#e2e8f0;color:#475569}.kds-badge--none{background:#fee2e2;color:#991b1b}
.tf-root{padding:clamp(12px,2vw,24px);width:100%}.tf-area{width:100%}
.tf-bar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.tf-chip{display:inline-flex;gap:6px;align-items:center;font-size:13px;font-weight:600;padding:.4rem .8rem;border-radius:999px;border:1px solid #cbd5e1;background:#fff;color:#334155}
.tf-chip b{background:#e2e8f0;border-radius:999px;padding:0 .45rem;font-size:12px}.tf-chip.is-on{background:#0d9488;border-color:#0d9488;color:#fff}.tf-chip.is-on b{background:rgba(255,255,255,.25)}
.dark .tf-chip{background:#1f2937;color:#e5e7eb;border-color:#374151}
.tf-area h2{font-size:13px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#64748b;margin:14px 2px 8px}
.tf-bar{flex-wrap:wrap}
#view-checkout .zco-panel .zco-kbtn,.zco-kbtn{display:inline-grid!important;place-items:center;width:26px;height:26px;min-height:0!important;padding:0!important;margin-left:6px;border-radius:50%;border:1.5px solid #cbd5e1;background:#f1f5f9;color:#94a3b8;vertical-align:middle;flex:none}
.zco-kbtn svg{width:15px;height:15px}.zco-kbtn .kslash{display:inline}.zco-kbtn.is-on{border-color:#0d9488;background:#ccfbf1;color:#0f766e}.zco-kbtn.is-on .kslash{display:none}
.zco-kstat{display:inline-flex!important;align-items:center;gap:3px;line-height:1.1}.zco-kstat svg{width:13px;height:13px}
.zco-ordertype{padding:2px!important;margin-bottom:4px!important;gap:2px!important}
.zco-ordertype button{display:flex!important;flex-direction:column;align-items:center;gap:1px;padding:5px 2px!important;font-size:10.5px!important;line-height:1.15;min-height:0!important}
.zco-ordertype button svg{width:17px;height:17px}
.cart-seat-rows{gap:.3rem!important}.cart-seat-rows .zco-customer{padding:.3rem .5rem!important;min-height:0}
.cart-seat-rows .zco-customer-main{display:flex!important;align-items:baseline;gap:6px;flex-wrap:wrap}.cart-seat-rows .zco-customer-main small{font-size:.62rem;text-transform:uppercase;letter-spacing:.04em}.cart-seat-rows .zco-customer-main strong{font-size:.8rem!important}
.cart-seat-rows .zco-customer-icon{width:22px;height:22px}
.zuno-never,#pay-later-btn.zuno-never{display:none!important}
.fulfil-notify{margin-top:10px;padding:12px;border:1px solid rgba(128,128,128,.35);border-radius:10px}
.fulfil-notify-h{display:flex;justify-content:space-between;gap:8px;align-items:baseline;margin-bottom:8px}
.fulfil-notify-h b{font-size:.9rem}.fulfil-notify-h span{font-size:.78rem;color:#6b7280}
.fulfil-notify.is-on{border-color:#0d9488;background:rgba(13,148,136,.07)}.fulfil-notify.is-on .fulfil-notify-h span{color:#0d9488;font-weight:600}
.fulfil-seg{display:grid;grid-template-columns:1fr 2fr;border:1px solid rgba(128,128,128,.4);border-radius:10px;overflow:hidden}
.fulfil-seg button{padding:10px 8px;font-weight:600;font-size:.9rem;background:transparent;min-height:44px}
.fulfil-seg button[aria-pressed=true]{background:#0d9488;color:#fff}
.fulfil-seg button:focus-visible{outline:2px solid #0d9488;outline-offset:-3px}
.fulfil-notify-list{display:none;margin:8px 0 0 18px;list-style:disc;font-size:.78rem;color:#6b7280}.fulfil-notify.is-on .fulfil-notify-list{display:block}
.fulfil-grid{display:grid;gap:16px}@media(min-width:768px){.fulfil-grid--2{grid-template-columns:1fr 1fr;gap:24px}}
.fulfil-match.is-best{border-color:#14b8a6;background:#f0fdfa}.dark .fulfil-match.is-best{background:#0f2f2c}
.tf-toprow{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px}.tf-toprow .tf-viewsw{margin:0}.tf-actions{display:flex;gap:8px;flex-wrap:wrap;margin-left:auto}.tf-actions .zd-btn{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}@media(max-width:480px){.tf-actions{width:100%}.tf-actions .zd-btn{flex:1;justify-content:center}}
.tkov-banner{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:2px 10px;padding:8px 12px;border-radius:10px;background:#ecfdf5;border:1.5px solid #34d399;color:#065f46;margin-bottom:6px}.tkov-banner.is-warn{background:#fffbeb;border-color:#f59e0b;color:#92400e}.tkov-banner span{font-size:12.5px}
.tkov-list{display:grid;grid-template-columns:1fr;column-gap:20px}@media(min-width:900px){.tkov-list{grid-template-columns:1fr 1fr}}
.tkov-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid #e5e7eb}.dark .tkov-row{border-color:#374151}
.tkov-dot{flex:none;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:11px;color:#fff}.tkov-dot.is-ok{background:#10b981}.tkov-dot.is-warn{background:#f59e0b}.tkov-dot.is-info{background:#94a3b8}
.tkov-txt{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.25}.tkov-txt b{font-size:14px}.tkov-txt small{color:#6b7280;font-size:12px;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tkov-row .kds-chip{flex:none;padding:5px 11px;font-size:12px}
@media(max-width:480px){.tkov-row{gap:8px}.tkov-txt b{font-size:13.5px}}
.zda--verified .zda-search,.zda--verified .zda-manual{display:none}
.zda-btn{flex:none;padding:0 14px;border-radius:8px;background:#14b8a6;color:#fff;font-weight:700}.zda-btn:disabled{opacity:.6}
.zda-found{border:1.5px solid #14b8a6;background:#f0fdfa;border-radius:12px;padding:10px 12px}.dark .zda-found{background:#0f2f2c}.zda-found p{margin:2px 0}
.zda-warn{color:#b45309;font-size:13px;font-weight:600}.zda-err{color:#b91c1c;font-size:14px}
.zda-map{height:220px;border-radius:12px;overflow:hidden;background:#e5e7eb;margin-top:8px}.zda-map[hidden]{display:none}
.zda gmp-place-autocomplete{display:block;width:100%;color-scheme:light;min-height:48px;background:#fff;border:1.5px solid #94a3b8;border-radius:8px}
.zda-manual summary{color:#0f766e}
.fulfil-chips{display:flex;flex-wrap:wrap;gap:6px}.fulfil-chip{padding:7px 12px;border-radius:999px;border:1.5px solid #cbd5e1;background:#fff;font-weight:700;font-size:13px;color:#334155}.fulfil-chip.is-on{background:#0f766e;border-color:#0f766e;color:#fff}
.fulfil-cust-card{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1.5px solid #14b8a6;background:#f0fdfa;border-radius:12px;padding:10px 12px}.fulfil-cust-card small{display:block;color:#475569}
.fulfil-matches{margin-top:6px;display:flex;flex-direction:column;gap:4px}.fulfil-match{text-align:left;padding:8px 10px;border:1px solid #cbd5e1;border-radius:10px;background:#f8fafc}.fulfil-match small{display:block;color:#64748b}
.dark .fulfil-chip,.dark .fulfil-match{background:#1f2937;border-color:#374151;color:#e5e7eb}.dark .fulfil-cust-card{background:#0f2f2c}
.mn-root{padding:clamp(12px,2vw,24px)}.mn-root.mn-settings{padding:0}.mn-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:18px;align-items:start}.mn-settings .mn-layout{grid-template-columns:minmax(320px,380px) minmax(0,1fr)}.mn-sec-row .mn-input{flex:1;min-width:0;width:auto}.mn-sec-row .kds-chip{min-width:32px;height:32px;padding:0 8px;flex:none}.mn-tsec .mn-thead{white-space:normal}
.mn-panel{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:14px;position:sticky;top:0}.mn-panel h3{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#64748b;margin:12px 0 6px}.mn-panel h3:first-child{margin-top:0}
.mn-chips{display:flex;gap:6px;flex-wrap:wrap}.mn-tog{display:flex;align-items:center;gap:8px;font-size:14px;padding:3px 0}.mn-input{width:100%;padding:8px 10px;border:1px solid #cbd5e1;border-radius:10px;background:#fff}
.mn-themes{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.mn-theme{border:2px solid #e2e8f0;border-radius:10px;padding:6px;background:#fff;font-size:11px;font-weight:700;text-align:center;color:#334155}.mn-theme i{display:block;height:26px;border-radius:6px;background:linear-gradient(90deg,var(--b) 0 60%,var(--a) 60% 100%);border:1px solid #cbd5e1;margin-bottom:4px}.mn-theme.is-on{border-color:#0f766e;box-shadow:0 0 0 2px #99f6e4}
.mn-sec-row{display:flex;gap:6px;margin-bottom:6px;align-items:center}.mn-assign-list{max-height:260px;overflow:auto;border:1px solid #e2e8f0;border-radius:10px;padding:6px}.mn-assign{display:flex;gap:8px;align-items:center;justify-content:space-between;padding:4px 2px;font-size:13px}.mn-assign select{max-width:48%;padding:4px;border:1px solid #cbd5e1;border-radius:8px;background:#fff}
.mn-stagewrap{min-width:0}.mn-zoom{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin:0 0 8px}.mn-zoom span{font-size:12px;font-weight:700;color:#475569;margin-right:2px}.mn-zoom small{font-size:11px;color:#64748b;margin-left:auto}.mn-stage{overflow:hidden;border-radius:6px;box-shadow:0 6px 24px rgba(15,23,42,.18);background:#cbd5e1}.mn-scale{pointer-events:none}
.mn-grip{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;color:#94a3b8;font-weight:800;letter-spacing:-.15em;padding:6px 8px;border-radius:8px;flex:none}.mn-grip:hover{background:#f1f5f9;color:#475569}
.mn-tree{display:grid;gap:10px;max-height:60vh;overflow:auto;padding-right:2px}.mn-tsec{border:1px solid #e2e8f0;border-radius:12px;padding:6px;background:#f8fafc}.mn-tsec-off{background:#fff7ed;border-color:#fed7aa}
.mn-thead{font-size:12px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:#475569;padding:4px 6px}.mn-thead small{font-weight:600;color:#94a3b8}
.mn-trow{display:flex;align-items:center;gap:6px;padding:4px 6px;border-radius:10px;background:#fff;border:1px solid #e2e8f0;margin:4px 0;font-size:13px}.mn-tname{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mn-trow small{color:#64748b;flex:none}.mn-trow .kds-chip{padding:2px 7px;min-height:0}
.mn-empty{font-size:12px;color:#94a3b8;padding:8px;text-align:center;border:1px dashed #cbd5e1;border-radius:10px;margin:4px 0}
.mn-dragging{opacity:.35}.mn-ghost{position:fixed;z-index:99999;pointer-events:none;box-shadow:0 14px 34px rgba(15,23,42,.28);border-radius:12px;background:#fff;opacity:.96;transform:rotate(-1deg)}
.mn-over{outline:2px solid #0f766e;outline-offset:-2px;background:#ecfdf5}.mn-over-before{box-shadow:0 -3px 0 #0f766e}.mn-over-after{box-shadow:0 3px 0 #0f766e}
.dark .mn-tsec{background:#1f2937;border-color:#374151}.dark .mn-trow{background:#111827;border-color:#374151}.dark .mn-thead{color:#cbd5e1}
.mn-ai-hero{position:relative;overflow:hidden;margin:0 0 14px;padding:14px;border-radius:16px;color:#fff;background:radial-gradient(120% 140% at 0% 0%,#14b8a6 0%,#0f766e 38%,#312e81 100%);box-shadow:0 10px 26px rgba(49,46,129,.28);display:grid;gap:10px}
.mn-ai-hero::after{content:'';position:absolute;right:-30px;top:-30px;width:120px;height:120px;border-radius:50%;background:rgba(255,255,255,.12);filter:blur(2px)}
.mn-ai-spark{font-size:22px;line-height:1;width:38px;height:38px;border-radius:12px;background:rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;box-shadow:inset 0 0 0 1px rgba(255,255,255,.3)}
.mn-ai-hero-t{display:grid;gap:3px;position:relative;z-index:1}.mn-ai-hero-t b{font-size:15px;font-weight:800;line-height:1.2}.mn-ai-hero-t span{font-size:12px;opacity:.9;line-height:1.4}
.mn-ai-hero-a{display:flex;gap:8px;flex-wrap:wrap;align-items:center;position:relative;z-index:1}.mn-ai-hero-btn{background:#fff;color:#0f3d3a;border:0;border-radius:11px;padding:9px 16px;font-weight:800;cursor:pointer;box-shadow:0 4px 12px rgba(0,0,0,.2);transition:transform .15s}.mn-ai-hero-btn:hover{transform:translateY(-1px)}.mn-ai-hero-btn:focus-visible,.mn-ai-undo:focus-visible{outline:3px solid #fde68a;outline-offset:2px}
.mn-ai-undo{background:rgba(255,255,255,.16);color:#fff;border:1px solid rgba(255,255,255,.4);border-radius:11px;padding:8px 12px;font-weight:700;cursor:pointer}
.mn-ai-cred{margin:10px 0;padding:10px 12px;border-radius:12px;background:#f0fdfa;border:1px solid #99f6e4;font-size:13px}.mn-ai-cred small{display:block;color:#64748b;margin-top:6px;line-height:1.4}.mn-ai-bar-t{height:6px;border-radius:99px;background:#ccfbf1;margin-top:6px;overflow:hidden}.mn-ai-bar-t i{display:block;height:100%;background:linear-gradient(90deg,#14b8a6,#6366f1);border-radius:99px}
.mn-build{display:grid;grid-template-columns:1fr 260px;gap:22px;align-items:start}@media (max-width:700px){.mn-build{grid-template-columns:1fr}.mn-build-page{display:none}}
.mn-build-steps{list-style:none;margin:12px 0;padding:0;display:grid;gap:8px}.mn-build-steps li{display:flex;gap:10px;font-size:14px;color:#94a3b8}.mn-build-steps li span{width:18px;text-align:center}.mn-build-steps li.done{color:#0f766e}.mn-build-steps li.now{color:#0f172a;font-weight:700}.mn-build-steps li.now span{color:#6366f1;animation:mnpulse 1s ease-in-out infinite}
.mn-build-page{aspect-ratio:210/297;border-radius:10px;background:#fffdf8;box-shadow:0 10px 30px rgba(15,23,42,.18);padding:16px;display:grid;gap:8px;align-content:start;overflow:hidden}.mn-build-title{font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#0f766e;font-size:13px;border-bottom:2px solid #0f766e;padding-bottom:6px}
.mn-build-line{height:16px;border-radius:6px;background:linear-gradient(90deg,#e2e8f0,#f1f5f9,#e2e8f0);background-size:200% 100%;animation:mnshimmer 1.4s linear infinite;font-size:11px;line-height:16px;overflow:hidden;white-space:nowrap}.mn-build-line.on{background:#fff;border:1px solid #e2e8f0;animation:mnin .4s ease-out;padding:0 6px}
@keyframes mnshimmer{to{background-position:-200% 0}}@keyframes mnin{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}@keyframes mnpulse{50%{opacity:.35}}@media (prefers-reduced-motion:reduce){.mn-build-line,.mn-build-line.on,.mn-build-steps li.now span{animation:none}}
.dark .mn-ai-cred{background:#042f2e;border-color:#115e59}
.mn-ai-tag{display:inline-block;align-self:flex-start;margin:3px 0;padding:2px 9px;border-radius:99px;background:#ccfbf1;color:#0f766e;font-size:11px;font-weight:700}.mn-ai-meta em{font-size:12px;color:#475569;font-style:normal;line-height:1.4}
.mn-ai-opt{transition:box-shadow .2s,transform .2s}.mn-ai-opt:hover{box-shadow:0 12px 28px rgba(15,23,42,.16);transform:translateY(-2px)}@media (prefers-reduced-motion:reduce){.mn-ai-opt{transition:none}.mn-ai-opt:hover{transform:none}}
.mn-ai-tweak{display:grid;gap:6px;margin:6px 0 4px;padding:12px;border-radius:14px;background:linear-gradient(135deg,#f0fdfa,#eef2ff);border:1px solid #c7d2fe}.mn-ai-tweak span{font-size:12px;color:#64748b}.mn-ai-tweak div{display:flex;gap:8px;flex-wrap:wrap}.mn-ai-tweak .mn-input{flex:1;min-width:200px}
.mn-trow,.mn-sec-row .mn-grip,.mn-ghost{user-select:none;-webkit-user-select:none}
.ch-wrap{display:grid;gap:10px}.ch-card{border:1px solid #e2e8f0;border-radius:14px;background:#fff;overflow:hidden}.ch-card.is-open{box-shadow:0 8px 24px rgba(15,23,42,.1)}
.ch-head{display:grid;grid-template-columns:1fr auto;gap:2px 10px;padding:12px 14px;cursor:pointer}.ch-head span{grid-column:1;font-size:12px;color:#64748b}.ch-head i{grid-row:1/3;grid-column:2;align-self:center;font-style:normal;color:#64748b}.ch-head:focus-visible{outline:3px solid #14b8a6;outline-offset:-3px}
.ch-body{padding:0 14px 14px;display:grid;gap:10px}.ch-body h4{font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#475569;margin:6px 0 0}.ch-f{display:grid;gap:4px;font-size:12px;color:#475569}.ch-row{display:flex;gap:16px;flex-wrap:wrap;align-items:end}.ch-n{width:80px}
.ch-opt{display:flex;gap:8px;align-items:center;margin:0 0 6px}.ch-opt .mn-input:first-child{flex:1;min-width:0}.ch-price{width:90px}.ch-cur{color:#64748b}.ch-off{font-size:12px;color:#64748b;display:flex;align-items:center;gap:4px;white-space:nowrap}
.ch-list{max-height:220px;overflow:auto;border:1px solid #e2e8f0;border-radius:10px;padding:6px 10px}.ch-foot{display:flex;justify-content:space-between;gap:8px}.ch-del{color:#b91c1c;border-color:#fecaca}.ch-add{padding:12px;border:1px dashed #cbd5e1;border-radius:14px;display:grid;gap:8px}
.mn-hrs,.mn-hrs-sum{margin:-2px 0 8px 26px}.mn-hrs-sum{font-size:12px;color:#0f766e}.mn-hrs{padding:10px;border:1px solid #99f6e4;background:#f0fdfa;border-radius:12px;display:grid;gap:8px}.mn-win{display:grid;gap:6px;padding:8px;background:#fff;border-radius:10px;border:1px solid #e2e8f0}.mn-win-t{display:flex;gap:8px;align-items:end;flex-wrap:wrap}.mn-win-t label{font-size:12px;color:#475569;display:grid;gap:2px}.mn-win small{color:#64748b;font-size:11px}
.dark .ch-card{background:#111827;border-color:#374151}.dark .ch-list,.dark .mn-win{border-color:#374151;background:#111827}
.mn-ai-bar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0 0 12px}.mn-ai-btn{background:linear-gradient(135deg,#0f766e,#115e59);color:#fff;border:0;border-radius:12px;padding:10px 16px;font-weight:700;cursor:pointer}.mn-ai-btn:disabled{opacity:.45;cursor:not-allowed}
.mn-ai-ov{position:fixed;inset:0;z-index:99990;background:rgba(15,23,42,.55);display:flex;align-items:center;justify-content:center;padding:16px;overflow:auto}
.mn-ai-card{background:#fff;color:#0f172a;border-radius:18px;max-width:640px;width:100%;max-height:92vh;overflow:auto;padding:20px;box-shadow:0 24px 60px rgba(0,0,0,.35)}.mn-ai-wide{max-width:980px}.mn-ai-center{text-align:center;padding:40px 20px}
.mn-ai-head{display:flex;justify-content:space-between;align-items:center}.mn-ai-head h2,.mn-ai-center h2{font-size:20px;font-weight:800;margin:0}.mn-ai-x{border:0;background:#f1f5f9;border-radius:10px;width:36px;height:36px;cursor:pointer}
.mn-ai-sub{font-size:13px;color:#64748b;margin:6px 0}.mn-ai-list{display:grid;gap:8px;margin:12px 0}.mn-ai-row{display:flex;gap:10px;padding:10px;border-radius:12px;border:1px solid #e2e8f0}.mn-ai-row.is-ok{background:#f0fdf4;border-color:#bbf7d0}.mn-ai-tick{font-weight:800;color:#0f766e;width:18px;flex:none}.mn-ai-row.is-todo .mn-ai-tick{color:#94a3b8}.mn-ai-row>div{flex:1;min-width:0}
.mn-ai-foot{display:flex;justify-content:space-between;gap:8px;margin-top:12px}.mn-ai-err{color:#b91c1c;font-size:13px;margin:8px 0}
.ch-warn{color:#b45309;font-style:normal;font-weight:700}.dark .ch-warn{color:#fbbf24}.pc-box{border:1px solid #e2e8f0;border-radius:10px;padding:12px;display:grid;gap:8px}.dark .pc-box{border-color:#374151}.pc-none{font-size:13px;color:#64748b;margin:0}.pc-row{display:flex;gap:10px;align-items:flex-start;padding:8px 10px;border:1px solid #e2e8f0;border-radius:10px;cursor:pointer}.dark .pc-row{border-color:#374151}.pc-row input{margin-top:4px;width:18px;height:18px}.pc-row b{display:block;font-size:14px}.pc-row small{display:block;font-size:12px;color:#64748b}.pc-card{border:1px solid #cbd5e1;border-radius:10px;padding:10px;display:grid;gap:8px}.dark .pc-card{border-color:#374151}.pc-card-h{display:flex;gap:8px;align-items:center}.pc-card-h .mn-input{flex:1;min-width:0;font-weight:700}.pc-used{color:#64748b;font-size:12px}.pc-new{display:grid;gap:6px;margin-top:4px}.pc-new small{color:#64748b}.pc-link{font-size:12.5px;color:#0d9488;text-decoration:underline}.mn-choices{font-size:.78em;opacity:.8;font-style:italic;margin:.15em 0 0}.ch-sg{margin:12px 0}.ch-sg h3{font-weight:700;font-size:15px;margin-bottom:6px}.ch-sg h3 small{font-weight:600;font-size:12px;color:#0d9488;margin-left:6px}.ch-so{display:grid;gap:6px}.ch-sopt{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;text-align:left;padding:12px 14px;border:2px solid #e2e8f0;border-radius:12px;background:transparent;font-size:16px;min-height:48px}.ch-sopt.is-on{border-color:#0d9488;background:rgba(13,148,136,.12);font-weight:700}.ch-sopt:disabled{opacity:.45}.ch-sopt b{font-size:14px;color:#0d9488}.dark .ch-sopt{border-color:#374151}.zco-line-picks{font-size:12.5px;font-weight:600;color:#0d9488;margin:1px 0 2px}
/* Menu Studio 02: decorative paper canvas; the actual pending state uses ZunoLoading. */
.mn-setup{max-width:720px;padding:30px}.mn-setup-eyebrow{font-size:10px;letter-spacing:.18em;color:#638072}.mn-setup h2{font-family:Georgia,serif;font-size:36px;letter-spacing:-.04em;margin:15px 0 10px;font-weight:400}.mn-setup .mn-ai-sub{line-height:1.7}.mn-setup-snapshot{display:flex;gap:12px;align-items:center;padding:16px;margin:20px 0;background:#f2f6f3;border:1px solid #e3ebe5;border-radius:12px}.mn-setup-snapshot>img{width:38px;height:38px;object-fit:contain}.mn-setup-snapshot>div{display:grid;gap:5px}.mn-setup-snapshot b{font-size:14px}.mn-setup-snapshot span{font-size:11px;color:#687e70}.mn-setup-snapshot .mn-setup-swatches{display:flex;gap:5px;margin-left:auto}.mn-setup-swatches i{width:16px;height:16px;border:1px solid #64748b33;border-radius:50%}.mn-setup-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.mn-setup-fields label{display:grid;gap:8px;font-size:13px;font-weight:600}.mn-setup-fields input{font-weight:400}.mn-setup-block{display:grid;gap:8px;margin-top:20px}.mn-setup-block>span{font-size:12px;font-weight:600}.mn-setup-block small{font-size:11px;color:#64748b}.mn-setup-credit{font-size:11px;padding:14px 0;margin-top:12px;border-top:1px solid #e2e8f0;color:#62766b}.mn-setup-credit summary{cursor:pointer}.mn-setup .mn-ai-foot{margin-top:18px}.dark .mn-setup-snapshot{background:#162a23;border-color:#284437}.dark .mn-setup-snapshot span,.dark .mn-setup-credit{color:#a3b8ab}@media(max-width:540px){.mn-setup{padding:22px}.mn-setup h2{font-size:30px}.mn-setup-fields{grid-template-columns:1fr}.mn-setup-snapshot .mn-setup-swatches{display:none}}
.mn-ai-ov.mn-studio{padding:0!important;align-items:stretch;justify-content:stretch;overflow:hidden;background:#0b151a}.mn-ai-ov.mn-dim{background:rgba(8,17,22,.94)}
.mn-st{position:relative;width:100%;height:100%;min-height:440px;display:grid;grid-template-columns:42% 58%;color:#e7ede9;background:radial-gradient(ellipse at 75% 40%,#243c3b 0%,#101f26 48%,#0b151b 85%);overflow:auto}
.mn-st-top{position:absolute;inset:26px 38px auto;display:flex;justify-content:space-between;align-items:center;z-index:3}.mn-st-brand{font-size:15px;letter-spacing:.02em}.mn-st-brand b{font-weight:400;opacity:.65;margin-left:8px}.mn-st-version{font:10px system-ui;letter-spacing:.18em;color:#9caeac}
.mn-st-left{align-self:center;position:relative;z-index:2;padding:100px 20px 100px clamp(28px,6vw,92px)}.mn-st-business{display:flex;align-items:center;gap:12px;font-size:14px;color:#b7c9c3}.mn-st-business img{width:38px;height:38px;object-fit:contain;border-radius:9px}.mn-st-name{font-family:Georgia,serif;font-size:clamp(34px,4.7vw,70px);font-weight:400;letter-spacing:-.045em;line-height:1.08;margin:25px 0 20px}.mn-st-name span{color:#b4d9bd}.mn-st-intro{font-size:15px;line-height:1.8;color:#a9bcb7}.mn-st-sw{display:flex;gap:9px;margin:23px 0 35px}.mn-st-sw i{width:18px;height:18px;border:1px solid #ffffff44;border-radius:50%}.mn-st-pending .zuno-loading{color:#ecf2ed;font-size:13px}.mn-st-status{font-size:12px;color:#a0bcb2;margin:10px 0;min-height:18px}.mn-st-facts{font-size:11px;color:#8baba0;line-height:1.7}.mn-st-cred{font-size:11px;color:#9ab1a9;margin-top:24px}
.mn-st-right{position:relative;align-self:center;height:min(76vh,780px);min-height:360px;display:grid;place-items:center;overflow:hidden}.mn-canvas-orbit{position:absolute;width:90%;height:90%;border-radius:50%;border:1px solid #b9dcc316;box-shadow:0 0 0 45px #b9dcc305,0 0 0 90px #b9dcc303}.mn-canvas-sheet{position:relative;width:min(65%,360px);aspect-ratio:210/297;background:#eae7db;border-radius:3px;box-shadow:0 28px 85px #0006;overflow:hidden}.mn-canvas-back{position:absolute;transform:rotate(7deg) translate(22px,0);background:#c6ccbc;opacity:.4}.mn-canvas-front{padding:9%;box-sizing:border-box;transform:rotate(-4deg);isolation:isolate}.mn-canvas-grain{position:absolute;inset:0;z-index:3;pointer-events:none;background-image:radial-gradient(#a1b2a8 1px,transparent 1px);background-size:5px 5px;opacity:.65;mask-image:linear-gradient(110deg,transparent 5%,#000 30%,#000 55%,transparent 80%);mask-size:300% 100%;animation:mnCanvasSweep 3.6s ease-in-out infinite}.mn-canvas-mast{display:grid;justify-items:center;gap:9px;margin-bottom:14%}.mn-canvas-mast i{display:block;width:26px;height:26px;border:1px solid #6e8b79;border-radius:50%}.mn-canvas-mast b{width:68%;height:10px;background:#48685470}.mn-canvas-mast span{width:42%;height:4px;background:#48685430}.mn-canvas-columns{display:grid;grid-template-columns:1fr 1fr;gap:20px 15px}.mn-canvas-section{display:grid;gap:10px;animation:mnCanvasBreathe 3.6s ease-in-out infinite;animation-delay:calc(var(--section)*.3s)}.mn-canvas-section:last-child{grid-column:1/-1}.mn-canvas-heading{height:5px;width:65%;background:#55796670;margin-bottom:4px}.mn-canvas-line{display:flex;justify-content:space-between;gap:8px;opacity:.5}.mn-canvas-line i{height:3px;width:70%;background:#55796660}.mn-canvas-line b{height:3px;width:12%;background:#55796690}.mn-canvas-stamp{position:absolute;bottom:7%;left:0;right:0;text-align:center;font-size:7px;letter-spacing:.24em;color:#48685480}.mn-canvas-caption{position:absolute;bottom:0;font-size:11px;letter-spacing:.04em;color:#9fbab0}.mn-st-bottom{position:absolute;bottom:22px;left:38px;right:38px;display:flex;justify-content:space-between;font-size:10px;letter-spacing:.03em;color:#77998b}
@keyframes mnCanvasSweep{0%{mask-position:120% 0}100%{mask-position:-20% 0}}@keyframes mnCanvasBreathe{0%,100%{opacity:.45;filter:blur(.5px)}50%{opacity:1;filter:blur(0)}}
.mn-fit-probe{position:fixed;left:-10000px;top:0;width:794px;pointer-events:none}.mn-fit-probe iframe{width:794px;height:1123px;border:0}.mn-ai-opt.is-generating-art .mn-thumb:after{content:'';position:absolute;inset:0;pointer-events:none;background:radial-gradient(#82ad93cc 1px,transparent 1px),linear-gradient(110deg,#dce9df22,#cee7d2bb,#ffffff11);background-size:5px 5px,300% 100%;animation:mnArtSweep 2.4s ease-in-out infinite}.mn-art-status{font-size:12px;color:#0f766e;background:#ecfdf5;padding:10px;border-radius:8px}.dark .mn-art-status{background:#12342c;color:#a7f3d0}@keyframes mnArtSweep{0%,100%{opacity:.35;background-position:0 0,100% 0}50%{opacity:.8;background-position:0 0,0 0}}
@media(max-width:760px){.mn-st{grid-template-columns:1fr;align-content:start}.mn-st-top{inset:20px 22px auto}.mn-st-version{font-size:8px}.mn-st-left{padding:80px 26px 12px;text-align:center}.mn-st-business,.mn-st-sw{justify-content:center}.mn-st-name{font-size:36px;margin:15px 0}.mn-st-intro{display:none}.mn-st-sw{margin:15px 0}.mn-st-cred{margin:10px 0}.mn-st-right{height:48vh;min-height:300px}.mn-canvas-sheet{width:min(48%,250px)}.mn-canvas-caption{bottom:8px}.mn-st-bottom{position:relative;grid-column:1;inset:auto;padding:20px;gap:15px}.mn-st-pending .zuno-loading{justify-content:center}}
@media(prefers-reduced-motion:reduce){.mn-canvas-grain,.mn-canvas-section,.mn-ai-opt.is-generating-art .mn-thumb:after{animation:none!important}.mn-canvas-grain{opacity:.15}.mn-canvas-front{transform:none}}
.mn-ai-grid.is-reveal .mn-ai-opt{animation:mnRev .35s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i) * .06s)}@keyframes mnRev{from{filter:blur(14px);opacity:0;transform:translateY(18px) scale(.96)}to{filter:none;opacity:1;transform:none}}.mn-card-in{animation:mnCardIn .25s ease both}@keyframes mnCardIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}.mn-q{color:#0d9488;font-weight:600;font-size:11.5px}
@media (prefers-reduced-motion:reduce){.mn-st *,.mn-ai-grid.is-reveal .mn-ai-opt,.mn-card-in{animation:none!important;transition:none!important}.mn-st .mn-st-logo img,.mn-st .mn-st-name,.mn-st .mn-st-sw,.mn-st .mn-st-facts{opacity:1;transform:none;filter:none}.sk section,.sk section p{opacity:1}}
.mn-thumb{position:relative;display:block;width:100%;aspect-ratio:794/1123;overflow:hidden;border:1px solid #cbd5e1;border-radius:10px;background:#cbd5e1;padding:0;cursor:zoom-in;box-shadow:0 6px 18px rgba(15,23,42,.15);transition:transform .18s ease,box-shadow .18s ease}.mn-thumb:hover,.mn-thumb:focus-visible{transform:translateY(-2px);box-shadow:0 12px 26px rgba(15,23,42,.25)}.mn-thumb iframe{max-width:none;position:absolute;left:0;top:0;border:0;width:794px;height:1123px;pointer-events:none;background:#fff}.mn-thumb-pill{position:absolute;left:8px;right:8px;bottom:8px;background:rgba(15,23,42,.82);color:#fff;font-size:12px;font-weight:600;border-radius:999px;padding:6px 10px;text-align:center}
.mn-prev-ov{position:fixed;inset:0;z-index:100001;background:rgba(2,6,23,.82);display:flex;animation:mnPrevIn .22s ease}@keyframes mnPrevIn{from{opacity:0;transform:scale(.98)}to{opacity:1;transform:none}}.mn-prev{display:flex;flex-direction:column;width:100%;height:100%}.mn-prev-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 14px;background:#fff;color:#0f172a}.dark .mn-prev-bar{background:#111827;color:#f1f5f9}.mn-prev-sp{flex:1}.mn-prev-pg{font-size:13px}.mn-prev-body{flex:1;overflow:auto;padding:16px;display:flex;justify-content:safe center}.mn-prev-paper{flex:none;position:relative;box-shadow:0 20px 60px rgba(0,0,0,.5);background:#fff}.mn-prev-paper iframe{max-width:none;position:absolute;left:0;top:0;border:0;width:794px;background:#fff}@media (prefers-reduced-motion:reduce){.mn-prev-ov{animation:none}.mn-thumb{transition:none}}
.mn-ai-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;margin:12px 0}.mn-ai-opt{display:grid;gap:8px;align-content:start;border:1px solid #e2e8f0;border-radius:14px;padding:10px}.mn-ai-meta{display:flex;flex-direction:column}.mn-ai-meta span{font-size:12px;color:#64748b}
.mn-mini{aspect-ratio:210/297;border-radius:8px;padding:12px;overflow:hidden;font-size:10px;line-height:1.35;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}.mn-mini img{height:28px;width:28px;object-fit:contain;display:block;margin:0 auto 4px}.mn-mini-h{font-weight:800;font-size:14px;text-align:center;text-transform:uppercase;letter-spacing:.06em}.mn-mini-t{text-align:center;font-style:italic;opacity:.8;margin-bottom:6px}.mn-mini-sec{font-weight:800;text-transform:uppercase;letter-spacing:.1em;margin-top:6px;border-bottom:1px solid currentColor;padding-bottom:1px}.mn-mini-it{display:flex;justify-content:space-between;gap:6px}
.mn-ai-spin{width:38px;height:38px;border-radius:50%;border:4px solid #e2e8f0;border-top-color:#0f766e;margin:0 auto 14px;animation:mnspin 1s linear infinite}@keyframes mnspin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.mn-ai-spin{animation:none}}
.dark .mn-ai-card{background:#111827;color:#f1f5f9}.dark .mn-ai-row{border-color:#374151}.dark .mn-ai-row.is-ok{background:#052e1c}.dark .mn-ai-opt{border-color:#374151}
.dark .mn-panel{background:#111827;border-color:#374151}.dark .mn-input{background:#1f2937;border-color:#374151;color:#f1f5f9}
@media (max-width:820px){.mn-layout{grid-template-columns:1fr}.mn-layout{display:flex;flex-direction:column}.mn-panel{position:static}}
.drv-sec{margin:0 0 22px}.drv-sec h2{font-size:15px;font-weight:800;margin:0 0 10px}.drv-sec h2 span{margin-left:6px;font-size:12px;background:#0f172a;color:#fff;border-radius:999px;padding:1px 8px}
.drv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:10px}
.drv-card{background:#fff;border:1.5px solid #e2e8f0;border-radius:14px;padding:12px 14px;display:flex;flex-direction:column;gap:6px}.drv-card.is-out{border-color:#7c3aed;background:#f5f3ff}
.drv-top{display:flex;align-items:center;gap:8px}.drv-top strong{margin-left:auto}.drv-line{font-size:13px;color:#475569}.drv-addr{color:#0f172a;font-weight:600}
.drv-h{cursor:pointer;display:flex;align-items:center;gap:6px;user-select:none}.drv-h span{margin-left:auto}.drv-chev{font-style:normal;font-size:20px;line-height:1;transition:transform .15s}.drv-chev.is-open{transform:rotate(90deg)}.drv-body[hidden]{display:none}@media (max-width:640px){.drv-card{padding:8px 10px;gap:3px;border-radius:12px}.drv-num{font-size:16px!important}.drv-line{font-size:12px}.drv-actions{gap:4px}.drv-actions .kds-chip,.drv-actions select{padding:4px 9px;font-size:12px}.drv-sec h2{font-size:14px}.drv-table{font-size:12px;min-width:0}.drv-table th,.drv-table td{padding:6px 6px}.drv-grid{gap:6px}.drv-delivered{overflow-x:auto}.drv-delivered th:nth-child(2),.drv-delivered td:nth-child(2){display:none}}.drv-num{font-size:20px}.drv-card.is-ready{border-color:#16a34a;background:#f0fdf4}tr.is-received td{color:#64748b}.drv-settle{margin:8px 0;justify-content:space-between}.drv-tag{font-size:11px;font-weight:700;border-radius:999px;padding:2px 8px;background:#e2e8f0;color:#334155}.drv-tag.is-out{background:#7c3aed;color:#fff}.drv-tag.is-paid{background:#16a34a;color:#fff}
.drv-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.drv-actions select{padding:6px 8px;border-radius:10px;border:1px solid #cbd5e1;background:#fff;max-width:100%}
.drv-period{display:flex;gap:6px;margin-bottom:10px;flex-wrap:wrap}.drv-scroll{overflow-x:auto;background:#fff;border-radius:14px;border:1px solid #e2e8f0}
.drv-table{width:100%;border-collapse:collapse;font-size:13px;min-width:560px}.drv-table th,.drv-table td{padding:9px 10px;text-align:right;white-space:nowrap}.drv-table th:first-child,.drv-table td:first-child{text-align:left}.drv-table th{font-size:11px;color:#64748b;text-transform:uppercase;border-bottom:1px solid #e2e8f0}.drv-table tr.drv-total td{font-weight:800;border-top:2px solid #e2e8f0}
.drv-note{font-size:12px;color:#64748b;margin-top:8px}.drv-driver{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:10px 12px;margin-bottom:8px}.drv-driver small{display:block;color:#64748b}.drv-driver.is-off{opacity:.6}
.dark .drv-card,.dark .drv-driver,.dark .drv-scroll{background:#111827;border-color:#374151}.dark .drv-line,.dark .drv-driver small{color:#9ca3af}.dark .drv-addr{color:#f1f5f9}
.zco-fulfil .zco-customer-main small.zco-fulfil-addr{display:block;white-space:normal;color:#64748b}
@media (max-width:640px){.tf-grid{grid-template-columns:1fr 1fr!important;gap:10px}.tf-grid .tf-card{min-height:0;padding:12px 14px}.tf-grid .tf-card:not(.is-free){grid-column:1/-1}.tf-top strong{font-size:22px}}
#orders-list .zuno-record-card--order .zuno-record-head{display:flex!important;flex-wrap:wrap;align-items:center;gap:.3rem .5rem}
#orders-list .zuno-record-card--order .zuno-record-title{flex:1 1 0;min-width:7rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#orders-list .zuno-record-card--order .zuno-record-amount{width:auto!important;max-width:none!important;overflow:visible!important;text-overflow:clip!important;margin-left:auto;font-size:.9rem!important}
#orders-list .zuno-record-card--order .kds-badge{order:9;flex:0 0 auto;margin-left:1.5rem}
.tf-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(clamp(140px,19vw,230px),1fr));gap:12px}
.tf-card{display:flex;flex-direction:column;gap:5px;text-align:left;padding:12px 14px;border-radius:16px;border:1.5px solid #e2e8f0;background:#fff;min-height:132px;justify-content:flex-start}
.dark .tf-card{background:#111827;border-color:#374151}

.tf-viewsw{margin:0 0 10px}.tf-spacer{flex:1}
.tf-seg{display:inline-flex;border:1px solid #cbd5e1;border-radius:12px;overflow:hidden}.tf-seg button{border:0;min-height:40px;padding:0 14px;font-weight:700;font-size:13px;background:transparent;color:inherit}.tf-seg button.is-on{background:#0d9488;color:#fff}
.tf-viewbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.tf-fp-wrap{width:100%;overflow-x:auto;overflow-y:hidden;margin-top:10px;-webkit-overflow-scrolling:touch}
.tf-fp{position:relative;width:100%;aspect-ratio:16/10;border-radius:18px;border:1.5px solid #cbd5e1;background:#f8fafc;background-image:radial-gradient(#cbd5e1 1px,transparent 1px);background-size:24px 24px;overflow:hidden}.dark .tf-fp{background-color:#0f172a;border-color:#374151;background-image:radial-gradient(#334155 1px,transparent 1px)}
.tf-fp-t{position:absolute;left:calc(var(--x)*1%);top:calc(var(--y)*1%);width:var(--w);aspect-ratio:var(--ar);transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;padding:2px;min-width:44px;min-height:44px;border:2px solid #86efac;background:#f0fdf4;color:#14532d;border-radius:12px;font-size:clamp(10px,1.5vw,14px);line-height:1.1;text-align:center;overflow:hidden;transition:transform .12s ease,box-shadow .12s ease}
.tf-fp-t.shape-round{border-radius:50%}.tf-fp-t strong{font-size:1.15em;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-fp-t span{opacity:.8;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-fp-t em{font-style:normal;font-weight:800;font-size:.9em}
.tf-fp-t.is-busy{border-color:#f59e0b;background:#fffbeb;color:#78350f}.tf-fp-t.is-over{border-color:#dc2626;background:#fef2f2;color:#7f1d1d}.tf-fp-t.is-off{opacity:.5}.tf-fp-t.is-dim{opacity:.3}
.tf-fp:not(.is-edit) .tf-fp-t:hover,.tf-fp:not(.is-edit) .tf-fp-t:focus-visible{transform:translate(-50%,-50%) scale(1.12);z-index:3;box-shadow:0 8px 22px rgba(0,0,0,.22)}
.tf-fp.is-edit .tf-fp-t{cursor:grab;touch-action:none;border-style:dashed;border-color:#64748b;background:#fff;color:#0f172a;transition:none}.tf-fp.is-edit .tf-fp-t:active{cursor:grabbing}.tf-fp.is-edit .tf-fp-t.is-sel{border-style:solid;border-color:#0d9488;box-shadow:0 0 0 3px rgba(13,148,136,.35);z-index:2}.tf-fp.is-edit .tf-fp-t.is-bad{border-color:#dc2626}
.tf-fp-t:focus-visible{outline:3px solid #14b8a6;outline-offset:2px}
.tf-fp-hint,.tf-fp-warn{margin:10px 2px 0;font-size:13px;color:#64748b}.tf-fp-warn{color:#b45309;font-weight:600}
.tf-edit-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}.tf-edit-head small{display:block;color:#64748b;font-size:13px;margin-top:2px;max-width:46ch}.tf-edit-actions{display:flex;gap:8px}
.tf-edit-panel{margin-top:12px;padding:12px;border:1px solid #e2e8f0;border-radius:14px;display:grid;gap:8px}.dark .tf-edit-panel{border-color:#374151}.tf-edit-panel label{font-size:12px;font-weight:700;color:#64748b}
.tf-fp-roomhead{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:16px}.tf-fp-roomhead h2{font-size:15px;font-weight:700;margin:0}
.zt-card{color:#0f172a;border:1px solid rgba(16,179,160,.35);border-radius:20px;background:linear-gradient(160deg,#ecfdf7 0%,#fff 55%);padding:18px;display:flex;flex-direction:column;gap:14px;box-shadow:0 10px 30px -18px rgba(11,147,132,.55)}.dark .zt-card{color:#f3f4f6;background:linear-gradient(160deg,#0f2e2b 0%,#111827 60%);border-color:rgba(49,205,174,.35)}
.zt-head{display:flex;gap:12px;align-items:flex-start}.zt-ico{flex:none;width:46px;height:46px;border-radius:14px;background:#0b9384;color:#fff;display:grid;place-items:center}
.zt-pill{display:inline-block;font-size:11px;font-weight:700;letter-spacing:.02em;padding:2px 9px;border-radius:999px;background:#0b9384;color:#fff}.zt-head h3{font-size:19px;font-weight:800;margin:4px 0 2px}.zt-head p{font-size:13px;color:#475569;margin:0}.dark .zt-head p{color:#9ca3af}
.zt-math{display:flex;align-items:stretch;gap:8px;flex-wrap:wrap}.zt-math>div{flex:1 1 0;min-width:86px;border-radius:14px;background:#fff;border:1px solid #d1d5db;padding:9px 11px;display:flex;flex-direction:column;gap:1px}.dark .zt-math>div{background:#0b1220;border-color:#374151}
.zt-math small{font-size:11px;color:#64748b}.dark .zt-math small{color:#9ca3af}.zt-math b{font-size:18px;font-weight:800}.zt-math b span{font-size:12px;font-weight:500;color:#64748b}.zt-math i{align-self:center;font-style:normal;font-weight:700;color:#64748b}
.zt-math .zt-total{background:#0b9384;border-color:#0b9384;color:#fff}.zt-math .zt-total small{color:#d1faf0}.zt-math .zt-total b span{color:#d1faf0}.zt-math--one>div{flex:0 1 auto;min-width:150px}
.zt-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;font-size:14px}.zt-list li{display:flex;gap:10px;align-items:flex-start}.zt-list svg{flex:none;margin-top:1px;color:#0b9384}
.zt-btn{align-self:stretch;min-height:48px;border:0;border-radius:12px;background:#0b9384;color:#fff;font-weight:700;font-size:16px;cursor:pointer;transition:background .15s ease,transform .1s ease}.zt-btn:hover{background:#0c766c}.zt-btn:active{transform:scale(.985)}.zt-btn:focus-visible{outline:3px solid #31cdae;outline-offset:2px}.zt-btn:disabled{opacity:.6}
.zt-fine{margin:0;font-size:12px;color:#64748b}.dark .zt-fine{color:#9ca3af}
@media (min-width:640px){.zt-btn{align-self:flex-start;padding:0 26px}}
@media (prefers-reduced-motion:reduce){.zt-btn{transition:none}}
@media (prefers-reduced-motion:reduce){.tf-fp-t{transition:none}}
@media (max-width:760px){.tf-fp{min-width:640px}}
.tf-only-narrow{display:none}@media (max-width:760px){.tf-only-narrow{display:block}}
.tf-card.is-busy{border-color:#f59e0b;background:#fffbeb}.tf-card.is-over{border-color:#dc2626;background:#fef2f2}.tf-card.is-free{border-color:#86efac}
.dark .tf-card.is-busy{background:#2a2108}.dark .tf-card.is-over{background:#2f1212}
.tf-top{display:flex;justify-content:space-between;align-items:center;gap:6px}.tf-top strong{font-size:clamp(20px,2.2vw,28px);line-height:1.1}
.tf-status{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:800;color:#475569}.tf-status i{width:8px;height:8px;border-radius:50%;background:#94a3b8}
.is-free .tf-status i,.tf-status.is-free i{background:#16a34a}.is-busy .tf-status i,.tf-status.is-busy i{background:#f59e0b}.is-over .tf-status i,.tf-status.is-over i{background:#dc2626}
.tf-meta,.tf-who,.tf-next,.tf-muted{font-size:12px;color:#64748b}.tf-total{font-size:clamp(17px,1.8vw,22px);font-weight:800}
.tf-timer{font-size:12px;font-weight:700;color:#475569}.tf-timer.is-soon{color:#b45309}.tf-timer.is-over{color:#dc2626}
.tf-empty{display:flex;flex-direction:column;gap:4px;align-items:center;padding:40px 16px;color:#64748b;text-align:center}
.tf-detail{position:fixed;inset:0;z-index:1200;display:flex;align-items:flex-end;justify-content:center}
.tf-backdrop{position:absolute;inset:0;background:rgba(2,6,23,.55)}
.tf-sheet{position:relative;width:min(560px,100%);max-height:88vh;overflow-y:auto;background:#fff;color:#0f172a;border-radius:18px 18px 0 0;padding:16px 18px 18px;box-shadow:0 -10px 40px rgba(2,6,23,.35)}
.dark .tf-sheet{background:#111827;color:#e5e7eb}
@media(min-width:700px){.tf-detail{align-items:center}.tf-sheet{border-radius:18px}}
.tf-sheet header{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}.tf-sheet h2{font-size:20px;font-weight:800}.tf-sheet h2 small{font-size:13px;color:#64748b;font-weight:600}
.tf-x{font-size:26px;line-height:1;padding:0 6px;color:#64748b}
.tf-sheet h3{font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#64748b;margin:14px 0 6px}
.tf-facts{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin:12px 0}.tf-facts div{background:rgba(148,163,184,.14);border-radius:10px;padding:8px 10px}.tf-facts dt{font-size:11px;color:#64748b;font-weight:700}.tf-facts dd{font-weight:800;margin:0}
.tf-lines,.tf-tickets{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.tf-lines li{font-size:15px}.tf-tickets li{border:1px solid #e2e8f0;border-radius:10px;padding:8px 10px}.tf-tickets small{display:block;color:#64748b;margin-top:2px}
.tf-note{margin-top:8px;font-size:13px;font-weight:600;color:#b45309}
.tf-sheet footer{display:flex;gap:8px;margin-top:16px;flex-wrap:wrap}
body.is-no-payment #checkout-desktop-cart-action,body.is-no-payment #go-to-payment-btn,body.is-no-payment #split-bill-btn{display:none!important}
body.is-clock-only .menu-link:not(#nav-timeclock),body.is-clock-only #menu-header-plan-cta,body.is-clock-only .menu-section-title{display:none!important}
body.is-kitchen-only .menu-link:not(#nav-kitchen),body.is-kitchen-only #menu-header-plan-cta,body.is-kitchen-only .menu-section-title{display:none!important}
.kds-hint{margin:8px 12px 0;font-size:12px;color:#92400e;background:#fffbeb;border:1px solid #fde68a;border-radius:10px;padding:6px 10px}.kds-hint a{font-weight:700;text-decoration:underline}.kds-count{font-size:12px;font-weight:700;padding:.25rem .6rem;border-radius:999px;background:#e0f2fe;color:#075985}.nav-count{margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#0d9488;color:#fff;font-size:11px;line-height:20px;text-align:center}.kds-live{font-size:12px;font-weight:700;padding:.25rem .6rem;border-radius:999px;background:#dcfce7;color:#166534}.kds-live.is-off{background:#fee2e2;color:#991b1b}
.kds-chip{font-size:12px;font-weight:600;padding:.4rem .7rem;border-radius:999px;border:1px solid #cbd5e1;background:#fff;color:#334155}.kds-chip.is-on{background:#0d9488;border-color:#0d9488;color:#fff}
.dark .kds-chip{background:#1f2937;color:#e5e7eb;border-color:#374151}.dark .kds-chip.is-on{background:#0d9488;color:#fff}
.kds-root{padding:12px}
.kds-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:start}
@media(max-width:860px){.kds-board{grid-template-columns:1fr}}
.kds-col{background:rgba(148,163,184,.12);border-radius:14px;padding:10px;min-height:120px}
.kds-col h2,.kds-served h2{font-weight:800;font-size:15px;display:flex;justify-content:space-between;align-items:center;margin:0 2px 8px}
.kds-col h2 span,.kds-served h2 span{background:#0f172a;color:#fff;border-radius:999px;font-size:12px;padding:0 .55rem;line-height:1.5rem}
.dark .kds-col h2 span,.dark .kds-served h2 span{background:#e2e8f0;color:#0f172a}
.kds-col-body,.kds-served-body{display:flex;flex-direction:column;gap:10px}
.kds-served{margin-top:16px;padding-top:10px;border-top:1px solid rgba(148,163,184,.4)}.kds-served h2{font-size:13px;color:#64748b;text-transform:uppercase;letter-spacing:.05em}.kds-served-body{display:flex;flex-direction:column;gap:4px}.kds-srow{display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:8px;background:rgba(148,163,184,.12);font-size:13px;color:#475569;min-width:0}.dark .kds-srow{color:#cbd5e1}.kds-srow .kds-type{font-size:11px;padding:.1rem .45rem;opacity:.75}.kds-slist{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kds-srow time{font-size:12px;color:#94a3b8}.kds-srow .kds-print{padding:.2rem .6rem;font-size:12px}.dark.cc-tags{display:flex;flex-wrap:wrap;gap:6px;margin:6px 2px}.cc-tag{font-size:12px;font-weight:800;padding:.15rem .6rem;border-radius:999px;background:#e2e8f0;color:#334155}.cc-tag--vip{background:#fef3c7;color:#92400e}.cc-tag--regular{background:#dcfce7;color:#166534}.cc-tag--new{background:#dbeafe;color:#1d4ed8}.cc-tag--lapsed{background:#ede9fe;color:#5b21b6}.cc-tag--noshow{background:#fee2e2;color:#991b1b}.cc-tag--owes{background:#ffedd5;color:#9a3412}.cp-ap-list li{flex-wrap:wrap}.cp-ap-list li span small{display:block;font-size:11px}.cp-ap-list li em small{color:#64748b}.cp-ap-list li b{font-size:12.5px}
.ap-len{display:flex;gap:6px;align-items:center}.ap-len input{flex:1;min-width:0}.ap-len select{flex:0 0 auto;max-width:42%}.ap-hist{border:1px solid #e2e8f0;border-radius:12px;padding:10px 12px;margin:2px 0 10px;background:rgba(148,163,184,.08)}.dark .ap-hist{border-color:#374151}.ap-hist-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px}.ap-hist-head small{color:#64748b}.ap-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:8px 0}.ap-stat{text-align:center;padding:6px 2px;border-radius:8px;background:#fff;border:1px solid #e2e8f0}.dark .ap-stat{background:#1f2937;border-color:#374151}.ap-stat b{display:block;font-size:15px}.ap-stat span{font-size:11px;color:#64748b}.ap-stat.is-warn{border-color:#f59e0b}.ap-stat.is-bad{border-color:#dc2626;background:#fef2f2}.dark .ap-stat.is-bad{background:#3b1212}.ap-facts{margin:6px 0;font-size:13px}.ap-facts div{display:flex;gap:8px;padding:2px 0}.ap-facts dt{flex:0 0 84px;color:#64748b}.ap-facts dd{margin:0;min-width:0}.ap-recent{list-style:none;margin:6px 0 0;padding:0;font-size:12.5px}.ap-recent li{display:flex;gap:8px;align-items:center;padding:3px 0;border-top:1px solid rgba(148,163,184,.25)}.ap-recent li span{flex:0 0 56px;color:#64748b}.ap-recent li em{flex:1;min-width:0;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ap-chip{font-style:normal;font-size:11px;font-weight:700;padding:0 .45rem;border-radius:999px;background:#e2e8f0;color:#334155}.ap-chip--noshow{background:#fee2e2;color:#991b1b}.ap-chip--done{background:#dcfce7;color:#166534}.ap-chip--cancelled{background:#f1f5f9;color:#64748b}@media(max-width:480px){.ap-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
.kds-ordno{font-size:11px;font-weight:700;color:#64748b;border:1px solid #cbd5e1;border-radius:6px;padding:0 .35rem;white-space:nowrap}.kds-sfilter{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 8px}.kds-sfilter input{flex:1 1 160px;min-width:0;padding:.4rem .6rem;border:1px solid #cbd5e1;border-radius:8px;font-size:13px;background:#fff;color:#0f172a}.kds-sfilter input[type=date]{flex:0 0 auto}.dark .kds-sfilter input{background:#1f2937;color:#e5e7eb;border-color:#374151}.kds-served-count{font-size:12px;color:#94a3b8;margin:0 2px 2px}.kds-tag{font-size:11px;font-weight:700;padding:0 .4rem;border-radius:6px;background:#fef3c7;color:#92400e}.kds-tag--cx{background:#fee2e2;color:#991b1b}
.kds-empty{color:#94a3b8;font-size:13px;text-align:center;padding:14px 0}
.kds-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:10px 12px;box-shadow:0 1px 2px rgba(15,23,42,.06)}
.dark .kds-card{background:#111827;border-color:#374151}
.kds-card.is-ready{border-color:#16a34a}.kds-card--cancel{border-color:#dc2626;background:#fef2f2}.dark .kds-card--cancel{background:#3b1212}
.kds-card-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.kds-type{font-weight:800;font-size:13px;padding:.2rem .55rem;border-radius:8px;color:#fff}
.kds-type--dine{background:#0f766e}.kds-type--take{background:#b45309}.kds-type--deliv{background:#7c3aed}.kds-type--counter{background:#4f46e5}
.kds-no{font-weight:800;color:#475569}.dark .kds-no{color:#cbd5e1}
.kds-timer{margin-left:auto;font-weight:800;font-size:14px;color:#475569}.kds-timer.is-amber{color:#b45309}.kds-timer.is-red{color:#dc2626}
.kds-sub{font-size:12px;color:#64748b;margin-top:2px}
.kds-flag{margin-top:6px;font-size:12px;font-weight:800;padding:.2rem .5rem;border-radius:6px;display:inline-block}
.kds-flag--rush{background:#dc2626;color:#fff;letter-spacing:.04em}.kds-card.is-rush{box-shadow:0 0 0 3px #dc2626}.kds-rush{padding:.5rem .75rem;border-radius:.6rem;border:1.5px solid #ef4444;background:#fff;color:#b91c1c;font-weight:700}.kds-rush.is-on{background:#dc2626;color:#fff}
.kds-flag--ready{background:#16a34a;color:#fff}.kds-flag--addon{background:#fef3c7;color:#92400e}.kds-flag--cancel{background:#dc2626;color:#fff}.kds-cx{color:#dc2626;text-decoration:line-through}.kds-ack{margin-left:8px;border:1px solid #fff;background:transparent;color:#fff;border-radius:6px;padding:2px 10px;font-weight:700;cursor:pointer}
.kds-items{list-style:none;margin:8px 0 4px;padding:0;font-size:16px;line-height:1.3;display:flex;flex-direction:column;gap:4px}.kds-items li{display:flex;gap:8px;align-items:baseline;padding:4px 0;border-top:1px solid rgba(148,163,184,.25)}.kds-items li:first-child{border-top:0}.kds-items b{flex:0 0 auto;min-width:2.2em;text-align:center;background:#0f172a;color:#fff;border-radius:6px;font-size:15px;padding:0 .3rem}.dark .kds-items b{background:#e2e8f0;color:#0f172a}.kds-items span{font-weight:600}.kds-items li.kds-cx b{background:#dc2626;color:#fff}.kds-items em{font-style:normal;font-size:11px;font-weight:800;text-transform:uppercase;margin-left:4px}
.kds-note{margin:4px 0 0;font-size:13px;font-weight:600;color:#b45309}
.kds-card-foot{display:flex;gap:6px;margin-top:10px;align-items:stretch}.kds-card-foot .kds-print,.kds-card-foot .kds-rush{flex:0 0 auto;padding:.4rem .6rem;font-size:13px}
.kds-print{padding:.55rem .9rem;border-radius:10px;border:1px solid #cbd5e1;background:transparent;font-weight:600;font-size:14px}
.kds-act{flex:1;min-height:42px;padding:.5rem .9rem;border-radius:10px;border:0;font-weight:800;font-size:15px;color:#fff;background:#0d9488}
.kds-act--new{background:#2563eb}.kds-act--preparing{background:#16a34a}.kds-act--ready{background:#475569}


.cp-hero{display:flex;align-items:center;gap:12px;background:#fff;border-radius:14px;padding:14px;border:1px solid #e5e7eb}
.dark .cp-hero,.dark .cp-card,.dark .cp-panel{background:#111827;border-color:#1f2937}
.cp-avatar{width:48px;height:48px;border-radius:14px;background:#ccfbf1;color:#0f766e;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:20px;flex-shrink:0}
.cp-name{display:block;font-size:17px}.cp-contact{display:block;font-size:12px;color:#6b7280;overflow:hidden;text-overflow:ellipsis}
.cp-chips{display:flex;gap:6px;overflow-x:auto;padding:2px 0}
.cp-chip{white-space:nowrap;padding:6px 12px;border-radius:999px;border:1px solid #d1d5db;background:#fff;font-size:12px;font-weight:600;color:#374151}
.dark .cp-chip{background:#111827;border-color:#374151;color:#d1d5db}
.cp-chip.is-on{background:#0d9488;border-color:#0d9488;color:#fff}
.cp-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
@media(min-width:640px){.cp-grid{grid-template-columns:repeat(3,1fr)}}
.cp-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:2px;min-width:0}
.cp-card-l{font-size:11px;color:#6b7280;font-weight:600}.cp-card-v{font-size:18px;overflow:hidden;text-overflow:ellipsis}.cp-card-s{font-size:11px;color:#9ca3af}
.cp-panel{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:12px 14px}
.cp-panel h3{font-size:14px;font-weight:700;margin-bottom:8px}.cp-panel h3 small{font-weight:500;color:#9ca3af;margin-left:6px}
.cp-bar{margin-bottom:8px}.cp-bar-t{display:flex;justify-content:space-between;gap:8px;font-size:12px}
.cp-bar-track{height:6px;border-radius:4px;background:#e5e7eb;margin-top:3px;overflow:hidden}.cp-bar-track i{display:block;height:100%;background:#14b8a6;border-radius:4px}
.cp-txn{width:100%;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #eef2f6;text-align:left}
.dark .cp-txn{border-color:#1f2937}
.cp-txn small{display:block;font-size:11px;color:#6b7280}.cp-items{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:60vw}.cp-bad{color:#dc2626;text-decoration:line-through}
.cp-more{width:100%;margin-top:8px;padding:10px;border-radius:10px;background:#f0fdfa;color:#0f766e;font-weight:700;font-size:13px}

.zmix-open-btn{padding:14px;border-radius:12px;border:1px dashed #14b8a6;color:#0f766e;font-weight:700;background:transparent}
#zmix-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:100000;display:flex;align-items:center;justify-content:center;padding:16px}
.zmix-card{background:#fff;color:#111827;border-radius:18px;padding:20px;width:100%;max-width:360px;display:flex;flex-direction:column;gap:12px}
.dark .zmix-card{background:#111827;color:#f3f4f6}
.zmix-card h3{font-size:18px;font-weight:800}.zmix-due{font-size:14px;color:#6b7280}.zmix-due b{font-size:20px;color:inherit;margin-left:6px}
.zmix-card label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600}
.zmix-card input{padding:12px;border-radius:10px;border:1px solid #d1d5db;font-size:18px;background:transparent;color:inherit}
.zmix-note{font-size:13px;color:#b45309;min-height:18px}.zmix-note.is-ok{color:#0f766e}
.zmix-actions{display:flex;gap:10px}.zmix-actions button{flex:1;padding:12px;border-radius:10px;font-weight:700;background:#e5e7eb;color:#111827}
.zmix-actions #zmix-ok{background:#0d9488;color:#fff}.zmix-actions #zmix-ok:disabled{opacity:.4}

#ztax-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:100000;display:flex;align-items:center;justify-content:center;padding:16px}
.ztax-card{background:#fff;color:#111827;border-radius:18px;padding:20px;width:100%;max-width:520px;max-height:90vh;overflow:auto;display:flex;flex-direction:column;gap:12px}
.dark .ztax-card{background:#111827;color:#f3f4f6}
.ztax-card h3{font-size:18px;font-weight:800}.ztax-range{font-size:12px;color:#6b7280}
.ztax-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.ztax-grid div{background:rgba(20,184,166,.08);border-radius:12px;padding:10px;display:flex;flex-direction:column;gap:2px}
.ztax-grid span{font-size:11px;color:#6b7280}.ztax-grid b{font-size:15px}
.ztax-table{width:100%;font-size:13px;border-collapse:collapse}.ztax-table th{text-align:left;color:#6b7280;font-weight:600;padding:6px 4px;border-bottom:1px solid #e5e7eb}.ztax-table td{padding:7px 4px;border-bottom:1px solid #eef2f6}
.ztax-note{font-size:11px;color:#6b7280}.ztax-actions{display:flex;gap:10px}.ztax-actions button{flex:1;padding:12px;border-radius:10px;font-weight:700;background:#e5e7eb;color:#111827}.ztax-actions #ztax-csv{background:#0d9488;color:#fff}

.zco-ordertype{display:flex;gap:4px;background:rgba(0,0,0,.06);border-radius:12px;padding:3px;margin-bottom:6px}
.dark .zco-ordertype{background:rgba(255,255,255,.08)}
.zco-ordertype button{flex:1;padding:8px 6px;border-radius:9px;font-size:13px;font-weight:700;color:#6b7280}
.zco-ordertype button.is-on{background:#0d9488;color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.zco-ot-wrap{display:flex;flex-direction:column;width:100%;gap:2px}.zco-ot-row{display:flex;align-items:center;gap:10px;width:100%}
.zco-ordertype{width:100%}

/* Full-screen "working" card: spinning ring around the Zuno mark, then a tick when done. */
#zuno-busy{position:fixed;inset:0;z-index:100000;display:none;align-items:center;justify-content:center;background:rgba(15,23,42,.55);backdrop-filter:blur(4px)}
#zuno-busy.is-on{display:flex}
#zuno-busy .zb-card{background:#fff;color:#0f172a;border-radius:24px;padding:28px 34px;min-width:250px;max-width:86vw;text-align:center;box-shadow:0 24px 70px rgba(0,0,0,.3)}
.dark #zuno-busy .zb-card{background:#111827;color:#f9fafb}
#zuno-busy .zb-mark{position:relative;width:76px;height:76px;margin:0 auto 14px}
#zuno-busy .zb-mark img{position:absolute;inset:14px;width:48px;height:48px;object-fit:contain}
#zuno-busy .zb-ring{position:absolute;inset:0;border-radius:50%;border:3px solid rgba(13,148,136,.18);border-top-color:#0d9488;animation:zbspin .9s linear infinite}
#zuno-busy.is-done .zb-ring{animation:none}
#zuno-busy .zb-tick{display:none;position:absolute;inset:0;align-items:center;justify-content:center;border-radius:50%;background:linear-gradient(135deg,var(--accent-2,#22e1c8),var(--accent,#0d9488));box-shadow:0 10px 26px rgba(var(--accent-rgb,13,148,136),.38)}
#zuno-busy .zb-tick svg{width:40px;height:40px;stroke:#fff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
#zuno-busy .zb-tick path{stroke-dasharray:26;stroke-dashoffset:26}
#zuno-busy.is-done .zb-tick{display:flex;animation:zbpop .32s cubic-bezier(.2,.9,.3,1.3)}
#zuno-busy.is-done .zb-tick path{animation:zbdraw .34s .12s ease-out forwards}
#zuno-busy.is-done .zb-mark img,#zuno-busy.is-done .zuno-loading-mark,#zuno-busy.is-done .zb-ring{display:none}
@keyframes zbpop{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes zbdraw{to{stroke-dashoffset:0}}
@media (prefers-reduced-motion:reduce){#zuno-busy.is-done .zb-tick,#zuno-busy.is-done .zb-tick path{animation:none;stroke-dashoffset:0}}
/* Checkbox + text: the box is centred on the first line of its text (works for one line and for wrapped text). */
label.items-start>input[type="checkbox"],label.zb-choice>input[type="checkbox"],.zb-choice>input[type="checkbox"]{width:16px!important;height:16px!important;flex:none;margin:calc((1lh - 16px)/2) 0 0!important}
.zb-choice{display:flex;align-items:flex-start;gap:.6rem}
#zuno-busy .zb-text{font-weight:700;font-size:15px}
@keyframes zbspin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){#zuno-busy .zb-ring{animation-duration:2.4s}}

        /* Subscription details card, yearly price line and payment history */
        #billing-section.zbd-seen .billing-plan-card { animation:none !important; opacity:1 !important; transform:none !important; }
        .zbd-card { border:1px solid #e2e8f0; border-radius:14px; padding:.85rem .95rem; background:#fff; }
        .dark .zbd-card { background:rgba(255,255,255,.04); border-color:rgba(55,65,81,.7); }
        .zbd-head { display:flex; align-items:center; justify-content:space-between; gap:.6rem; flex-wrap:wrap; }
        .zbd-head b { font-size:.95rem; font-weight:800; }
        .zbd-pill { font-size:.68rem; font-weight:800; padding:.18rem .55rem; border-radius:999px; }
        .zbd-pill--on { background:#dcfce7; color:#166534; }
        .zbd-pill--off { background:#fef3c7; color:#92400e; }
        .zbd-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.5rem; margin-top:.7rem; }
        .zbd-grid span { display:block; font-size:.65rem; font-weight:700; color:#94a3b8; text-transform:uppercase; letter-spacing:.03em; }
        .zbd-grid strong { display:block; font-size:.82rem; font-weight:800; margin-top:.1rem; }
        .zbd-note { font-size:.76rem; line-height:1.45; color:#64748b; margin-top:.65rem; }
        .dark .zbd-note { color:#94a3b8; }
        .zbd-note--next { color:#92400e; font-weight:600; }
        .zbd-actions { margin-top:.7rem; }
        .zbd-btn { font-size:.8rem; font-weight:700; padding:.5rem .9rem; border-radius:10px; border:1.5px solid #cbd5e1; background:transparent; color:inherit; cursor:pointer; }
        .zbd-btn--on { background:#0d9488; border-color:#0d9488; color:#fff; }
        .zbd-yearline { font-size:.78rem; margin:.15rem 0 .35rem; color:#475569; }
        .dark .zbd-yearline { color:#cbd5e1; }
        .zbd-yearline b { background:#dcfce7; color:#166534; font-weight:800; border-radius:999px; padding:.1rem .45rem; margin-right:.3rem; font-size:.7rem; }
        .zbd-pay-head { display:flex; justify-content:space-between; align-items:baseline; gap:.5rem; margin-bottom:.4rem; font-size:.78rem; }
        .zbd-pay { display:flex; justify-content:space-between; gap:.7rem; padding:.55rem 0; border-top:1px solid #e2e8f0; }
        .dark .zbd-pay { border-color:rgba(55,65,81,.7); }
        .zbd-pay b { display:block; font-size:.82rem; }
        .zbd-pay span { display:block; font-size:.7rem; color:#64748b; overflow:hidden; text-overflow:ellipsis; }
        .zbd-pay-r { text-align:right; flex-shrink:0; }
        .zbd-pay-r strong { display:block; font-size:.85rem; }
        .zbd-pay-r em { font-style:normal; font-size:.68rem; color:#166534; font-weight:700; margin-right:.4rem; }
        .zbd-pay-r em.zbd-unpaid { color:#b91c1c; }
        .zbd-pay-r a { font-size:.7rem; color:#0d9488; font-weight:700; text-decoration:underline; }
        @media (max-width:520px) { .zbd-grid { grid-template-columns:1fr 1fr; } }

.mn-current-design{display:grid;gap:6px;padding:16px;background:#edf5ef;border-radius:12px;margin-bottom:16px}.mn-current-design small{font-size:9px;letter-spacing:.15em}.mn-current-design b{font:22px Georgia,serif}.mn-current-design span{font-size:12px;color:#62766b}.mn-manual{border:1px solid #dce4dd;border-radius:10px;padding:12px}.mn-manual summary{cursor:pointer;font-weight:600;font-size:13px}.dark .mn-current-design{background:#162a23}
/* Menu Studio 03: review before save, readable controls, balanced real-page previews. */
.mn-workspace{max-width:1200px;padding:28px;background:#f7f8f5}.mn-workspace .mn-ai-head h2{font:400 34px Georgia,serif;letter-spacing:-.035em;margin:8px 0}.mn-workspace .mn-ai-grid{gap:20px;margin:24px 0}.mn-workspace .mn-ai-opt{padding:14px;background:#fff;border-color:#dce4dd;border-radius:16px}.mn-workspace .mn-ai-meta{gap:6px;padding:8px 0}.mn-workspace .mn-ai-meta>b{font:400 23px Georgia,serif}.mn-workspace .mn-ai-meta em{font-size:12px;line-height:1.6;color:#64748b;font-style:normal}.mn-direction-label{font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:#687e70;margin-bottom:4px}.mn-workspace-credits{font-size:12px;color:#62766b;cursor:pointer}.mn-review{border:1px solid #e2e8e3;border-radius:10px;margin:14px 0;padding:12px;font-size:12px;color:#425849}.mn-review summary{cursor:pointer;font-weight:600;line-height:1.5}.mn-review p{font-size:11px;line-height:1.6;margin:10px 0;color:#64748b}.mn-review>div{margin-top:14px}.mn-review ul{list-style:none;padding:0;margin:8px 0 0;display:grid;gap:7px}.mn-review li{display:flex;justify-content:space-between;gap:12px;font-size:11px;line-height:1.5}.mn-review li>span:last-child{white-space:nowrap;font-variant-numeric:tabular-nums}.mn-review[open]{max-height:300px;overflow:auto}.mn-density-label{font-size:11px;color:#62766b;display:grid;gap:6px}.mn-design-contents{margin:2px 0}.mn-workspace .mn-ai-tweak{padding:20px;background:#edf2ed;border-radius:12px}.dark .mn-workspace{background:#0e1c18}.dark .mn-workspace .mn-ai-opt{background:#15261f;border-color:#2d4437}.dark .mn-review,.dark .mn-density-label,.dark .mn-direction-label,.dark .mn-workspace-credits{color:#b6c9bc;border-color:#2d4437}.dark .mn-workspace .mn-ai-tweak{background:#162a23}@media(max-width:600px){.mn-workspace{padding:18px}.mn-workspace .mn-ai-head h2{font-size:28px}.mn-workspace .mn-ai-grid{grid-template-columns:1fr}.mn-workspace .mn-ai-tweak>div{flex-wrap:wrap}.mn-workspace .mn-ai-tweak input{min-width:0}}
