/*
 * SMS-Payments — theme overrides (Batches 1–10).
 *
 * Small, hand-written overrides loaded AFTER Metronic's style.bundle.css.
 * The generated bundles are never edited; everything theme-specific lives
 * here. Primary brand colour is refined via Metronic's own --bs-primary
 * variables, so buttons, links, charts and active states follow
 * automatically.
 *
 * Batch 8 — the big one:
 *   - Status badges are LIGHT TINTS with DARK TEXT in both themes
 *     (the old solid badges with white text — e.g. white "Completed"
 *     on green — were hard to read; dark ink on a tint is not).
 *   - Consistent page headers, stat cards, empty states, filter bars
 *     and a transactions table that sizes to its content (auto height,
 *     max-height + internal scroll) instead of stretching full-screen.
 *   - Add-store wizard v2: numbered stepper with a progress fill,
 *     per-step headings and a Back button on every step after the first.
 *   - Copy-to-clipboard feedback (toast) and a one-click theme toggle
 *     (the toggle was removed again in Batch 10 — see below).
 *   - Dark mode keeps working: tinted badges deliberately stay light
 *     in dark mode so their dark text stays readable.
 *
 * Batch 10:
 *   - Transactions filter bar is ONE line on desktop (nowrap + scroll,
 *     wraps only below the lg breakpoint); Metronic Select2 is back on
 *     the Status / Provider / Store selects, sized to match the other
 *     inputs.
 *   - Highlights restyled to subtle Metronic tints: the just-created
 *     store row lost its harsh table-primary wash, the "New" badge and
 *     the applied-filter chips are now Metronic badge-light-* badges.
 *   - Transaction STATE badges are the original Metronic solid badges
 *     again (badge-success etc. with dark text, as rendered server-side
 *     by MessagesController): the tint overrides below never touch a
 *     plain .badge-success / .badge-danger / .badge-warning.
 *   - The Batch 8 duplicate one-click theme toggle is removed; the
 *     original Metronic Light / Dark / System menu is the only switch,
 *     and the saved preference (localStorage, light default) still
 *     works through it.
 *
 * Batch 11:
 *   - Transactions filter is the Metronic DataTables Buttons doc
 *     pattern: card card-flush, card-header
 *     align-items-center py-5 gap-2 gap-md-5, search in the
 *     card-title, filters + actions in the card-toolbar
 *     (flex-row-fluid justify-content-end gap-5) - ONE row on
 *     desktop, wrapping only below the lg breakpoint.
 *   - The grey .tx-filter-bar box is DELETED (no background, border,
 *     radius or padding on the filter row): the row sits directly on
 *     the theme card surface, transparent in light AND dark mode.
 *   - No labels above the controls; Select2 placeholders
 *     (Status / Provider / Store) and the search placeholder do it.
 *
 * Batch 15:
 *   - Filter box: the search magnifier is fixed with Metronic's own
 *     search pattern (top-50 / translate-middle-y / start-0 / ms-4
 *     on the icon, ps-12 on the input, geometry pinned in CSS below
 *     so it stays centred even if a utility class is ever dropped).
 *     All toolbar controls now share one height, one vertical
 *     rhythm and one focus treatment in light AND dark mode, and the
 *     below-1400px 2-column grid gets a slightly roomier gap.
 *
 * Batch 14:
 *   - New screenshot (after Batch 13 + cache clear): the card title
 *     "Transactions" is clipped on its left too, so the defect is
 *     page/card level, NOT a table scroller — Batches 11-13 fixed
 *     the wrong layer. The table no longer forces a fixed 1210px
 *     content width; it is a plain width: 100% table that fits its
 *     card. The table card's side padding is now guaranteed here
 *     (the undocumented zero-padding card class is dropped from the Blade),
 *     and the view's aside class-swap JS is deleted — KTDrawer owns
 *     #kt_aside through its data-kt-drawer-* attributes.
 *
 * Batch 19:
 *   - Setup assistant dark-mode fix (user screenshot): chat bubbles
 *     are theme-aware surfaces with explicit text colours in both
 *     themes (dark-mode bubbles are dark surfaces, never a pale tint
 *     with white text), the "Done" pill is a .badge-status-* tint,
 *     the page card is a centred max-800px column, the Arabic
 *     greeting is a proper RTL block with LTR-isolated Latin tokens,
 *     and subtitle / quick-reply contrast is pinned per theme.
 */

/* ------------------------------------------------------------------ */
/* Brand primary — refined deep blue (light theme)                     */
/* ------------------------------------------------------------------ */
:root {
    --bs-primary: #006ce6;
    --bs-primary-active: #0058bd;
    --bs-primary-light: #e6f0ff;
    --bs-primary-inverse: #ffffff;
    --bs-primary-rgb: 0, 108, 230;
    /* Batch 8 — shared tints (dark text on light tint, both themes). */
    --sms-tint-success-bg: #d9f2e3;
    --sms-tint-success-border: #a9e0bd;
    --sms-tint-success-text: #0c5a2b;
    --sms-tint-danger-bg: #fde7e7;
    --sms-tint-danger-border: #f3b3b3;
    --sms-tint-danger-text: #8c1d1d;
    --sms-tint-warning-bg: #fff1c2;
    --sms-tint-warning-border: #eed484;
    --sms-tint-warning-text: #6b4d00;
    --sms-tint-info-bg: #dbeafe;
    --sms-tint-info-border: #a8c8f5;
    --sms-tint-info-text: #173f7a;
    --sms-tint-primary-bg: #e0eaff;
    --sms-tint-primary-border: #b3c9f7;
    --sms-tint-primary-text: #0b3d91;
    --sms-tint-muted-bg: #eceef1;
    --sms-tint-muted-border: #d3d8de;
    --sms-tint-muted-text: #3f4756;
}

/* Brand primary — lifted for contrast on dark surfaces */
[data-bs-theme="dark"] {
    --bs-primary: #2e8bff;
    --bs-primary-active: #5ea8ff;
    --bs-primary-light: #12294d;
    --bs-primary-inverse: #ffffff;
    --bs-primary-rgb: 46, 139, 255;
}

/* ------------------------------------------------------------------ */
/* Cards — slightly larger radius, softer shadow                       */
/* ------------------------------------------------------------------ */
.card {
    border-radius: 0.85rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.04);
}

[data-bs-theme="dark"] .card {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.35);
}

/* ------------------------------------------------------------------ */
/* Batch 8 — status badges: dark text on light tints, always.          */
/* Metronic's solid .badge-success/.badge-danger use white text on a   */
/* saturated background; pairing them with .badge-status-* used to     */
/* force white text too. Every status badge is now a tint with dark    */
/* ink, in light AND dark mode, so "Completed" reads like it did       */
/* originally (dark text) instead of white-on-green.                   */
/*                                                                     */
/* Batch 10 — boundary: the tint below applies ONLY to elements that   */
/* carry a .badge-status-* class on its own (store state badges,       */
/* expiry count). A plain Metronic badge (.badge-success,               */
/* .badge-danger, .badge-warning with no .badge-status-* class) is     */
/* NEVER re-tinted here — transaction STATE badges rendered            */
/* server-side by MessagesController keep their original solid         */
/* Metronic backgrounds, with dark text (inline style in the           */
/* controller, plus the .badge-warning guard below).                   */
/* ------------------------------------------------------------------ */
.badge-status-success {
    background-color: var(--sms-tint-success-bg) !important;
    border: 1px solid var(--sms-tint-success-border);
    color: var(--sms-tint-success-text) !important;
}

.badge-status-danger {
    background-color: var(--sms-tint-danger-bg) !important;
    border: 1px solid var(--sms-tint-danger-border);
    color: var(--sms-tint-danger-text) !important;
}

.badge-status-warning {
    background-color: var(--sms-tint-warning-bg) !important;
    border: 1px solid var(--sms-tint-warning-border);
    color: var(--sms-tint-warning-text) !important;
}

.badge-status-info {
    background-color: var(--sms-tint-info-bg) !important;
    border: 1px solid var(--sms-tint-info-border);
    color: var(--sms-tint-info-text) !important;
}

.badge-status-primary {
    background-color: var(--sms-tint-primary-bg) !important;
    border: 1px solid var(--sms-tint-primary-border);
    color: var(--sms-tint-primary-text) !important;
}

.badge-status-muted {
    background-color: var(--sms-tint-muted-bg) !important;
    border: 1px solid var(--sms-tint-muted-border);
    color: var(--sms-tint-muted-text) !important;
}

/* Generic alias for non-badge elements on a warning background
   (e.g. the "Pending Transactions" button in the dashboard header). */
.badge-status {
    background-color: var(--sms-tint-warning-bg) !important;
    border: 1px solid var(--sms-tint-warning-border);
    color: var(--sms-tint-warning-text) !important;
}

[data-bs-theme="dark"] .badge-status-success {
    background-color: var(--sms-tint-success-bg) !important;
    color: var(--sms-tint-success-text) !important;
}

[data-bs-theme="dark"] .badge-status-danger {
    background-color: var(--sms-tint-danger-bg) !important;
    color: var(--sms-tint-danger-text) !important;
}

[data-bs-theme="dark"] .badge-status-warning,
[data-bs-theme="dark"] .badge-status {
    background-color: var(--sms-tint-warning-bg) !important;
    color: var(--sms-tint-warning-text) !important;
}

/* Plain solid Metronic warning badges (e.g. the sidebar expiry count)
   already use dark text; make it explicit so a bundle change cannot
   flip them to white. */
.badge.badge-warning {
    color: #181c32 !important;
}

/* ------------------------------------------------------------------ */
/* Batch 8 — page headers, stat cards, empty states                    */
/* ------------------------------------------------------------------ */
.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.page-head-title {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: var(--bs-gray-900);
}

.page-head-sub {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: var(--bs-gray-500);
}

.page-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* Dashboard stat tiles: subtle lift on hover, icon tile tint. */
.stat-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 1.75rem rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .stat-card:hover {
    box-shadow: 0 0.75rem 1.75rem rgba(0, 0, 0, 0.45);
}

.stat-card .symbol-label {
    border-radius: 0.65rem;
    background-color: var(--bs-primary-light);
}

/* Welcome hero on the dashboard: keep the white text readable over
   the green banner image in both themes. */
.welcome-hero h3,
.welcome-hero .text-white {
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

/* Empty states — centred, calm, with an action. */
.empty-state {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--bs-gray-500);
}

.empty-state-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.empty-state-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bs-gray-800);
    margin-bottom: 0.25rem;
}

.empty-state-text {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ------------------------------------------------------------------ */
/* Batch 13 - separate actions + coherent toolbar + mobile grid.
   Screenshot evidence (wide desktop, after Batch 12): the toolbar
   was one line (good) but the TABLE was still broken — ID column
   half-cut at the card's left edge, table wider than its card, the
   card's left rounded corner cut. That is NOT a narrow-screen issue:
   Batch 12 left TWO nested horizontal scrollers (Bootstrap
   .table-responsive around DataTables' own JS-sized inner
   scroller), and the inner one started the table parked sideways.
   Batch 13 keeps exactly ONE scroll mechanism (the wrapper; the
   DataTables horizontal scroller is off in the Blade) and the
   wrapper was reset to scroll-left 0 after init and every draw
   (Batch 14 removes that reset — the table now fits its card, so
   the wrapper starts at 0 by itself). The toolbar itself never
   scrolls now:
   its widths are flexible (no fixed w-250px/w-150px utilities) so it
   is one clean line on wide desktop (>= 1400px) and a tidy 2-column
   grid below that — search full-width on its own row, then filters
   2 per row, Apply/Reset side by side. Every control shares one
   height (--tx-control-h) so search, Select2 selects, date inputs
   and buttons align in light AND dark mode. */
.tx-toolbar-standalone {
    min-width: 0;
}

.tx-filter-toolbar {
    --tx-control-h: calc(1.5em + 1.55rem + 2px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

/* Flexible widths: the controls share the row and shrink to fit
   instead of forcing a fixed 1400px+ row that has to scroll. */
.tx-filter-search {
    flex: 1 1 200px;
    min-width: 140px;
}

.tx-filter-search input {
    width: 100%;
    min-width: 0;
    height: var(--tx-control-h);
    /* Text starts at 3rem (ps-12): icon left 1rem + icon ~1.35rem
       wide + 0.65rem clear gap, so typed text / placeholder never
       overlaps the magnifier. Set explicitly here (not only via the
       ps-12 utility) so the geometry survives a utility change. */
    padding-left: 3rem;
    padding-right: 1rem;
    line-height: 1.5;
}

.tx-filter-select {
    flex: 1 1 140px;
    min-width: 120px;
}

.tx-filter-date {
    flex: 1 1 140px;
    min-width: 125px;
    height: var(--tx-control-h);
}

.tx-filter-toolbar .btn {
    flex-shrink: 0;
    height: var(--tx-control-h);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Below the xxl breakpoint the one-line row cannot fit honestly
   (sidebar + 8 controls), so it becomes a clean 2-column grid
   instead of a scrolling row: search spans the full row, then
   filters 2 per row, Apply/Reset side by side. This covers the
   below-lg mobile layout and small-desktop widths alike. */
@media (max-width: 1399.98px) {
    .tx-filter-toolbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        /* Batch 15: a touch roomier than the 0.5rem desktop gap so
           the stacked rows breathe on mobile / small desktop. */
        gap: 0.75rem;
    }

    .tx-filter-search {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .tx-filter-select,
    .tx-filter-date {
        min-width: 0;
        width: 100%;
    }

    .tx-filter-toolbar .btn {
        width: 100%;
    }

    /* Batch 39 — Apply/Reset share their own full-width row, side
       by side, instead of landing diagonally across two grid rows. */
    .tx-filter-toolbar .tx-filter-actions {
        grid-column: 1 / -1;
        display: flex;
        gap: 0.75rem;
    }
    .tx-filter-toolbar .tx-filter-actions .btn {
        flex: 1 1 0;
        width: auto;
    }
}

/* Batch 39 — on the one-line desktop row the wrapper disappears so
   the two buttons are direct flex items of the toolbar, exactly as
   before (same size, same order, same gap). */
@media (min-width: 1400px) {
    .tx-filter-actions {
        display: contents;
    }
}

/* Card header actions (Batch 13): Export / Add Transaction live in
   the table card's own header, clearly separate from the filter
   toolbar — never inside it, never at the end of a scrolling row.
   .card-toolbar is deliberately NOT used: Metronic gives it
   a forced content width, which was the Batch 11 blowout. */
.tx-table-card > .card-header {
    min-width: 0;
}

/* Batch 14 — the table card's side padding is guaranteed here, not
   left to the theme default: the card title AND the table both sit
   behind this padding, so even if the page is ever parked a few px
   to the side again, glyphs are never the first thing cut at the
   card's left border. (The undocumented zero-padding card class is dropped
   from the Blade.) Placed before the mobile media query below so
   the 1.25rem mobile padding still wins under 768px. */
.tx-table-card > .card-header,
.tx-table-card > .card-body {
    padding-left: 2.25rem;
    padding-right: 2.25rem;
}

.tx-card-title {
    display: flex;
    align-items: center;
    min-width: 0;
}

.tx-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    margin-left: auto;
}

@media (max-width: 767.98px) {
    .tx-table-card > .card-header {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .tx-card-actions {
        width: 100%;
        margin-left: 0;
    }

    /* Batch 38 — the two buttons share the row 50/50 but must never
       wrap their labels ("Add / Transaction" on two lines): no icon
       on phones (the label alone is clear) and no wrapping. */
    .tx-card-actions .btn {
        flex: 1 1 0;
        white-space: nowrap;
    }

    .tx-card-actions .btn i {
        display: none;
    }
}

/* Blowout defuse (Batch 12, extended Batch 13): every flex item on
   the chain from the layout (.page > #kt_wrapper > the flex row >
   .container-fluid) down through the page wrapper to the table
   wrapper may shrink to 0, and the card clips anything that still
   overflows it. Batch 13 also guards the page itself: nothing on
   this page may create a page-level horizontal scrollbar (the
   screenshot showed the content sitting shifted, the card's left
   corner cut). overflow-x: clip keeps position: sticky working,
   unlike hidden; the @supports fallback covers older browsers. */
html,
body {
    overflow-x: clip;
}

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

.page,
#kt_wrapper,
#kt_wrapper > .d-flex.flex-column-fluid,
#kt_wrapper .container-fluid,
#kt_content,
.tx-page,
.tx-page > .card,
.tx-page .card-body,
.tx-page .tx-table-wrap {
    min-width: 0;
}

.tx-page > .card {
    overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* Batch 10/11 - Select2 inside the one-line header. Metronic         */
/* initialises [data-kt-select2="true"] globally (scripts.bundle.js),  */
/* so the selects only need the attribute. The rendered container     */
/* must fill its w-150px wrapper, never force a wider flex-basis,     */
/* and match the height of the neighbouring .form-control inputs.     */
/* ------------------------------------------------------------------ */
.tx-filter-select .select2-container {
    width: 100% !important;
    min-width: 0;
}

.tx-filter-select .select2-container .select2-selection--single {
    height: var(--tx-control-h);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.tx-filter-select .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.5;
    padding-left: 1rem;
    padding-right: 2rem;
}

.tx-filter-select .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 0.5rem;
}

.tx-filter-select .select2-container--default .select2-selection--single .select2-selection__clear {
    margin-right: 0.25rem;
}

/* ------------------------------------------------------------------ */
/* Batch 15 — filter box: search icon + one shared control rhythm.     */
/*                                                                     */
/* ROOT CAUSE (search icon): the Blade carried only                    */
/*   <i class="ki-duotone ki-magnifier fs-3 position-absolute ms-5">  */
/* — position:absolute with NO top, NO left and NO translate, and     */
/*   custom.css had NO rule for the icon at all. An absolutely         */
/*   positioned element with no offsets sits at its static position:  */
/*   the top edge of the wrapper, pushed 1.25rem right by ms-5 —      */
/*   never vertically centred on the input's text line, and drifting  */
/*   whenever the wrapper/control height changed (Batches 13/14).     */
/*   The fix is Metronic's own search pattern, in BOTH layers so      */
/*   neither can regress alone: the Blade now pins the icon with      */
/*   top-50 / translate-middle-y / start-0 / ms-4, and the rules      */
/*   below pin the same geometry in CSS (left/top/transform           */
/*   fallbacks, click-through, theme-aware colour). The utilities     */
/*   set left: 0 (!important) + margin-left: 1rem, which lands the    */
/*   icon at exactly the 1rem the CSS fallback declares — the two     */
/*   layers agree, they do not fight.                                 */
/*                                                                     */
/* Geometry (all in rem, so it scales with the theme font size):      */
/*   icon left 1rem, icon ~1.35rem wide (fs-3), input text at 3rem    */
/*   (ps-12) → 0.65rem clear gap between icon and text.                */
/* ------------------------------------------------------------------ */

/* Search icon: vertically centred on the input, click-through so a
   click on the magnifier focuses the input underneath, muted theme
   colour in light AND dark mode (var(--bs-gray-500) adapts). */
.tx-filter-search .tx-filter-search-icon,
.tx-filter-search > i.ki-magnifier {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    line-height: 1;
    color: var(--bs-gray-500);
    pointer-events: none;
}

/* One shared rhythm for every toolbar control: same height, same
   vertical centring, same radius as the theme's form controls, no
   wrapping labels. Heights all resolve to --tx-control-h, defined
   on .tx-filter-toolbar above. */
.tx-filter-toolbar .form-control,
.tx-filter-toolbar .btn {
    min-height: var(--tx-control-h);
}

.tx-filter-toolbar .btn {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    white-space: nowrap;
}

/* Date inputs: same height/padding/line-height as the search input
   so their text sits on the same baseline. (No display:flex here:
   native date inputs centre their own text; flex would disturb the
   browser's internal date segments and picker button.) */
.tx-filter-date {
    padding: 0.775rem 1rem;
    line-height: 1.5;
}

/* Select2 singles: same radius as the theme's form controls and
   their text vertically centred (the selection is already
   display:flex + align-items:center above); keep the rendered text
   clear of the dropdown arrow. */
.tx-filter-select .select2-container .select2-selection--single {
    border-radius: 0.475rem;
}

.tx-filter-select .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-top: 0;
    padding-bottom: 0;
}

/* One focus treatment for the whole toolbar: the theme primary
   border, in light AND dark mode. (The global :focus-visible
   outline in this file still applies on keyboard focus.) */
.tx-filter-search input:focus,
.tx-filter-date:focus {
    border-color: var(--bs-primary);
}

.tx-filter-select .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--bs-primary);
}

/* Applied-filter chips: below the filter row, subtle Metronic badge-light-* */
/* badges (see updateActiveFilters() in transctions.blade.php). Batch 14:    */
/* the chips moved out of the table card into the toolbar card itself, so    */
/* the margin is just a top gap — the toolbar card's own padding handles     */
/* the sides. Empty = hidden (rule below), so no gap shows with no filters.  */
.tx-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--bs-gray-600);
    margin: 0.75rem 0 0;
}

.tx-active-filters:empty {
    display: none;
}

.tx-active-filters .badge {
    cursor: default;
}

/* Table: height follows its rows; long lists scroll inside the card
   instead of stretching the page. Sticky header while scrolling. */
.tx-table-wrap {
    max-height: 620px;
    overflow: auto;
    height: auto;
}

.tx-table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--bs-body-bg);
}

/* Batch 14 — plain Bootstrap table: width 100%, automatic column
   layout. It fits the card instead of forcing a fixed 1210px
   content width (the old rule below) that blew the flex chain
   wider than the viewport. The wrapper stays the only horizontal
   scroller; it starts at scroll-left 0 by itself, with the ID
   column fully visible at the card's left edge. */
.tx-table-wrap .table {
    width: 100%;
    table-layout: auto;
    margin-bottom: 0;
}

/* Batch 14 — cells stay on one line (except Username, which may wrap)
   and long values ellipsize instead of stretching the table; the
   table scrolls inside its own wrapper only. */
.tx-table-wrap .table th,
.tx-table-wrap .table td {
    white-space: nowrap;
}

.tx-table-wrap .table td.tx-col-username {
    white-space: normal;
}

.tx-table-wrap .table td.tx-col-ellipsis {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ------------------------------------------------------------------ */
/* Batch 21 — dashboard "Last 8 transactions" table: the same plain    */
/* table rules as the records page (.tx-table-wrap, Batch 14), so the  */
/* two tables align identically in light and dark mode — width 100%,  */
/* automatic column layout, cells on one line, no bottom margin. The  */
/* wrapper is the only horizontal scroller on narrow screens; the     */
/* colours come from Metronic's theme variables, so nothing here is   */
/* hard-coded per theme.                                              */
/* ------------------------------------------------------------------ */
.dash-last8-wrap .table {
    width: 100%;
    table-layout: auto;
    margin-bottom: 0;
}

.dash-last8-wrap .table th,
.dash-last8-wrap .table td {
    white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Store expiry — tinted chips with dark text (readable in both        */
/* themes), replacing the old plain red/amber text.                    */
/* ------------------------------------------------------------------ */
.store-expiry-danger {
    color: #cc0000;
}

.store-expiry-warning {
    color: #a97e00;
}

[data-bs-theme="dark"] .store-expiry-danger {
    color: #ff8296;
}

[data-bs-theme="dark"] .store-expiry-warning {
    color: #ffc700;
}

.expiry-chip {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.4;
}

.expiry-chip-danger {
    background-color: var(--sms-tint-danger-bg);
    border: 1px solid var(--sms-tint-danger-border);
    color: var(--sms-tint-danger-text);
}

.expiry-chip-warning {
    background-color: var(--sms-tint-warning-bg);
    border: 1px solid var(--sms-tint-warning-border);
    color: var(--sms-tint-warning-text);
}

.expiry-chip-ok {
    background-color: var(--sms-tint-success-bg);
    border: 1px solid var(--sms-tint-success-border);
    color: var(--sms-tint-success-text);
}

.expiry-note {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* ------------------------------------------------------------------ */
/* Copy-wallet button on the public payment page — replaces           */
/* style="... background-color: #28a745;"                              */
/* ------------------------------------------------------------------ */
.btn-copy-wallet {
    background-color: #28a745 !important;
    border: 0 !important;
    color: #ffffff !important;
}

.btn-copy-wallet:hover,
.btn-copy-wallet:focus {
    background-color: #218838 !important;
    color: #ffffff !important;
}

.btn-copy-wallet .fa-clone {
    color: #ffffff;
}

/* Wallet number on the public payment page: dark text on a green tint
   (was white text on a solid green badge). */
.check-wallet-badge {
    background-color: var(--sms-tint-success-bg) !important;
    border: 1px solid var(--sms-tint-success-border);
    color: var(--sms-tint-success-text) !important;
}

/* Batch 8 — copy feedback: a small toast + a "copied" button state. */
.sms-toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translate(-50%, 1rem);
    z-index: 9999;
    max-width: min(90vw, 420px);
    padding: 0.65rem 1.1rem;
    border-radius: 0.65rem;
    background-color: #181c32;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    text-align: center;
}

.sms-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.btn.is-copied {
    border-color: var(--sms-tint-success-border) !important;
    background-color: var(--sms-tint-success-bg) !important;
    color: var(--sms-tint-success-text) !important;
}

/* ------------------------------------------------------------------ */
/* Batch 10 — the Batch 8 one-click theme toggle is removed: the       */
/* original Metronic Light / Dark / System menu is the only switch.    */
/* (The .theme-quick-toggle / .auth-theme-toggle rules and the buttons  */
/* that used them were deleted with it; the saved preference still     */
/* works through Metronic's own theme-mode menu + setup script.)       */
/* ------------------------------------------------------------------ */

/* ------------------------------------------------------------------ */
/* Batch 8 — auth + public payment page polish                         */
/* ------------------------------------------------------------------ */
.auth-shell .card {
    border: 1px solid var(--bs-gray-200);
}

[data-bs-theme="dark"] .auth-shell .card {
    border-color: var(--bs-gray-700);
}

.check-card {
    border-radius: 1rem;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .check-card {
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.45);
}

/* Visible keyboard focus everywhere (Metronic's reset hides it). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Batch 4 — add-store wizard (kept) + Batch 8 wizard v2               */
/* ------------------------------------------------------------------ */

/* Stepper header */
.store-wizard-steps {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.store-wizard-step-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 0;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    color: var(--bs-gray-600);
    text-align: left;
}

.store-wizard-step-item:disabled {
    cursor: default;
}

.store-wizard-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--bs-gray-200);
    color: var(--bs-gray-700);
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.store-wizard-step-label {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.store-wizard-step-item.is-active .store-wizard-step-num {
    background-color: var(--bs-primary);
    color: var(--bs-primary-inverse);
}

.store-wizard-step-item.is-active .store-wizard-step-label {
    color: var(--bs-primary);
}

.store-wizard-step-item.is-done .store-wizard-step-num {
    background-color: var(--bs-success);
    color: #ffffff;
}

.store-wizard-step-line {
    flex: 1 1 1.5rem;
    height: 2px;
    background-color: var(--bs-gray-300);
    min-width: 1rem;
    margin-top: 1rem;
}

[data-bs-theme="dark"] .store-wizard-step-num {
    background-color: var(--bs-gray-700);
    color: var(--bs-gray-200);
}

[data-bs-theme="dark"] .store-wizard-step-line {
    background-color: var(--bs-gray-700);
}

/* Batch 8 — wizard v2: step sub-labels, progress fill, step heading. */
.store-wizard-step-sub {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--bs-gray-500);
    white-space: nowrap;
}

.store-wizard-step-item.is-active .store-wizard-step-sub {
    color: var(--bs-primary);
}

.store-wizard-step-item.is-future {
    opacity: 0.55;
    cursor: not-allowed;
}

.store-wizard-progress {
    height: 6px;
    background-color: var(--bs-gray-200);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 1rem;
}

[data-bs-theme="dark"] .store-wizard-progress {
    background-color: var(--bs-gray-700);
}

.store-wizard-progress-fill {
    height: 100%;
    width: 20%;
    background-color: var(--bs-primary);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.store-wizard-step-counter {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bs-gray-600);
    white-space: nowrap;
}

.wizard-step-head {
    margin-bottom: 1.25rem;
}

.wizard-step-kicker {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bs-primary);
    margin-bottom: 0.25rem;
}

.wizard-step-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--bs-gray-900);
}

.wizard-step-desc {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: var(--bs-gray-500);
}

.wizard-nav {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 0.9rem 1rem;
    margin-top: 1rem;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-gray-200);
    border-radius: 0.75rem;
    box-shadow: 0 -0.25rem 1rem rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .wizard-nav {
    border-color: var(--bs-gray-700);
    box-shadow: 0 -0.25rem 1rem rgba(0, 0, 0, 0.35);
}

/* Panel-type and currency radio cards */
.panel-type-grid,
.currency-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.panel-type-card,
.currency-card {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--bs-gray-300);
    border-radius: 0.65rem;
    cursor: pointer;
    background-color: var(--bs-body-bg);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    margin-bottom: 0;
}

.panel-type-card input,
.currency-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.panel-type-card:hover,
.currency-card:hover {
    border-color: var(--bs-primary);
}

/* :has() styles the checked card; the wizard JS also toggles
   .is-selected for browsers without :has() support. */
.panel-type-card:has(input:checked),
.currency-card:has(input:checked),
.panel-type-card.is-selected,
.currency-card.is-selected {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 1px var(--bs-primary);
    background-color: var(--bs-primary-light);
}

.panel-type-name,
.currency-card-code {
    font-weight: 700;
    color: var(--bs-gray-800);
}

.panel-type-desc,
.currency-card-name {
    font-size: 0.8rem;
    color: var(--bs-gray-600);
}

/* Newly created store, highlighted on /stores after creation.
   Batch 10 — gentle fade of Metronic's own primary-light tint only;
   the old table-primary full-row wash was too harsh and is gone. */
.store-row-new {
    animation: store-row-new-fade 3s ease forwards;
}

@keyframes store-row-new-fade {
    0% {
        background-color: var(--bs-primary-light);
    }
    100% {
        background-color: transparent;
    }
}

/* Batch 8 — store search input on /stores. */
.store-search {
    max-width: 320px;
}

/* ------------------------------------------------------------------ */
/* Batch 18 — setup assistant, command palette, assistant pill,       */
/* customer-page amount chips. No vendor bundle touched.              */
/* ------------------------------------------------------------------ */

/* Batch 22 — floating Setup Assistant pill deleted (sidebar link restored instead). */

/* Ctrl+K command palette (client-side only). */
.sms-palette-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
}
.sms-palette-overlay[hidden] { display: none; }
.sms-palette {
    width: min(560px, 92vw);
    background: var(--hatch-widget-surface, #fff);
    color: var(--hatch-widget-text, #181c32);
    border: 1px solid var(--hatch-widget-border, #e4e6ef);
    border-radius: 0.85rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
    overflow: hidden;
}
.sms-palette-input {
    width: 100%;
    border: 0;
    outline: none;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    background: transparent;
    color: inherit;
    border-bottom: 1px solid var(--hatch-widget-border, #e4e6ef);
}
.sms-palette-list { max-height: 320px; overflow-y: auto; }
.sms-palette-item {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-weight: 500;
}
.sms-palette-selected { background: var(--bs-primary-light); }
.sms-palette-empty { padding: 1rem 1.25rem; color: var(--hatch-widget-muted, #7e8299); }
.sms-palette-hint {
    padding: 0.6rem 1.25rem;
    font-size: 0.8rem;
    color: var(--hatch-widget-muted, #7e8299);
    border-top: 1px solid var(--hatch-widget-border, #e4e6ef);
}

/* ------------------------------------------------------------------ */
/* Batch 19 — setup assistant: dark-mode readability + centred chat.  */
/* The Batch 18 bubbles used pale light tints with NO text colour, so */
/* in dark mode the page-default (near-white) text landed on a pale   */
/* green/grey surface and was unreadable. Each bubble now sets its    */
/* own theme-aware background, border AND text colour, and anything   */
/* Metronic-coloured inside a bubble (.text-gray-700, .text-muted)    */
/* inherits the bubble colour instead of the page default. The       */
/* "Done" pill no longer relies on an inline black style on a solid  */
/* .badge-success (Metronic forces white text there in dark mode);   */
/* it is a .badge-status-* tint, dark text in both themes. The page   */
/* card is a centred max-800px column instead of a full-width strip  */
/* with 720px bubbles parked on its left. No routes, steps, QR flow  */
/* or links changed — Blade classes only, plus this CSS.              */
/* ------------------------------------------------------------------ */

/* Centred chat column: the card, not just the bubbles, is capped. */
.sms-assistant-card {
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Header title / subtitle with explicit contrast in both themes. */
.sms-assistant-title { color: #181c32 !important; }
.sms-assistant-subtitle { color: #5e6278 !important; }
[data-bs-theme="dark"] .sms-assistant-title { color: #e4e6ef !important; }
[data-bs-theme="dark"] .sms-assistant-subtitle { color: #a1a5b7 !important; }

/* Progress track: visible against the card in both themes. */
.sms-assistant-progress { background-color: #e4e6ef !important; }
[data-bs-theme="dark"] .sms-assistant-progress { background-color: #2b2b3a !important; }

/* Setup assistant chat bubbles — theme-aware surfaces. */
.sms-chat-bubble {
    padding: 1rem 1.25rem;
    border-radius: 0.85rem;
    width: 100%;
    max-width: 100%;
}
.sms-chat-assistant {
    background: var(--bs-primary-light);
    border: 1px solid #c8dbff;
    color: #173f7a;
}
.sms-chat-done {
    background: var(--sms-tint-success-bg);
    border: 1px solid var(--sms-tint-success-border);
    color: var(--sms-tint-success-text);
}
.sms-chat-next {
    background: var(--sms-tint-muted-bg);
    border: 1px solid var(--sms-tint-muted-border);
    color: var(--sms-tint-muted-text);
}
.sms-chat-focus { outline: 2px solid var(--bs-primary); outline-offset: 2px; }

/* Dark theme: bubbles become dark surfaces with light text — never a
   pale tint with white text. */
[data-bs-theme="dark"] .sms-chat-assistant {
    background: #12294d;
    border-color: #1e3f6e;
    color: #cfe3ff;
}
[data-bs-theme="dark"] .sms-chat-done {
    background: #0e2f1d;
    border-color: #1e5c38;
    color: #b7eecb;
}
[data-bs-theme="dark"] .sms-chat-next {
    background: #22222f;
    border-color: #3a3a4d;
    color: #e4e6ef;
}

/* Inside a bubble, Metronic utility colours follow the bubble's own
   theme-aware text colour (detail lines, QR hint, EN translation). */
.sms-chat-bubble .text-gray-700,
.sms-chat-bubble .text-gray-800 { color: inherit !important; }
.sms-chat-bubble .text-muted { color: inherit !important; opacity: 0.72; }
.sms-chat-bubble a:not(.btn) { color: inherit; text-decoration: underline; }

/* Quick replies: vertically aligned row, readable label + chips. */
.sms-quick-replies { align-items: center; }
.sms-quick-replies-label { color: #5e6278 !important; }
[data-bs-theme="dark"] .sms-quick-replies-label { color: #a1a5b7 !important; }
[data-bs-theme="dark"] .sms-assistant-card .btn-light-primary {
    background-color: #12294d;
    border-color: #12294d;
    color: #7db4ff;
}

/* Customer payment page: quick-amount chips. */
.sms-amount-chip { border-radius: 999px; }

/* ------------------------------------------------------------------ */
/* Batch 20 — setup assistant rebuilt as a real chat box (Daffaa's    */
/* /setup/chat style): centred chat column on a light-grey page,      */
/* green assistant bubbles on the left, user bubbles on the right,    */
/* quick-reply chips above a single-line composer, WhatsApp support   */
/* link at the bottom. The 4 step cards are now a compact, collapsed  */
/* progress summary — the chat is the main content. Theme-aware in    */
/* both modes: the assistant bubble is solid #15803d, which keeps     */
/* white text readable (about 4.6:1) in light AND dark mode — never   */
/* a pale tint with white text; user bubbles use theme surfaces.      */
/* No routes, state machine, QR flow or links changed — CSS only.     */
/* ------------------------------------------------------------------ */

/* Light-grey page background; dark surface in dark mode. */
.sms-chat-page {
    background: #f4f5f7;
    border-radius: 0.85rem;
    padding: 1.5rem 1rem 2rem;
}
[data-bs-theme="dark"] .sms-chat-page { background: #16161f; }

/* Centred chat column, ~900-1000px wide (Batch 22: was 720px, too
   narrow on wide screens; on >=1200px it becomes a two-column
   progress + chat grid, see .sms-chat-grid below). */
.sms-chat-shell {
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Green "Next step" button: solid green, white text, both themes. */
.sms-next-step {
    background: #15803d !important;
    border-color: #15803d !important;
    color: #fff !important;
    font-weight: 600;
}
.sms-next-step:hover,
.sms-next-step:focus {
    background: #166534 !important;
    border-color: #166534 !important;
    color: #fff !important;
}

/* Compact progress summary (the 4 steps, collapsed by default). */
.sms-progress-summary-head {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}
.sms-progress-summary-head::-webkit-details-marker { display: none; }
.sms-progress-summary-head::before {
    content: "▸ ";
    color: #15803d;
}
.sms-progress-summary[open] .sms-progress-summary-head::before { content: "▾ "; }

/* Chat log: scrollable column of bubbles. */
.sms-chat-log {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 58vh;
    overflow-y: auto;
    padding: 0.25rem;
    scroll-behavior: smooth;
}

/* Chat bubbles: assistant green on the left, user on the right. */
.sms-chat-msg {
    max-width: 82%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    line-height: 1.6;
    overflow-wrap: break-word;
}
.sms-chat-msg--assistant {
    align-self: flex-start;
    background: #15803d;
    color: #fff;
    border-bottom-left-radius: 0.25rem;
}
.sms-chat-msg--assistant a { color: #fff; text-decoration: underline; font-weight: 600; }
.sms-chat-msg--assistant .sms-chat-translation { opacity: 0.85; font-size: 0.85rem; margin-top: 0.5rem; }
.sms-chat-msg--user {
    align-self: flex-end;
    background: #e9ebef;
    color: #181c32;
    border-bottom-right-radius: 0.25rem;
}
[data-bs-theme="dark"] .sms-chat-msg--user {
    background: #2b2b3a;
    color: #e4e6ef;
}

/* Typing indicator: three white dots on the green bubble. */
.sms-chat-typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 4px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.45;
    animation: sms-typing-dot 1.2s infinite;
}
.sms-chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.sms-chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes sms-typing-dot {
    0%, 60%, 100% { opacity: 0.45; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}

/* QR inside a chat bubble: white backing so it always scans. */
.sms-chat-qr {
    max-width: 220px;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
    display: block;
}

/* Quick-reply chips above the composer. */
.sms-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}
.sms-chips:empty { margin-top: 0; }
.sms-chip {
    border: 1px solid #d3d8de;
    background: #fff;
    color: #181c32;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.sms-chip:hover,
.sms-chip:focus {
    border-color: #15803d;
    color: #15803d;
    outline: none;
}
[data-bs-theme="dark"] .sms-chip {
    background: #22222f;
    border-color: #3a3a4d;
    color: #e4e6ef;
}
[data-bs-theme="dark"] .sms-chip:hover,
[data-bs-theme="dark"] .sms-chip:focus {
    border-color: #4ade80;
    color: #4ade80;
}

/* Composer: single-line input + green Send button. */
.sms-composer {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.sms-composer-input { flex: 1; }
.sms-composer-send {
    background: #15803d !important;
    border-color: #15803d !important;
    color: #fff !important;
    font-weight: 600;
    flex-shrink: 0;
}
.sms-composer-send:hover,
.sms-composer-send:focus {
    background: #166534 !important;
    border-color: #166534 !important;
    color: #fff !important;
}
.sms-composer-send:disabled { opacity: 0.6; }

/* ------------------------------------------------------------------ */
/* Batch 22 — dashboard audit fixes + setup-assistant store creation. */
/* ------------------------------------------------------------------ */

/* Batch 23 — (1) reverted: the Last 8 / Welcome row stretches again
   (h-xl-100 on both cards), so the Last 8 table keeps its original
   empty space under the rows, matching the Welcome card height. */

/* Batch 24 — table row hover highlight removed: hovering a row in the
   Last 8 table (.dash-last8-wrap) or the transactions table
   (.tx-table-wrap) must not change its background, in light or dark
   mode. The Batch 22 (5) tbody tr:hover rules are deleted here; no
   table-hover class exists on either table. */


/* (9) Welcome hero: clip the green banner image so its stray curve
   cannot spill past the card. */
.welcome-hero { overflow: hidden; }

/* (12) Upgrade card: text in its own max-width column, graphic as a
   separate element on the right (never under the text). */
.sms-upgrade-card { position: relative; overflow: hidden; }
.sms-upgrade-text { max-width: 460px; position: relative; z-index: 2; }
.sms-upgrade-art {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 190px;
    width: auto;
    pointer-events: none;
    opacity: 0.9;
}
@media (max-width: 767px) { .sms-upgrade-art { display: none; } }

/* (14) Verify banner dismiss button. */
.sms-notice-dismiss { flex-shrink: 0; align-self: flex-start; }

/* (15) Announcements carousel: larger dots + visible arrows.
   Batch 23 — the arrows were absolutely positioned at the card's
   bottom-left corner (bottom/left offsets against the whole card),
   so they sat on the card's edge and looked like a tab sticking out
   of the box. They now sit in a normal flex row (.sms-carousel-nav)
   under the slides, inside the card-body, so nothing can stick out
   of the card in light or dark mode at any width; the card also
   clips anything stray. */
.sms-announcements { overflow: hidden; }
.sms-announcements .carousel-indicators li {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.sms-announcements .carousel-indicators li.active { width: 14px; height: 14px; }
.sms-carousel-nav {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.sms-carousel-arrow {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    background: var(--bs-gray-200);
    border: 0;
    border-radius: 50%;
    opacity: 0.9;
}
[data-bs-theme="dark"] .sms-carousel-arrow { background: rgba(255, 255, 255, 0.18); }
.sms-carousel-arrow .carousel-control-prev-icon,
.sms-carousel-arrow .carousel-control-next-icon { width: 1rem; height: 1rem; }

/* (16) Sidebar footer: pinned Logout + Download App + scroll cue. */
.sms-aside-scroll-cue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bs-gray-500);
}
[data-bs-theme="dark"] .sms-aside-scroll-cue { color: var(--bs-gray-400); }

/* (17) Header phone status chip: one chip, text + colour. */
.sms-phone-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    white-space: nowrap;
}
.sms-phone-chip--on { box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.7); }
.sms-phone-chip--on .ki-wifi-square { color: #4ade80; }
.sms-phone-chip--warn { box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.8); }
.sms-phone-chip--warn .ki-wifi-square { color: #fbbf24; }
.sms-phone-chip--off { box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.8); }
.sms-phone-chip--off .ki-wifi-square { color: #f87171; }
@media (max-width: 767px) { .sms-phone-chip-text { display: none; } }

/* (18) Dark-mode contrast for muted text / secondary links that were
   too dim: Verify banner, setup banner, Announcements body, stat
   icons, Download App button. Light mode untouched. */
[data-bs-theme="dark"] .notice .text-gray-700 { color: #e4e6ef !important; }
[data-bs-theme="dark"] .notice .text-gray-600 { color: #b9bdcf !important; }
[data-bs-theme="dark"] .notice a:not(.btn) { color: #7dd3fc; }
[data-bs-theme="dark"] .sms-announcements .text-gray-500 { color: #c3c6d4 !important; }
[data-bs-theme="dark"] .stat-card .symbol-label { background: rgba(255, 255, 255, 0.08); }
[data-bs-theme="dark"] .stat-card .text-gray-500 { color: #b9bdcf !important; }
[data-bs-theme="dark"] #kt_aside_footer .btn-light {
    background: rgba(255, 255, 255, 0.1);
    color: #e4e6ef;
    border-color: transparent;
}
[data-bs-theme="dark"] .sms-chat-page .text-muted { color: #b9bdcf !important; }

/* (20) Setup assistant: two-column progress + chat on wide screens. */
.sms-chat-grid { display: block; }
@media (min-width: 1200px) {
    .sms-chat-grid {
        display: grid;
        grid-template-columns: 320px minmax(0, 1fr);
        gap: 1rem;
        align-items: start;
    }
    .sms-chat-grid .sms-progress-col { position: sticky; top: 1rem; }
}
.sms-chat-log { max-height: 62vh; }

/* (20) In-chat store creation: review summary + masked API key. */
.sms-create-review {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.sms-create-review td { padding: 0.2rem 0; vertical-align: top; }
.sms-create-review td:first-child { font-weight: 700; padding-right: 0.75rem; white-space: nowrap; }

/* (21) Footer bottom padding so the scroll-top button / page end
   never covers footer content. */
#kt_footer { padding-bottom: 2.5rem; }

/* ------------------------------------------------------------------ */
/* Batch 29 — setup assistant: English-only rebuild, two-column       */
/* layout, clear button hierarchy. Appended at the end so these       */
/* rules win over the earlier Batch 19/20/22 chat rules.              */
/* - Wider shell (1200px) and a 340px progress column so the panel    */
/*   and the chat both breathe on large screens.                      */
/* - Step rows: icon circle + title + status pill + subtext + the     */
/*   step's own action button, separated by dashed dividers.          */
/* - Chat header: green avatar + online status on the left, the ONE   */
/*   primary CTA ("Create my store") on the right.                    */
/* - Bubbles larger and easier to read; every bubble carries a        */
/*   timestamp (.sms-chat-time).                                      */
/* - Quick replies grouped by intent under small label rows.          */
/* - Composer: taller input + Send at one shared height.              */
/* - Chat footer: support + safety note on the left, "Clear           */
/*   conversation" (destructive secondary) kept away from every       */
/*   primary action. "Back to dashboard" is a quiet link above the    */
/*   grid, never a competing button. All theme-aware in both modes.   */
/* No routes, steps, QR flow or links changed — CSS only.             */
/* ------------------------------------------------------------------ */

/* Wider shell; 340px progress column on wide screens. */
.sms-chat-shell { max-width: 1200px; }
@media (min-width: 1200px) {
    .sms-chat-grid { grid-template-columns: 340px minmax(0, 1fr); gap: 1.25rem; }
}

/* Quiet "Back to dashboard" link above the grid. */
.sms-back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: #7e8299;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}
.sms-back-link:hover { color: #181c32; }
[data-bs-theme="dark"] .sms-back-link:hover { color: #e4e6ef; }

/* Progress panel: step rows with icon, title, pill, subtext, action. */
.sms-step-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #e4e6ef;
}
.sms-step-row:last-child { padding-bottom: 0; border-bottom: 0; }
[data-bs-theme="dark"] .sms-step-row { border-bottom-color: #2b2b3a; }
.sms-step-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}
.sms-step-icon--done {
    background: var(--sms-tint-success-bg);
    color: var(--sms-tint-success-text);
    border: 1px solid var(--sms-tint-success-border);
}
.sms-step-icon--warn {
    background: var(--sms-tint-warning-bg);
    color: var(--sms-tint-warning-text);
    border: 1px solid var(--sms-tint-warning-border);
}
.sms-step-icon--todo {
    background: var(--sms-tint-muted-bg);
    color: var(--sms-tint-muted-text);
    border: 1px solid var(--sms-tint-muted-border);
}
.sms-step-title { line-height: 1.35; }
.sms-step-cta { margin-top: 0.5rem; }

/* Chat header: avatar + status on the left, primary CTA on the right. */
.sms-chat-head { align-items: center; }
.sms-assistant-avatar {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: #15803d;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}
.sms-online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 0.3rem;
    vertical-align: 1px;
}

/* Chat bubbles: larger and easier to read, with a timestamp. */
.sms-chat-msg { max-width: 85%; padding: 0.875rem 1.1rem; font-size: 0.95rem; }
.sms-chat-time { font-size: 0.72rem; opacity: 0.75; margin-top: 0.35rem; text-align: right; }

/* Quick replies grouped by intent: a small label row, then chips. */
.sms-chip-group-label {
    width: 100%;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #7e8299;
    margin-top: 0.35rem;
}
[data-bs-theme="dark"] .sms-chip-group-label { color: #a1a5b7; }

/* Composer: taller input + Send, one shared height. */
.sms-composer-input { min-height: 48px; }
.sms-composer-send { min-height: 48px; padding-left: 1.25rem; padding-right: 1.25rem; }

/* Chat footer: support + safety note on the left, Clear conversation
   (destructive secondary) on the right, away from every primary. */
.sms-chat-footer { border-top: 1px solid #e4e6ef; padding-top: 1rem; }
[data-bs-theme="dark"] .sms-chat-footer { border-top-color: #2b2b3a; }

/* Chat log: a little taller now the panel carries the progress. */
.sms-chat-log { max-height: 64vh; }

/* ------------------------------------------------------------------ */
/* Batch 30 — setup assistant layout fixes (from a dark-mode
   screenshot of /setup-assistant). Appended at the end so these
   rules win over the earlier Batch 19/20/22/29 chat rules.
   - (1) Top gap: the page slab's 1.5rem top padding left a band of
     empty space above the "Back to dashboard" link. The slab now
     starts tight (0.5rem) so the page starts cleanly.
   - (2) Equal heights: the grid used align-items:start, so the
     progress panel stayed short while the chat card grew. Both
     columns now stretch to the same row height; the chat card is a
     flex column whose log takes the free space (min-height:0) and
     scrolls internally instead of growing the page. The progress
     card fills its column too (and scrolls if it ever overflows).
     Applies at >=1200px (1377px and 1920px); below that the page
     stays single-column as before.
   - (3) Dark mode: the page slab (#16161f) read as a black square
     behind the lighter chat card. In dark mode the slab is now
     transparent, so the chat card sits directly on the theme
     background like every other page's cards. Light mode keeps its
     light-grey slab.
   No routes, steps, QR flow or links changed — CSS only.
   ------------------------------------------------------------------ */

/* (1) No empty band above "Back to dashboard". */
.sms-chat-page { padding-top: 0.5rem; }

/* (3) No dark square behind the chat in dark mode. */
[data-bs-theme="dark"] .sms-chat-page { background: transparent; }

@media (min-width: 1200px) {
    /* (2) Both columns share one row height. */
    .sms-chat-grid { align-items: stretch; }
    .sms-chat-grid .sms-progress-col { position: static; height: 100%; min-height: 0; }
    .sms-chat-grid .sms-progress-col > .card { height: 100%; overflow: visible; }
    .sms-chat-grid .sms-chat-card { height: 100%; min-height: 0; display: flex; flex-direction: column; }
    .sms-chat-grid .sms-chat-card > .card-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
    .sms-chat-grid .sms-chat-log { flex: 1 1 auto; min-height: 0; }
}

/* ------------------------------------------------------------------ */
/* Batch 31 — setup assistant: FIXED chat height (user screenshot).   */
/* Root cause of the Batch 30 failure: the 64vh cap sat on the LOG    */
/* only, while NOTHING in the chain had a definite height — the grid  */
/* row is auto-sized (align-items:stretch only equalises columns to   */
/* the tallest content, it never caps it), the card's height:100%     */
/* resolves back to that content height, and flex:1 1 auto (basis    */
/* auto = content size) on card-body/log lets them size to content.   */
/* So the card still grew with every message (header + up-to-64vh     */
/* log + chips + composer + footer = taller than the viewport), the   */
/* composer/footer sank below the fold, the page grew, and the        */
/* stretched progress card filled the same tall row with empty        */
/* space inside it. The fix caps the ROW and the CARD at one          */
/* viewport-based height; the log then takes only the space left      */
/* inside that fixed card (flex-basis:0) and scrolls internally.      */
/* No routes, steps, QR flow, chat logic or text changed — CSS only,  */
/* plus a scrollLog hardening in the Blade script (see there).        */
/* ------------------------------------------------------------------ */

/* One source of truth for the chat height: viewport-based so the card
   always fits on screen (~200px left for header, back link, footer),
   floored so the log stays usable on short screens, capped so it
   never becomes a giant slab on tall ones. */
.sms-chat-page { --sms-chat-h: clamp(500px, calc(100vh - 200px), 760px); }

/* The card itself is fixed-height at every width: header, log, chips,
   composer and footer all live INSIDE that height, so chat messages
   can never push the page down or leave empty space below the cards. */
.sms-chat-card {
    height: var(--sms-chat-h);
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sms-chat-card > .card-header { flex-shrink: 0; }
.sms-chat-card > .card-body {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* The log takes ONLY the space left after header / chips / composer /
   footer (flex-basis:0, never content size) and scrolls internally.
   max-height:none retires the Batch 20/22/29 vh caps (58/62/64vh),
   which capped the log alone while the card, the grid row and the
   page kept growing with it. */
.sms-chat-log {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
}

/* Chips, composer and footer are pinned at the bottom of the card:
   they never shrink and never get pushed below the fold. The chips
   get their own small scroll guard so a long chip list cannot
   squeeze the log to nothing. */
.sms-chat-card .sms-chips,
.sms-chat-card .sms-composer,
.sms-chat-card .sms-chat-footer { flex-shrink: 0; }
.sms-chips { max-height: 7.5rem; overflow-y: auto; }

@media (min-width: 1200px) {
    /* Batch 33 — the grid row is NO LONGER a fixed height: it is
       sized by the taller column (the progress panel's content or
       the chat card's min-height, whichever is taller), so the left
       panel NEVER gets its own scrollbar — it simply makes the row
       a bit taller until all 4 steps + buttons fit. Both columns
       still fill the row exactly (align-items:stretch), so they
       stay equal height at any message count. The chat card keeps
       a definite height (its min-height here, plus the stretch),
       so the log still takes only the space left inside the card
       and scrolls internally — the ONLY scroll on the page. The
       old fixed row height (height: var(--sms-chat-h) on the grid)
       is gone: it capped the row below the panel's content height
       and forced the overflow-y:auto scrollbar on the panel card. */
    .sms-chat-grid {
        align-items: stretch;
    }
    .sms-chat-grid .sms-progress-col { position: static; height: 100%; min-height: 0; }
    .sms-chat-grid .sms-progress-col > .card { height: 100%; min-height: 0; overflow: visible; }
    .sms-chat-grid .sms-chat-card { height: auto; min-height: var(--sms-chat-h); display: flex; flex-direction: column; }
    .sms-chat-grid .sms-chat-card > .card-body { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
    .sms-chat-grid .sms-chat-log { flex: 1 1 0; min-height: 0; max-height: none; overflow-y: auto; }
}

/* ------------------------------------------------------------------ */
/* Batch 38 — mobile audit + fixes (375px, verified with a headless  */
/* Chromium render of every page + the live-browser audit's ranked    */
/* findings). One section, all mobile-only unless noted. Desktop      */
/* layout, routes, API and field names are unchanged.                 */
/*                                                                    */
/* What the 375px renders proved: the page itself never scrolls       */
/* sideways (html/body overflow-x: clip from Batch 12/13 holds),      */
/* but the header top-bar cluster is ~390px wide in a 375px           */
/* viewport, every wide table scrolls internally with its key         */
/* columns cut off, and the notice banners squeeze their text into    */
/* a narrow column next to their buttons. The fixes below:            */
/*  (a) header shrinks + 44px tap targets, dropdowns capped to the    */
/*      viewport; (b) banners stack; (c) [Batch 39 REVERTED] the      */
/*      low-priority columns used to hide below md — the hiding is    */
/*      removed, and Batch 43 follow-up restores the tables to their   */
/*      pre-Batch-38 originals exactly (no hiding, no tap-to-expand,   */
/*      no sticky column, no IP word-breaking, original min-widths     */
/*      and cell padding; only the original contained horizontal       */
/*      scroll stays). Sender numbers stay FULL, "Make Completed"      */
/*      stays in the USERNAME column, and no Actions column is added   */
/*      anywhere);                                                     */
/*  (d) forms that were one row on desktop stack on phones;           */
/*  (e) QR images can never exceed their container.                   */
/* ------------------------------------------------------------------ */

/* --- Long unbreakable strings (IPv6, URLs, tokens) may wrap. --- */
.alert { overflow-wrap: anywhere; }

/* --- QR codes: never wider than their container, always square. --- */
.sms-chat-qr { width: 220px; max-width: 100%; height: auto; }
img[data-qr-img] { width: 200px !important; max-width: 100% !important; height: auto !important; }
#smsGetStartedQr { max-width: 100%; height: auto; }

/* --- Header / top bar: let the cluster shrink instead of forcing --- */
/* --- the page wider. Below lg the sidebar is a drawer (KTDrawer) --- */
/* --- and the hamburger (#kt_aside_toggle, d-lg-none) is the way in. --- */
@media (max-width: 991.98px) {
    #kt_header .container-fluid { gap: 0.5rem; }
    .sms-brand { margin-right: 0.5rem !important; }
    .sms-topbar { flex-shrink: 1 !important; min-width: 0; }
    .sms-topbar > div { margin-left: 0.25rem !important; }
}

@media (max-width: 767.98px) {
    /* Phone chip: icon only (text already hidden here) + square. */
    .sms-phone-chip { padding: 0.4rem; }
    /* 44px tap targets: hamburger, header icon buttons, avatar. */
    #kt_aside_toggle { width: 44px !important; height: 44px !important; }
    .sms-topbar .btn-icon { width: 44px !important; height: 44px !important; }
    #kt_header_user_menu_toggle .symbol {
        width: 40px !important;
        height: 40px !important;
    }
    #kt_header_user_menu_toggle .symbol img {
        width: 40px !important;
        height: 40px !important;
    }
    /* No header dropdown may run off the right edge of a phone. */
    .menu-sub-dropdown { max-width: calc(100vw - 24px) !important; }
    /* Tap targets: modal close, carousel arrows. */
    .modal-header .btn-icon { min-width: 44px; min-height: 44px; }
    .sms-carousel-arrow { width: 44px; height: 44px; }
    /* Batch 43 follow-up — back-to-top RESTORED on phones: the user
       did not want it hidden (only the QR card's excess white space
       was the complaint). 44px tap target, as Batch 38 set it. The
       page gets bottom breathing room below so the button never
       covers the last card. */
    #kt_scrolltop { width: 44px !important; height: 44px !important; }
    body { padding-bottom: 5.5rem; }
}

/* --- Notice banners (dashboard setup, get-started, assistant      --- */
/* --- welcome, get-started "All done"): text + button(s) stack. --- */
@media (max-width: 767.98px) {
    .sms-notice-stack { flex-wrap: wrap; align-items: flex-start !important; }
    .sms-notice-stack > i { margin-top: 0.25rem; }
    .sms-notice-stack > div { min-width: 0; }
    .sms-notice-stack .flex-stack { flex-wrap: wrap; gap: 0.75rem; }
    .sms-notice-stack .flex-stack > .btn {
        flex: 1 1 100%;
        margin-left: 0 !important;
        min-height: 44px;
    }
    .sms-notice-stack .flex-stack > .d-flex {
        flex: 1 1 100%;
        margin-left: 0 !important;
        flex-wrap: wrap;
    }
    .sms-notice-stack .flex-stack > .d-flex .btn { flex: 1 1 auto; }
    .sms-notice-stack .flex-stack > .d-flex a:not(.btn) {
        flex: 1 1 100%;
        text-align: center;
    }
    .sms-notice-stack > .btn {
        flex: 1 1 100%;
        margin-left: 0 !important;
        margin-top: 0.75rem;
        min-height: 44px;
    }
}

/* --- Dashboard verify banner: icon + text on row 1, Verify now --- */
/* --- full-width on row 2, dismiss pinned top-right at 44px. --- */
@media (max-width: 767.98px) {
    .sms-verify-banner .card-body {
        flex-wrap: wrap;
        position: relative;
        padding-right: 3.75rem;
    }
    .sms-verify-banner .card-body > .flex-grow-1 {
        flex: 1 1 calc(100% - 74px);
        min-width: 0;
    }
    .sms-verify-banner .card-body > .btn-success {
        flex: 1 1 100%;
        min-height: 44px;
        margin-top: 0.5rem;
    }
    .sms-verify-banner .card-body > .btn-icon {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        width: 44px !important;
        height: 44px !important;
    }
}

/* --- Announcements: logo above the text on phones (was a        --- */
/* --- squeezed side-by-side row), arrows already 44px above. --- */
@media (max-width: 767.98px) {
    .sms-announcements .carousel-item .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem;
    }
    .sms-announcements .carousel-item .d-flex .w-80px {
        width: auto !important;
        margin-right: 0 !important;
    }
}

/* --- Stores page head: search takes the row, Add sits with it. --- */
@media (max-width: 767.98px) {
    .page-head-actions { flex: 1 1 100%; }
    .page-head-actions .store-search { flex: 1 1 180px; min-width: 0; }
    .page-head-actions .store-search .form-control { width: 100%; }
    .page-head-actions .btn { white-space: nowrap; }
}

/* --- Add-store wizard: stepper becomes a neat 2-column grid     --- */
/* --- (connector lines hidden — they read as stray dashes when     --- */
/* --- wrapped), username prefix hidden, nav buttons never wrap. --- */
@media (max-width: 767.98px) {
    .store-wizard-step-item { flex: 1 1 45%; min-width: 0; }
    .store-wizard-step-line { display: none; }
    .sms-username-group .input-group-text { display: none; }
    .sms-username-group .form-control { border-radius: 0.475rem !important; }
    .wizard-nav { flex-wrap: wrap; }
    .wizard-nav .btn { white-space: nowrap; }
}

/* --- Profile tabs: one scrollable row, never wrapped to two. --- */
@media (max-width: 767.98px) {
    .sms-profile-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .sms-profile-tabs::-webkit-scrollbar { display: none; }
    .sms-profile-tabs .nav-item { flex-shrink: 0; }
    .sms-profile-tabs .nav-link {
        margin-right: 1.25rem !important;
        padding-top: 0.9rem;
        padding-bottom: 0.9rem;
        white-space: nowrap;
    }
}

/* --- Profile: WhatsApp row, Auto Completed row, token/app rows. --- */
@media (max-width: 767.98px) {
    .sms-whatsapp-group { flex-wrap: wrap; }
    .sms-whatsapp-group select {
        flex: 0 1 130px;
        min-width: 0;
    }
    .sms-whatsapp-group input {
        flex: 1 1 140px;
        min-width: 0;
    }
    .sms-whatsapp-group .btn {
        flex: 1 1 100%;
        min-height: 44px;
        margin-top: 0.5rem;
    }
    /* Batch 39 — the Auto Completed switch + days dropdown stay on
       ONE row on phones too (Batch 38 stacked the dropdown below the
       switch, which broke the row): the switch keeps its size, the
       dropdown shrinks to the space that is left. Do not stack
       things that fit side by side. */
    .sms-auto-row { flex-direction: row; flex-wrap: nowrap; align-items: center; }
    .sms-auto-row .form-check { flex: 0 0 auto; }
    .sms-auto-row #auto_days_wrapper { flex: 1 1 auto; min-width: 0; width: auto; }
    .sms-2fa-form { flex-wrap: wrap; }
    .sms-2fa-form .form-check-label { flex: 1 1 200px; }
    .sms-notif-row { flex-wrap: wrap; }
    .sms-notif-row .badge { white-space: normal; text-align: left; }
    .sms-referral-group { flex-wrap: wrap; }
    .sms-referral-group .form-control { flex: 1 1 100%; }
    .sms-referral-group .btn {
        flex: 1 1 100%;
        min-height: 44px;
        margin-top: 0.5rem;
    }
    .sms-activity-filter { flex-wrap: wrap; }
    .sms-activity-filter form { flex: 1 1 100%; flex-wrap: wrap; }
    .sms-activity-filter form select {
        flex: 1 1 100%;
        width: 100% !important;
        max-width: 100%;
    }
    .sms-activity-filter #activity_count { flex: 1 1 100%; }
}

/* --- Setup assistant: step title + pill wrap, chat head stacks, --- */
/* --- Create-my-store CTA goes full width, composer never clips. --- */
@media (max-width: 767.98px) {
    .sms-step-head { flex-wrap: wrap; }
    .sms-step-head .sms-step-title { flex: 1 1 160px; min-width: 0; }
    .sms-chat-head { flex-wrap: wrap; }
    .sms-chat-head #smsCreateCta { flex: 1 1 100%; min-height: 44px; }
    .sms-composer-input { min-width: 0; }
}

/* --- Diagnostics search: the Search button never wraps its     --- */
/* --- label vertically again (was "Se / arc / h" in a 1-col slot). --- */
.sms-diag-search .btn { white-space: nowrap; min-height: 44px; }
@media (max-width: 991.98px) {
    .sms-diag-search .col-md-1,
    .sms-diag-search .col-md-2,
    .sms-diag-search .col-md-3 { min-width: 0; }
}

/* --- Customers header: title row, then search full width. --- */
@media (max-width: 767.98px) {
    .sms-customers-head { flex-wrap: wrap; }
    .sms-customers-head .card-toolbar { flex: 1 1 100%; }
    .sms-customers-head .card-toolbar form { flex: 1 1 100%; }
    .sms-customers-head .card-toolbar .form-control {
        flex: 1 1 auto;
        min-width: 0;
    }
    .sms-customers-head .card-toolbar .btn { white-space: nowrap; }
}

/* --- Auth pages: tighter form padding on phones, logo band      --- */
/* --- slimmer, Remember Me a real 44px tap row. --- */
@media (max-width: 991.98px) {
    .sms-auth-form { padding: 1.5rem !important; }
    .sms-auth-aside .py-7 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
}
@media (max-width: 767.98px) {
    #kt_sign_in_form .form-check {
        min-height: 44px;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    #kt_sign_in_form .form-check-input { width: 24px; height: 24px; }
    #kt_sign_in_form .form-check-label { line-height: 1.3; }
}

/* ------------------------------------------------------------------ */
/* Batch 43 follow-up — tables restored to their pre-Batch-38       */
/* originals (commit 077e76b1). The Batch 38/39 table changes are ALL   */
/* reverted, exactly as the user asked — he had no problem with the    */
/* original tables: no column hiding, no tap-to-expand rows (engine +  */
/* CSS deleted in Batch 43), no sticky first column, no IP             */
/* word-breaking (.sms-break-anywhere deleted), original desktop       */
/* min-widths and cell padding back (the Batch 38 "Tables on phones"   */
/* block is deleted). Tables are exactly as they were: same markup,    */
/* same columns, same data, only the original contained horizontal     */
/* scroll inside the card. Tapping a row does nothing; row controls    */
/* keep working as before.                                             */
/* Kept from Batch 39 (NOT removed): back-to-top restored on phones    */
/* (see above), App Token unlock form left-aligned on phones (below),  */
/* Auto Completed switch + days dropdown on one row, Apply/Reset side  */
/* by side, "Transactions" heading removed.                            */
/* ------------------------------------------------------------------ */

/* --- App Token unlock form: on phones the footer form stacks into a
       full-width column with the label left-aligned above its field
       (Batch 38's right-aligned flex row pushed the label + input to
       the right, so the label read as centred/oddly aligned). The
       button goes full-width below. Desktop keeps the row. --- */
@media (max-width: 767.98px) {
    .sms-token-unlock {
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }
    .sms-token-unlock > div {
        width: 100%;
    }
    .sms-token-unlock label {
        display: block;
        text-align: left;
    }
    .sms-token-unlock .btn {
        width: 100%;
    }
}

/* ------------------------------------------------------------------ */
/* Batch 43 follow-up — profile QR card, tighter + more distinctive   */
/* on phones. The card had too much white space around the QR: the    */
/* card-body padding shrinks, the white QR frame shrinks to fit its   */
/* content, is centred with minimal even padding, and gets a soft     */
/* border + shadow so it reads as a scan card instead of a blank      */
/* white slab. The QR itself is larger on phones (240px) and centred, */
/* with the Live badge, valid-until + countdown and Refresh / Rotate  */
/* buttons below it, exactly as before. Desktop is unchanged. The     */
/* 30-minute rotation and LinkQr logic are untouched.                 */
/* ------------------------------------------------------------------ */
@media (max-width: 767.98px) {
    .sms-qr-card-body {
        padding: 1.25rem !important;
    }
    .sms-qr-wrap {
        align-items: center !important;
        text-align: center;
    }
    .sms-qr-frame {
        margin-left: auto;
        margin-right: auto;
        padding: 0.75rem !important;
        border: 1px solid var(--bs-border-color);
        border-radius: 1rem;
        box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.08);
    }
    .sms-qr-frame img[data-qr-img] {
        width: min(240px, 72vw) !important;
        height: auto !important;
    }
    .sms-qr-wrap .sms-qr-status {
        text-align: center;
    }
}

/* ------------------------------------------------------------------ */
/* Batch 48 — backup codes card (Security tab): a scannable grid of   */
/* per-code copy tiles, a hide/reveal blur, and print rules that      */
/* print only the codes card (not the rest of the page). The tiles    */
/* reuse the theme's btn-light styling, so they stay readable in      */
/* light and dark mode without new colours.                           */
/* ------------------------------------------------------------------ */
.sms-backup-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
}
.sms-backup-codes-grid .sms-backup-code {
    width: 100%;
    letter-spacing: 0.02em;
}
.sms-backup-codes-grid.sms-codes-hidden .sms-backup-code {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}
@media print {
    body * {
        visibility: hidden !important;
    }
    #totp_backup_codes_box,
    #totp_backup_codes_box * {
        visibility: visible !important;
    }
    #totp_backup_codes_box {
        position: absolute;
        inset: 0 auto auto 0;
        width: 100%;
        border: none !important;
        box-shadow: none !important;
    }
    #totp_backup_codes_box .sms-backup-codes-actions {
        display: none !important;
    }
}

/* ------------------------------------------------------------------ */
/* Batch 50 — QR frames fit the QR (all widths, light + dark).        */
/* Root cause of the Diagnostics screenshot: the link QR is an SVG    */
/* with a large intrinsic size (~450px), shown through                */
/* `width: min(200px, 100%)`. A percentage width against an           */
/* indefinite flex-item size leaves the SVG's intrinsic width as the  */
/* frame's max-content width, so the white frame stretched ~450px     */
/* wide while the QR itself rendered at 200px on the left — a big     */
/* empty white area to its right. The fix is a DEFINITE width on the  */
/* image (200px, capped by max-width: 100% on narrow screens) so     */
/* the frame sizes to the QR, plus one shared .sms-qr-frame that     */
/* hugs its content with minimal even padding (0.75rem) instead of   */
/* the old per-site p-4 (1.5rem) white slabs. The frame stays white   */
/* in dark mode too — a QR must scan on white. Rotation, LinkQr and   */
/* the QR content are untouched; the Batch 43 mobile rule below      */
/* (240px on phones) still wins on small screens.                    */
/* ------------------------------------------------------------------ */
.sms-qr-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
    padding: 0.75rem;
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.08);
}
.sms-qr-frame img[data-qr-img],
.sms-qr-frame img {
    width: 200px;
    max-width: 100%;
    height: auto;
    display: block;
}
/* The header phone chip is now a link (to the link-phone steps), so
   it must never look like an underlined text link. */
a.sms-phone-chip { text-decoration: none; }
a.sms-phone-chip:hover { color: #ffffff; }
