/* ==========================================================================
   phone.css - the admin on a phone (and a few tablet rules), loaded after
   every other stylesheet. Shared fixes first, then page by page.
   Audited at 375px and 360px on 21.10.2026: the problems below were measured
   on the real pages (localhost, stage data) and in renders of the templates.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tables wider than the screen scroll inside the box that holds them, instead
   of dragging the whole page sideways. Phones and tablets. Not where a row has
   a dropdown menu: a scrolling box would cut the menu off (those pages get
   their own layout below).
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .preview-full-container :has(> table):not(:has(> table .dropdown-menu)),
    .cfmodal-body :has(> table):not(:has(> table .dropdown-menu)) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* A scrolling box placed right after a full-width floated column shrank to 0px
   (it will not overlap floats): on a phone it starts below them. Columns keep
   floating side by side. */
@media (max-width: 767px) {
    .preview-full-container :has(> table):not([class*="col-"]):not(:has(> table .dropdown-menu)),
    .cfmodal-body :has(> table):not([class*="col-"]):not(:has(> table .dropdown-menu)) {
        clear: both;
    }
}

@media (max-width: 767px) {

    /* ----------------------------------------------------------------------
       Page frame
       ---------------------------------------------------------------------- */

    /* 15px like Bootstrap's gutter: a .row (margins of -15px) right inside the
       page no longer sticks out 5px on each side and scrolls the page. */
    .preview-full-container {
        padding: 10px 15px !important;
    }

    /* 140px of empty space above the pages that use it (My Apps, Control Panel,
       courier, marketing...). */
    body .margin-top-100 {
        margin-top: 0;
        padding-bottom: 16px;
    }

    /* Long links and codes (terms URLs, webhook endpoints, theme links) break
       instead of widening the page. */
    .preview-full-container a:not(.btn),
    .preview-full-container code,
    .cfmodal-body a:not(.btn),
    .cfmodal-body code {
        overflow-wrap: anywhere;
    }

    /* Tabbed pages: 25px of padding and margin around every tab body left about
       270px for the content; a tab body inside another one adds nothing. */
    .preview-full-container .tab-content {
        margin: 12px 0;
        padding: 12px 10px;
    }

    .preview-full-container .tab-content .tab-content {
        margin: 10px 0 0;
        padding: 0;
        border: 0;
        background: transparent;
    }

    /* Tab bars stay on one line and scroll sideways: they wrapped into up to 8
       rows (Control Panel, Direct Marketing, the product form). */
    .nav-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .nav-tabs > li {
        flex: 0 0 auto;
        float: none;
        width: auto;
    }

    .nav-tabs > li > a {
        height: auto;
        white-space: nowrap;
    }

    /* ----------------------------------------------------------------------
       Forms and buttons
       ---------------------------------------------------------------------- */

    /* Under 16px iPhones zoom into the page on every field. */
    body .form-control,
    body input[type="text"],
    body input[type="email"],
    body input[type="tel"],
    body input[type="search"],
    body input[type="number"],
    body input[type="password"],
    body input[type="date"],
    body input[type="url"],
    body select,
    body textarea {
        font-size: 16px;
    }

    body select,
    body .form-control:not(textarea) {
        min-height: 36px;
    }

    /* Finger-sized small buttons and page numbers */
    .btn-xs {
        min-height: 32px;
        padding: 6px 9px;
    }

    .cftable-pagination .cftable-page,
    .dataTables_paginate a,
    .dataTables_paginate a:not(:empty),
    .dataTables_paginate span > a {
        display: inline-block;
        min-width: 34px;
        padding: 7px 10px;
        font-size: 14px;
        text-align: center;
    }

    /* ----------------------------------------------------------------------
       Modals (cfmodal). Their width per size is fixed in base.css.
       ---------------------------------------------------------------------- */

    /* Editors take the whole screen; a confirm() stays a dialog. */
    .cfmodal.show-modal:not(#cfconfirm):not(#modal-publish-app):not(#modal-export-menu):not(.cf-notification) .cfmodal-content {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    #cfconfirm.cfmodal .cfmodal-content,
    #cfalert.cfmodal .cfmodal-content {
        width: calc(100% - 32px);
        max-width: 420px;
    }

    /* The button bar sat at the top, over the title (position: fixed inside a
       transformed box). On a phone it is a bar at the bottom of the modal. */
    .cfmodal:not(#cfconfirm):not(#modal-publish-app):not(#modal-export-menu) .cfmodal-footer {
        position: static;
        order: 3;
        flex: 0 0 auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 6px;
        padding: 8px 10px;
        border-top: 1px solid #e5e5e5;
        background: #fff;
    }

    .cfmodal:not(#cfconfirm):not(#modal-publish-app):not(#modal-export-menu) .cfmodal-footer .btn {
        margin: 0;
        white-space: normal;
    }

    /* Some editors (Places, Loyalty, About, online shop...) have the bar inside
       the scrolling body, after the form: Save was 3,400px down. It sticks to
       the bottom of the screen instead (-12px: the body's padding). */
    .cfmodal:not(#cfconfirm):not(#modal-publish-app):not(#modal-export-menu) .cfmodal-body .cfmodal-footer {
        position: sticky;
        bottom: -12px;
        z-index: 5;
    }

    .cfmodal .cfmodal-content .cfmodal-header {
        order: 1;
        padding: 12px 44px 8px 12px;
    }

    .cfmodal .cfmodal-content .cfmodal-header .modal-title {
        margin: 0;
        font-size: 17px;
    }

    /* Wide content inside a modal scrolls instead of being cut off. */
    .cfmodal:not(#cfconfirm) .cfmodal-content .cfmodal-body {
        order: 2;
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        /* 15px at the sides: a .row right inside (-15px margins) does not stick out */
        padding: 12px 15px;
        overflow-x: auto;
    }

    .icon-close.cfmodal-close {
        padding: 14px 12px;
    }

    #cfconfirm,
    #cfalert {
        text-align: left;
    }

    /* The help and chat buttons were drawn over every modal's corner (on top of
       Save on the Publisher). */
    body.modal-opened .floating-buttons-container {
        display: none;
    }

    /* ----------------------------------------------------------------------
       Global pages (My Apps, Control Panel, profile...): the old header.
       It was fixed and 141px tall, more than the 60px kept free under it, so
       it covered the top of some pages. On a phone it scrolls with the page.
       ---------------------------------------------------------------------- */
    body:not(.special-header):not(.no-header) header.navbar-fixed-top {
        position: relative;
    }

    body:not(.no-header):not(.special-header) .preview-full-container {
        margin-top: 0 !important;
    }

    /* Its rows sit right in the header, with no container padding to absorb the
       row's -15px margins: in the page flow they widened it by 15px. */
    .main-header > .row {
        margin-right: 0;
        margin-left: 0;
    }

    .members-top .pull-right {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        float: none !important;
    }

    .members-top a {
        padding: 8px 10px;
        white-space: nowrap;
    }

    .members-top a[data-title="My Packages"],
    .members-top .username-top i {
        display: none;
    }

    .main-header > .row:nth-child(2) {
        padding: 4px 0;
    }

    .main-header .navbar-toggle {
        margin: 6px 0;
    }

    .main-header .logo-header {
        max-width: 100%;
        max-height: 36px;
    }

    /* The menu opens as a full-width list under the header: its links were 10px
       capitals with 28px of padding, squeezed into three quarters of the row. */
    .main-header > .row:nth-child(2) > .container {
        position: relative;
    }

    .main-header .menu-bar.collapse-this {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 5;
        float: none !important;
        margin: 0;
        background: #fff;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    .main-header .navbar-nav > li > a {
        padding: 12px 20px;
        font-size: 14px;
    }
}


/* ==========================================================================
   Global pages: login, register, My Apps, courier
   ========================================================================== */

/* ==========================================================================
   Global pages on a phone (to merge into css/phone.css): login, register,
   My Apps, Courier Management. Every rule is inside @media (max-width: 767px),
   so tablets and desktop are untouched. Publisher rules live in the publisher
   templates' own <style> blocks.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Login, register, My Apps
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {

    /* Login + register: 40px of card padding and a 60% / 90% form left a 164px / 246px form */
    .login-appz,
    .register-appz {
        margin-top: 4vh;
        padding: 20px 16px;
        border-radius: 12px;
    }

    .login-appz .center-block,
    .register-appz .center-block {
        width: 100%;
    }

    .login-appz h1,
    .register-appz h1 {
        margin: 12px 0 24px;
    }

    /* Login: "Register" and "Forgot password" were two half columns wrapping to 3 lines each */
    .login-appz .center-block > .col-xs-6,
    .register-appz .center-block .col-xs-6.no-padding {
        width: 100%;
        margin-top: 10px;
        text-align: center;
    }

    /* Register: every button was forced to half width ("Trimite codul" at 123px) */
    .register-appz .btn {
        width: 100%;
    }

    /* Register step 2: labels stacked above their fields stayed right-aligned */
    .register-appz .col-sm-4.text-right {
        text-align: left;
    }

    /* Register step 2: each consent checkbox sat alone on a line, its text on the next */
    .register-appz .col-sm-4.text-right:has(> input[type="checkbox"]) {
        float: left;
        width: auto;
        padding: 2px 10px 0 0;
    }

    .register-appz .col-sm-4.text-right:has(> input[type="checkbox"]) + .col-sm-8 {
        overflow: hidden;
        padding: 0;
    }

    /* My Apps: search, agency filter and 3 buttons stacked in five right-aligned rows */
    .app-search > h3 {
        float: none !important;
        margin: 0 0 10px;
    }

    .app-search > .form-inline {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        float: none !important;
        margin-top: 0;
    }

    .app-search > .form-inline > .form-group {
        margin: 0;
    }

    .app-search > .form-inline > .form-group:nth-child(1) {
        flex: 1 1 100%;
    }

    .app-search > .form-inline > .form-group:nth-child(2) {
        flex: 1 1 200px;
        min-width: 0;
    }

    .app-search > .form-inline > .form-group:nth-child(n+4) {
        flex: 1 1 40%;
    }

    .app-search .search-app,
    .app-search .filter-agency,
    .app-search > .form-inline > .form-group:nth-child(n+4) > .btn {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .app-search .clear-filters {
        min-width: 40px;
        min-height: 36px;
    }

    /* My Apps: "Modifică selecţia (n)" stayed at the top of a long list; now a bar
       at the bottom, left of the help and chat buttons */
    .apps-multiple-actions:not(.hidden) {
        position: fixed;
        right: 64px;
        bottom: 12px;
        left: 12px;
        z-index: 1000;
        min-height: 44px;
        margin: 0 !important;
        white-space: normal;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }

    #appList {
        padding-bottom: 64px;
    }

    /* My Apps cards: Android / iOS links were 20px dots, the days / package chips 24px */
    .app-box .appbox-links > a {
        width: 28px;
        height: 28px;
        padding-top: 0;
        font-size: 15px;
        line-height: 28px;
    }

    .app-box .subscription-pack a {
        min-width: 30px;
        padding: 7px 6px;
        text-align: center;
    }
}

/* --------------------------------------------------------------------------
   Courier Management (#courierManagement, Dispatch Center and the fleet tabs).
   Selectors start with .courier-page or .fleet-ui and are one class stronger
   than they need to be: courierManagement.html brings its own <style> block,
   injected with the page, after this file.
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {

    /* Courier Management: page + title + tab body paddings left about 210px for the jobs */
    .courier-page.container-fluid {
        padding-right: 0;
        padding-left: 0;
    }

    .courier-page .courier-management-container {
        padding: 0;
    }

    .courier-page .courier-management-container > h2 {
        margin: 0 0 10px;
        font-size: 20px;
    }

    .courier-page .courier-tabs {
        margin-bottom: 0;
    }

    .courier-page .tab-content.courier-tab-content {
        margin: 10px 0 0;
        padding: 0;
        border: 0;
    }

    /* Fleet tabs: a lower heading; the "Updated at" line under the fleet, Refresh next to it */
    .fleet-ui .panel-heading.fl-head {
        padding: 12px 10px;
    }

    .fleet-ui .fl-head .fl-bar-status {
        order: 3;
        flex: 1 1 100%;
    }

    /* Fleet tabs: "Updated at" was grey on the teal heading, the failure brown on teal */
    .fleet-ui .fl-head .fl-bar-status.fl-muted {
        color: rgba(255, 255, 255, 0.92);
    }

    .fleet-ui .fl-head .fl-bar-status.text-warning {
        padding: 2px 6px;
        border-radius: 4px;
        background: #b45309;
        color: #fff;
    }

    /* Fleet modals (job, Alocă / Mută, forms): Save / Alocă stay at the bottom of the screen
       instead of after the whole courier list or the map */
    .fleet-ui .modal-footer {
        position: -webkit-sticky;
        position: sticky;
        bottom: 0;
        z-index: 2;
        background: #fff;
    }

    /* Job sheet tables: Bootstrap keeps every cell on one line under 768px; options,
       names and partner errors wrap instead */
    .fleet-ui .table-responsive > .fd-table > tbody > tr > td {
        white-space: normal;
    }

    .fleet-ui .table-responsive > .fd-table > tbody > tr > td.fl-pre {
        white-space: pre-line;
    }

    /* Couriers / pickup points cards: the Edit / Complete button squeezed the name to a
       letter per line; the button goes under the name when both do not fit */
    .fleet-couriers .fc-card-head,
    .fleet-points .fp-card-head {
        flex-wrap: wrap;
    }

    .fleet-couriers .fc-card-name,
    .fleet-points .fp-card-name {
        flex: 1 1 140px;
    }

    /* Delivery history: the table needed 650px of width; on a phone every job is a card
       (number and state on top, customer, times), still a tap to open it */
    .fleet-history .table-responsive {
        margin-bottom: 0;
        border: 0;
    }

    .fleet-history .fh-table > thead {
        display: none;
    }

    .fleet-history .fh-table,
    .fleet-history .fh-table > tbody {
        display: block;
        width: 100%;
    }

    .fleet-history .fh-table > tbody > tr {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 2px 8px;
        margin-bottom: 8px;
        padding: 8px 10px;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        background: #fff;
    }

    .fleet-history .table-responsive > .fh-table > tbody > tr > td {
        display: block;
        flex: 1 1 100%;
        min-width: 0;
        padding: 0;
        border: 0;
        white-space: normal;
    }

    .fleet-history .table-responsive > .fh-table > tbody > tr > td:first-child {
        flex: 1 1 auto;
    }

    .fleet-history .table-responsive > .fh-table > tbody > tr > td:nth-child(2) {
        flex: 0 1 auto;
        text-align: right;
    }

    .fleet-history .table-responsive > .fh-table > tbody > tr > td.fh-nowrap {
        white-space: nowrap;
    }
}


/* ==========================================================================
   App setup: pages and menu, places, online shop, app info, theme, analytics
   ========================================================================== */

/* ==========================================================================
   App setup pages on a phone (appPages, Places / online shop editors,
   appEditInfo, appTheme, appAnalytics). To be merged into css/phone.css.
   ========================================================================== */

@media (max-width: 767px) {

    /* appPages: the filter bar was five 56px columns; "Tradu meniul" and
       "Adaugă modul nou" spilled out of their 40px boxes over the page tree. */
    .apppages-toolbar {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 10px;
    }

    .apppages-toolbar > [class*="col-xs-"] {
        float: none;
        width: auto;
        padding: 0;
    }

    .apppages-toolbar > .apt-places {
        flex: 1 1 100%;
    }

    /* Search and its X fill the second line; the two buttons share the third. */
    .apppages-toolbar > .apt-search {
        flex: 1 1 calc(100% - 52px);
        min-width: 0;
    }

    .apppages-toolbar > .apt-search .form-group {
        margin-bottom: 0;
    }

    .apppages-toolbar .reset-filters {
        min-width: 44px;
        min-height: 36px;
    }

    /* With one language the translate column is empty: it takes no room. */
    .apppages-toolbar > .apt-translate,
    .apppages-toolbar > .apt-add {
        display: contents;
    }

    .apppages-toolbar .translate-items,
    .apppages-toolbar .add-more-items2 {
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
        min-height: 44px;
        height: auto;
        max-height: none;
        padding: 8px 10px;
        font-size: 15px;
        line-height: 1.2;
    }

    .apppages-toolbar > .multi-select-actions {
        flex: 1 1 100%;
        margin-top: 0 !important;
    }

    .apppages-toolbar > .multi-select-actions .btn {
        margin: 0 6px 6px 0;
    }

    /* appPages: a sub-level header was 440px of drag hints wide and pushed its
       close button off the screen. Dragging needs a mouse, so the hints and the
       "Drag & Drop" bar of the first level go. */
    .tree-level-header .level-drag-hints,
    .tree-level-0 > .tree-level-header {
        display: none;
    }

    .tree-level-header .level-breadcrumb {
        flex: 1 1 auto;
        min-width: 0;
    }

    .tree-level-header .close-tree-level {
        flex: 0 0 auto;
        width: 36px;
        height: 36px;
    }

    /* appPages, "Tradu meniul": the name fields shrank to 54px to fit every
       language in one screen; they keep a usable width and the table scrolls
       sideways in its box (phone.css). The filters above stack (template). */
    #modal-translate-menu table.translate-table td .change-values {
        min-width: 150px;
    }

    #modal-translate-menu .TranslationAvailableChars {
        margin-top: 0;
    }

    #modal-translate-menu .actions .get-translation {
        width: 100%;
        white-space: normal;
    }

    /* Places editor, "Servicii și livrare": the barcode format presets are
       long one-line labels (up to 246px) and were cut off at the edge. */
    #form-Places .serving-line-preset {
        max-width: 100%;
        white-space: normal;
        text-align: left;
    }

    /* Places editor, services: the settings now sit under the service name,
       full width (template); the name keeps little space above them. */
    #place-services-tab .form-group.col-sm-3.no-padding {
        margin-bottom: 4px;
    }

    #place-services-tab .form-group.col-sm-3.no-padding h4 {
        margin: 0;
    }

    /* Online shop editor: its rows and .form-horizontal groups (-15px) stuck
       out 3px past the 12px padding of the modal body, so every swipe moved
       the form sideways. */
    #online-shop-form {
        padding-right: 3px;
        padding-left: 3px;
    }

    /* appEditInfo, multi-currency: the table now scrolls in its box (phone.css);
       its fields keep a width you can read instead of a 35px currency select. */
    .currencies-table .currency-selector {
        min-width: 140px;
    }

    .currencies-table [name="_RateToBase"] {
        min-width: 100px;
    }

    .currencies-table [name="_CurrencyPosition"] {
        min-width: 110px;
    }
}

@media (max-width: 767px) {

    /* appTheme: the rows right inside the form (the colormind line, "Web Shop
       Styles") stuck out 15px on each side; the title was cut on the left. The
       col-xs grid itself now stacks (template: col-xs-12 / col-xs-6 col-sm-N). */
    #theme-color-form > .row {
        margin-right: 0;
        margin-left: 0;
    }

    #theme-color-form > .row > small,
    #theme-color-form > .row > h2,
    #theme-color-form .palette-container > h2,
    #theme-color-form .palette-container > .used-theme,
    #theme-color-form .palette-container > .selected-theme {
        display: block;
        padding-right: 15px;
        padding-left: 15px;
    }

    /* appAnalytics: the install / register charts stood side by side at 167px
       each, and a canvas is 1173px wide (inline) until its chart is drawn. */
    #analytics-tab .graph-canvas {
        float: none;
        width: 100%;
    }

    #analytics-tab .graph-canvas canvas {
        max-width: 100%;
        height: auto !important;
    }
}

@media (max-width: 767px) {

}

/* appEditInfo, languages: with a finger the two lists cannot be dragged, so a
   tap moves an item (AppEditInfo.tapMoveLanguage, same media query). The + and
   x say which way it goes. Touch tablets too: they cannot drag either. */
@media (max-width: 767px), (hover: none) {
    #editAppInfoForm .languages li {
        position: relative;
        height: 40px;
        padding: 10px 36px 10px 8px;
        font-size: 14px;
        cursor: pointer;
    }

    #editAppInfoForm .languages li:after {
        content: "\f067";
        position: absolute;
        top: 10px;
        right: 12px;
        font-family: FontAwesome;
        color: #22aba6;
        background: transparent;
    }

    #editAppInfoForm .selected-languages li:after {
        content: "\f00d";
        color: #ab5222;
    }
}


/* ==========================================================================
   Customers, notifications, loyalty, direct marketing, email/ticket/screen templates
   ========================================================================== */

/* ==========================================================================
   Customers, communication and templates: users, companies, notifications,
   loyalty, email templates, direct marketing, ticket and screen templates.
   To be merged into css/phone.css (after its shared layer).
   ========================================================================== */

@media (max-width: 767px) {

    /* Companies > department: the 500px map filled the screen inside the
       scrolling form, so a swipe moved the map instead of the page. */
    #manage-department #map-container2 {
        height: 260px;
        margin: 12px 0;
    }

    #manage-department #map-container2 #map-leaflet2 {
        height: 100%;
        margin: 0;
    }

    /* Companies > department: columns nested in columns lost 30px per side. */
    #manage-department .col-sm-12 > [class*="col-sm-"] {
        padding-right: 0;
        padding-left: 0;
    }

    /* Companies > department: Delivery Time has no form-group, so stacked it
       touched the Preparation Time label below it. */
    #manage-department .DeliveryTime-group {
        margin-bottom: 15px;
    }

    /* Notifications > Campaigns: Edit / Send sat past the right edge of the
       scrolling table; the cell now stays pinned to the right. */
    .app-notifications-page .push-campaigns-table td.campaign-actions:not(:empty) {
        position: sticky;
        right: 0;
        background-color: #fff;
        white-space: nowrap;
        box-shadow: -6px 0 6px -6px rgba(0, 0, 0, 0.35);
    }

    .app-notifications-page .push-campaigns-table > tbody > tr:nth-of-type(odd) > td.campaign-actions:not(:empty) {
        background-color: #f9f9f9;
    }

    .app-notifications-page .push-campaigns-table .campaign-actions .btn {
        min-width: 36px;
    }

    /* Notifications > Compose, customer segments card (AI POS 5c): the title
       and the subtitle stacked, the four tiles 2 x 2, nothing wider than the
       screen. */
    .app-notifications-page .customer-segments {
        padding: 10px;
    }

    .app-notifications-page .customer-segments-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-notifications-page .customer-segments-tiles {
        display: flex;
        flex-wrap: wrap;
    }

    .app-notifications-page .customer-segments-tile {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
        padding: 8px;
    }

    .app-notifications-page .customer-segments-num {
        font-size: 20px;
    }

    /* Loyalty: every tab added 20px of inline padding inside the tab body
       (5px left so the rows' -15px margins end at the tab body's edge). */
    .loyalty-container .tab-content > .tab-pane > [class^="loyalty-"] {
        padding: 0 5px !important;
    }

    /* Loyalty: the pencil / bin / draw buttons sat past the right edge of the
       scrolling tables; the last cell now stays pinned to the right. */
    .loyalty-tiers-tab .table > tbody > tr > td:last-child:not([colspan]),
    .loyalty-rewards-tab .table > tbody > tr > td:last-child:not([colspan]),
    .loyalty-raffles-tab .table > tbody > tr > td:last-child:not([colspan]),
    .loyalty-automations-tab .table > tbody > tr > td:last-child:not([colspan]),
    .loyalty-campaigns-tab .table > tbody > tr > td:last-child:not([colspan]) {
        position: sticky;
        right: 0;
        background-color: #fff;
        white-space: nowrap;
        box-shadow: -6px 0 6px -6px rgba(0, 0, 0, 0.35);
    }

    .loyalty-tiers-tab .table-striped > tbody > tr:nth-of-type(odd) > td:last-child:not([colspan]),
    .loyalty-rewards-tab .table-striped > tbody > tr:nth-of-type(odd) > td:last-child:not([colspan]),
    .loyalty-raffles-tab .table-striped > tbody > tr:nth-of-type(odd) > td:last-child:not([colspan]),
    .loyalty-automations-tab .table-striped > tbody > tr:nth-of-type(odd) > td:last-child:not([colspan]),
    .loyalty-campaigns-tab .table-striped > tbody > tr:nth-of-type(odd) > td:last-child:not([colspan]) {
        background-color: #f9f9f9;
    }

    /* Email templates: "Add new email content" spilled out of its 150px
       column (and widened the page at 360px). */
    .email-sets-group .btn,
    .email-content-group > .btn {
        white-space: normal;
    }

    /* Email templates: 24px headings broke in two in the half-width columns. */
    .email-sets-group h3,
    .email-content-group h3,
    .email-type-group h3 {
        font-size: 18px;
    }

    /* Email templates: four lists of up to 300px came before the editor. */
    #email-sets,
    #email-contents,
    #email-content-type,
    #language-content {
        max-height: 180px;
    }
}

/* --------------------------------------------------------------------------
   Direct Marketing (appDirectMarketing) - phone fixes.
   -------------------------------------------------------------------------- */

/* All widths. Direct Marketing / agency modals (Campaign, Google Ads and Meta Ads
   wizards, segment and flow builders...): their box (.cfmodal-container) had no
   scroll, so on any screen shorter than the wizard Next / Save could not be
   reached. It now scrolls; when the content fits nothing changes. */
.cfmodal > .cfmodal-container {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {

    /* Direct Marketing modals: a full-screen white sheet instead of a box on the
       dark backdrop, where the title was dark on dark. */
    .cfmodal > .cfmodal-container {
        background: #fff;
    }

    /* Direct Marketing modals: the title stays on top while the wizard scrolls,
       and the × (a bare 24px button) becomes a 44px target on the right. */
    .cfmodal > .cfmodal-container > .cfmodal-header {
        position: sticky;
        top: 0;
        z-index: 3;
        display: flex;
        align-items: center;
        padding: 4px 4px 4px 12px;
        background: #fff;
        border-bottom: 1px solid #e5e5e5;
    }

    .cfmodal > .cfmodal-container > .cfmodal-header .cfmodal-title {
        flex: 1 1 auto;
        order: 1;
        margin: 0;
        font-size: 17px;
    }

    .cfmodal > .cfmodal-container > .cfmodal-header .cfmodal-close {
        order: 2;
        flex: 0 0 44px;
        height: 44px;
        padding: 0;
        border: 0;
        background: none;
        font-size: 28px;
        line-height: 1;
        color: #666;
    }

    /* Direct Marketing tables (Campaigns, Google Ads, Meta Ads, Automation): the
       Actions column was the last of 7-10 and sat off-screen; it stays pinned
       on the right while the other columns scroll under it. */
    .direct-marketing-page .table-responsive > .table > thead > tr > th:last-child,
    .direct-marketing-page .table-responsive > .table > tbody > tr > td:last-child {
        position: sticky;
        right: 0;
        z-index: 1;
        box-shadow: -4px 0 6px -4px rgba(0, 0, 0, 0.25);
    }

    /* (the header cell keeps its own grey; body cells need a solid colour or
       the scrolled columns show through) */
    .direct-marketing-page .table-responsive > .table > tbody > tr > td:last-child {
        background: #fff;
    }

    .direct-marketing-page .table-responsive > .table-striped > tbody > tr:nth-of-type(odd) > td:last-child {
        background: #f9f9f9;
    }

    /* ...with the buttons two per row, so the pinned column stays narrow. */
    .direct-marketing-page .table-responsive > .table > tbody > tr > td:last-child > .btn-group {
        width: 72px;
        white-space: normal;
    }

    /* Direct Marketing tables: the action icons (btn-group-xs) were 22px. */
    .direct-marketing-page .table .btn-group-xs > .btn {
        min-width: 34px;
        min-height: 32px;
        padding: 6px 9px;
    }

    /* Client Segments: four buttons at 25% each (about 70px) - their labels ran
       over the next button. Two per row on a phone. */
    .direct-marketing-page .segment-card .panel-footer .btn-group > .btn {
        width: 50% !important;
        margin-bottom: 2px;
    }
}

/* --------------------------------------------------------------------------
   Ticket templates + screen templates on a phone.
   The page designer's own rules (note, hidden canvas) live in its template's
   <style> (manage-cs-page.html).
   -------------------------------------------------------------------------- */

/* Ticket templates: the "Click and Right Click" tip makes no sense where there
   is no right-click (phones, tablets). */
@media (hover: none) {
    .ticket-types .tips-right-click {
        display: none;
    }
}

@media (max-width: 767px) {

    /* Ticket templates (printer form): Print server ID and Copies under their
       labels, like the other fields (the column is now full width) */
    #ticket-content-edit [name="PrintServerID"],
    #ticket-content-edit [name="Copies"] {
        display: block;
        max-width: 100%;
    }

    /* Screen templates, Pages list: the Infos column (size, language) pushed the
       table past the screen; the Actions menu can't sit in a scrolling box. */
    #CSPagesTable > thead > tr > th:nth-child(3),
    #CSPagesTable > tbody > tr > td:nth-child(3) {
        display: none;
    }

    /* Screen playlist (Edit screen): a 7-column table left the Page field 29px
       wide and the delete button off-screen. Each row becomes a card:
       up/down + position + delete on top, then Page, then Duration. */
    #manage-screen .items-list-wrap {
        overflow: visible;
    }

    #manage-screen .items-list,
    #manage-screen .items-list > tbody {
        display: block;
        width: 100%;
        border: 0;
    }

    #manage-screen .items-list > thead {
        display: none;
    }

    #manage-screen .items-list > tbody > tr.type-element {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: #fff;
    }

    #manage-screen .items-list > tbody > tr > td {
        display: block;
        width: auto !important;
        padding: 0;
        border: 0;
    }

    /* the drag handle's teal cell; on a phone it only holds the buttons */
    #manage-screen .items-list > tbody > tr > td.change-pos { order: 1; background: none; cursor: default; }
    #manage-screen .cs-move-buttons { white-space: nowrap; }
    #manage-screen .items-list > tbody > tr > td.cs-item-position { order: 2; font-weight: 600; }
    #manage-screen .items-list > tbody > tr > td.cs-item-position:before { content: "#"; }
    #manage-screen .items-list > tbody > tr > td.cs-item-actions { order: 3; margin-left: auto; }
    #manage-screen .items-list > tbody > tr > td.cs-item-page { order: 4; flex: 1 1 100%; }

    #manage-screen .items-list > tbody > tr > td.cs-item-duration {
        order: 5;
        display: flex;
        flex: 1 1 100%;
        align-items: center;
        gap: 8px;
    }

    #manage-screen .items-list > tbody > tr > td.cs-item-duration:before {
        content: attr(data-label);
        font-size: 13px;
        color: #666;
        white-space: nowrap;
    }

    #manage-screen .items-list > tbody > tr > td.cs-item-duration .form-control {
        flex: 1 1 auto;
        width: auto;
    }

    /* the two transition fields are disabled placeholders */
    #manage-screen .items-list > tbody > tr > td.cs-item-transition {
        display: none;
    }

    #manage-screen .cs-move-buttons .btn {
        min-width: 40px;
        min-height: 36px;
    }

    /* Screen playlist: the long screen link was cut off */
    #manage-screen .Key-value {
        overflow-wrap: anywhere;
    }

    /* Background editor (screen pages): the layers column took 240px and left
       the editor about 95px; the columns stack and the dialog keeps a gutter.
       !important: the editor's markup carries inline styles. */
    #screen-gradient-modal .sg-dialog {
        margin: 8px !important;
        max-height: calc(100vh - 16px) !important;
    }

    #screen-gradient-modal .sg-body {
        flex-direction: column;
    }

    #screen-gradient-modal .sg-left,
    #screen-gradient-modal .sg-right {
        flex: 0 0 auto !important;
        width: 100%;
    }
}


/* ==========================================================================
   Webhooks, ANAF, billing, module configurator, update log
   ========================================================================== */

/* --------------------------------------------------------------------------
   Integrations, webhooks and billing on a phone (to merge into css/phone.css).
   Desktop (>= 992px) is untouched: the only rule outside the 767px block is
   for tablets, where the shared table rule caused the problem it fixes.
   -------------------------------------------------------------------------- */

/* Webhooks > Logs: the shared "table scrolls in its own box" rule turns the logs
   box into a scroll box, and next to the full-width floated title above it that
   box shrank to 0px: filters and table vanished. It now starts under the floats. */
@media (max-width: 991px) {
    #modal-webhook-logs .table-webhook-logs-cont {
        clear: both;
    }

    /* the filter row's -15px margins made that box scroll 15px sideways */
    #modal-webhook-logs .table-webhook-logs-cont .filters > .row {
        margin-right: 0;
        margin-left: 0;
    }
}

@media (max-width: 767px) {

    /* Webhooks > edit modal: three nested 15px paddings narrowed every field */
    #modal-webhook .webhook-wrapper > .col-xs-12 {
        padding-right: 0;
        padding-left: 0;
    }

    /* Webhooks > edit, ANAF e-Factura and Glovo On Demand: the buttons now stack, keep them apart */
    #manage-webhook .anaf-auth-actions > div,
    #manage-webhook .god-actions > div {
        margin-bottom: 8px;
    }

    #manage-webhook .god-actions .btn {
        white-space: normal;
    }

    /* Webhooks > ANAF authorisation, step 1: the two choices one under the other (side by side the second was cut off) */
    .auth-anaf-step1,
    .auth-anaf-step2-cert,
    .auth-anaf-step2-no-cert {
        padding: 0;
    }

    .auth-anaf-step1 .auth-options {
        flex-direction: column;
        gap: 16px;
        margin-top: 16px;
    }

    .auth-anaf-step1 .auth-options .auth-option .btn {
        min-height: 0;
    }

    /* Webhooks > ANAF authorisation, step 3: the three link buttons ran past the right edge */
    .auth-anaf-step2-no-cert .auth-link-container {
        padding: 12px;
    }

    .auth-anaf-step2-no-cert .auth-link-container .actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .auth-anaf-step2-no-cert .auth-link-container .actions .btn {
        flex: 1 1 100%;
        white-space: normal;
    }

    /* Webhooks > Wolt and r_keeper menus: shop JSON and long button labels wrap instead of running off the screen */
    #modal-generic-menu .webhook-wrapper {
        overflow-wrap: anywhere;
    }

    #modal-generic-menu .webhook-wrapper .btn {
        white-space: normal;
        text-align: left;
    }

    #modal-generic-menu .webhook-wrapper .no-padding {
        margin-bottom: 8px;
    }

    /* Hostware sync: the product/ingredient match list was cut off by the table's scroll box; it opens inside the row */
    #hostware-sync-container .hw-appy-results,
    #hostware-sync-container .hw-ring-results {
        position: static !important;
        white-space: normal;
    }

    /* the search field and its list had a 75px column; the table already scrolls sideways in its box */
    #hostware-sync-container .hw-appy-search,
    #hostware-sync-container .hw-ring-search {
        min-width: 180px;
    }

    /* Billing management: Refresh and Run Billing Cycle dropped under the first card (hidden, not tappable) */
    .billing-management h3 .bm-actions {
        display: flex !important;
        flex-wrap: wrap;
        float: none !important;
        margin-top: 8px;
    }

    .billing-management h3 .bm-actions .btn {
        min-height: 36px;
    }

    /* Billing management: the four counters two per row instead of 400px of stacked cards */
    .billing-management .billing-card {
        padding: 12px 8px;
    }

    .billing-management .billing-card .card-value {
        font-size: 24px;
    }

    .billing-management .billing-card .card-label {
        font-size: 11px;
        letter-spacing: 0;
    }

    /* App update log: the template's own copy of the page frame doubled the side padding and the height */
    .special-header .preview-full-container.app-update-log-root {
        min-height: 0;
        padding: 0 !important;
    }

    .app-update-log-root .saveEditAppLogBtn {
        white-space: normal;
    }
}


/* ==========================================================================
   Control Panel and Agency Marketing
   ========================================================================== */

/* Agency Marketing > Leads: the toolbar becomes a column on phones but kept
   flex-wrap: wrap, and in a wrapping column each line is as wide as its widest
   child, so the stage chips (meant to scroll in their own row) made the page
   837px wide. */
@media (max-width: 767px) {
    .mkl-toolbar {
        flex-wrap: nowrap;
    }
}

/* --------------------------------------------------------------------------
   Control Panel and Agency Marketing (phone), on top of the shared layer.
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {

    /* Bootstrap grids built for a desktop: one field per row on a phone.
       Add / Edit User and Edit App (3 columns: 57px fields, a 13px "Customize"
       button), Terms and Policy (Delete / Add New Set overlapped and ran off the
       screen, 50px selects), Localization (three 62px columns), Agency
       Management's package and discount editors (nested 2/6/4 columns: a 52px
       Name field, a 26px type select). */
    #modal-control-panel .cfmodal-body [class*="col-xs-"],
    #terms-policy [class*="col-xs-"],
    #localization [class*="col-xs-"],
    .modal-packs .cfmodal-body [class*="col-xs-"],
    .modal-discounts .cfmodal-body [class*="col-xs-"] {
        float: none;
        width: 100%;
    }

    /* A column that no longer floats does not hold its floated title or button:
       they slid into the next block. */
    #modal-control-panel .cfmodal-body [class*="col-xs-"]::after,
    #terms-policy [class*="col-xs-"]::after,
    #localization [class*="col-xs-"]::after,
    .modal-packs .cfmodal-body [class*="col-xs-"]::after,
    .modal-discounts .cfmodal-body [class*="col-xs-"]::after {
        content: "";
        display: table;
        clear: both;
    }


    /* Control Panel → Users: the edit / activate / delete icons were 22px circles. */
    #cp-users-list .edit-user,
    #cp-users-list .delete-user,
    #cp-users-list .change-user-status {
        width: 34px;
        height: 34px;
        margin: 2px;
        padding: 9px 0;
    }

    /* Control Panel → Add / Edit User: a .row right in the modal body stuck out
       3px and made the body scroll sideways. */
    #modal-control-panel .cfmodal-body .row {
        margin-right: 0;
        margin-left: 0;
    }

    /* The package's library chips: two per row instead of one. */
    #modal-control-panel .manage-app-items-list .sel-app-item {
        float: left;
        width: 50%;
    }

    #modal-control-panel .manage-app-items-list .sel-app-item:nth-child(2n+1) {
        clear: left;
    }

    /* App access tiles were 45px wide: two per row, search field under the title. */
    #modal-control-panel .agency-app {
        width: 50%;
    }

    #modal-control-panel .search-agency-app {
        float: none !important;
        width: 100%;
        max-width: none !important;
        margin-top: 8px;
    }

    /* Control Panel → Terms and Policy: Delete and Add New Set side by side. */
    #terms-policy .existent-terms > [class*="col-xs-"] {
        padding-right: 0;
        padding-left: 0;
    }

    #terms-policy .existent-terms > .col-xs-2 {
        float: left;
        width: 50%;
    }

    #terms-policy .existent-terms > .col-xs-2:not(.no-padding) {
        padding-right: 6px;
    }

    #terms-policy .existent-terms .btn {
        width: 100%;
    }

    /* The long "Generate new terms & policy set for …" button stuck out of its box. */
    #terms-policy .generate-lists {
        max-width: 100%;
        white-space: normal;
    }

    /* "Update Changes" sat at the end of the Privacy / Terms tab bar, off-screen in
       the scrolling strip: it goes on its own row under the two tabs. */
    #terms-policy-form .nav-tabs {
        flex-wrap: wrap;
        overflow: visible;
    }

    #terms-policy-form .nav-tabs > li.pull-right {
        order: 3;
        width: 100%;
        margin-top: 6px;
    }

    #terms-policy-form .nav-tabs > li.pull-right .terms-update {
        width: 100%;
    }

    /* Control Panel → Apps Management: "Show 10 entries" sat on the page numbers. */
    #cp-apps .dataTables_length {
        position: static;
        float: none;
        margin-bottom: 6px;
    }

    /* Control Panel → Ads Service: tiles were 11% wide (about 30px). Two per row. */
    #cp-ads .app-a-d {
        position: relative;
        float: left;
        width: 50%;
    }

    #cp-ads .app-a-d:nth-child(2n+1) {
        clear: left;
    }

    #cp-ads .app-a-d [a-d-switch] {
        padding: 8px 5px;
    }

    /* Agency Management → package editor: label columns ("Name:", "#:") read
       right-aligned above their field; the column headings row means nothing
       once the columns are stacked. */
    .modal-packs .cfmodal-body .text-right {
        text-align: left;
    }

    .modal-packs .table-header {
        display: none;
    }

    /* Agency Marketing → Fundație → Brand: the hex fields were 41px wide
       ("#22aba6" read "#22a"). One colour per row. */
    .mks-colors {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* ==========================================================================
   Products: list, product form, extras, bulk actions, imports, export, files
   ========================================================================== */

/* ==========================================================================
   Products & catalog on a phone: products list, product form, extras groups,
   translate tab, bulk actions, imports, file manager, digital menu export.
   Goes after the shared rules of phone.css. Nothing here applies from 992px.
   ========================================================================== */

/* Product form, recipe and nutrient rows: the scroll box phone.css puts around
   a wide table (up to 991px) cut off the ingredient / nutrient suggestions that
   open under the last rows. The list now opens inside the row. */
@media (max-width: 991px) {
    .recipe-list .autocomplete-ingredients .ui-autocomplete,
    .nutrients-list .autocomplete-nutrients .ui-autocomplete {
        position: static !important;
        max-height: 240px;
        overflow-y: auto;
    }

    /* Product form, Type & visibility (and the other label + switch rows):
       each pair is two floated halves in a col-md-3 that only floats from
       992px. Below that the boxes had no height, so a switch slid next to the
       following label ("Disponibil în POS/OM" with the online shop's switch).
       Each pair is one row again. */
    #modal-edit-product .line-ptb-10 {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }
}

@media (max-width: 767px) {

    /* ----------------------------------------------------------------------
       Products list (#app/<id>/appProducts/products)
       ---------------------------------------------------------------------- */

    /* Products list: 13 filters filled a screen and a half above the first
       product. They fold behind the "Filtre" button; the name search stays. */
    .table-products-cont > .filter-group:not(.filters-open) .filters > .row:not(:last-child) {
        display: none;
    }

    .products-filters-toggle {
        min-height: 40px;
        margin-bottom: 10px;
    }

    .products-filters-toggle .badge:empty {
        display: none;
    }

    /* Products list: "Modifică selecția" and "Salvează modificările" sat in the
       pagination bars, far from the rows. On a phone they are a bar at the
       bottom of the screen; the copy in the top pagination bar is hidden. */
    .table-products-cont > .filter-group + .cftable-pagination .show-product-multiple-actions-container,
    .table-products-cont > .filter-group + .cftable-pagination .show-save-changes-container {
        display: none !important;
    }

    #table-products + .cftable-pagination .show-product-multiple-actions-container:not(:empty),
    #table-products + .cftable-pagination .show-save-changes-container:not(.hidden) {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1000;
        display: flex;
        gap: 8px;
        margin: 0 !important;
        /* room on the right for the help / chat buttons */
        padding: 8px 64px 8px 15px;
        border-top: 1px solid #e5e5e5;
        background: #fff;
        box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.08);
    }

    /* both bars at once: the selection one sits on top of the save one */
    #table-products + .cftable-pagination .show-save-changes-container:not(.hidden) ~ .show-product-multiple-actions-container:not(:empty) {
        bottom: 57px;
    }

    #table-products + .cftable-pagination .show-product-multiple-actions-container .btn,
    #table-products + .cftable-pagination .show-save-changes-container .btn {
        flex: 1 1 auto;
        min-height: 40px;
        margin: 0;
    }

    /* the last rows can still scroll out from under the bars */
    .table-products-cont:has(.show-product-multiple-actions-container:not(:empty)),
    .table-products-cont:has(.show-save-changes-container:not(.hidden)) {
        padding-bottom: 120px;
    }

    /* Products list: row buttons were 28px, the row checkbox 13px and the
       WEB / POS / PORTALS / status switches 10px text on a 25px chip. */
    #table-products td.td-buttons button.btn {
        min-width: 40px;
        height: 40px;
    }

    #table-products .row-selection {
        width: 22px;
        height: 22px;
    }

    #table-products .status-wrapper .label {
        padding: 9px 8px;
        font-size: 12px;
    }

    /* Products list: each product is a card instead of a 560px table row in a
       box that scrolls sideways. The edit pencil sat 140px past the right edge,
       the language labels were cut to "R(" and the price and time fields were
       45px wide. Photo and names on top, prices and times under them, then
       availability and locations, and the row buttons last, Edit first and
       named, the selection box on the right. */
    #table-products,
    #table-products > tbody {
        display: block;
        width: 100%;
    }

    #table-products > thead {
        display: block;
        border: 0;
        background: transparent;
    }

    #table-products > thead > tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        border: 0;
        background: transparent;
    }

    #table-products > thead > tr > th {
        display: none;
    }

    /* the header keeps "Acțiuni" with its invert-selection button, and in
       reorder mode the sort buttons */
    #table-products > thead > tr > th:last-child,
    #table-products:not(.hide-position) > thead > tr > th.name-size {
        display: block;
        width: auto;
        padding: 4px 0 8px;
        border: 0;
        background: transparent;
    }

    #table-products > thead > tr > th:last-child br {
        display: none;
    }

    #table-products > thead > tr > th.name-size {
        font-size: 0;
    }

    #table-products > thead > tr > th.name-size .btn {
        min-height: 36px;
        margin: 0 4px 0 0;
        padding: 8px 10px;
        font-size: 13px;
    }

    #table-products > tbody > tr.order-item {
        display: grid;
        grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "img name name"
            "price price time"
            "status status status"
            "btns btns btns";
        gap: 8px 10px;
        margin-bottom: 10px;
        padding: 10px;
        border: 1px solid #e5e5e5;
        border-radius: 6px;
        background: #fff;
    }

    /* reorder mode (a category or type is filtered): the position comes first */
    #table-products:not(.hide-position) > tbody > tr.order-item {
        grid-template-areas:
            "pos pos pos"
            "img name name"
            "price price time"
            "status status status"
            "btns btns btns";
    }

    #table-products > tbody > tr.order-item > td {
        display: block;
        width: auto;
        min-width: 0;
        padding: 0;
        border: 0;
        background: transparent;
        text-align: left;
    }

    /* reorder: the arrow is the grip a finger drags (jqueryUiTouch.js), next
       to the position button. The cell only spans the two, so the rest of the
       row still scrolls the list. Only in reorder mode: otherwise temp.css
       hides the cell (.hide-position .col-to-hide). */
    #table-products > tbody > tr.order-item > td.change-pos {
        grid-area: pos;
    }

    #table-products:not(.hide-position) > tbody > tr.order-item > td.change-pos {
        justify-self: start;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    #table-products > tbody > tr.order-item > td.change-pos > br {
        display: none;
    }

    #table-products > tbody > tr.order-item > td.change-pos > .fa {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 36px;
        border-radius: 4px;
        background: #22aba6;
        color: #fff;
        font-size: 18px;
        touch-action: none;
    }

    /* while dragging: a gap the size of a card where it will land */
    #table-products > tbody > tr.sortable-placeholder-products {
        display: block;
        height: 120px;
        margin-bottom: 10px;
        border-radius: 6px;
    }

    #table-products > tbody > tr.sortable-placeholder-products > td {
        display: none;
    }

    #table-products > tbody > tr.order-item.ui-sortable-helper {
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }

    #table-products > tbody > tr.order-item > td.edit-photos {
        grid-area: img;
        font-size: 11px;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    #table-products > tbody > tr.order-item > td.name-size {
        grid-area: name;
    }

    #table-products > tbody > tr.order-item > td.prices-size {
        grid-area: price;
    }

    #table-products > tbody > tr.order-item > td.sku-size {
        grid-area: time;
    }

    #table-products > tbody > tr.order-item > td.module-size {
        grid-area: status;
    }

    #table-products > tbody > tr.order-item > td.td-buttons {
        grid-area: btns;
        display: flex;
        align-items: center;
        gap: 8px;
        padding-top: 8px;
        border-top: 1px solid #eee;
    }

    #table-products > tbody > tr.order-item > td.td-buttons .clearfix {
        display: none;
    }

    #table-products > tbody > tr.order-item > td.td-buttons button.btn {
        width: 44px;
        margin: 0;
        padding: 0;
    }

    #table-products > tbody > tr.order-item > td.td-buttons button.edit-product {
        order: -1;
        width: auto;
        padding: 0 16px;
    }

    /* its name comes from the tooltip text; base.css hides that ::after (it is
       the tooltip's arrow on hover) */
    #table-products > tbody > tr.order-item > td.td-buttons button.edit-product::after,
    #table-products > tbody > tr.order-item > td.td-buttons button.edit-product:hover::after {
        content: attr(data-title);
        position: static;
        width: auto;
        height: auto;
        margin: 0 0 0 8px;
        border: 0;
        opacity: 1;
        transition: none;
    }

    #table-products > tbody > tr.order-item > td.td-buttons .row-selection {
        order: 1;
        flex: 0 0 auto;
        margin: 0 4px 0 auto;
    }

    /* names: the language code next to its field, the product type once */
    #table-products td.name-size > .form-group {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0 6px;
        margin-bottom: 4px;
    }

    #table-products td.name-size > .form-group ~ .form-group > small.no-wrap,
    #table-products td.name-size > .form-group > .help-block:empty {
        display: none;
    }

    #table-products td.name-size > .form-group > small.no-wrap {
        flex: 0 0 100%;
        white-space: normal;
    }

    #table-products td.name-size > .form-group > label {
        flex: 0 0 auto;
        width: auto;
        float: none;
        margin: 0;
    }

    #table-products td.name-size > .form-group > div[class*="col-xs-"] {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        float: none !important;
    }

    #table-products td.name-size .product-app-item {
        font-size: 13px;
    }

    /* prices and times: each label above its field */
    #table-products td.prices-size > br,
    #table-products td.sku-size > br {
        display: none;
    }

    #table-products td.prices-size > div,
    #table-products td.sku-size > div {
        margin-bottom: 6px;
    }

    #table-products td.prices-size [class*="col-xs-"],
    #table-products td.sku-size [class*="col-xs-"] {
        display: block;
        width: auto;
        float: none;
        padding: 0;
        text-align: left;
    }

    #table-products td.sku-size > small {
        display: block;
    }

    #table-products td.module-size .status-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    #table-products td.module-size .status-wrapper .label {
        margin: 0;
    }

    /* ----------------------------------------------------------------------
       Product form (#modal-edit-product)
       ---------------------------------------------------------------------- */

    /* Every tab of the product form fits the screen, so its body does not
       scroll sideways: in WebKit a select's native box still pushed "Tip și
       vizibilitate" 11px wider, and the whole form wobbled under the finger. */
    #modal-edit-product.cfmodal .cfmodal-content .cfmodal-body {
        overflow-x: hidden;
    }

    /* Product form: its 7 buttons made a bottom bar of 3 rows (122px), and as
       one sideways-scrolling row the previous / next product sat off screen.
       Two rows that always fit: the three saves, then previous / next as
       arrows, Cancel changes and Close. */
    #modal-edit-product.cfmodal:not(#cfconfirm):not(#modal-publish-app):not(#modal-export-menu) .cfmodal-footer {
        flex-wrap: wrap;
        justify-content: flex-start;
        padding: 6px 10px;
    }

    #modal-edit-product.cfmodal:not(#cfconfirm):not(#modal-publish-app):not(#modal-export-menu) .cfmodal-footer .btn {
        flex: 1 1 0;
        min-width: 0;
        min-height: 40px;
        padding: 4px 6px;
        font-size: 13px;
        line-height: 1.2;
        white-space: normal;
    }

    /* the saves fill the first row (-1px: rounding must not push the third
       one down), so the rest always starts the second */
    #modal-edit-product.cfmodal:not(#cfconfirm):not(#modal-publish-app):not(#modal-export-menu) .cfmodal-footer .save-product,
    #modal-edit-product.cfmodal:not(#cfconfirm):not(#modal-publish-app):not(#modal-export-menu) .cfmodal-footer .save-back {
        flex-basis: calc((100% - 12px) / 3 - 1px);
    }

    #modal-edit-product .cfmodal-footer .save-product:not(.go-next) {
        order: -7;
    }

    #modal-edit-product .cfmodal-footer .save-product.go-next {
        order: -6;
    }

    #modal-edit-product .cfmodal-footer .save-back {
        order: -5;
    }

    #modal-edit-product .cfmodal-footer .next-product[data-direction="prev"] {
        order: -4;
    }

    #modal-edit-product .cfmodal-footer .next-product[data-direction="next"] {
        order: -3;
    }

    #modal-edit-product .cfmodal-footer .reset-changes {
        order: -2;
    }

    #modal-edit-product .cfmodal-footer .cfmodal-close {
        order: -1;
    }

    /* previous / next product: an arrow (the name stays for screen readers) */
    #modal-edit-product.cfmodal:not(#cfconfirm):not(#modal-publish-app):not(#modal-export-menu) .cfmodal-footer .next-product {
        flex: 0 0 48px;
        font-size: 0;
    }

    #modal-edit-product .cfmodal-footer .next-product::before {
        content: "\f053";
        font: normal 16px/1 FontAwesome;
    }

    #modal-edit-product .cfmodal-footer .next-product[data-direction="next"]::before {
        content: "\f054";
    }

    /* Product form: the title lists the name in every language and took three
       lines above the tabs. Two lines, a little smaller. */
    #modal-edit-product .cfmodal-header .modal-title {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        font-size: 15px;
        line-height: 1.35;
    }

    /* Product form: long buttons ("Caută valori nutriționale pentru <name>",
       410px) wrap inside the screen; buttons, check boxes and radio labels
       were 16-31px tall. */
    #modal-edit-product .cfmodal-body .btn {
        max-width: 100%;
        white-space: normal;
    }

    #modal-edit-product .cfmodal-body .btn:not(.btn-xs) {
        min-height: 40px;
    }

    #modal-edit-product .cfmodal-body label:has(> input[type="checkbox"]),
    #modal-edit-product .cfmodal-body label:has(> input[type="radio"]) {
        min-height: 32px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    /* Product form, Locations & VAT: SKU, prep time factor and capacity had
       their labels in a right-aligned half column; label above the field. */
    #places-tab label.control-label.col-xs-6,
    #places-tab label.control-label.col-xs-6 + .col-xs-6 {
        width: 100%;
        text-align: left;
    }

    /* Product form, General (APPY team only): the recipe JSON is one long
       word */
    #info-tab .recipe-calculated-fields p {
        overflow-wrap: anywhere;
    }

    /* Product form: a label + switch pair in a col-sm-* box (frozen product on
       the nutrients tab) floated beside the next field. One row. */
    #modal-edit-product [class*="col-sm-"]:has(> .col-xs-6 + .col-xs-6 .switcher) {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        width: 100%;
    }

    /* Product form, Units: "Add a new unit type" and its help were squeezed
       into a right-floated box. */
    #unitType-tab .add-unit-type {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        float: none !important;
    }

    #unitType-tab .add-unit-type > .input-group-btn {
        display: block;
        width: auto;
    }

    #unitType-tab .add-unit-type > small {
        float: none !important;
        margin: 0;
    }

    /* Product form, Export: the export button floated over the heading. */
    #export-tab h4 > .pull-right {
        float: none !important;
        margin-top: 8px;
    }

    /* Product form, nutrients: the search block sat four columns deep (30px
       of padding each), which left 150px for the barcode search field. */
    #nutritions-tab .bg-grey [class*="col-"] {
        padding-right: 0;
        padding-left: 0;
    }

    #nutritions-tab .openfoodfacts-search-section .input-group {
        width: 100%;
    }

    /* Product form tables (recipe, copy from, used in, nutrients, units): each
       row is a card, every value under its column's name (data-label, set by
       the row templates). They scrolled sideways and cut names and values. */
    #modal-edit-product .recipe-list,
    #modal-edit-product .copy-recipe-list,
    #modal-edit-product .nutrients-list,
    #modal-edit-product .product-unitType-list,
    #used-in-tab table:has(> tbody.usedin-list-here) {
        display: block;
        border: 0;
    }

    #modal-edit-product .recipe-list > tbody,
    #modal-edit-product .copy-recipe-list > tbody,
    #modal-edit-product .nutrients-list > tbody,
    #modal-edit-product .product-unitType-list > tbody,
    #used-in-tab table > tbody.usedin-list-here {
        display: block;
    }

    #modal-edit-product .copy-recipe-list > thead,
    #modal-edit-product .nutrients-list > thead,
    #modal-edit-product .product-unitType-list > thead {
        display: none;
    }

    /* the recipe header keeps the recipe's total weight, "Used in" its Save
       button */
    #modal-edit-product .recipe-list > thead,
    #used-in-tab table > thead {
        display: block;
        border: 0;
        background: transparent;
    }

    #modal-edit-product .recipe-list > thead > tr,
    #used-in-tab table > thead > tr {
        display: flex;
        justify-content: flex-end;
        border: 0;
        background: transparent;
    }

    #modal-edit-product .recipe-list > thead > tr > th:not(:nth-child(5)),
    #used-in-tab table > thead > tr > th:not(:has(.save-used-in-list)) {
        display: none;
    }

    #modal-edit-product .recipe-list > thead > tr > th,
    #used-in-tab table > thead > tr > th {
        width: auto !important;
        padding: 0 0 8px;
        border: 0;
        background: transparent;
        text-align: right;
    }

    #modal-edit-product .recipe-list > tbody > tr,
    #modal-edit-product .copy-recipe-list > tbody > tr,
    #modal-edit-product .nutrients-list > tbody > tr,
    #modal-edit-product .product-unitType-list > tbody > tr,
    #used-in-tab table > tbody.usedin-list-here > tr {
        display: grid;
        align-items: start;
        gap: 8px 10px;
        margin-bottom: 8px;
        padding: 10px;
        border: 1px solid #e5e5e5;
        border-radius: 6px;
        background: #fff;
    }

    #modal-edit-product .recipe-list > tbody > tr > td,
    #modal-edit-product .copy-recipe-list > tbody > tr > td,
    #modal-edit-product .nutrients-list > tbody > tr > td,
    #modal-edit-product .product-unitType-list > tbody > tr > td,
    #used-in-tab table > tbody.usedin-list-here > tr > td {
        display: block;
        width: auto !important;
        min-width: 0;
        padding: 0;
        border: 0;
        background: transparent;
    }

    /* the row number */
    #modal-edit-product .recipe-list > tbody > tr > td:first-child,
    #modal-edit-product .copy-recipe-list > tbody > tr > td:first-child,
    #modal-edit-product .nutrients-list > tbody > tr > td:first-child,
    #modal-edit-product .product-unitType-list > tbody > tr > td:first-child,
    #used-in-tab table > tbody.usedin-list-here > tr > td:first-child {
        display: none;
    }

    #modal-edit-product .recipe-list td[data-label]::before,
    #modal-edit-product .copy-recipe-list td[data-label]::before,
    #modal-edit-product .nutrients-list td[data-label]::before,
    #modal-edit-product .product-unitType-list td[data-label]::before,
    #used-in-tab .usedin-list-here td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: #777;
        font-size: 12px;
        line-height: 1.3;
    }

    /* recipe, copy from, used in: name and delete, type, quantity, then the
       base-unit quantity and the cost */
    #modal-edit-product .recipe-list > tbody > tr,
    #modal-edit-product .copy-recipe-list > tbody > tr,
    #used-in-tab table > tbody.usedin-list-here > tr {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
        grid-template-areas:
            "name name btn"
            "type type type"
            "qty qty qty"
            "grams cost cost";
    }

    #modal-edit-product .recipe-list > tbody > tr > td:nth-child(2),
    #modal-edit-product .copy-recipe-list > tbody > tr > td:nth-child(2),
    #used-in-tab .usedin-list-here > tr > td:nth-child(2) {
        grid-area: type;
    }

    #modal-edit-product .recipe-list > tbody > tr > td:nth-child(3),
    #modal-edit-product .copy-recipe-list > tbody > tr > td:nth-child(3),
    #used-in-tab .usedin-list-here > tr > td:nth-child(3) {
        grid-area: name;
    }

    #modal-edit-product .recipe-list > tbody > tr > td:nth-child(4),
    #modal-edit-product .copy-recipe-list > tbody > tr > td:nth-child(4),
    #used-in-tab .usedin-list-here > tr > td:nth-child(4) {
        grid-area: qty;
    }

    #modal-edit-product .recipe-list > tbody > tr > td:nth-child(5),
    #modal-edit-product .copy-recipe-list > tbody > tr > td:nth-child(5),
    #used-in-tab .usedin-list-here > tr > td:nth-child(5) {
        grid-area: grams;
    }

    #modal-edit-product .recipe-list > tbody > tr > td:nth-child(6),
    #modal-edit-product .copy-recipe-list > tbody > tr > td:nth-child(6),
    #used-in-tab .usedin-list-here > tr > td:nth-child(6) {
        grid-area: cost;
    }

    #modal-edit-product .recipe-list > tbody > tr > td:nth-child(7),
    #modal-edit-product .copy-recipe-list > tbody > tr > td:nth-child(7),
    #used-in-tab .usedin-list-here > tr > td:nth-child(7) {
        grid-area: btn;
    }

    /* nutrients: name and delete, then value, displayed value and unit (the
       unit needs no title: it reads as the value's suffix) */
    #modal-edit-product .nutrients-list > tbody > tr {
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 44px 44px;
        grid-template-areas:
            "name name name btn"
            "qty disp unit unit";
    }

    #modal-edit-product .nutrients-list > tbody > tr > td:nth-child(5) {
        align-self: end;
        padding-bottom: 8px;
    }

    #modal-edit-product .nutrients-list > tbody > tr > td:nth-child(5)::before {
        display: none;
    }

    #modal-edit-product .nutrients-list > tbody > tr > td:nth-child(2) {
        grid-area: name;
    }

    #modal-edit-product .nutrients-list > tbody > tr > td:nth-child(3) {
        grid-area: qty;
    }

    #modal-edit-product .nutrients-list > tbody > tr > td:nth-child(4) {
        grid-area: disp;
    }

    #modal-edit-product .nutrients-list > tbody > tr > td:nth-child(5) {
        grid-area: unit;
    }

    #modal-edit-product .nutrients-list > tbody > tr > td:nth-child(6) {
        grid-area: btn;
    }

    #modal-edit-product .nutrients-list .search-for-nutrient,
    #modal-edit-product .nutrients-list .nutrient-qty {
        min-width: 0;
    }

    /* the ingredient search and its "add new" button fill the card */
    #modal-edit-product .recipe-list td .input-group,
    #modal-edit-product .recipe-list td .qty-selector {
        width: 100%;
    }

    /* units: symbol, name, default and delete, then the conversion */
    #modal-edit-product .product-unitType-list > tbody > tr {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) minmax(0, 1fr) 44px;
        grid-template-areas:
            "sym name def btn"
            "conv conv conv conv";
    }

    #modal-edit-product .product-unitType-list > tbody > tr > td:nth-child(2) {
        grid-area: sym;
    }

    #modal-edit-product .product-unitType-list > tbody > tr > td:nth-child(3) {
        grid-area: name;
    }

    #modal-edit-product .product-unitType-list > tbody > tr > td:nth-child(4) {
        grid-area: def;
    }

    #modal-edit-product .product-unitType-list > tbody > tr > td:nth-child(5) {
        grid-area: conv;
    }

    #modal-edit-product .product-unitType-list > tbody > tr > td:nth-child(6) {
        grid-area: btn;
    }

    #modal-edit-product .product-unitType-list .nowrap {
        display: flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
    }

    #modal-edit-product .product-unitType-list .conversion-factor-to-default {
        flex: 1 1 auto;
        width: auto;
    }

    /* the delete / add button of a card */
    #modal-edit-product .recipe-list > tbody > tr > td:last-child .btn,
    #modal-edit-product .copy-recipe-list > tbody > tr > td:last-child .btn,
    #modal-edit-product .nutrients-list > tbody > tr > td:last-child .btn,
    #modal-edit-product .product-unitType-list > tbody > tr > td:last-child .btn,
    #used-in-tab .usedin-list-here > tr > td:last-child .btn {
        width: 44px;
        min-height: 40px;
        margin: 0;
        padding: 0;
    }

    /* Product form, Type & visibility: the "not available in" channels were
       spaced with &nbsp; and wrapped at random indents. Two columns. */
    #visibility-tab .col-xs-12:has(> label > input[name^="HiddenIn_"]) {
        display: flex;
        flex-wrap: wrap;
        font-size: 0;
    }

    #visibility-tab .col-xs-12:has(> label > input[name^="HiddenIn_"]) > * {
        flex: 0 0 100%;
        font-size: 14px;
    }

    #visibility-tab .col-xs-12:has(> label > input[name^="HiddenIn_"]) > label {
        display: flex;
        flex-basis: 50%;
        align-items: center;
        gap: 6px;
        min-width: 0;
        min-height: 36px;
        margin: 0;
        font-weight: normal;
        overflow-wrap: anywhere;
    }

    /* Product form, Variants: the table scrolls now, but the name fields were
       34px wide and the SKU fields had no width at all. */
    .custom-product-feat-list .feat-name input,
    .custom-product-feat-list .feat-type input,
    .custom-product-feat-list td > .col-xs-10 > input {
        min-width: 110px;
    }

    .custom-product-feat-list .feat-sku input[type="text"] {
        width: 100%;
        min-width: 90px;
    }

    .custom-product-feat-list .feat-price input {
        min-width: 70px;
    }

    /* Product form, Recipe: the ingredient name field was 20px wide next to its
       "Add new" button; the long "Save & update from recipe" was one 464px line. */
    .recipe-list .search-for-ingredient {
        min-width: 150px;
    }

    .recipe-list .ingredient-qty {
        min-width: 70px;
    }

    .recipe-list .um-selector {
        min-width: 80px;
    }

    .recipe-list select.product-type {
        min-width: 100px;
    }

    #recipes-tab .update-all-from-recipe {
        max-width: 100%;
        white-space: normal;
        text-align: left;
    }

    /* Product form, Units and Nutrition: conversion and nutrient fields were
       about 45px wide. */
    .product-unitType-list .conversion-factor-to-default {
        min-width: 80px;
    }

    .nutrients-list .search-for-nutrient {
        min-width: 150px;
    }

    .nutrients-list .nutrient-qty {
        min-width: 70px;
    }

    /* Product form, Type & visibility: each category's position field (132px)
       stuck out of a 31px column over the next category. One per line. */
    .product-categories .categ-elem {
        width: 100%;
    }

    .product-categories .categ-elem input[type="number"] {
        width: 100%;
        max-width: 140px;
        min-height: 36px;
    }

    /* Product form, Variants: up / down buttons replace dragging (touch); the
       actions cell holds four finger-sized buttons. */
    .custom-product-feat-list td.td-buttons button.btn {
        min-width: 40px;
        height: 40px;
    }

    /* ----------------------------------------------------------------------
       Extras groups (#app/<id>/appProducts/extrasgroups) and their modals
       ---------------------------------------------------------------------- */

    /* Extras groups list: the date column pushed Delete off the screen. */
    #table-extrasets th:nth-child(3),
    #table-extrasets td:nth-child(3) {
        display: none;
    }

    /* Extras group, subset items: two text columns made names and prices run
       into each other. */
    #modal-sub-set .manage-app-items-list.extras {
        -webkit-columns: 1;
        columns: 1;
    }

    /* Extras subgroup, selected items: up / down buttons replace dragging. */
    .manage-app-items-selected .sel-item-move .btn {
        min-width: 36px;
        margin: -4px 0 0 4px;
    }

    /* Extras group, "add to products / to a category": the search field shared
       its row with one or two buttons. The buttons go under it. */
    #extra-set .input-group {
        display: flex;
        flex-wrap: wrap;
    }

    #extra-set .input-group > .form-control {
        flex: 1 1 100%;
        width: 100%;
        border-radius: 4px;
    }

    #extra-set .input-group > .input-group-btn {
        display: flex;
        width: 100%;
        margin-top: 6px;
    }

    #extra-set .input-group > .input-group-btn > .btn {
        flex: 1 1 auto;
        margin: 0;
        border-radius: 4px;
    }

    /* ----------------------------------------------------------------------
       Translate tab (#app/<id>/appProducts/translate)
       ---------------------------------------------------------------------- */

    /* Translate tab: six table cells per product left 3-55px per field and
       split the language code ("r o"). One field per line. */
    #translate-products,
    #translate-products > tbody,
    #translate-products > tbody > tr {
        display: block;
        width: 100%;
    }

    #translate-products > tbody > tr > td {
        display: block;
        width: auto !important;
        border-top: 0;
        word-break: normal;
    }

    #translate-products > tbody > tr > td.lncode,
    #translate-products > tbody > tr > td.categ {
        display: inline-block;
        padding-bottom: 0;
    }

    #translate-products > tbody > tr.start > td.lncode {
        border-top: 0;
    }

    #translate-products > tbody > tr.start {
        border-top: 4px solid #969696;
    }

    #translate-products td label {
        display: block;
    }

    #translate-products td .form-group > .form-control {
        flex: 1 1 auto;
        min-width: 0;
    }

    /* Bulk edit: an empty status line pushed 42% to the right (.save-infos,
       style.css) made the whole modal scroll sideways by 135px. */
    .group-actions .nav-tabs-custom > .save-infos {
        left: 0;
    }

    /* ----------------------------------------------------------------------
       Places & VAT (product form tab and bulk "Locații și taxe")
       ---------------------------------------------------------------------- */

    /* Places & VAT: five VAT columns of ~60px with their headers cut to
       "D… VAT". Two per row, full headers. */
    .location .vat-taxes {
        display: flex;
        flex-wrap: wrap;
    }

    .location .vat-taxes > [class*="col-xs-"] {
        float: none;
        width: 50%;
        margin-bottom: 10px;
        padding-right: 8px !important;
    }

    .location .vat-taxes .label-head {
        height: auto;
    }

    /* ----------------------------------------------------------------------
       Imports (AI, POS, delivery platforms, nutrition values)
       ---------------------------------------------------------------------- */

    /* POS / delivery-platform import review: names were cut to 75px and the
       category lists to 45px. */
    .pos-import-wizard .product-name-input,
    .pos-import-wizard .category-name-input,
    .delivery-import-wizard .product-name-input,
    .delivery-import-wizard .category-name-input,
    .delivery-import-wizard .extra-name-input {
        min-width: 160px;
    }

    .pos-import-wizard .products-table select,
    .pos-import-wizard .categories-table select,
    .delivery-import-wizard table select {
        min-width: 110px;
    }

    .delivery-import-wizard .delivery-step {
        padding-right: 0;
        padding-left: 0;
    }

    /* AI import review: a 400px scroll box inside the scrolling modal; the list
       now scrolls with the modal. Option labels were 11px. */
    .ai-import-content .products-review-body {
        max-height: none !important;
    }

    .ai-import-content .ai-import-options .checkbox label {
        font-size: 13px;
    }

    /* Nutrition values import: allergen / additive / nutrient badges at 10px */
    .nutritional-import-wizard .allergen-badge,
    .nutritional-import-wizard .additive-badge,
    .nutritional-import-wizard .nutrient-mini,
    .nutritional-import-wizard .import-stats .badge {
        font-size: 12px;
    }

    /* ----------------------------------------------------------------------
       Product photos, file manager, digital menu export
       ---------------------------------------------------------------------- */

    /* Product photos: three 60px-wide buttons whose labels ran over each other.
       They share the bottom bar. */
    #modal-edit-photo .cfmodal-footer > .row {
        display: flex;
        flex: 1 1 100%;
        gap: 6px;
        margin: 0;
    }

    #modal-edit-photo .cfmodal-footer > .row > [class*="col-xs-"] {
        float: none;
        flex: 1 1 0;
        width: auto;
        padding: 0;
    }

    #modal-edit-photo .cfmodal-footer > .row > .clearfix,
    #modal-edit-photo .cfmodal-footer > .clearfix {
        display: none;
    }

    #modal-edit-photo .cfmodal-footer .btn-block {
        height: 100%;
        min-height: 44px;
        white-space: normal;
    }

    /* File manager: six columns (504px) pushed the buttons off the screen.
       The link field (the "copy link" button does the same), author and date
       are hidden. */
    .files .file-list th:nth-child(3),
    .files .file-list td:nth-child(3),
    .files .file-list th:nth-child(4),
    .files .file-list td:nth-child(4),
    .files .file-list th:nth-child(5),
    .files .file-list td:nth-child(5) {
        display: none;
    }

    .files .file-list td:nth-child(2) {
        overflow-wrap: anywhere;
    }

    /* Digital menu export: the colour row did not wrap ("Dark" and the site
       theme select were cut off) and its buttons came out above the title. */
    #modal-export-menu .theme-wrapp {
        flex-wrap: wrap;
        padding: 5px 0;
    }

    #modal-export-menu .theme-wrapp > div {
        flex: 1 0 64px;
    }

    /* the "Site Theme" select gets a line of its own */
    #modal-export-menu .theme-wrapp > div:last-child {
        flex-basis: 100%;
        text-align: left;
    }

    #modal-export-menu .cfmodal-footer .help {
        font-size: 12px;
        padding-bottom: 6px;
    }

    #modal-export-menu .cfmodal-content .cfmodal-footer {
        order: 3;
    }
}

/* Module lock + engine billing (css/module-billing.css): tables stack into cards with the column
   name from data-label, forms wrap, the lock page buttons take the full width. */
@media (max-width: 767px) {
    .mb-table thead {
        display: none;
    }
    .mb-table,
    .mb-table tbody,
    .mb-table tr,
    .mb-table td {
        display: block;
        width: 100%;
    }
    .mb-table tr {
        border: 1px solid var(--border-color, #ddd);
        border-radius: var(--border-radius, 2px);
        margin-bottom: 10px;
        padding: 6px 10px;
    }
    .mb-table td {
        border: 0;
        padding: 4px 0;
    }
    .mb-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: 12px;
        color: var(--text-muted, #6b7280);
    }
    .mb-table .mb-actions {
        text-align: left;
        white-space: normal;
    }
    .mb-inline-form .form-control,
    .mb-table .mb-inline-form .form-control {
        flex: 1 1 120px;
        max-width: none;
        min-width: 0;
    }
    .mb-inline-form .form-control.mb-short {
        flex: 0 0 70px;
    }
    .mb-card {
        padding: 12px;
    }
    .mb-lock {
        padding: 20px 12px;
    }
    .mb-lock-actions .btn {
        flex: 1 1 100%;
    }
    .app-item-module-locked {
        font-size: 11px;
    }
}
