﻿/*
StockRuler safe mobile-first fixes.
Add after site.css in _Layout.cshtml:
<link rel="stylesheet" href="~/css/mobile-first-fixes.css" asp-append-version="true" />
*/

:root {
    --sr-navbar-height: 64px;
    --sr-touch-target: 44px;
}

html {
    scroll-padding-top: calc(var(--sr-navbar-height) + 12px);
}

body.authenticated {
    padding-top: var(--sr-navbar-height);
}

.sr-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3000;
    min-height: var(--sr-navbar-height);
}

.sr-sidebar {
    z-index: 2900;
}

.sr-overlay {
    z-index: 2850;
}

button,
.btn,
.form-control,
.form-select,
.sr-link,
.search-item {
    min-height: var(--sr-touch-target);
}

.transaction-search-shell {
    position: relative;
}

.search-results {
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
}

.search-item {
    padding: .75rem .9rem;
    border-bottom: 1px solid rgba(15, 23, 42, .07) !important;
}

    .search-item:last-child {
        border-bottom: 0 !important;
    }

    .search-item.active,
    .search-item:focus,
    .search-item:hover {
        outline: none;
        background: rgba(25, 135, 84, .12) !important;
    }

.sale-action-bar,
.post-sale-bar {
    z-index: 2600;
}

.transaction-client-error {
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    .sr-hide-mobile {
        display: none !important;
    }

    .sr-brand span {
        max-width: 44vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .card-modern,
    .card {
        border-radius: 16px;
    }

        .table-responsive-mobile,
        .card-modern table {
            display: block;
            width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

    .mobiletxn-row .d-flex {
        gap: .5rem !important;
    }

    .mobiletxn-row .price,
    .mobiletxn-row .qty {
        min-width: 0;
        flex: 1 1 120px;
    }

    .mobiletxn-row .removeRow {
        flex: 0 0 48px;
    }

    .sticky-search {
        position: sticky;
        top: calc(var(--sr-navbar-height) + 8px);
        z-index: 1000;
    }
}

/* =========================================================
   STOCKRULER TOPBAR PROFESSIONAL POLISH
   Uses existing:
   - .sr-navbar
   - .sr-dropdown
   - .sr-dropdown-toggle
   - .sr-dropdown-menu
   - #menuToggle
========================================================= */

.sr-topbar {
    gap: .75rem;
    padding-inline: clamp(.75rem, 2vw, 1.25rem);
    background: linear-gradient(135deg, rgba(15, 23, 42, .98), rgba(30, 41, 59, .96)), radial-gradient(circle at top left, rgba(59, 130, 246, .22), transparent 18rem);
    border-bottom: 1px solid rgba(148, 163, 184, .18);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
}

    .sr-topbar .sr-nav-left,
    .sr-topbar .sr-nav-right {
        min-width: 0;
    }

    .sr-topbar .sr-nav-left {
        flex: 1 1 auto;
        gap: .65rem;
    }

    .sr-topbar .sr-nav-right {
        flex: 0 0 auto;
    }

.sr-menu-toggle {
    width: 42px;
    min-width: 42px;
    height: 42px;
    border-radius: 14px !important;
    font-weight: 900;
}

.sr-brand-link {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: #f8fafc !important;
    text-decoration: none !important;
}

    .sr-brand-link img {
        width: 28px;
        height: 28px;
        object-fit: contain;
        border-radius: 8px;
    }

    .sr-brand-link span {
        max-width: 240px;
        overflow: hidden;
        font-size: .95rem;
        font-weight: 900;
        letter-spacing: -.02em;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.sr-branch-switcher {
    flex: 0 1 auto;
}

.sr-branch-pill,
.sr-user-pill {
    min-height: 44px;
    display: inline-flex !important;
    align-items: center;
    gap: .55rem;
    padding: .35rem .7rem !important;
    border-radius: 999px !important;
    color: #e5e7eb !important;
    background: rgba(15, 23, 42, .52) !important;
    border-color: rgba(148, 163, 184, .26) !important;
}

    .sr-branch-pill:hover,
    .sr-user-pill:hover,
    .sr-branch-pill[aria-expanded="true"],
    .sr-user-pill[aria-expanded="true"] {
        color: #ffffff !important;
        background: rgba(30, 41, 59, .78) !important;
        border-color: rgba(59, 130, 246, .45) !important;
    }

    .sr-branch-pill.all-branches {
        border-color: rgba(245, 158, 11, .5) !important;
        background: rgba(120, 53, 15, .26) !important;
    }

    .sr-branch-pill.specific-branch {
        border-color: rgba(34, 197, 94, .38) !important;
    }

.sr-branch-icon {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
}

.sr-branch-copy,
.sr-user-meta {
    min-width: 0;
    display: grid;
    gap: .02rem;
    text-align: left;
    line-height: 1.05;
}

    .sr-branch-copy small,
    .sr-user-meta small {
        color: #94a3b8;
        font-size: .62rem;
        font-weight: 800;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .sr-branch-copy strong,
    .sr-user-meta strong {
        max-width: 170px;
        overflow: hidden;
        color: #f8fafc;
        font-size: .82rem;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.sr-user-avatar {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    font-size: .85rem;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .28);
}

    .sr-user-avatar.large {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

.sr-dropdown-header {
    padding: .65rem .8rem .35rem;
    color: #64748b;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.sr-branch-menu,
.sr-user-dropdown {
    min-width: 250px;
    padding: .45rem;
    border-radius: 18px;
}

    .sr-branch-menu .sr-dropdown-item,
    .sr-user-dropdown .sr-dropdown-item {
        display: flex;
        align-items: center;
        gap: .65rem;
        padding: .7rem .75rem;
        border-radius: 14px;
    }

        .sr-branch-menu .sr-dropdown-item span:last-child,
        .sr-user-dropdown .sr-dropdown-item span:last-child {
            min-width: 0;
            display: grid;
            gap: .1rem;
        }

        .sr-branch-menu .sr-dropdown-item strong,
        .sr-user-dropdown .sr-dropdown-item strong {
            font-size: .86rem;
            color: #0f172a;
        }

        .sr-branch-menu .sr-dropdown-item small,
        .sr-user-dropdown .sr-dropdown-item small {
            color: #64748b;
            font-size: .72rem;
        }

        .sr-branch-menu .sr-dropdown-item.active {
            background: #eff6ff;
            color: #1d4ed8;
        }

            .sr-branch-menu .sr-dropdown-item.active strong {
                color: #1d4ed8;
            }

.sr-user-summary {
    cursor: default;
}

    .sr-user-summary:hover {
        background: transparent !important;
    }

/* Mobile header compression */
@media (max-width: 768px) {
    .sr-topbar {
        padding-inline: .65rem;
    }

    .sr-brand-link span {
        max-width: 30vw;
    }

    .sr-branch-pill {
        max-width: 42vw;
        padding-inline: .5rem !important;
    }

    .sr-branch-copy strong {
        max-width: 26vw;
    }

    .sr-branch-copy small {
        display: none;
    }

    .sr-user-pill {
        width: 42px;
        min-width: 42px;
        justify-content: center;
        padding: .25rem !important;
    }

        .sr-user-pill::after {
            display: none;
        }

    .sr-user-avatar {
        width: 32px;
        height: 32px;
    }

    .sr-dropdown-menu.right,
    .sr-user-dropdown {
        right: 0;
        left: auto;
    }

    .sr-branch-menu {
        left: 0;
        right: auto;
        width: min(92vw, 320px);
    }
}

/* Very small phones */
@media (max-width: 430px) {
    .sr-brand-link span {
        display: none;
    }

    .sr-branch-pill {
        max-width: 54vw;
    }

    .sr-branch-copy strong {
        max-width: 38vw;
    }
}

/* =========================================================
   STOCKRULER GENERIC HISTORY / LEDGER TABLE
   Used by _HistoryTable.cshtml
========================================================= */

.sr-history-shell {
    padding: .75rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .07);
}

.sr-history-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
    padding: .35rem .35rem .75rem;
    border-bottom: 1px solid rgba(148, 163, 184, .16);
}

    .sr-history-summary div {
        display: grid;
        gap: .05rem;
    }

    .sr-history-summary strong {
        color: #0f172a;
        font-size: .95rem;
        font-weight: 900;
    }

    .sr-history-summary small {
        color: #64748b;
        font-size: .72rem;
        font-weight: 700;
    }

.sr-empty-history {
    display: grid;
    place-items: center;
    gap: .3rem;
    padding: 2.5rem 1rem;
    color: #64748b;
    text-align: center;
}

    .sr-empty-history strong {
        color: #0f172a;
        font-size: 1rem;
    }

    .sr-empty-history small {
        max-width: 280px;
        line-height: 1.4;
    }

.sr-empty-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: .25rem;
    border-radius: 18px;
    background: #f1f5f9;
    font-size: 1.45rem;
}

.sr-history-mobile-list {
    display: grid;
    gap: .7rem;
}

.sr-history-card {
    padding: .85rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.sr-history-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

.sr-history-card-title {
    min-width: 0;
    display: grid;
    gap: .35rem;
}

    .sr-history-card-title strong {
        color: #0f172a;
        font-size: .9rem;
        font-weight: 900;
        line-height: 1.25;
    }

.sr-history-card-emphasis {
    flex: 0 0 auto;
    color: #0f172a;
    font-size: .92rem;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.sr-history-card-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    margin-top: .75rem;
}

    .sr-history-card-details div {
        min-width: 0;
        padding: .55rem .65rem;
        border-radius: 15px;
        background: rgba(241, 245, 249, .75);
    }

    .sr-history-card-details small {
        display: block;
        margin-bottom: .18rem;
        color: #64748b;
        font-size: .64rem;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .sr-history-card-details strong {
        display: block;
        overflow: hidden;
        color: #0f172a;
        font-size: .78rem;
        font-weight: 800;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.sr-history-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    margin-top: .75rem;
}

    .sr-history-card-actions .btn {
        min-height: 38px;
        border-radius: 999px;
        font-weight: 800;
    }

.sr-ledger-badge {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

    .sr-ledger-badge.success {
        color: #047857;
        background: #d1fae5;
    }

    .sr-ledger-badge.danger {
        color: #b91c1c;
        background: #fee2e2;
    }

    .sr-ledger-badge.warning {
        color: #92400e;
        background: #fef3c7;
    }

    .sr-ledger-badge.neutral {
        color: #334155;
        background: #e2e8f0;
    }

.sr-history-table {
    margin-bottom: 0;
}

    .sr-history-table thead th {
        border-bottom: 1px solid rgba(148, 163, 184, .24);
        color: #64748b;
        font-size: .72rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .sr-history-table tbody td {
        vertical-align: middle;
        color: #0f172a;
        font-size: .86rem;
    }

.sr-clickable-row {
    cursor: pointer;
}

    .sr-clickable-row:hover {
        background: #f8fafc;
    }

.sr-row-actions {
    white-space: nowrap;
}

    .sr-row-actions .btn {
        border-radius: 999px;
        font-weight: 800;
    }

@media (max-width: 390px) {
    .sr-history-card-details {
        grid-template-columns: 1fr;
    }

    .sr-history-card-top {
        flex-direction: column;
    }

    .sr-history-card-emphasis {
        text-align: left;
    }
}

/* =========================================================
   STOCKRULER REUSABLE HISTORY FILTER CARD
========================================================= */

.sr-filter-card {
    margin-bottom: 1rem;
    padding: .9rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.sr-filter-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .85rem;
}

    .sr-filter-heading strong {
        display: block;
        color: #0f172a;
        font-size: .95rem;
        font-weight: 900;
    }

    .sr-filter-heading small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .78rem;
        line-height: 1.35;
    }

.sr-filter-form {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .75rem;
    align-items: end;
}

.sr-filter-field {
    min-width: 0;
}

    .sr-filter-field label {
        display: block;
        margin-bottom: .25rem;
        color: #475569;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .sr-filter-field .form-control,
    .sr-filter-field .form-select {
        min-height: 42px;
        border-radius: 14px;
        border-color: rgba(148, 163, 184, .35);
        font-size: .86rem;
    }

.sr-filter-search {
    grid-column: span 2;
}

.sr-filter-actions {
    display: flex;
    gap: .45rem;
}

    .sr-filter-actions .btn {
        min-height: 42px;
        border-radius: 999px;
        font-weight: 800;
        white-space: nowrap;
    }

.sr-filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(148, 163, 184, .15);
}

    .sr-filter-chips span {
        color: #64748b;
        font-size: .72rem;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .sr-filter-chips a {
        display: inline-flex;
        align-items: center;
        min-height: 30px;
        padding: .25rem .7rem;
        border-radius: 999px;
        color: #1d4ed8;
        background: #eff6ff;
        font-size: .76rem;
        font-weight: 900;
        text-decoration: none;
    }

        .sr-filter-chips a:hover {
            background: #dbeafe;
        }

@media (max-width: 992px) {
    .sr-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sr-filter-search,
    .sr-filter-actions {
        grid-column: span 2;
    }

        .sr-filter-actions .btn {
            flex: 1 1 auto;
        }
}

@media (max-width: 520px) {
    .sr-filter-form {
        grid-template-columns: 1fr;
    }

    .sr-filter-search,
    .sr-filter-actions {
        grid-column: auto;
    }

    .sr-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .sr-filter-card {
        padding: .8rem;
        border-radius: 22px;
    }
}

/* =========================================================
   STOCKRULER TRANSACTION SCREEN POLISH
   Applies to Sales/Create and Purchases/Create via _TransactionForm
========================================================= */

.pro-transaction-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
    margin-bottom: .75rem;
    padding: .95rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #f8fafc), radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 16rem);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.pro-transaction-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.pro-transaction-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    display: inline-grid;
    place-items: center;
    border-radius: 18px;
    background: #eff6ff;
    font-size: 1.35rem;
}

.pro-transaction-eyebrow {
    margin-bottom: .08rem;
    color: #2563eb;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.pro-transaction-title h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 900;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.pro-transaction-title p {
    margin: .18rem 0 0;
    color: #64748b;
    font-size: .82rem;
}

.pro-transaction-time {
    flex: 0 0 auto;
    display: grid;
    gap: .05rem;
    text-align: right;
}

    .pro-transaction-time small {
        color: #64748b;
        font-size: .65rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-transaction-time strong {
        color: #0f172a;
        font-size: .9rem;
        font-weight: 900;
    }

.pro-txn-contextbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
    margin-bottom: .75rem;
}

    .pro-txn-contextbar > div {
        min-width: 0;
        padding: .75rem .85rem;
        border: 1px solid rgba(148, 163, 184, .16);
        border-radius: 18px;
        background: #ffffff;
        box-shadow: 0 8px 20px rgba(15, 23, 42, .045);
    }

    .pro-txn-contextbar small {
        display: block;
        margin-bottom: .18rem;
        color: #64748b;
        font-size: .62rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-txn-contextbar strong {
        display: block;
        overflow: hidden;
        color: #0f172a;
        font-size: .82rem;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.pro-txn-stepper {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--txn-steps, 4), minmax(0, 1fr));
    gap: .35rem;
    margin-bottom: .85rem;
    padding: .55rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .055);
    overflow: hidden;
}

    .pro-txn-stepper[data-txn-total-steps="3"] {
        --txn-steps: 3;
    }

    .pro-txn-stepper[data-txn-total-steps="4"] {
        --txn-steps: 4;
    }

.pro-txn-progress-rail {
    position: absolute;
    left: .65rem;
    right: .65rem;
    bottom: .35rem;
    height: 4px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.pro-txn-progress-bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #22c55e);
    transition: width .22s ease;
}

.pro-txn-step {
    position: relative;
    z-index: 1;
    min-height: 54px;
    display: grid;
    place-items: center;
    gap: .2rem;
    padding: .4rem .25rem .65rem;
    border-radius: 16px;
    color: #64748b;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

    .pro-txn-step span {
        width: 28px;
        height: 28px;
        display: inline-grid;
        place-items: center;
        border-radius: 999px;
        background: #f1f5f9;
        font-size: .95rem;
    }

    .pro-txn-step small {
        font-size: .66rem;
        font-weight: 900;
        line-height: 1;
        white-space: nowrap;
    }

    .pro-txn-step.active {
        color: #1d4ed8;
        background: #eff6ff;
    }

        .pro-txn-step.active span {
            background: #dbeafe;
        }

    .pro-txn-step.complete {
        color: #047857;
    }

        .pro-txn-step.complete span {
            background: #d1fae5;
        }

/* Improve transaction cards without changing JS-generated markup */
.transaction-form .card-modern,
.transaction-form .mobiletxn-row {
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 20px !important;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
}

.transaction-form .form-control,
.transaction-form .form-select {
    min-height: 44px;
    border-radius: 14px;
}

.transaction-form .btn {
    min-height: 44px;
    border-radius: 999px;
    font-weight: 800;
}

/* Keep transaction total bar above mobile bottom nav */
@media (max-width: 768px) {
    .pro-transaction-hero {
        align-items: flex-start;
        padding: .85rem;
        border-radius: 22px;
    }

    .pro-transaction-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        border-radius: 16px;
    }

    .pro-transaction-time {
        display: none;
    }

    .pro-txn-contextbar {
        grid-template-columns: 1fr 1fr;
        gap: .5rem;
    }

        .pro-txn-contextbar > div {
            padding: .65rem .7rem;
            border-radius: 16px;
        }

    .pro-txn-stepper {
        position: sticky;
        top: calc(var(--sr-nav-height, 64px) + .55rem);
        z-index: 900;
        margin-bottom: .75rem;
        border-radius: 20px;
    }

    .pro-txn-step {
        min-height: 50px;
    }

        .pro-txn-step small {
            font-size: .61rem;
        }

    body.authenticated .transaction-form .sale-action-bar {
        left: .75rem !important;
        right: .75rem !important;
        bottom: calc(5.25rem + env(safe-area-inset-bottom)) !important;
        width: auto !important;
        padding: .65rem .85rem !important;
        border-radius: 20px !important;
        z-index: 1030 !important;
        background: rgba(255, 255, 255, .96) !important;
        backdrop-filter: blur(14px);
    }

    body.authenticated .transaction-form .post-sale-bar {
        left: .75rem !important;
        right: .75rem !important;
        bottom: calc(9.5rem + env(safe-area-inset-bottom)) !important;
        width: auto !important;
        border-radius: 20px !important;
        z-index: 1031 !important;
    }
}

@media (max-width: 390px) {
    .pro-txn-contextbar {
        grid-template-columns: 1fr;
    }

    .pro-txn-step small {
        display: none;
    }

    .pro-txn-step {
        min-height: 44px;
        padding-bottom: .55rem;
    }
}

/* =========================================================
   STOCKRULER DETAILS + PAYMENT PAGES
========================================================= */

.pro-detail-shell {
    display: grid;
    gap: 1rem;
}

.pro-detail-summary-card,
.pro-detail-card {
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.pro-detail-status-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .9rem;
}

    .pro-detail-status-row small,
    .pro-info-grid small,
    .pro-money-grid span,
    .pro-progress-label span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-detail-status-row strong,
    .pro-info-grid strong {
        color: #0f172a;
        font-size: .92rem;
        font-weight: 900;
    }

.pro-ledger-status {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-top: .25rem;
    padding: .25rem .7rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 900;
}

    .pro-ledger-status.success {
        color: #047857;
        background: #d1fae5;
    }

    .pro-ledger-status.warning {
        color: #92400e;
        background: #fef3c7;
    }

    .pro-ledger-status.danger {
        color: #b91c1c;
        background: #fee2e2;
    }

.pro-money-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
}

    .pro-money-grid > div,
    .pro-info-grid > div {
        min-width: 0;
        padding: .75rem;
        border: 1px solid rgba(148, 163, 184, .14);
        border-radius: 18px;
        background: rgba(255, 255, 255, .78);
    }

    .pro-money-grid strong {
        display: block;
        margin-top: .18rem;
        color: #0f172a;
        font-size: clamp(.94rem, 2vw, 1.15rem);
        font-weight: 900;
        letter-spacing: -.02em;
    }

.pro-progress-wrap {
    margin-top: .9rem;
}

.pro-progress-label {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .35rem;
}

    .pro-progress-label strong {
        color: #0f172a;
        font-size: .8rem;
        font-weight: 900;
    }

.pro-payment-progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

    .pro-payment-progress span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, #22c55e, #2563eb);
    }

.pro-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin-top: .9rem;
}

    .pro-info-grid strong {
        display: block;
        overflow: hidden;
        margin-top: .15rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.pro-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .8rem;
}

    .pro-section-title strong {
        color: #0f172a;
        font-size: .98rem;
        font-weight: 900;
    }

    .pro-section-title small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .76rem;
    }

.pro-line-list {
    display: grid;
    gap: .55rem;
}

.pro-line-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .78rem;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 18px;
    background: #ffffff;
}

    .pro-line-item strong {
        color: #0f172a;
        font-weight: 900;
    }

    .pro-line-item small {
        display: block;
        margin-top: .18rem;
        color: #64748b;
        font-size: .78rem;
    }

.pro-line-total {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
}

.pro-detail-total-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: .9rem;
    padding-top: .9rem;
    border-top: 1px solid rgba(148, 163, 184, .18);
}

    .pro-detail-total-row span {
        color: #64748b;
        font-size: .8rem;
        font-weight: 900;
        text-transform: uppercase;
    }

    .pro-detail-total-row strong {
        color: #047857;
        font-size: 1.15rem;
        font-weight: 900;
    }

.pro-soft-empty {
    display: grid;
    place-items: center;
    gap: .25rem;
    padding: 2rem 1rem;
    border: 1px dashed rgba(148, 163, 184, .35);
    border-radius: 20px;
    color: #64748b;
    text-align: center;
    background: rgba(248, 250, 252, .78);
}

    .pro-soft-empty span {
        font-size: 1.55rem;
    }

    .pro-soft-empty strong {
        color: #0f172a;
        font-size: .95rem;
    }

    .pro-soft-empty small {
        max-width: 280px;
        line-height: 1.4;
    }

.pro-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    justify-content: flex-end;
}

    .pro-detail-actions .btn,
    .pro-payment-form .btn {
        min-height: 42px;
        border-radius: 999px;
        font-weight: 800;
    }

.pro-payment-form .form-control,
.pro-payment-form .form-select {
    min-height: 48px;
    border-radius: 16px;
}

.pro-quick-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .55rem;
}

@media (max-width: 768px) {
    .pro-detail-summary-card,
    .pro-detail-card {
        padding: .85rem;
        border-radius: 22px;
    }

    .pro-money-grid,
    .pro-info-grid {
        grid-template-columns: 1fr;
    }

    .pro-detail-status-row,
    .pro-line-item,
    .pro-detail-total-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .pro-line-total {
        text-align: left;
    }

    .pro-detail-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

        .pro-detail-actions .btn {
            width: 100%;
        }

    .pro-section-title {
        align-items: stretch;
        flex-direction: column;
    }
}

/* =========================================================
   STOCKRULER RECEIPT PAGE
========================================================= */

.receipt-page {
    max-width: 760px;
    margin: 0 auto;
}

.receipt-toolbar {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1rem;
}

    .receipt-toolbar .btn {
        min-height: 42px;
        border-radius: 999px;
        font-weight: 800;
    }

.receipt-card {
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.receipt-header {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1rem;
    text-align: left;
}

.receipt-brand-mark {
    width: 54px;
    height: 54px;
    min-width: 54px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: #eff6ff;
    font-size: 1.6rem;
}

.receipt-header h1 {
    margin: 0;
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -.03em;
}

.receipt-header p {
    margin: .15rem 0 0;
    color: #64748b;
    font-size: .86rem;
}

.receipt-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
}

    .receipt-meta > div {
        min-width: 0;
        padding: .7rem;
        border-radius: 18px;
        background: #f8fafc;
    }

    .receipt-meta small {
        display: block;
        margin-bottom: .18rem;
        color: #64748b;
        font-size: .65rem;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .receipt-meta strong {
        display: block;
        overflow: hidden;
        color: #0f172a;
        font-size: .82rem;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.receipt-status {
    width: fit-content;
    padding: .2rem .55rem;
    border-radius: 999px;
}

    .receipt-status.paid {
        color: #047857 !important;
        background: #d1fae5;
    }

    .receipt-status.unpaid {
        color: #b91c1c !important;
        background: #fee2e2;
    }

.receipt-divider {
    height: 1px;
    margin: 1rem 0;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, .38), transparent);
}

.receipt-items {
    display: grid;
    gap: .45rem;
}

.receipt-items-head,
.receipt-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 80px 120px;
    gap: .65rem;
    align-items: center;
}

.receipt-items-head {
    color: #64748b;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

    .receipt-items-head span:nth-child(2),
    .receipt-items-head span:nth-child(3),
    .receipt-item > span,
    .receipt-item > strong:last-child {
        text-align: right;
    }

.receipt-item {
    padding: .7rem;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 18px;
    background: #ffffff;
}

    .receipt-item strong {
        color: #0f172a;
        font-size: .86rem;
        font-weight: 900;
    }

    .receipt-item small {
        display: block;
        margin-top: .15rem;
        color: #64748b;
        font-size: .74rem;
    }

    .receipt-item > span {
        color: #0f172a;
        font-weight: 800;
    }

.receipt-totals {
    display: grid;
    gap: .45rem;
    margin-left: auto;
    max-width: 360px;
}

    .receipt-totals > div,
    .receipt-payments > div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
    }

    .receipt-totals span,
    .receipt-payments span {
        color: #64748b;
        font-size: .8rem;
        font-weight: 800;
    }

    .receipt-totals strong,
    .receipt-payments strong {
        color: #0f172a;
        font-size: .92rem;
        font-weight: 900;
    }

.receipt-balance {
    margin-top: .25rem;
    padding-top: .55rem;
    border-top: 1px dashed rgba(148, 163, 184, .45);
}

    .receipt-balance.has-balance strong {
        color: #b91c1c;
    }

    .receipt-balance.settled strong {
        color: #047857;
    }

.receipt-payments {
    display: grid;
    gap: .45rem;
}

    .receipt-payments > strong {
        color: #0f172a;
        font-size: .95rem;
        font-weight: 900;
    }

    .receipt-payments > div {
        padding: .55rem .7rem;
        border-radius: 14px;
        background: #f8fafc;
    }

.receipt-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(148, 163, 184, .45);
    text-align: center;
}

    .receipt-footer p {
        margin: 0;
        color: #0f172a;
        font-weight: 900;
    }

    .receipt-footer small {
        color: #64748b;
        font-size: .72rem;
    }

@media (max-width: 768px) {
    .receipt-card {
        padding: .9rem;
        border-radius: 24px;
    }

    .receipt-toolbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .receipt-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .receipt-items-head {
        display: none;
    }

    .receipt-item {
        grid-template-columns: 1fr;
        gap: .35rem;
    }

        .receipt-item > span,
        .receipt-item > strong:last-child {
            text-align: left;
        }

        .receipt-item > strong:last-child {
            font-size: .98rem;
        }

    .receipt-totals {
        max-width: none;
    }
}

@media (max-width: 430px) {
    .receipt-meta {
        grid-template-columns: 1fr;
    }
}

/* Print Mode */
@media print {
    @page {
        size: auto;
        margin: 8mm;
    }

    body {
        background: #ffffff !important;
    }

    .no-print,
    .sr-navbar,
    .sr-sidebar,
    .pro-mobile-bottom-nav,
    .footer,
    #scrollTopBtn,
    #overlay,
    .sr-overlay {
        display: none !important;
    }

    .sr-app,
    .sr-content,
    .sr-main,
    .receipt-page {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .receipt-card {
        width: 100% !important;
        max-width: 80mm;
        margin: 0 auto;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .receipt-header {
        justify-content: center;
        text-align: center;
    }

    .receipt-brand-mark {
        display: none;
    }

    .receipt-header h1 {
        font-size: 14px;
    }

    .receipt-header p,
    .receipt-footer small,
    .receipt-item small,
    .receipt-meta small,
    .receipt-totals span,
    .receipt-payments span {
        font-size: 10px;
    }

    .receipt-meta {
        grid-template-columns: 1fr 1fr;
        gap: 3px;
    }

        .receipt-meta > div,
        .receipt-item,
        .receipt-payments > div {
            padding: 3px 0;
            border: 0;
            border-radius: 0;
            background: #ffffff;
        }

    .receipt-items-head,
    .receipt-item {
        grid-template-columns: 1fr 42px 58px;
        gap: 4px;
    }

    .receipt-items-head {
        display: grid;
    }

    .receipt-item strong,
    .receipt-meta strong,
    .receipt-totals strong,
    .receipt-payments strong {
        font-size: 11px;
    }

    .receipt-divider {
        margin: 6px 0;
        background: #000000;
    }

    .receipt-footer {
        margin-top: 8px;
        padding-top: 6px;
    }
}

/* =========================================================
   STOCKRULER BRANCH DASHBOARD
========================================================= */

.pro-branch-dashboard {
    display: grid;
    gap: 1rem;
}

.pro-branch-insight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #f8fafc), radial-gradient(circle at top left, rgba(59, 130, 246, .12), transparent 16rem);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

    .pro-branch-insight span {
        display: block;
        margin-bottom: .15rem;
        color: #2563eb;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .pro-branch-insight strong {
        color: #0f172a;
        font-size: .95rem;
        font-weight: 900;
    }

.pro-branch-pill {
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: .35rem .75rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
}

    .pro-branch-pill.success {
        color: #047857;
        background: #d1fae5;
    }

    .pro-branch-pill.warning {
        color: #92400e;
        background: #fef3c7;
    }

.pro-branch-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem;
}

.pro-branch-kpi {
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

    .pro-branch-kpi span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-branch-kpi strong {
        display: block;
        overflow: hidden;
        margin-top: .2rem;
        color: #0f172a;
        font-size: clamp(1.05rem, 2.4vw, 1.45rem);
        font-weight: 900;
        letter-spacing: -.035em;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pro-branch-kpi small {
        display: block;
        margin-top: .18rem;
        color: #64748b;
        font-size: .74rem;
    }

    .pro-branch-kpi.primary {
        background: linear-gradient(135deg, #eff6ff, #ffffff);
    }

    .pro-branch-kpi.success {
        background: linear-gradient(135deg, #ecfdf5, #ffffff);
    }

    .pro-branch-kpi.danger {
        background: linear-gradient(135deg, #fef2f2, #ffffff);
    }

.pro-branch-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .85fr);
    gap: 1rem;
}

.pro-branch-card {
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.pro-branch-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .85rem;
}

    .pro-branch-card-title strong {
        color: #0f172a;
        font-size: .98rem;
        font-weight: 900;
    }

    .pro-branch-card-title small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .76rem;
    }

.pro-chart-wrap {
    position: relative;
    height: 300px;
}

.pro-ranked-list {
    display: grid;
    gap: .55rem;
}

.pro-ranked-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .7rem;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 18px;
    background: #f8fafc;
}

    .pro-ranked-item > span {
        width: 32px;
        height: 32px;
        min-width: 32px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        color: #1d4ed8;
        background: #dbeafe;
        font-size: .78rem;
        font-weight: 900;
    }

    .pro-ranked-item strong {
        color: #0f172a;
        font-size: .88rem;
        font-weight: 900;
    }

    .pro-ranked-item small {
        display: block;
        margin-top: .1rem;
        color: #64748b;
        font-size: .74rem;
    }

.pro-branch-empty {
    display: grid;
    place-items: center;
    gap: .25rem;
    min-height: 180px;
    padding: 1.5rem;
    border: 1px dashed rgba(148, 163, 184, .34);
    border-radius: 20px;
    color: #64748b;
    text-align: center;
    background: #f8fafc;
}

    .pro-branch-empty span {
        font-size: 1.55rem;
    }

    .pro-branch-empty strong {
        color: #0f172a;
        font-size: .95rem;
    }

    .pro-branch-empty small {
        max-width: 260px;
        line-height: 1.4;
    }

.pro-low-stock-card {
    background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.pro-low-stock-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

    .pro-low-stock-list span {
        display: inline-flex;
        align-items: center;
        min-height: 34px;
        padding: .35rem .7rem;
        border-radius: 999px;
        color: #92400e;
        background: #fef3c7;
        font-size: .78rem;
        font-weight: 900;
    }

@media (max-width: 992px) {
    .pro-branch-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pro-branch-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .pro-branch-insight {
        align-items: flex-start;
        flex-direction: column;
        border-radius: 22px;
    }

    .pro-branch-kpi-grid {
        grid-template-columns: 1fr;
        gap: .7rem;
    }

    .pro-branch-kpi,
    .pro-branch-card {
        padding: .85rem;
        border-radius: 22px;
    }

    .pro-chart-wrap {
        height: 240px;
    }

    .pro-branch-card-title {
        align-items: stretch;
        flex-direction: column;
    }

        .pro-branch-card-title .btn {
            width: 100%;
        }
}

/* =========================================================
   STOCKRULER HOME DASHBOARD QUICK ACTIONS
========================================================= */

.pro-home-actions {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #f8fafc), radial-gradient(circle at top left, rgba(37, 99, 235, .10), transparent 18rem);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.pro-home-actions-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .85rem;
}

    .pro-home-actions-head span {
        display: block;
        margin-bottom: .12rem;
        color: #2563eb;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .pro-home-actions-head strong {
        color: #0f172a;
        font-size: 1rem;
        font-weight: 900;
    }

.pro-home-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.pro-home-action {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 20px;
    color: #0f172a !important;
    background: #ffffff;
    text-decoration: none !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

    .pro-home-action:hover {
        transform: translateY(-2px);
        border-color: rgba(37, 99, 235, .35);
        box-shadow: 0 16px 32px rgba(15, 23, 42, .08);
        background: #f8fafc;
    }

    .pro-home-action > span {
        width: 42px;
        height: 42px;
        min-width: 42px;
        display: grid;
        place-items: center;
        border-radius: 16px;
        background: #eff6ff;
        font-size: 1.25rem;
    }

    .pro-home-action strong {
        display: block;
        overflow: hidden;
        color: #0f172a;
        font-size: .9rem;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pro-home-action small {
        display: block;
        margin-top: .12rem;
        overflow: hidden;
        color: #64748b;
        font-size: .74rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pro-home-action.primary {
        background: linear-gradient(135deg, #eff6ff, #ffffff);
    }

        .pro-home-action.primary > span {
            color: #ffffff;
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
        }

    .pro-home-action.warning {
        background: linear-gradient(135deg, #fffbeb, #ffffff);
    }

        .pro-home-action.warning > span {
            background: #fef3c7;
        }

@media (max-width: 992px) {
    .pro-home-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .pro-home-action-grid {
        grid-template-columns: 1fr;
    }

    .pro-home-actions {
        padding: .85rem;
        border-radius: 22px;
    }

    .pro-home-action {
        min-height: 72px;
    }
}

/* =========================================================
   STOCKRULER SETUP / ONBOARDING PAGE
========================================================= */

.pro-setup-shell {
    display: grid;
    gap: 1rem;
}

.pro-setup-progress-card {
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #f8fafc), radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 16rem);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.pro-setup-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
}

    .pro-setup-progress-top span,
    .pro-setup-next span {
        display: block;
        color: #2563eb;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .pro-setup-progress-top strong,
    .pro-setup-next strong {
        display: block;
        margin-top: .1rem;
        color: #0f172a;
        font-size: 1.05rem;
        font-weight: 900;
    }

.pro-setup-status {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: .35rem .75rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
}

    .pro-setup-status.complete {
        color: #047857;
        background: #d1fae5;
    }

    .pro-setup-status.pending {
        color: #92400e;
        background: #fef3c7;
    }

.pro-setup-progress-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

    .pro-setup-progress-track span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, #2563eb, #22c55e);
    }

.pro-setup-next {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: .85rem;
    border-radius: 20px;
    background: rgba(239, 246, 255, .85);
}

    .pro-setup-next small {
        display: block;
        margin-top: .15rem;
        color: #64748b;
        font-size: .78rem;
    }

    .pro-setup-next .btn {
        min-height: 42px;
        border-radius: 999px;
        font-weight: 800;
        white-space: nowrap;
    }

.pro-setup-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem;
}

.pro-setup-step {
    display: grid;
    gap: .9rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

    .pro-setup-step:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 34px rgba(15, 23, 42, .09);
    }

    .pro-setup-step.completed {
        background: linear-gradient(135deg, #ecfdf5, #ffffff);
        border-color: rgba(34, 197, 94, .25);
    }

    .pro-setup-step.pending {
        background: linear-gradient(135deg, #eff6ff, #ffffff);
        border-color: rgba(37, 99, 235, .22);
    }

    .pro-setup-step.locked {
        opacity: .72;
        background: #f8fafc;
    }

.pro-setup-step-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.pro-setup-step-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: #eff6ff;
    font-size: 1.35rem;
}

.pro-setup-step.completed .pro-setup-step-icon {
    background: #d1fae5;
}

.pro-setup-step.locked .pro-setup-step-icon {
    background: #e2e8f0;
}

.pro-setup-step-number {
    color: #64748b;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.pro-setup-step-body h3 {
    margin: 0;
    color: #0f172a;
    font-size: .98rem;
    font-weight: 900;
}

.pro-setup-step-body p {
    margin: .25rem 0 0;
    color: #64748b;
    font-size: .82rem;
    line-height: 1.45;
}

.pro-setup-step-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
    margin-top: auto;
}

    .pro-setup-step-footer .btn {
        border-radius: 999px;
        font-weight: 800;
        white-space: nowrap;
    }

.pro-setup-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

    .pro-setup-badge.success {
        color: #047857;
        background: #d1fae5;
    }

    .pro-setup-badge.warning {
        color: #92400e;
        background: #fef3c7;
    }

    .pro-setup-badge.muted {
        color: #475569;
        background: #e2e8f0;
    }

.pro-setup-complete-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #16a34a, #15803d), radial-gradient(circle at top left, rgba(255, 255, 255, .22), transparent 14rem);
    box-shadow: 0 16px 34px rgba(22, 163, 74, .24);
}

.pro-setup-complete-icon {
    width: 54px;
    height: 54px;
    min-width: 54px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: rgba(255, 255, 255, .16);
    font-size: 1.65rem;
}

.pro-setup-complete-card h3 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 900;
}

.pro-setup-complete-card p {
    margin: .2rem 0 0;
    color: rgba(255, 255, 255, .82);
    font-size: .86rem;
}

.pro-setup-complete-card .btn {
    border-radius: 999px;
    font-weight: 900;
    white-space: nowrap;
}

@media (max-width: 992px) {
    .pro-setup-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .pro-setup-progress-card,
    .pro-setup-step,
    .pro-setup-complete-card {
        border-radius: 22px;
    }

    .pro-setup-grid {
        grid-template-columns: 1fr;
    }

    .pro-setup-next,
    .pro-setup-complete-card,
    .pro-setup-step-footer {
        align-items: stretch;
        flex-direction: column;
    }

        .pro-setup-next .btn,
        .pro-setup-complete-card .btn,
        .pro-setup-step-footer .btn {
            width: 100%;
        }

    .pro-setup-progress-top {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================================
   STOCKRULER ACTIVITY LOG
========================================================= */

.pro-activity-shell {
    display: grid;
    gap: 1rem;
}

.pro-activity-filter,
.pro-activity-card,
.pro-activity-empty {
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.pro-activity-filter {
    padding: 1rem;
    background: linear-gradient(135deg, #ffffff, #f8fafc), radial-gradient(circle at top left, rgba(37, 99, 235, .10), transparent 16rem);
}

.pro-activity-filter-head {
    margin-bottom: .85rem;
}

    .pro-activity-filter-head strong {
        display: block;
        color: #0f172a;
        font-size: .98rem;
        font-weight: 900;
    }

    .pro-activity-filter-head small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .78rem;
    }

.pro-activity-filter-form {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .7rem;
    align-items: end;
}

    .pro-activity-filter-form label {
        display: block;
        margin-bottom: .25rem;
        color: #475569;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-activity-filter-form .form-control,
    .pro-activity-filter-form .form-select {
        min-height: 42px;
        border-radius: 14px;
        font-size: .86rem;
    }

.pro-activity-search {
    grid-column: span 2;
}

.pro-activity-filter-actions {
    display: flex;
    gap: .45rem;
}

    .pro-activity-filter-actions .btn {
        min-height: 42px;
        border-radius: 999px;
        font-weight: 800;
    }

.pro-activity-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

    .pro-activity-summary article {
        padding: .9rem;
        border: 1px solid rgba(148, 163, 184, .16);
        border-radius: 22px;
        background: #ffffff;
        box-shadow: 0 10px 26px rgba(15, 23, 42, .055);
    }

        .pro-activity-summary article.success {
            background: linear-gradient(135deg, #ecfdf5, #ffffff);
        }

        .pro-activity-summary article.warning {
            background: linear-gradient(135deg, #fffbeb, #ffffff);
        }

        .pro-activity-summary article.danger {
            background: linear-gradient(135deg, #fef2f2, #ffffff);
        }

    .pro-activity-summary span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-activity-summary strong {
        display: block;
        margin-top: .2rem;
        color: #0f172a;
        font-size: 1.25rem;
        font-weight: 900;
    }

    .pro-activity-summary small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .74rem;
    }

.pro-activity-list {
    display: grid;
    gap: .85rem;
}

.pro-activity-card {
    padding: .9rem;
    border-left-width: 5px;
}

    .pro-activity-card.success {
        border-left-color: #22c55e;
    }

    .pro-activity-card.warning {
        border-left-color: #f59e0b;
    }

    .pro-activity-card.danger {
        border-left-color: #ef4444;
    }

    .pro-activity-card.neutral {
        border-left-color: #64748b;
    }

.pro-activity-card-head {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.pro-activity-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: #eff6ff;
    font-size: 1.25rem;
}

.pro-activity-main {
    min-width: 0;
    flex: 1 1 auto;
}

.pro-activity-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

    .pro-activity-title-row strong {
        color: #0f172a;
        font-size: .95rem;
        font-weight: 900;
        line-height: 1.3;
    }

.pro-activity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .45rem;
}

    .pro-activity-meta span {
        display: inline-flex;
        align-items: center;
        min-height: 28px;
        padding: .25rem .6rem;
        border-radius: 999px;
        color: #475569;
        background: #f1f5f9;
        font-size: .72rem;
        font-weight: 800;
    }

.pro-activity-badge {
    flex: 0 0 auto;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
}

    .pro-activity-badge.success {
        color: #047857;
        background: #d1fae5;
    }

    .pro-activity-badge.warning {
        color: #92400e;
        background: #fef3c7;
    }

    .pro-activity-badge.danger {
        color: #b91c1c;
        background: #fee2e2;
    }

    .pro-activity-badge.neutral {
        color: #334155;
        background: #e2e8f0;
    }

.pro-activity-details {
    margin-top: .75rem;
}

    .pro-activity-details summary {
        width: fit-content;
        min-height: 34px;
        display: inline-flex;
        align-items: center;
        padding: .35rem .75rem;
        border-radius: 999px;
        color: #1d4ed8;
        background: #eff6ff;
        font-size: .76rem;
        font-weight: 900;
        cursor: pointer;
        list-style: none;
    }

        .pro-activity-details summary::-webkit-details-marker {
            display: none;
        }

        .pro-activity-details summary::after {
            content: "⌄";
            margin-left: .45rem;
            transition: transform .18s ease;
        }

    .pro-activity-details[open] summary::after {
        transform: rotate(180deg);
    }

.pro-activity-change-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    margin-top: .75rem;
}

.pro-activity-change {
    min-width: 0;
    padding: .7rem;
    border-radius: 16px;
    background: #f8fafc;
}

    .pro-activity-change small {
        display: block;
        margin-bottom: .25rem;
        color: #64748b;
        font-size: .64rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-activity-change strong,
    .pro-activity-change span {
        color: #0f172a;
        font-size: .8rem;
        font-weight: 800;
        overflow-wrap: anywhere;
    }

    .pro-activity-change.added {
        background: #ecfdf5;
    }

    .pro-activity-change.deleted {
        background: #fef2f2;
    }

    .pro-activity-change.modified {
        background: #fffbeb;
    }

    .pro-activity-change .old {
        color: #b91c1c;
    }

    .pro-activity-change .new {
        color: #047857;
    }

    .pro-activity-change .arrow {
        margin-inline: .35rem;
        color: #64748b;
    }

.pro-activity-empty {
    display: grid;
    place-items: center;
    gap: .25rem;
    padding: 2.5rem 1rem;
    color: #64748b;
    text-align: center;
}

    .pro-activity-empty span {
        font-size: 1.6rem;
    }

    .pro-activity-empty strong {
        color: #0f172a;
        font-size: 1rem;
        font-weight: 900;
    }

    .pro-activity-empty small {
        max-width: 280px;
        line-height: 1.4;
    }

@media (max-width: 992px) {
    .pro-activity-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pro-activity-search,
    .pro-activity-filter-actions {
        grid-column: span 2;
    }

    .pro-activity-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .pro-activity-filter,
    .pro-activity-card,
    .pro-activity-empty {
        border-radius: 22px;
    }

    .pro-activity-filter-form,
    .pro-activity-summary,
    .pro-activity-change-grid {
        grid-template-columns: 1fr;
    }

    .pro-activity-search,
    .pro-activity-filter-actions {
        grid-column: auto;
    }

    .pro-activity-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .pro-activity-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .pro-activity-card-head {
        align-items: flex-start;
    }

    .pro-activity-meta span {
        max-width: 100%;
    }
}

/* =========================================================
   MOBILE BOTTOM NAV - ROLE-AWARE ITEM COUNT OVERRIDE
   Works with --mobile-nav-count from _MobileBottomNav.cshtml
========================================================= */

@media (max-width: 768px) {
    .pro-mobile-bottom-nav {
        grid-template-columns: repeat(var(--mobile-nav-count, 5), minmax(0, 1fr)) !important;
    }
}

/* =========================================================
   STOCKRULER MASTER DATA FORMS
   Used by Branches, Units, Suppliers, Customers and Users
========================================================= */

.pro-master-form-shell {
    display: grid;
    gap: 1rem;
}

.pro-master-form-card {
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.pro-master-form-section {
    display: grid;
    gap: .75rem;
}

.pro-master-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.pro-master-field {
    min-width: 0;
}

    .pro-master-field.full {
        grid-column: 1 / -1;
    }

    .pro-master-field label {
        display: block;
        margin-bottom: .28rem;
        color: #475569;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-master-field .form-control,
    .pro-master-field .form-select {
        min-height: 46px;
        border-radius: 16px;
        border-color: rgba(148, 163, 184, .34);
        font-size: .9rem;
    }

    .pro-master-field textarea.form-control {
        min-height: 92px;
    }

.pro-master-help {
    margin-top: .28rem;
    color: #64748b;
    font-size: .76rem;
    line-height: 1.4;
}

.pro-master-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.pro-master-check-card {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .8rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 18px;
    background: #ffffff;
}

    .pro-master-check-card input {
        width: 1.1rem;
        height: 1.1rem;
    }

    .pro-master-check-card strong {
        display: block;
        color: #0f172a;
        font-size: .86rem;
        font-weight: 900;
    }

    .pro-master-check-card small {
        display: block;
        color: #64748b;
        font-size: .74rem;
    }

.pro-master-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .55rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, .16);
}

    .pro-master-actions .btn {
        min-height: 42px;
        border-radius: 999px;
        font-weight: 800;
    }

.pro-master-alert {
    padding: .85rem;
    border: 1px solid rgba(59, 130, 246, .18);
    border-radius: 20px;
    color: #1e40af;
    background: #eff6ff;
    font-size: .86rem;
    line-height: 1.45;
}

@media (max-width: 768px) {
    .pro-master-form-card {
        padding: .85rem;
        border-radius: 22px;
    }

    .pro-master-form-grid,
    .pro-master-option-grid {
        grid-template-columns: 1fr;
    }

    .pro-master-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

        .pro-master-actions .btn {
            width: 100%;
        }
}

/* =========================================================
   STOCKRULER BRANCH REQUIRED NOTICE
========================================================= */

.pro-branch-required-alert {
    margin-bottom: 1rem;
    padding: .9rem;
    border: 1px solid rgba(245, 158, 11, .3);
    border-radius: 22px;
    background: linear-gradient(135deg, #fffbeb, #ffffff);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

    .pro-branch-required-alert > div {
        display: flex;
        align-items: center;
        gap: .75rem;
    }

    .pro-branch-required-alert span {
        width: 44px;
        height: 44px;
        min-width: 44px;
        display: grid;
        place-items: center;
        border-radius: 16px;
        background: #fef3c7;
        font-size: 1.25rem;
    }

    .pro-branch-required-alert strong {
        display: block;
        color: #92400e;
        font-size: .95rem;
        font-weight: 900;
    }

    .pro-branch-required-alert small {
        display: block;
        margin-top: .15rem;
        color: #64748b;
        font-size: .78rem;
        line-height: 1.4;
    }

@media (max-width: 560px) {
    .pro-branch-required-alert {
        border-radius: 20px;
    }

        .pro-branch-required-alert > div {
            align-items: flex-start;
        }
}

/* =========================================================
   STOCKRULER STAFF MANAGEMENT
========================================================= */

.pro-staff-shell {
    display: grid;
    gap: 1rem;
}

.pro-staff-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

    .pro-staff-summary article,
    .pro-staff-card {
        border: 1px solid rgba(148, 163, 184, .16);
        border-radius: 22px;
        background: #ffffff;
        box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    }

    .pro-staff-summary article {
        padding: .9rem;
    }

        .pro-staff-summary article.success {
            background: linear-gradient(135deg, #ecfdf5, #ffffff);
        }

        .pro-staff-summary article.warning {
            background: linear-gradient(135deg, #fffbeb, #ffffff);
        }

    .pro-staff-summary span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-staff-summary strong {
        display: block;
        margin-top: .2rem;
        color: #0f172a;
        font-size: 1.15rem;
        font-weight: 900;
    }

    .pro-staff-summary small {
        color: #64748b;
        font-size: .74rem;
    }

.pro-staff-mobile-list {
    display: grid;
    gap: .75rem;
}

.pro-staff-card {
    padding: .85rem;
}

    .pro-staff-card.inactive {
        opacity: .78;
    }

.pro-staff-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

    .pro-staff-card-top strong {
        color: #0f172a;
        font-size: .95rem;
        font-weight: 900;
    }

    .pro-staff-card-top small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .78rem;
    }

.pro-staff-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

    .pro-staff-status.active {
        color: #047857;
        background: #d1fae5;
    }

    .pro-staff-status.inactive {
        color: #475569;
        background: #e2e8f0;
    }

.pro-staff-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    margin-top: .75rem;
}

    .pro-staff-meta > div {
        min-width: 0;
        padding: .6rem;
        border-radius: 16px;
        background: #f8fafc;
    }

    .pro-staff-meta small {
        display: block;
        margin-bottom: .16rem;
        color: #64748b;
        font-size: .62rem;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .pro-staff-meta strong {
        display: block;
        overflow: hidden;
        color: #0f172a;
        font-size: .8rem;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.pro-staff-table {
    margin-bottom: 0;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 22px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

    .pro-staff-table thead th {
        color: #64748b;
        font-size: .72rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .pro-staff-table tbody td {
        vertical-align: middle;
        font-size: .86rem;
    }

@media (max-width: 992px) {
    .pro-staff-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .pro-staff-summary,
    .pro-staff-meta {
        grid-template-columns: 1fr;
    }

    .pro-staff-card {
        border-radius: 20px;
    }
}

/* =========================================================
   STOCKRULER PAYROLL
========================================================= */

.pro-payroll-shell {
    display: grid;
    gap: 1rem;
}

.pro-payroll-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

    .pro-payroll-summary article,
    .pro-payroll-card {
        border: 1px solid rgba(148, 163, 184, .16);
        border-radius: 22px;
        background: #ffffff;
        box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    }

    .pro-payroll-summary article {
        padding: .9rem;
    }

        .pro-payroll-summary article.success {
            background: linear-gradient(135deg, #ecfdf5, #ffffff);
        }

    .pro-payroll-summary span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-payroll-summary strong {
        display: block;
        margin-top: .2rem;
        color: #0f172a;
        font-size: 1.1rem;
        font-weight: 900;
    }

    .pro-payroll-summary small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .74rem;
    }

.pro-payroll-mobile-list {
    display: grid;
    gap: .75rem;
}

.pro-payroll-card {
    padding: .85rem;
}

.pro-payroll-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

    .pro-payroll-card-top strong {
        color: #0f172a;
        font-size: .95rem;
        font-weight: 900;
    }

    .pro-payroll-card-top small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .78rem;
    }

    .pro-payroll-card-top span {
        display: inline-flex;
        align-items: center;
        min-height: 28px;
        padding: .25rem .65rem;
        border-radius: 999px;
        color: #047857;
        background: #d1fae5;
        font-size: .72rem;
        font-weight: 900;
        white-space: nowrap;
    }

.pro-payroll-amount {
    margin-top: .75rem;
    color: #047857;
    font-size: 1.1rem;
    font-weight: 900;
}

.pro-payroll-breakdown {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
    margin-top: .75rem;
}

    .pro-payroll-breakdown > div {
        min-width: 0;
        padding: .6rem;
        border-radius: 16px;
        background: #f8fafc;
    }

    .pro-payroll-breakdown small {
        display: block;
        margin-bottom: .16rem;
        color: #64748b;
        font-size: .62rem;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .pro-payroll-breakdown strong {
        display: block;
        overflow: hidden;
        color: #0f172a;
        font-size: .8rem;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.pro-payroll-table {
    margin-bottom: 0;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 22px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

    .pro-payroll-table thead th {
        color: #64748b;
        font-size: .72rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .pro-payroll-table tbody td {
        vertical-align: middle;
        font-size: .86rem;
    }

@media (max-width: 768px) {
    .pro-payroll-summary {
        grid-template-columns: 1fr;
    }

    .pro-payroll-breakdown {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   STOCKRULER PRODUCTION MODULE
========================================================= */

.pro-production-shell {
    display: grid;
    gap: 1rem;
}

.pro-production-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

    .pro-production-summary article,
    .pro-production-card {
        border: 1px solid rgba(148, 163, 184, .16);
        border-radius: 22px;
        background: #ffffff;
        box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    }

    .pro-production-summary article {
        padding: .9rem;
    }

        .pro-production-summary article.success {
            background: linear-gradient(135deg, #ecfdf5, #ffffff);
        }

    .pro-production-summary span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-production-summary strong {
        display: block;
        margin-top: .2rem;
        color: #0f172a;
        font-size: 1.15rem;
        font-weight: 900;
    }

    .pro-production-summary small {
        color: #64748b;
        font-size: .74rem;
    }

.pro-production-mobile-list {
    display: grid;
    gap: .75rem;
}

.pro-production-card {
    padding: .85rem;
}

.pro-production-card-top {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
}

    .pro-production-card-top strong {
        color: #0f172a;
        font-size: .95rem;
        font-weight: 900;
    }

    .pro-production-card-top small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .78rem;
    }

    .pro-production-card-top span {
        min-height: 28px;
        display: inline-flex;
        align-items: center;
        padding: .25rem .65rem;
        border-radius: 999px;
        color: #047857;
        background: #d1fae5;
        font-size: .72rem;
        font-weight: 900;
        white-space: nowrap;
    }

.pro-production-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
    margin-top: .75rem;
}

    .pro-production-meta > div {
        min-width: 0;
        padding: .6rem;
        border-radius: 16px;
        background: #f8fafc;
    }

    .pro-production-meta small {
        display: block;
        margin-bottom: .16rem;
        color: #64748b;
        font-size: .62rem;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .pro-production-meta strong {
        display: block;
        overflow: hidden;
        color: #0f172a;
        font-size: .8rem;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.pro-production-table {
    margin-bottom: 0;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 22px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

    .pro-production-table thead th {
        color: #64748b;
        font-size: .72rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .pro-production-table tbody td {
        vertical-align: middle;
        font-size: .86rem;
    }

@media (max-width: 768px) {
    .pro-production-summary,
    .pro-production-meta {
        grid-template-columns: 1fr;
    }

    .pro-production-card-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================================
   STOCKRULER RECIPE SETUP
========================================================= */

.recipe-ingredient-list {
    display: grid;
    gap: .75rem;
}

.recipe-ingredient-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(160px, .6fr) auto;
    gap: .75rem;
    align-items: end;
    padding: .85rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 20px;
    background: #f8fafc;
}

    .recipe-ingredient-row .btn {
        min-height: 42px;
        border-radius: 999px;
        font-weight: 800;
    }

@media (max-width: 768px) {
    .recipe-ingredient-row {
        grid-template-columns: 1fr;
        border-radius: 18px;
    }

        .recipe-ingredient-row .btn {
            width: 100%;
        }
}

/* =========================================================
   STOCKRULER PAYMENT HISTORY
========================================================= */

.pro-payment-history-shell {
    display: grid;
    gap: 1rem;
}

.pro-payment-method-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

    .pro-payment-method-summary article {
        min-width: 0;
        padding: .9rem;
        border: 1px solid rgba(148, 163, 184, .16);
        border-radius: 22px;
        background: #ffffff;
        box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    }

        .pro-payment-method-summary article.cash {
            background: linear-gradient(135deg, #ecfdf5, #ffffff);
        }

        .pro-payment-method-summary article.transfer {
            background: linear-gradient(135deg, #eff6ff, #ffffff);
        }

        .pro-payment-method-summary article.pos {
            background: linear-gradient(135deg, #f5f3ff, #ffffff);
        }

    .pro-payment-method-summary span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-payment-method-summary strong {
        display: block;
        overflow: hidden;
        margin-top: .2rem;
        color: #0f172a;
        font-size: clamp(1rem, 2vw, 1.25rem);
        font-weight: 900;
        letter-spacing: -.03em;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pro-payment-method-summary small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .74rem;
    }

@media (max-width: 992px) {
    .pro-payment-method-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .pro-payment-method-summary {
        grid-template-columns: 1fr;
    }

        .pro-payment-method-summary article {
            border-radius: 20px;
        }
}

/* =========================================================
   STOCKRULER CUSTOMER DETAILS
========================================================= */

.pro-customer-detail-shell {
    display: grid;
    gap: 1rem;
}

.pro-customer-profile-card,
.pro-customer-payment-card {
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.pro-customer-profile-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pro-customer-profile-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .85rem;
}

.pro-customer-avatar {
    width: 56px;
    height: 56px;
    min-width: 56px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    font-size: 1.3rem;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .22);
}

.pro-customer-profile-main h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    font-weight: 900;
    letter-spacing: -.03em;
}

.pro-customer-contact {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .35rem;
}

    .pro-customer-contact span {
        display: inline-flex;
        align-items: center;
        min-height: 28px;
        padding: .25rem .6rem;
        border-radius: 999px;
        color: #475569;
        background: #f1f5f9;
        font-size: .74rem;
        font-weight: 800;
    }

.pro-customer-status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: .35rem .8rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 900;
}

    .pro-customer-status.clear {
        color: #047857;
        background: #d1fae5;
    }

    .pro-customer-status.owing {
        color: #b91c1c;
        background: #fee2e2;
    }

.pro-customer-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

    .pro-customer-kpi-grid article {
        min-width: 0;
        padding: .9rem;
        border: 1px solid rgba(148, 163, 184, .16);
        border-radius: 22px;
        background: #ffffff;
        box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    }

        .pro-customer-kpi-grid article.success {
            background: linear-gradient(135deg, #ecfdf5, #ffffff);
        }

        .pro-customer-kpi-grid article.danger {
            background: linear-gradient(135deg, #fef2f2, #ffffff);
        }

    .pro-customer-kpi-grid span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-customer-kpi-grid strong {
        display: block;
        overflow: hidden;
        margin-top: .2rem;
        color: #0f172a;
        font-size: clamp(1rem, 2vw, 1.25rem);
        font-weight: 900;
        letter-spacing: -.03em;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pro-customer-kpi-grid small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .74rem;
    }

.pro-customer-ledger-list {
    display: grid;
    gap: .65rem;
}

.pro-customer-ledger-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .75rem;
    align-items: center;
    padding: .8rem;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 18px;
    background: #ffffff;
}

    .pro-customer-ledger-item strong {
        color: #0f172a;
        font-weight: 900;
    }

    .pro-customer-ledger-item small {
        display: block;
        margin-top: .14rem;
        color: #64748b;
        font-size: .76rem;
    }

.pro-customer-ledger-money {
    text-align: right;
}

    .pro-customer-ledger-money strong {
        white-space: nowrap;
    }

@media (max-width: 992px) {
    .pro-customer-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pro-customer-ledger-item {
        grid-template-columns: 1fr;
    }

    .pro-customer-ledger-money {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .pro-customer-profile-card {
        align-items: flex-start;
        flex-direction: column;
        border-radius: 22px;
    }

    .pro-customer-profile-main {
        align-items: flex-start;
    }

    .pro-customer-kpi-grid {
        grid-template-columns: 1fr;
    }

    .pro-customer-avatar {
        width: 50px;
        height: 50px;
        min-width: 50px;
        border-radius: 19px;
    }
}

/* =========================================================
   STOCKRULER SUPPLIER DETAILS
========================================================= */

.pro-supplier-detail-shell {
    display: grid;
    gap: 1rem;
}

.pro-supplier-profile-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.pro-supplier-profile-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .85rem;
}

.pro-supplier-avatar {
    width: 56px;
    height: 56px;
    min-width: 56px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #16a34a, #047857);
    font-size: 1.3rem;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(22, 163, 74, .22);
}

.pro-supplier-profile-main h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    font-weight: 900;
    letter-spacing: -.03em;
}

.pro-supplier-contact {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .35rem;
}

    .pro-supplier-contact span {
        display: inline-flex;
        align-items: center;
        min-height: 28px;
        padding: .25rem .6rem;
        border-radius: 999px;
        color: #475569;
        background: #f1f5f9;
        font-size: .74rem;
        font-weight: 800;
    }

.pro-supplier-status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: .35rem .8rem;
    border-radius: 999px;
    color: #047857;
    background: #d1fae5;
    font-size: .78rem;
    font-weight: 900;
}

.pro-supplier-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

    .pro-supplier-kpi-grid article {
        min-width: 0;
        padding: .9rem;
        border: 1px solid rgba(148, 163, 184, .16);
        border-radius: 22px;
        background: #ffffff;
        box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    }

        .pro-supplier-kpi-grid article.success {
            background: linear-gradient(135deg, #ecfdf5, #ffffff);
        }

    .pro-supplier-kpi-grid span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-supplier-kpi-grid strong {
        display: block;
        overflow: hidden;
        margin-top: .2rem;
        color: #0f172a;
        font-size: clamp(1rem, 2vw, 1.25rem);
        font-weight: 900;
        letter-spacing: -.03em;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pro-supplier-kpi-grid small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .74rem;
    }

.pro-supplier-ledger-list {
    display: grid;
    gap: .65rem;
}

.pro-supplier-ledger-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: .75rem;
    align-items: center;
    padding: .8rem;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 18px;
    background: #ffffff;
}

    .pro-supplier-ledger-item strong {
        color: #0f172a;
        font-weight: 900;
    }

    .pro-supplier-ledger-item small {
        display: block;
        margin-top: .14rem;
        color: #64748b;
        font-size: .76rem;
    }

.pro-supplier-ledger-money {
    text-align: right;
}

    .pro-supplier-ledger-money strong {
        white-space: nowrap;
    }

@media (max-width: 992px) {
    .pro-supplier-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pro-supplier-ledger-item {
        grid-template-columns: 1fr;
    }

    .pro-supplier-ledger-money {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .pro-supplier-profile-card {
        align-items: flex-start;
        flex-direction: column;
        border-radius: 22px;
    }

    .pro-supplier-profile-main {
        align-items: flex-start;
    }

    .pro-supplier-kpi-grid {
        grid-template-columns: 1fr;
    }

    .pro-supplier-avatar {
        width: 50px;
        height: 50px;
        min-width: 50px;
        border-radius: 19px;
    }
}

/* =========================================================
   STOCKRULER PRODUCT DETAILS
========================================================= */

.pro-product-detail-shell {
    display: grid;
    gap: 1rem;
}

.pro-product-profile-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.pro-product-profile-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .85rem;
}

.pro-product-avatar {
    width: 56px;
    height: 56px;
    min-width: 56px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    font-size: 1.3rem;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .22);
}

.pro-product-profile-main h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    font-weight: 900;
    letter-spacing: -.03em;
}

.pro-product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .35rem;
}

    .pro-product-tags span {
        display: inline-flex;
        align-items: center;
        min-height: 28px;
        padding: .25rem .6rem;
        border-radius: 999px;
        color: #475569;
        background: #f1f5f9;
        font-size: .74rem;
        font-weight: 800;
    }

.pro-product-status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: .35rem .8rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 900;
}

    .pro-product-status.success {
        color: #047857;
        background: #d1fae5;
    }

    .pro-product-status.danger {
        color: #b91c1c;
        background: #fee2e2;
    }

.pro-product-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

    .pro-product-kpi-grid article {
        min-width: 0;
        padding: .9rem;
        border: 1px solid rgba(148, 163, 184, .16);
        border-radius: 22px;
        background: #ffffff;
        box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    }

        .pro-product-kpi-grid article.success {
            background: linear-gradient(135deg, #ecfdf5, #ffffff);
        }

        .pro-product-kpi-grid article.danger {
            background: linear-gradient(135deg, #fef2f2, #ffffff);
        }

        .pro-product-kpi-grid article.warning {
            background: linear-gradient(135deg, #fffbeb, #ffffff);
        }

    .pro-product-kpi-grid span,
    .pro-product-unit-card span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-product-kpi-grid strong,
    .pro-product-unit-card strong {
        display: block;
        overflow: hidden;
        margin-top: .2rem;
        color: #0f172a;
        font-size: clamp(.95rem, 2vw, 1.2rem);
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pro-product-kpi-grid small,
    .pro-product-unit-card small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .74rem;
    }

.pro-product-unit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.pro-product-unit-card {
    display: grid;
    gap: .65rem;
    padding: .85rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
}

.pro-product-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 992px) {
    .pro-product-kpi-grid,
    .pro-product-unit-grid,
    .pro-product-two-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .pro-product-profile-card {
        align-items: flex-start;
        flex-direction: column;
        border-radius: 22px;
    }

    .pro-product-profile-main {
        align-items: flex-start;
    }

    .pro-product-kpi-grid,
    .pro-product-unit-grid,
    .pro-product-two-column {
        grid-template-columns: 1fr;
    }

    .pro-product-avatar {
        width: 50px;
        height: 50px;
        min-width: 50px;
        border-radius: 19px;
    }
}

/* =========================================================
   STOCKRULER THERMAL RECEIPT PRINTING
   Supports 80mm and 58mm browser-based receipt printers
========================================================= */

.receipt-print-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

    .receipt-print-actions .btn {
        min-height: 42px;
        border-radius: 999px;
        font-weight: 800;
    }

@media print {
    @page {
        size: auto;
        margin: 0;
    }

    html,
    body {
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        color: #000000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

        body * {
            visibility: hidden !important;
        }

    #printableReceipt,
    #printableReceipt * {
        visibility: visible !important;
    }

    .no-print,
    .receipt-toolbar,
    .sr-navbar,
    .sr-sidebar,
    .pro-mobile-bottom-nav,
    .footer,
    #scrollTopBtn,
    #overlay,
    .sr-overlay,
    .btn,
    button {
        display: none !important;
        visibility: hidden !important;
    }

    .sr-app,
    .sr-content,
    .sr-main,
    main,
    .container,
    .container-fluid,
    .receipt-page {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #ffffff !important;
    }

    #printableReceipt {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        display: block !important;
        width: 80mm !important;
        max-width: 80mm !important;
        margin: 0 auto !important;
        padding: 2mm 3mm !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #ffffff !important;
        color: #000000 !important;
        font-family: Arial, "Segoe UI", sans-serif !important;
        font-size: 11px !important;
        line-height: 1.25 !important;
    }

    html[data-receipt-size="58"] #printableReceipt {
        width: 58mm !important;
        max-width: 58mm !important;
        padding: 2mm !important;
        font-size: 10px !important;
    }

    .receipt-header {
        display: block !important;
        margin: 0 0 5px !important;
        padding: 0 !important;
        text-align: center !important;
    }

    .receipt-brand-mark {
        display: none !important;
    }

    .receipt-header h1 {
        margin: 0 !important;
        padding: 0 !important;
        color: #000000 !important;
        font-size: 15px !important;
        font-weight: 900 !important;
        line-height: 1.15 !important;
        text-align: center !important;
        text-transform: uppercase !important;
    }

    html[data-receipt-size="58"] .receipt-header h1 {
        font-size: 13px !important;
    }

    .receipt-header p {
        margin: 2px 0 0 !important;
        color: #000000 !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }

    .receipt-meta {
        display: block !important;
        margin: 5px 0 !important;
        padding: 0 !important;
    }

        .receipt-meta > div {
            display: flex !important;
            justify-content: space-between !important;
            gap: 6px !important;
            width: 100% !important;
            margin: 0 !important;
            padding: 1px 0 !important;
            border: 0 !important;
            border-radius: 0 !important;
            background: transparent !important;
        }

        .receipt-meta small {
            display: inline !important;
            margin: 0 !important;
            color: #000000 !important;
            font-size: 9px !important;
            font-weight: 700 !important;
            letter-spacing: 0 !important;
            text-transform: none !important;
        }

            .receipt-meta small::after {
                content: ":";
            }

        .receipt-meta strong {
            display: inline !important;
            max-width: 38mm !important;
            overflow: visible !important;
            color: #000000 !important;
            font-size: 9px !important;
            font-weight: 800 !important;
            text-align: right !important;
            white-space: normal !important;
            overflow-wrap: anywhere !important;
        }

    html[data-receipt-size="58"] .receipt-meta strong {
        max-width: 28mm !important;
    }

    .receipt-status,
    .receipt-status.paid,
    .receipt-status.unpaid {
        padding: 0 !important;
        border-radius: 0 !important;
        color: #000000 !important;
        background: transparent !important;
    }

    .receipt-divider {
        height: 0 !important;
        margin: 5px 0 !important;
        border-top: 1px dashed #000000 !important;
        background: transparent !important;
    }

    .receipt-items {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .receipt-items-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 14mm 20mm !important;
        gap: 2mm !important;
        margin-bottom: 2px !important;
        padding-bottom: 2px !important;
        border-bottom: 1px dashed #000000 !important;
        color: #000000 !important;
        font-size: 9px !important;
        font-weight: 900 !important;
        letter-spacing: 0 !important;
        text-transform: uppercase !important;
    }

    html[data-receipt-size="58"] .receipt-items-head {
        grid-template-columns: minmax(0, 1fr) 10mm 16mm !important;
        gap: 1mm !important;
        font-size: 8px !important;
    }

    .receipt-item {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 14mm 20mm !important;
        gap: 2mm !important;
        align-items: start !important;
        margin: 0 !important;
        padding: 2px 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    html[data-receipt-size="58"] .receipt-item {
        grid-template-columns: minmax(0, 1fr) 10mm 16mm !important;
        gap: 1mm !important;
    }

    .receipt-item div {
        min-width: 0 !important;
    }

    .receipt-item strong {
        color: #000000 !important;
        font-size: 10px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    html[data-receipt-size="58"] .receipt-item strong {
        font-size: 9px !important;
    }

    .receipt-item small {
        display: block !important;
        margin-top: 1px !important;
        color: #000000 !important;
        font-size: 8px !important;
        line-height: 1.15 !important;
        white-space: normal !important;
    }

    .receipt-item > span,
    .receipt-item > strong:last-child,
    .receipt-items-head span:nth-child(2),
    .receipt-items-head span:nth-child(3) {
        text-align: right !important;
    }

    .receipt-item > span {
        color: #000000 !important;
        font-size: 9px !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
    }

    .receipt-item > strong:last-child {
        font-size: 9px !important;
        white-space: nowrap !important;
    }

    html[data-receipt-size="58"] .receipt-item > span,
    html[data-receipt-size="58"] .receipt-item > strong:last-child {
        font-size: 8px !important;
    }

    .receipt-totals {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 4px 0 0 !important;
        padding: 0 !important;
    }

        .receipt-totals > div {
            display: flex !important;
            justify-content: space-between !important;
            gap: 6px !important;
            padding: 1px 0 !important;
        }

        .receipt-totals span {
            color: #000000 !important;
            font-size: 10px !important;
            font-weight: 800 !important;
        }

        .receipt-totals strong {
            color: #000000 !important;
            font-size: 10px !important;
            font-weight: 900 !important;
            text-align: right !important;
            white-space: nowrap !important;
        }

    .receipt-balance {
        margin-top: 2px !important;
        padding-top: 3px !important;
        border-top: 1px dashed #000000 !important;
    }

        .receipt-balance.has-balance strong,
        .receipt-balance.settled strong {
            color: #000000 !important;
        }

    .receipt-payments {
        display: block !important;
    }

        .receipt-payments > strong {
            display: block !important;
            margin-bottom: 2px !important;
            color: #000000 !important;
            font-size: 10px !important;
            font-weight: 900 !important;
        }

        .receipt-payments > div {
            display: grid !important;
            grid-template-columns: 1fr auto auto !important;
            gap: 4px !important;
            padding: 1px 0 !important;
            border-radius: 0 !important;
            background: transparent !important;
        }

        .receipt-payments span,
        .receipt-payments strong {
            color: #000000 !important;
            font-size: 8px !important;
            font-weight: 800 !important;
        }

    .receipt-footer {
        margin-top: 6px !important;
        padding-top: 5px !important;
        border-top: 1px dashed #000000 !important;
        text-align: center !important;
    }

        .receipt-footer p {
            margin: 0 !important;
            color: #000000 !important;
            font-size: 10px !important;
            font-weight: 900 !important;
            line-height: 1.25 !important;
        }

        .receipt-footer small {
            display: block !important;
            margin-top: 2px !important;
            color: #000000 !important;
            font-size: 8px !important;
        }
}

.thermal-print-hint {
    width: 100%;
    margin-top: .5rem;
    color: #64748b;
    font-size: .78rem;
    text-align: right;
}

@media (max-width: 768px) {
    .thermal-print-hint {
        text-align: left;
    }
}

/* =========================================================
   RICH RECEIPT BUSINESS HEADER
========================================================= */

.receipt-branch-name {
    margin: .15rem 0 0;
    color: #475569;
    font-size: .85rem;
    font-weight: 800;
}

.receipt-business-line {
    max-width: 100%;
    margin: .12rem 0 0;
    color: #64748b;
    font-size: .78rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

/* =========================================================
   RECEIPT PAGE - MOBILE SCREEN FIX
   Fixes squeezed business address and receipt header layout
========================================================= */

@media screen and (max-width: 768px) {
    .receipt-page {
        width: 100% !important;
        max-width: 100% !important;
        padding: .75rem .65rem 6rem !important;
        overflow-x: hidden !important;
    }

    .receipt-toolbar {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: .65rem !important;
        width: 100% !important;
        margin-bottom: .85rem !important;
    }

        .receipt-toolbar > a {
            width: 100% !important;
            min-height: 44px !important;
            border-radius: 999px !important;
            font-weight: 800 !important;
        }

    .receipt-print-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: .5rem !important;
        width: 100% !important;
    }

        .receipt-print-actions .btn {
            width: 100% !important;
            min-height: 44px !important;
            padding-inline: .5rem !important;
            border-radius: 999px !important;
            font-size: .86rem !important;
            font-weight: 900 !important;
            white-space: nowrap !important;
        }

    .thermal-print-hint {
        width: 100% !important;
        margin: .25rem 0 .75rem !important;
        color: #64748b !important;
        font-size: .78rem !important;
        line-height: 1.45 !important;
        text-align: left !important;
    }

    #printableReceipt {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 1rem .85rem !important;
        border-radius: 24px !important;
        overflow: hidden !important;
    }

    .receipt-header {
        display: grid !important;
        grid-template-columns: 52px minmax(0, 1fr) !important;
        grid-template-areas:
            "icon name"
            "icon branch"
            "info info" !important;
        gap: .15rem .7rem !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: .9rem !important;
        padding: 0 !important;
        text-align: left !important;
    }

    .receipt-brand-mark {
        grid-area: icon !important;
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        display: grid !important;
        place-items: center !important;
        border-radius: 18px !important;
    }

    .receipt-header h1 {
        grid-area: name !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        color: #0f172a !important;
        font-size: 1.08rem !important;
        font-weight: 900 !important;
        line-height: 1.15 !important;
        text-align: left !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    .receipt-branch-name {
        grid-area: branch !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: .1rem 0 0 !important;
        color: #475569 !important;
        font-size: .8rem !important;
        font-weight: 900 !important;
        text-align: left !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    .receipt-business-line {
        grid-column: 1 / -1 !important;
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: .15rem 0 0 !important;
        color: #64748b !important;
        font-size: .78rem !important;
        line-height: 1.35 !important;
        text-align: left !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        writing-mode: horizontal-tb !important;
    }

    .receipt-meta {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: .5rem !important;
        width: 100% !important;
        margin-top: .75rem !important;
    }

        .receipt-meta > div {
            width: 100% !important;
            min-width: 0 !important;
            padding: .7rem .75rem !important;
            border-radius: 16px !important;
        }

        .receipt-meta small,
        .receipt-meta strong {
            width: 100% !important;
            max-width: 100% !important;
            min-width: 0 !important;
            white-space: normal !important;
            word-break: normal !important;
            overflow-wrap: break-word !important;
        }

    .receipt-items-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 54px 92px !important;
        gap: .35rem !important;
        width: 100% !important;
        font-size: .72rem !important;
    }

    .receipt-item {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 54px 92px !important;
        gap: .35rem !important;
        width: 100% !important;
        align-items: start !important;
        padding: .75rem .65rem !important;
    }

        .receipt-item div,
        .receipt-item strong,
        .receipt-item small {
            min-width: 0 !important;
            max-width: 100% !important;
            white-space: normal !important;
            word-break: normal !important;
            overflow-wrap: break-word !important;
        }

        .receipt-item > span,
        .receipt-item > strong:last-child {
            text-align: right !important;
            white-space: nowrap !important;
        }

    .receipt-totals {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
    }

        .receipt-totals > div,
        .receipt-payments > div {
            width: 100% !important;
            min-width: 0 !important;
        }

    .receipt-footer {
        width: 100% !important;
        text-align: center !important;
    }

        .receipt-footer p,
        .receipt-footer small {
            width: 100% !important;
            max-width: 100% !important;
            white-space: normal !important;
            word-break: normal !important;
            overflow-wrap: break-word !important;
        }
}

@media screen and (max-width: 420px) {
    .receipt-items-head {
        grid-template-columns: minmax(0, 1fr) 44px 78px !important;
        font-size: .68rem !important;
    }

    .receipt-item {
        grid-template-columns: minmax(0, 1fr) 44px 78px !important;
        padding: .7rem .55rem !important;
    }

        .receipt-item > span,
        .receipt-item > strong:last-child {
            font-size: .78rem !important;
        }

    .receipt-print-actions {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================
   STOCKRULER PRODUCT UNIT PRICING ASSISTANT
========================================================= */

.product-unit-pricing-shell .pro-readonly-box {
    min-height: 48px;
    display: grid;
    align-content: center;
    gap: .12rem;
    padding: .7rem .8rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 16px;
    background: #f8fafc;
}

    .product-unit-pricing-shell .pro-readonly-box strong {
        color: #0f172a;
        font-weight: 900;
    }

    .product-unit-pricing-shell .pro-readonly-box small {
        color: #64748b;
        font-size: .76rem;
    }

.product-pricing-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.pro-calculated-card {
    min-height: 92px;
    display: grid;
    align-content: center;
    gap: .15rem;
    padding: .85rem;
    border: 1px solid rgba(37, 99, 235, .16);
    border-radius: 20px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
}

    .pro-calculated-card span {
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-calculated-card strong {
        color: #1d4ed8;
        font-size: 1.15rem;
        font-weight: 900;
    }

    .pro-calculated-card small {
        color: #64748b;
        font-size: .74rem;
        line-height: 1.35;
    }

.pricing-foundation-panel {
    display: none;
}

@media (max-width: 768px) {
    .product-pricing-preview-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   STOCKRULER PRODUCT EDIT / FRIENDLY QUANTITY EXPERIENCE
========================================================= */

.pro-product-edit-shell {
    display: grid;
    gap: 1rem;
}

.pro-product-edit-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

    .pro-product-edit-summary article {
        min-width: 0;
        padding: .9rem;
        border: 1px solid rgba(148, 163, 184, .16);
        border-radius: 22px;
        background: #ffffff;
        box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    }

        .pro-product-edit-summary article.success {
            background: linear-gradient(135deg, #ecfdf5, #ffffff);
        }

        .pro-product-edit-summary article.warning {
            background: linear-gradient(135deg, #fffbeb, #ffffff);
        }

    .pro-product-edit-summary span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pro-product-edit-summary strong {
        display: block;
        overflow: hidden;
        margin-top: .2rem;
        color: #0f172a;
        font-size: clamp(.95rem, 2vw, 1.2rem);
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pro-product-edit-summary small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .74rem;
        line-height: 1.35;
    }

@media (max-width: 992px) {
    .pro-product-edit-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .pro-product-edit-summary {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   STOCKRULER PURCHASE COST GUIDE
========================================================= */

.pro-purchase-cost-note {
    display: grid;
    gap: .18rem;
    margin: .65rem 0;
    padding: .8rem .9rem;
    border: 1px solid rgba(37, 99, 235, .14);
    border-radius: 18px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
}

    .pro-purchase-cost-note strong {
        color: #1d4ed8;
        font-size: .86rem;
        font-weight: 900;
    }

    .pro-purchase-cost-note small {
        color: #475569;
        font-size: .78rem;
        line-height: 1.45;
    }

.transaction-row-note {
    display: block;
    width: 100%;
    margin-top: .45rem;
    padding: .45rem .6rem;
    border-radius: 14px;
    background: #f8fafc;
    color: #475569;
    font-size: .76rem;
    line-height: 1.4;
}

    .transaction-row-note strong {
        color: #0f172a;
        font-weight: 900;
    }

/* =========================================================
   TRANSACTION UNIT HELPER
========================================================= */

.pro-purchase-cost-note {
    display: grid;
    gap: .18rem;
    margin: .65rem 0;
    padding: .8rem .9rem;
    border: 1px solid rgba(37, 99, 235, .14);
    border-radius: 18px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
}

    .pro-purchase-cost-note strong {
        color: #1d4ed8;
        font-size: .86rem;
        font-weight: 900;
    }

    .pro-purchase-cost-note small {
        color: #475569;
        font-size: .78rem;
        line-height: 1.45;
    }

.transaction-unit-helper-note {
    display: block;
    width: 100%;
    margin-top: .45rem;
    padding: .45rem .6rem;
    border-radius: 14px;
    background: #f8fafc;
    color: #475569;
    font-size: .76rem;
    line-height: 1.4;
}

    .transaction-unit-helper-note strong {
        color: #0f172a;
        font-weight: 900;
    }

    .transaction-unit-helper-note.d-none {
        display: none !important;
    }

/* =========================================================
   SALES STOCK WARNING
========================================================= */

.sales-stock-warning-note {
    display: block;
    width: 100%;
    margin-top: .4rem;
    padding: .45rem .6rem;
    border-radius: 14px;
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.4;
}

    .sales-stock-warning-note strong {
        font-weight: 900;
    }

    .sales-stock-warning-note.is-muted {
        color: #475569;
        background: #f8fafc;
    }

    .sales-stock-warning-note.is-ok {
        color: #047857;
        background: #ecfdf5;
    }

    .sales-stock-warning-note.is-danger {
        color: #991b1b;
        background: #fef2f2;
        border: 1px solid rgba(239, 68, 68, .25);
    }

    .sales-stock-warning-note.d-none {
        display: none !important;
    }

/* =========================================================
   TRANSACTION ENTRY FIELD LABELS
========================================================= */

.txn-entry-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(92px, .45fr) 52px;
    gap: .5rem;
    align-items: end;
}

.txn-field-wrap {
    display: grid;
    gap: .25rem;
    min-width: 0;
}

.txn-field-label {
    margin: 0;
    color: #475569;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.txn-entry-grid .removeRow {
    min-height: 48px;
    border-radius: 16px;
}

@media (max-width: 520px) {
    .txn-entry-grid {
        grid-template-columns: 1fr;
    }

        .txn-entry-grid .removeRow {
            width: 100%;
        }
}

/* =========================================================
   STOCKRULER PRICING REVIEW
========================================================= */

.pricing-review-shell {
    display: grid;
    gap: 1rem;
}

.pricing-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .75rem;
}

.pricing-kpi-card {
    display: grid;
    gap: .12rem;
    min-width: 0;
    padding: .9rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 22px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .055);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

    .pricing-kpi-card:hover,
    .pricing-kpi-card.active {
        transform: translateY(-2px);
        border-color: rgba(37, 99, 235, .35);
        box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
    }

    .pricing-kpi-card span {
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .pricing-kpi-card strong {
        color: #0f172a;
        font-size: clamp(1.3rem, 2vw, 1.7rem);
        font-weight: 950;
        letter-spacing: -.04em;
    }

    .pricing-kpi-card small {
        color: #64748b;
        font-size: .74rem;
    }

    .pricing-kpi-card.danger {
        background: linear-gradient(135deg, #fef2f2, #ffffff);
    }

    .pricing-kpi-card.warning {
        background: linear-gradient(135deg, #fffbeb, #ffffff);
    }

    .pricing-kpi-card.healthy {
        background: linear-gradient(135deg, #ecfdf5, #ffffff);
    }

    .pricing-kpi-card.no-price {
        background: linear-gradient(135deg, #f8fafc, #ffffff);
    }

.pricing-review-card,
.pricing-table-card {
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .055);
}

.pricing-filter-form {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(220px, .8fr) auto;
    gap: .75rem;
    align-items: end;
}

.pricing-filter-field {
    display: grid;
    gap: .25rem;
}

    .pricing-filter-field label {
        color: #475569;
        font-size: .72rem;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

.pricing-filter-actions {
    display: flex;
    gap: .45rem;
}

    .pricing-filter-actions .btn {
        min-height: 42px;
        border-radius: 999px;
        font-weight: 800;
    }

.pricing-bulk-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: .9rem;
    padding: .75rem;
    border-radius: 18px;
    background: #f8fafc;
}

    .pricing-bulk-bar strong {
        color: #0f172a;
        font-weight: 950;
    }

    .pricing-bulk-bar span {
        color: #64748b;
        font-size: .82rem;
        font-weight: 700;
    }

    .pricing-bulk-bar .btn {
        border-radius: 999px;
        font-weight: 900;
    }

.pricing-mobile-list {
    display: none;
}

.pricing-mobile-card {
    display: grid;
    gap: .75rem;
    padding: .9rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

    .pricing-mobile-card.status-loss-risk {
        border-color: rgba(239, 68, 68, .25);
        background: linear-gradient(135deg, #fef2f2, #ffffff);
    }

    .pricing-mobile-card.status-low-margin {
        border-color: rgba(245, 158, 11, .28);
        background: linear-gradient(135deg, #fffbeb, #ffffff);
    }

    .pricing-mobile-card.status-healthy {
        border-color: rgba(16, 185, 129, .2);
        background: linear-gradient(135deg, #ecfdf5, #ffffff);
    }

.pricing-mobile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

    .pricing-mobile-head strong {
        color: #0f172a;
        font-size: 1rem;
        font-weight: 950;
    }

    .pricing-mobile-head small {
        display: block;
        color: #64748b;
        font-size: .76rem;
    }

.pricing-mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}

    .pricing-mobile-grid div {
        padding: .65rem;
        border-radius: 16px;
        background: rgba(255, 255, 255, .78);
        border: 1px solid rgba(148, 163, 184, .12);
    }

    .pricing-mobile-grid span {
        display: block;
        color: #64748b;
        font-size: .66rem;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .pricing-mobile-grid strong {
        display: block;
        margin-top: .15rem;
        color: #0f172a;
        font-size: .9rem;
        font-weight: 950;
    }

.pricing-message {
    margin: 0;
    color: #475569;
    font-size: .8rem;
    line-height: 1.45;
}

.pricing-card-actions,
.pricing-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .4rem;
}

    .pricing-card-actions .btn,
    .pricing-row-actions .btn {
        border-radius: 999px;
        font-weight: 850;
    }

.pricing-table {
    margin-bottom: 0;
}

    .pricing-table th {
        color: #64748b;
        font-size: .72rem;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .pricing-table td {
        vertical-align: middle;
    }

.pricing-empty-state {
    display: grid;
    place-items: center;
    gap: .25rem;
    min-height: 220px;
    padding: 2rem;
    border: 1px dashed rgba(148, 163, 184, .45);
    border-radius: 24px;
    background: #ffffff;
    text-align: center;
}

    .pricing-empty-state span {
        font-size: 2.2rem;
    }

    .pricing-empty-state strong {
        color: #0f172a;
        font-weight: 950;
    }

    .pricing-empty-state small {
        color: #64748b;
    }

@media (max-width: 1100px) {
    .pricing-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pricing-filter-form {
        grid-template-columns: 1fr;
    }

    .pricing-filter-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .pricing-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pricing-mobile-list {
        display: grid;
        gap: .75rem;
    }

    .pricing-table-card {
        display: none;
    }

    .pricing-bulk-bar {
        align-items: flex-start;
        flex-direction: column;
    }

        .pricing-bulk-bar form,
        .pricing-bulk-bar .btn {
            width: 100%;
        }

    .pricing-card-actions {
        justify-content: flex-start;
    }

        .pricing-card-actions form,
        .pricing-card-actions .btn {
            width: 100%;
        }
}

@media (max-width: 480px) {
    .pricing-kpi-grid,
    .pricing-mobile-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   POST-PURCHASE PRICING REVIEW CTA
========================================================= */

.pricing-review-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
    margin: 1rem 0;
    padding: .95rem 1rem;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 22px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

    .pricing-review-cta strong {
        display: block;
        color: #0f172a;
        font-size: .95rem;
        font-weight: 950;
    }

    .pricing-review-cta small {
        display: block;
        margin-top: .12rem;
        color: #475569;
        font-size: .8rem;
        line-height: 1.4;
    }

    .pricing-review-cta .btn {
        flex: 0 0 auto;
        min-height: 42px;
        border-radius: 999px;
        font-weight: 900;
    }

@media (max-width: 640px) {
    .pricing-review-cta {
        align-items: stretch;
        flex-direction: column;
    }

        .pricing-review-cta .btn {
            width: 100%;
        }
}

/* =========================================================
   PRODUCT DETAILS PRICING STATUS
========================================================= */

.pro-unit-pricing-status {
    display: grid;
    gap: .35rem;
    padding: .55rem .65rem;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, .14);
}

    .pro-unit-pricing-status .badge {
        width: fit-content;
        border-radius: 999px;
        font-weight: 900;
    }

    .pro-unit-pricing-status small {
        color: #64748b;
        font-size: .74rem;
        line-height: 1.35;
    }

.pro-unit-pricing-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
}

    .pro-unit-pricing-preview div {
        padding: .55rem;
        border-radius: 14px;
        background: #ffffff;
        border: 1px solid rgba(148, 163, 184, .12);
    }

    .pro-unit-pricing-preview span {
        display: block;
        color: #64748b;
        font-size: .64rem;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .pro-unit-pricing-preview strong {
        display: block;
        margin-top: .12rem;
        color: #0f172a;
        font-size: .88rem;
        font-weight: 950;
    }

@media (max-width: 480px) {
    .pro-unit-pricing-preview {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   SALES PRICE WARNING
========================================================= */

.sales-price-warning-note {
    display: block;
    width: 100%;
    margin-top: .4rem;
    padding: .45rem .6rem;
    border-radius: 14px;
    font-size: .74rem;
    font-weight: 750;
    line-height: 1.4;
}

    .sales-price-warning-note strong {
        font-weight: 950;
    }

    .sales-price-warning-note.is-ok {
        color: #047857;
        background: #ecfdf5;
    }

    .sales-price-warning-note.is-warning {
        color: #92400e;
        background: #fffbeb;
        border: 1px solid rgba(245, 158, 11, .25);
    }

    .sales-price-warning-note.is-danger {
        color: #991b1b;
        background: #fef2f2;
        border: 1px solid rgba(239, 68, 68, .25);
    }

    .sales-price-warning-note.d-none {
        display: none !important;
    }

/* =========================================================
   BELOW-COST OVERRIDE PANEL
========================================================= */

.below-cost-override-box {
    display: grid;
    gap: .35rem;
    margin: 1rem 0;
    padding: .9rem;
    border: 1px solid rgba(239, 68, 68, .22);
    border-radius: 20px;
    background: linear-gradient(135deg, #fef2f2, #ffffff);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
}

    .below-cost-override-box small {
        color: #7f1d1d;
        font-size: .78rem;
        line-height: 1.45;
    }

    .below-cost-override-box textarea {
        border-radius: 16px;
        resize: vertical;
    }

/* =========================================================
   BELOW-COST OVERRIDE CLIENT ERROR
========================================================= */

.below-cost-override-client-error {
    margin-bottom: .75rem;
    border-radius: 16px;
    font-size: .82rem;
    line-height: 1.45;
}

    .below-cost-override-client-error ul {
        padding-left: 1.15rem;
    }

/* =========================================================
   TRANSACTION DRAFT RESTORE
========================================================= */

.transaction-draft-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: .85rem 0;
    padding: .75rem .85rem;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 18px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
}

    .transaction-draft-banner strong {
        display: block;
        color: #0f172a;
        font-weight: 950;
    }

    .transaction-draft-banner small {
        display: block;
        color: #475569;
        font-size: .78rem;
        line-height: 1.4;
    }

    .transaction-draft-banner .btn {
        flex: 0 0 auto;
        border-radius: 999px;
        font-weight: 850;
    }

@media (max-width: 640px) {
    .transaction-draft-banner {
        align-items: stretch;
        flex-direction: column;
    }

        .transaction-draft-banner .btn {
            width: 100%;
        }
}

.transaction-draft-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
}

.transaction-draft-prompt {
    border-color: rgba(245, 158, 11, .35);
    background: linear-gradient(135deg, #fffbeb, #ffffff);
}

@media (max-width: 640px) {
    .transaction-draft-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

        .transaction-draft-actions .btn {
            width: 100%;
        }
}

/* =========================================================
   STOCKRULER AUTH PAGES
   Login / Forgot Password / Reset Password
   Single source of truth
========================================================= */

.sr-auth-body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    background: radial-gradient(circle at 95% 92%, rgba(34, 197, 94, .10), transparent 36%), radial-gradient(circle at 0% 0%, rgba(37, 99, 235, .13), transparent 34%), linear-gradient(180deg, #f7fbff 0%, #eef4fb 100%);
    color: #0f172a;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.sr-auth-page {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.sr-auth-brand {
    width: 100%;
    max-width: 390px;
    margin: 0 auto 1.25rem;
    text-align: center;
}

    .sr-auth-brand img {
        width: min(230px, 72vw);
        max-height: 92px;
        object-fit: contain;
        display: block;
        margin: 0 auto .45rem;
    }

.sr-auth-tagline {
    color: #334155;
    font-size: .98rem;
    line-height: 1.35;
    font-weight: 500;
}

.sr-auth-card {
    width: 100%;
    max-width: 390px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(226, 232, 240, .85) !important;
    box-shadow: 0 22px 55px rgba(15, 23, 42, .10);
    overflow: hidden;
}

    .sr-auth-card .card-body {
        padding: 1.75rem 1.5rem 1.55rem;
    }

.sr-auth-card-header {
    margin-bottom: 1.45rem;
}

.sr-auth-title {
    margin: 0;
    color: #0f172a;
    font-size: 1.55rem;
    font-weight: 950;
    letter-spacing: -.035em;
    line-height: 1.08;
}

.sr-auth-subtitle {
    margin: .5rem 0 0;
    color: #64748b;
    font-size: .94rem;
    line-height: 1.35;
}

.sr-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sr-auth-field {
    margin: 0;
}

    .sr-auth-field .form-label,
    .sr-password-label-row .form-label {
        margin-bottom: .45rem;
        color: #334155;
        font-size: .84rem;
        font-weight: 900;
    }

    .sr-auth-field .form-control {
        min-height: 56px;
        border-radius: 16px;
        border: 1px solid rgba(148, 163, 184, .25);
        background: #eaf2ff;
        color: #0f172a;
        font-size: .98rem;
        font-weight: 650;
        padding: .95rem 1rem;
        box-shadow: none;
    }

        .sr-auth-field .form-control:focus {
            background: #eaf2ff;
            border-color: #2563eb;
            box-shadow: 0 0 0 .22rem rgba(37, 99, 235, .16);
        }

.sr-password-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: .45rem;
}

    .sr-password-label-row .sr-auth-link {
        font-size: .84rem;
        font-weight: 950;
        white-space: nowrap;
    }

.sr-password-wrap {
    position: relative;
}

    .sr-password-wrap .form-control {
        padding-right: 4.5rem;
    }

.password-toggle {
    position: absolute;
    right: .82rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #2563eb;
    font-size: .84rem;
    font-weight: 950;
    padding: .45rem .35rem;
}

.sr-auth-remember-row {
    padding-left: 1.65rem;
    margin-top: .15rem;
    margin-bottom: .35rem;
}

.sr-auth-form .form-check {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 32px;
}

.sr-auth-form .form-check-input {
    width: 1.08rem;
    height: 1.08rem;
    margin-top: 0;
    border-radius: .35rem;
}

.sr-auth-form .form-check-label {
    color: #475569;
    font-size: .92rem;
    font-weight: 500;
}

.sr-auth-submit {
    min-height: 54px;
    border: 0;
    border-radius: 15px;
    font-size: .95rem;
    font-weight: 950;
    margin-top: .35rem;
    box-shadow: 0 14px 26px rgba(37, 99, 235, .18);
}

    .sr-auth-submit:disabled,
    .sr-auth-submit.is-loading {
        opacity: .78;
        cursor: wait;
    }

.sr-auth-link {
    color: #2563eb;
    font-weight: 900;
    text-decoration: none;
}

    .sr-auth-link:hover {
        text-decoration: underline;
    }

.sr-auth-error-summary {
    font-size: .9rem;
    border-radius: 16px;
}

/* Mobile-first preferred feel */
@media (max-width: 575.98px) {
    .sr-auth-page {
        justify-content: flex-start;
        padding: 2.15rem 1rem 1.25rem;
    }

    .sr-auth-brand {
        margin-bottom: 1.8rem;
    }

    .sr-auth-card {
        max-width: 348px;
    }

        .sr-auth-card .card-body {
            padding: 1.55rem 1.35rem 1.45rem;
        }

    .sr-auth-title {
        font-size: 1.45rem;
    }
}

/* Very small phones */
@media (max-width: 370px) {
    .sr-auth-page {
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .sr-auth-brand {
        margin-bottom: 1.4rem;
    }

        .sr-auth-brand img {
            width: min(205px, 68vw);
        }

    .sr-auth-card {
        max-width: 100%;
        border-radius: 22px;
    }

        .sr-auth-card .card-body {
            padding: 1.35rem 1.05rem 1.25rem;
        }

    .sr-auth-title {
        font-size: 1.32rem;
    }

    .sr-auth-subtitle {
        font-size: .86rem;
    }

    .sr-auth-remember-row {
        padding-left: 1.35rem;
    }
}

/* =========================================================
   USER SECURITY STATUS
========================================================= */

.user-security-meta {
    display: grid;
    gap: .15rem;
    margin-top: .35rem;
    color: #64748b;
    font-size: .78rem;
}

.user-security-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .55rem;
}

    .user-security-actions .btn {
        min-height: 36px;
        border-radius: 999px;
        font-size: .78rem;
        font-weight: 800;
    }

.low-stock-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    padding: .75rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, .2);
}

    .low-stock-list-item:last-child {
        border-bottom: 0;
    }

.low-stock-badge {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .35rem .7rem;
    border-radius: 12px;
    color: #ffffff;
    background: #dc3545;
    font-size: .78rem;
    font-weight: 900;
}

/* =========================================================
   INVENTORY PRODUCT SEARCH PICKER
   Add Stock / Remove Stock modal
========================================================= */

.sr-product-search-wrap {
    position: relative;
}

.sr-product-original-select {
    display: none !important;
}

.sr-product-search-input {
    min-height: 52px;
    border-radius: 14px;
    font-weight: 650;
}

.sr-product-search-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 1085;
    display: none;
    max-height: 260px;
    overflow-y: auto;
    padding: .45rem;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 16px;
    box-shadow: 0 22px 45px rgba(15, 23, 42, .16);
}

    .sr-product-search-menu.is-open {
        display: block;
    }

.sr-product-search-item {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: .75rem .85rem;
    border-radius: 12px;
    color: #0f172a;
    font-weight: 750;
}

    .sr-product-search-item:hover,
    .sr-product-search-item:focus {
        background: #eef4ff;
        outline: none;
    }

.sr-product-search-hint,
.sr-product-search-empty {
    padding: .75rem .85rem;
    color: #64748b;
    font-size: .86rem;
}

@media (max-width: 575.98px) {
    .sr-product-search-menu {
        max-height: 45vh;
    }

    .sr-product-search-input {
        font-size: 1rem;
    }

    .sr-product-search-item {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}

/* =========================================================
   INVENTORY MOBILE CARDS - PROFESSIONAL APP LOOK
========================================================= */

@media (max-width: 767.98px) {
    .sr-inventory-mobile-card {
        background: rgba(255, 255, 255, .98);
        border: 1px solid rgba(226, 232, 240, .9);
        border-radius: 20px;
        box-shadow: 0 14px 35px rgba(15, 23, 42, .08);
        padding: .95rem;
        margin-bottom: .9rem;
    }

    .sr-inventory-mobile-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: .7rem;
    }

    .sr-inventory-product-main h3 {
        margin: 0;
        color: #0f172a;
        font-size: .98rem;
        font-weight: 950;
        line-height: 1.25;
    }

    .sr-inventory-product-main span {
        display: block;
        margin-top: .18rem;
        color: #64748b;
        font-size: .78rem;
        font-weight: 700;
    }

    .sr-stock-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: fit-content;
        max-width: 100%;
        padding: .42rem .65rem;
        border-radius: 999px;
        color: #ffffff;
        font-size: .78rem;
        font-weight: 950;
        line-height: 1.15;
        word-break: break-word;
    }

    .sr-stock-pill-success {
        background: #198754;
    }

    .sr-stock-pill-danger {
        background: #dc3545;
    }

    .sr-inventory-chip-row {
        display: flex;
        flex-wrap: wrap;
        gap: .35rem;
        margin-top: .75rem;
    }

    .sr-inventory-chip {
        display: inline-flex;
        align-items: center;
        min-height: 28px;
        padding: .28rem .55rem;
        border-radius: 999px;
        font-size: .74rem;
        font-weight: 850;
    }

        .sr-inventory-chip.danger {
            background: #fee2e2;
            color: #b91c1c;
        }

        .sr-inventory-chip.warning {
            background: #fef3c7;
            color: #92400e;
        }

        .sr-inventory-chip.info {
            background: #dbeafe;
            color: #1d4ed8;
        }

    .sr-inventory-mobile-metrics {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .55rem;
        margin-top: .85rem;
    }

        .sr-inventory-mobile-metrics > div,
        .sr-inventory-mobile-extra > div {
            background: #f8fafc;
            border: 1px solid rgba(226, 232, 240, .75);
            border-radius: 14px;
            padding: .65rem;
            min-width: 0;
        }

        .sr-inventory-mobile-metrics small,
        .sr-inventory-mobile-extra small {
            display: block;
            color: #64748b;
            font-size: .68rem;
            font-weight: 850;
            text-transform: uppercase;
            letter-spacing: .04em;
        }

        .sr-inventory-mobile-metrics strong,
        .sr-inventory-mobile-extra strong {
            display: block;
            margin-top: .2rem;
            color: #0f172a;
            font-size: .82rem;
            font-weight: 950;
            word-break: break-word;
        }

        .sr-inventory-mobile-metrics span {
            display: block;
            margin-top: .15rem;
            color: #64748b;
            font-size: .68rem;
            font-weight: 700;
        }

    .sr-margin-text {
        border-radius: 999px;
        padding: .12rem .35rem;
        width: fit-content;
    }

    .sr-margin-success {
        color: #047857 !important;
    }

    .sr-margin-warning {
        color: #92400e !important;
    }

    .sr-margin-danger {
        color: #b91c1c !important;
    }

    .sr-inventory-mobile-extra {
        display: grid;
        grid-template-columns: 1fr;
        gap: .55rem;
        margin-top: .55rem;
    }

    .sr-inventory-mobile-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .55rem;
        margin-top: .8rem;
    }

        .sr-inventory-mobile-actions .btn {
            min-height: 44px;
            border-radius: 14px;
            font-size: .84rem;
            font-weight: 900;
        }
}

/* =========================================================
   HOME DASHBOARD POLISH
========================================================= */

.sr-home-hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

    .sr-home-hero-metrics > div {
        min-width: 0;
    }

    .sr-home-hero-metrics small {
        display: block;
        color: rgba(255, 255, 255, .82);
        font-size: .75rem;
        font-weight: 700;
    }

    .sr-home-hero-metrics strong {
        display: block;
        margin-top: .2rem;
        color: #ffffff;
        font-size: 1rem;
        font-weight: 950;
        line-height: 1.15;
        word-break: break-word;
    }

@media (max-width: 767.98px) {
    .sr-home-hero-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .9rem .75rem;
    }

        .sr-home-hero-metrics small {
            font-size: .72rem;
        }

        .sr-home-hero-metrics strong {
            font-size: .95rem;
        }
}

/* Hide transaction total until the cashier starts item entry */
.transaction-form[data-current-step="1"] .sale-action-bar {
    display: none !important;
}

/* =========================================================
   SALES / PURCHASE ENTRY - MOBILE POLISH
========================================================= */

@media (max-width: 767.98px) {
    .pro-transaction-hero {
        margin-bottom: .6rem;
        padding: .8rem;
        border-radius: 22px;
    }

    .pro-transaction-title {
        gap: .65rem;
    }

    .pro-transaction-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
        border-radius: 16px;
        font-size: 1.2rem;
    }

    .pro-transaction-title h1 {
        font-size: 1.05rem;
    }

    .pro-transaction-title p {
        font-size: .78rem;
    }

    .pro-txn-contextbar {
        gap: .55rem;
        margin-bottom: .65rem;
    }

        .pro-txn-contextbar > div {
            padding: .65rem .75rem;
            border-radius: 16px;
        }

    .pro-txn-stepper {
        margin-bottom: .65rem;
        padding: .45rem;
        border-radius: 18px;
    }

    .pro-txn-step {
        min-height: 46px;
        border-radius: 14px;
    }

        .pro-txn-step span {
            width: 26px;
            height: 26px;
            font-size: .9rem;
        }

        .pro-txn-step small {
            font-size: .58rem;
        }

    .transaction-form .card-modern {
        padding: .85rem !important;
        border-radius: 18px !important;
    }

    .transaction-search-shell .form-control {
        min-height: 50px;
        border-radius: 16px;
        font-size: .92rem;
    }
}

/* =========================================================
   TRANSACTION SEARCH DROPDOWN SAFETY
   Prevents customer/product search result click-through
========================================================= */

.transaction-search-shell {
    position: relative;
    z-index: 50;
}

    .transaction-search-shell:focus-within {
        z-index: 2800;
    }

.search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 3000;
    max-height: 260px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 16px;
    box-shadow: 0 22px 48px rgba(15, 23, 42, .22);
    pointer-events: auto;
}

    .search-results.d-none {
        display: none !important;
    }

    .search-results .search-item,
    .search-results button,
    .search-results a {
        position: relative;
        z-index: 1;
        width: 100%;
        min-height: 46px;
        display: block;
        text-align: left;
        touch-action: manipulation;
    }

@media (max-width: 767.98px) {
    .search-results {
        max-height: 42vh;
    }
}

/* =========================================================
   PAGE HEADER MOBILE ACTION POLISH
   Applies to _PageHeader.cshtml
========================================================= */

@media (max-width: 767.98px) {
    .pro-page-header {
        padding: .95rem;
        border-radius: 22px;
    }

    .pro-page-title-wrap {
        align-items: flex-start;
        gap: .75rem;
    }

    .pro-page-icon {
        width: 46px;
        height: 46px;
        min-width: 46px;
        border-radius: 16px;
        font-size: 1.25rem;
    }

    .pro-page-title-text h1 {
        font-size: 1.2rem;
        line-height: 1.15;
        margin-bottom: .25rem;
    }

    .pro-page-title-text p {
        font-size: .86rem;
        line-height: 1.35;
        margin-bottom: 0;
    }

    .pro-page-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .6rem;
        width: 100%;
        margin-top: .9rem;
    }

        .pro-page-actions .pro-branch-pill {
            grid-column: 1 / -1;
            width: 100%;
            min-height: 40px;
            justify-content: center;
            border-radius: 999px;
            font-size: .82rem;
            font-weight: 900;
        }

            .pro-page-actions .pro-branch-pill small {
                display: block;
                margin-left: .25rem;
                font-size: .68rem;
                font-weight: 700;
            }

        .pro-page-actions .pro-action-btn {
            width: 100%;
            min-height: 44px;
            border-radius: 14px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: .35rem;
            font-size: .86rem;
            font-weight: 900;
            white-space: nowrap;
        }

            .pro-page-actions .pro-action-btn.btn-light {
                background: #ffffff;
                border: 1px solid rgba(148, 163, 184, .35);
                color: #0f172a;
                box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
            }

            .pro-page-actions .pro-action-btn.btn-primary,
            .pro-page-actions .pro-action-btn.is-primary-action {
                box-shadow: 0 14px 24px rgba(37, 99, 235, .18);
            }
}

/* =========================================================
   SALES SCREEN UX IMPROVEMENT
========================================================= */

.sr-sale-items-sticky {
    position: sticky;
    top: calc(var(--sr-nav-height, 64px) + .55rem);
    z-index: 930;
    padding: .75rem;
    margin-bottom: .75rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .10);
    backdrop-filter: blur(14px);
}

.sr-sale-live-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
    margin-bottom: .6rem;
}

    .sr-sale-live-summary > div {
        padding: .65rem .75rem;
        border-radius: 18px;
        background: #f8fafc;
    }

    .sr-sale-live-summary small {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .sr-sale-live-summary strong {
        display: block;
        margin-top: .1rem;
        color: #0f172a;
        font-size: 1rem;
        font-weight: 950;
    }

.sr-sale-help-text {
    display: block;
    margin-top: .45rem;
    color: #64748b;
    font-size: .78rem;
    line-height: 1.35;
}

.sr-manual-entry-btn {
    min-height: 42px !important;
    font-size: .86rem;
    background: #fff;
}

.sr-sale-item-card {
    margin-bottom: .75rem;
    padding: .85rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .08);
}

.sr-sale-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .65rem;
}

    .sr-sale-item-head strong {
        display: block;
        color: #0f172a;
        font-size: .95rem;
        font-weight: 950;
        line-height: 1.2;
    }

    .sr-sale-item-head small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .76rem;
        font-weight: 700;
    }

.sr-sale-item-card .product,
.sr-sale-item-card .unit {
    margin-bottom: .55rem;
    min-height: 42px;
    border-radius: 16px;
}

.sr-sale-item-card .txn-entry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
    align-items: end;
}

.sr-sale-item-card .txn-field-label {
    display: block;
    margin-bottom: .22rem;
    color: #64748b;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.sr-sale-item-card .form-control {
    min-height: 44px;
    border-radius: 16px;
}

.sr-line-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    margin-top: .7rem;
    padding-top: .65rem;
    border-top: 1px dashed rgba(148, 163, 184, .35);
}

    .sr-line-total-row span {
        color: #64748b;
        font-size: .78rem;
        font-weight: 700;
    }

    .sr-line-total-row strong {
        color: #0f172a;
        font-size: 1rem;
        font-weight: 950;
    }

.transaction-form[data-current-step="1"] .sale-action-bar,
.transaction-form[data-current-step="1"] .post-sale-bar {
    display: none !important;
}

@media (max-width: 520px) {
    .sr-sale-items-sticky {
        top: calc(var(--sr-nav-height, 58px) + .4rem);
        margin-left: -.15rem;
        margin-right: -.15rem;
        border-radius: 22px;
    }

    .sr-sale-item-card {
        border-radius: 22px;
    }

        .sr-sale-item-card .txn-entry-grid {
            grid-template-columns: 1fr;
        }
}

/* =========================================================
   SALES MOBILE FINAL UX OVERRIDE
   Applies after existing transaction CSS.
========================================================= */

@media (max-width: 767.98px) {
    /*
       Give room for fixed product search and bottom total/nav.
       Step 2 only.
    */
    .transaction-form[data-current-step="2"] .txn-step[data-step="2"] {
        padding-top: 76px !important;
        padding-bottom: 145px !important;
    }

    /*
       Make product search/scan truly visible while selling.
       This overrides the earlier sticky behaviour.
    */
    .transaction-form[data-current-step="2"] .sr-sale-items-sticky {
        position: fixed !important;
        top: calc(var(--sr-navbar-height, 64px) + 8px) !important;
        left: 14px !important;
        right: 14px !important;
        z-index: 2750 !important;
        margin: 0 !important;
        padding: .55rem !important;
        border-radius: 20px !important;
        background: rgba(255, 255, 255, .98) !important;
        border: 1px solid rgba(148, 163, 184, .28) !important;
        box-shadow: 0 16px 36px rgba(15, 23, 42, .18) !important;
        backdrop-filter: blur(12px);
    }

    /*
       Hide the small helper/summary inside fixed search on mobile
       to save vertical space. The global total is already fixed below.
    */
    .transaction-form[data-current-step="2"] .sr-sale-live-summary,
    .transaction-form[data-current-step="2"] .sr-sale-help-text {
        display: none !important;
    }

    .transaction-form[data-current-step="2"] .sr-sale-items-sticky .form-control {
        min-height: 44px !important;
        height: 44px !important;
        border-radius: 16px !important;
        font-size: 16px !important;
    }

    .transaction-form[data-current-step="2"] .search-results {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        top: calc(100% + 6px) !important;
        max-height: 42vh !important;
        z-index: 2800 !important;
    }

    /*
       Keep manual/review buttons from hiding behind the fixed total.
    */
    .transaction-form[data-current-step="2"] #mobileRows {
        padding-bottom: .5rem !important;
    }
}

/* Better item separation */
#mobileRows {
    display: flex !important;
    flex-direction: column !important;
    gap: .85rem !important;
}

    /* Compact generated sale item card */
    #mobileRows .sr-sale-item-card.mobiletxn-row,
    #mobileRows .mobiletxn-row {
        position: relative !important;
        margin: 0 !important;
        padding: .72rem .72rem .78rem !important;
        border: 1px solid rgba(148, 163, 184, .30) !important;
        border-left: 5px solid #2563eb !important;
        border-radius: 20px !important;
        background: linear-gradient(135deg, #ffffff, #f8fafc) !important;
        box-shadow: 0 12px 26px rgba(15, 23, 42, .08) !important;
    }

        /* Visible demarcation label */
        #mobileRows .mobiletxn-row::before {
            content: attr(data-sale-item-label);
            display: inline-flex;
            width: fit-content;
            align-items: center;
            min-height: 21px;
            margin-bottom: .42rem;
            padding: .16rem .52rem;
            border-radius: 999px;
            background: #eff6ff;
            color: #1d4ed8;
            font-size: .68rem;
            font-weight: 950;
            letter-spacing: .04em;
            text-transform: uppercase;
        }

    /* Card header layout */
    #mobileRows .sr-sale-item-head {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: .6rem !important;
        margin-bottom: .55rem !important;
    }

    #mobileRows .sr-item-title {
        display: block;
        color: #0f172a;
        font-size: .92rem;
        font-weight: 950;
        line-height: 1.2;
    }

    #mobileRows .sr-item-unit {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .74rem;
        font-weight: 750;
    }

    /* Force delete button to remain compact */
    #mobileRows .removeRow {
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        height: 38px !important;
        min-height: 38px !important;
        padding: 0 !important;
        margin: 0 !important;
        flex: 0 0 42px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 14px !important;
        font-size: .92rem !important;
        line-height: 1 !important;
    }

    /* Compact inputs */
    #mobileRows .form-select,
    #mobileRows .form-control {
        min-height: 40px !important;
        height: 40px;
        padding: .42rem .7rem !important;
        border-radius: 14px !important;
        font-size: 16px !important;
    }

    #mobileRows .txn-entry-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: .5rem !important;
        align-items: end !important;
    }

    #mobileRows .txn-field-label {
        display: block !important;
        margin-bottom: .15rem !important;
        color: #475569 !important;
        font-size: .65rem !important;
        font-weight: 950 !important;
        letter-spacing: .04em !important;
        text-transform: uppercase !important;
    }

    /* Compact conversion note */
    #mobileRows .transaction-row-note {
        margin-top: .45rem !important;
        padding: .45rem .55rem !important;
        border-radius: 13px !important;
        background: #f1f5f9 !important;
        color: #334155 !important;
        font-size: .75rem !important;
        line-height: 1.35 !important;
    }

    /* Line total */
    #mobileRows .sr-line-total-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: .65rem !important;
        margin-top: .52rem !important;
        padding-top: .52rem !important;
        border-top: 1px dashed rgba(148, 163, 184, .45) !important;
    }

        #mobileRows .sr-line-total-row span {
            color: #64748b !important;
            font-size: .76rem !important;
            font-weight: 850 !important;
        }

        #mobileRows .sr-line-total-row strong {
            color: #0f172a !important;
            font-size: .98rem !important;
            font-weight: 950 !important;
        }

@media (max-width: 390px) {
    #mobileRows .txn-entry-grid {
        grid-template-columns: 1fr !important;
    }

    #mobileRows .form-select,
    #mobileRows .form-control {
        min-height: 39px !important;
    }
}

/* =========================================================
   SALES MOBILE-FIRST CAROUSEL REFINEMENT
   Safe override: Sales mode only.
========================================================= */

.transaction-form[data-transaction-mode="sale"] .sr-sale-live-summary {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
}

.transaction-form[data-transaction-mode="sale"] .sr-sale-live-card {
    min-width: 0;
}

    .transaction-form[data-transaction-mode="sale"] .sr-sale-live-card em {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .7rem;
        font-style: normal;
        font-weight: 750;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.transaction-form[data-transaction-mode="sale"] .sr-sale-carousel-shell {
    margin: .15rem 0 .85rem;
}

.transaction-form[data-transaction-mode="sale"] .sr-sale-carousel-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 0 0 .45rem;
    color: #64748b;
    font-size: .76rem;
    font-weight: 850;
}

.transaction-form[data-transaction-mode="sale"] .sr-swipe-hint::before {
    content: "↔";
    margin-right: .25rem;
    font-weight: 950;
}

.transaction-form[data-transaction-mode="sale"] #mobileRows {
    display: flex !important;
    flex-direction: row !important;
    gap: .85rem !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    scroll-padding-inline: .15rem !important;
    padding: .15rem .15rem .75rem !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

    .transaction-form[data-transaction-mode="sale"] #mobileRows::-webkit-scrollbar {
        display: none;
    }

    .transaction-form[data-transaction-mode="sale"] #mobileRows .sr-sale-item-card.mobiletxn-row,
    .transaction-form[data-transaction-mode="sale"] #mobileRows .mobiletxn-row {
        flex: 0 0 min(100%, 520px) !important;
        scroll-snap-align: center !important;
        scroll-snap-stop: always !important;
        min-height: 360px;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    }

        .transaction-form[data-transaction-mode="sale"] #mobileRows .mobiletxn-row.is-active {
            border-color: rgba(37, 99, 235, .52) !important;
            box-shadow: 0 18px 38px rgba(15, 23, 42, .14) !important;
            transform: translateY(-1px);
        }

    .transaction-form[data-transaction-mode="sale"] #mobileRows .removeRow {
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        height: 38px !important;
        min-height: 38px !important;
        padding: 0 !important;
        margin: 0 !important;
        flex: 0 0 42px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 14px !important;
        font-size: .92rem !important;
        line-height: 1 !important;
    }

.transaction-form[data-transaction-mode="sale"] .sr-sale-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-top: .2rem;
}

    .transaction-form[data-transaction-mode="sale"] .sr-sale-carousel-controls .btn {
        min-height: 36px !important;
        padding: .38rem .7rem !important;
        border-radius: 999px !important;
        font-size: .78rem !important;
        font-weight: 850 !important;
        box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
    }

        .transaction-form[data-transaction-mode="sale"] .sr-sale-carousel-controls .btn:disabled {
            opacity: .45;
            box-shadow: none;
        }

.transaction-form[data-transaction-mode="sale"] .sr-sale-step-actions {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: .65rem;
    margin-top: .35rem;
}

    .transaction-form[data-transaction-mode="sale"] .sr-sale-step-actions .btn {
        width: 100%;
        min-height: 44px !important;
        border-radius: 16px !important;
        font-weight: 900;
    }

@media (max-width: 767.98px) {
    .transaction-form[data-transaction-mode="sale"][data-current-step="2"] .txn-step[data-step="2"] {
        padding-top: 142px !important;
        padding-bottom: 150px !important;
    }

    .transaction-form[data-transaction-mode="sale"][data-current-step="2"] .sr-sale-items-sticky {
        padding: .55rem !important;
    }

    .transaction-form[data-transaction-mode="sale"][data-current-step="2"] .sr-sale-live-summary {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: .45rem !important;
        margin-bottom: .5rem !important;
    }

        .transaction-form[data-transaction-mode="sale"][data-current-step="2"] .sr-sale-live-summary > div {
            padding: .48rem .56rem !important;
            border-radius: 15px !important;
        }

        .transaction-form[data-transaction-mode="sale"][data-current-step="2"] .sr-sale-live-summary small {
            font-size: .6rem !important;
        }

        .transaction-form[data-transaction-mode="sale"][data-current-step="2"] .sr-sale-live-summary strong {
            font-size: .9rem !important;
            line-height: 1.1 !important;
        }

    .transaction-form[data-transaction-mode="sale"][data-current-step="2"] .sr-sale-live-card em {
        font-size: .62rem !important;
    }

    .transaction-form[data-transaction-mode="sale"][data-current-step="2"] .sr-sale-help-text {
        display: none !important;
    }

    .transaction-form[data-transaction-mode="sale"] #mobileRows .sr-sale-item-card.mobiletxn-row,
    .transaction-form[data-transaction-mode="sale"] #mobileRows .mobiletxn-row {
        flex-basis: 100% !important;
        min-height: calc(100svh - 355px);
        max-height: calc(100svh - 250px);
        overflow-y: auto;
    }

    .transaction-form[data-transaction-mode="sale"] #mobileRows .txn-entry-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .transaction-form[data-transaction-mode="sale"] .sr-sale-carousel-controls {
        display: none;
    }
}

@media (min-width: 768px) {
    .transaction-form[data-transaction-mode="sale"] .sr-sale-carousel-shell {
        max-width: 1100px;
    }

    .transaction-form[data-transaction-mode="sale"] #mobileRows .sr-sale-item-card.mobiletxn-row,
    .transaction-form[data-transaction-mode="sale"] #mobileRows .mobiletxn-row {
        flex-basis: min(520px, 72vw) !important;
    }
}

@media (max-width: 390px) {
    .transaction-form[data-transaction-mode="sale"][data-current-step="2"] .txn-step[data-step="2"] {
        padding-top: 136px !important;
    }

    .transaction-form[data-transaction-mode="sale"] #mobileRows .sr-sale-item-card.mobiletxn-row,
    .transaction-form[data-transaction-mode="sale"] #mobileRows .mobiletxn-row {
        min-height: calc(100svh - 340px);
    }

    .transaction-form[data-transaction-mode="sale"] .sr-sale-step-actions {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   SALES ENTRY MODE - TRUE MOBILE-FIRST SALES CONSOLE
   Append at the bottom of mobile-first-fixes.css
========================================================= */

@media (max-width: 767.98px) {
    body.sr-sale-entry-mode .pro-transaction-hero,
    body.sr-sale-entry-mode .pro-txn-contextbar,
    body.sr-sale-entry-mode .pro-txn-stepper {
        display: none !important;
    }

    body.sr-sale-entry-mode .sale-action-bar {
        display: none !important;
    }

    body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] .txn-step[data-step="2"] {
        padding-top: 136px !important;
        padding-bottom: 94px !important;
        min-height: calc(100dvh - 86px);
    }

    body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] .sr-sale-items-sticky {
        position: fixed !important;
        top: calc(var(--sr-navbar-height, 64px) + 6px) !important;
        left: 12px !important;
        right: 12px !important;
        z-index: 3500 !important;
        margin: 0 !important;
        padding: .55rem !important;
        border-radius: 20px !important;
        background: rgba(255, 255, 255, .98) !important;
        border: 1px solid rgba(148, 163, 184, .32) !important;
        box-shadow: 0 16px 36px rgba(15, 23, 42, .18) !important;
        backdrop-filter: blur(14px);
    }

    body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] .sr-sale-live-summary {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: .45rem !important;
        margin-bottom: .45rem !important;
    }

        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] .sr-sale-live-card,
        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] .sr-sale-live-summary > div {
            min-width: 0;
            padding: .48rem .58rem !important;
            border-radius: 15px !important;
            background: #f8fafc !important;
        }

        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] .sr-sale-live-summary small {
            display: block;
            color: #64748b;
            font-size: .58rem !important;
            font-weight: 950;
            letter-spacing: .05em;
            text-transform: uppercase;
            line-height: 1.1;
        }

        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] .sr-sale-live-summary strong {
            display: block;
            margin-top: .08rem;
            color: #0f172a;
            font-size: .9rem !important;
            font-weight: 950;
            line-height: 1.1;
        }

        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] .sr-sale-live-summary em {
            display: block;
            margin-top: .08rem;
            color: #64748b;
            font-size: .6rem !important;
            font-style: normal;
            font-weight: 800;
            line-height: 1.15;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

    body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] .sr-page-divider {
        display: inline-block;
        margin: 0 .2rem;
        opacity: .65;
    }

    body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] .sr-product-search-shell {
        position: relative !important;
        z-index: 3600 !important;
    }

    body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #productSearch {
        min-height: 44px !important;
        height: 44px !important;
        border-radius: 16px !important;
        font-size: 16px !important;
        padding: .5rem .8rem !important;
    }

    body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #searchResults {
        position: absolute !important;
        top: calc(100% + 6px) !important;
        bottom: auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: min(260px, 42vh) !important;
        z-index: 3900 !important;
        border-radius: 16px !important;
        box-shadow: 0 22px 48px rgba(15, 23, 42, .25) !important;
    }

    body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] .sr-sale-carousel-shell {
        margin-top: .3rem;
    }

    body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows {
        display: flex !important;
        flex-direction: row !important;
        gap: .85rem !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        scroll-padding-inline: 0 !important;
        padding: .15rem 0 .45rem !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows::-webkit-scrollbar {
            display: none;
        }

        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows .mobiletxn-row {
            flex: 0 0 100% !important;
            scroll-snap-align: center !important;
            scroll-snap-stop: always !important;
            min-height: calc(100dvh - 340px);
            max-height: calc(100dvh - 245px);
            overflow-y: auto;
            margin: 0 !important;
            padding: .78rem !important;
            border-radius: 22px !important;
            border: 1px solid rgba(148, 163, 184, .34) !important;
            border-left: 5px solid #2563eb !important;
            background: linear-gradient(135deg, #ffffff, #f8fafc) !important;
            box-shadow: 0 14px 32px rgba(15, 23, 42, .10) !important;
        }

            body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows .mobiletxn-row.is-active {
                border-color: rgba(37, 99, 235, .55) !important;
                box-shadow: 0 18px 38px rgba(15, 23, 42, .16) !important;
            }

            body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows .mobiletxn-row::before {
                content: attr(data-sale-item-label);
                display: inline-flex;
                width: fit-content;
                align-items: center;
                min-height: 21px;
                margin-bottom: .42rem;
                padding: .16rem .52rem;
                border-radius: 999px;
                background: #eff6ff;
                color: #1d4ed8;
                font-size: .66rem;
                font-weight: 950;
                letter-spacing: .04em;
                text-transform: uppercase;
            }

        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows .sr-sale-item-head {
            margin-bottom: .55rem !important;
        }

        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows .sr-item-title {
            font-size: .9rem !important;
            line-height: 1.15;
        }

        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows .sr-item-unit {
            font-size: .7rem !important;
        }

        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows .product,
        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows .unit,
        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows .form-control {
            min-height: 40px !important;
            height: 40px !important;
            border-radius: 14px !important;
            font-size: 16px !important;
            padding: .42rem .7rem !important;
        }

        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows .txn-entry-grid {
            display: grid !important;
            grid-template-columns: 1fr 1fr !important;
            gap: .5rem !important;
        }

        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows .txn-field-label {
            font-size: .62rem !important;
            margin-bottom: .14rem !important;
        }

        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows .removeRow {
            width: 40px !important;
            min-width: 40px !important;
            max-width: 40px !important;
            height: 36px !important;
            min-height: 36px !important;
            padding: 0 !important;
            border-radius: 13px !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
        }

        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows .transaction-row-note {
            margin-top: .45rem !important;
            padding: .42rem .52rem !important;
            font-size: .7rem !important;
            line-height: 1.3 !important;
            border-radius: 13px !important;
        }

        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows .sr-line-total-row {
            margin-top: .5rem !important;
            padding-top: .48rem !important;
        }

    body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] .sr-sale-step-actions {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(var(--sr-bottom-nav-height, 76px) + 8px);
        z-index: 2500;
        display: grid;
        grid-template-columns: .75fr 1.25fr;
        gap: .6rem;
        padding: .55rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, .96);
        border: 1px solid rgba(148, 163, 184, .24);
        box-shadow: 0 14px 32px rgba(15, 23, 42, .16);
        backdrop-filter: blur(12px);
    }

        body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] .sr-sale-step-actions .btn {
            min-height: 42px !important;
            border-radius: 15px !important;
            font-size: .82rem !important;
            font-weight: 900 !important;
        }
}

@media (max-width: 390px) {
    body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] .txn-step[data-step="2"] {
        padding-top: 130px !important;
    }

    body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows .mobiletxn-row {
        min-height: calc(100dvh - 330px);
        max-height: calc(100dvh - 238px);
    }

    body.sr-sale-entry-mode .transaction-form[data-transaction-mode="sale"] #mobileRows .txn-entry-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* =========================================================
   PURCHASE MOBILE-FIRST ENTRY MODE
   Replicates the polished sales carousel experience for purchases.
========================================================= */

@media (max-width: 767.98px) {
    body.sr-purchase-entry-mode .pro-transaction-hero,
    body.sr-purchase-entry-mode .pro-txn-contextbar,
    body.sr-purchase-entry-mode .pro-txn-stepper,
    body.sr-purchase-entry-mode .pro-purchase-cost-note {
        display: none !important;
    }

    body.sr-purchase-entry-mode .sale-action-bar {
        display: none !important;
    }

    body.sr-transaction-entry-mode .sr-branch-pill {
        min-width: 48px !important;
        width: 48px !important;
        padding: .45rem !important;
        border-radius: 999px !important;
        justify-content: center !important;
    }

        body.sr-transaction-entry-mode .sr-branch-pill .sr-branch-copy {
            display: none !important;
        }

    body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] .txn-step[data-step="2"] {
        padding-top: 136px !important;
        padding-bottom: 96px !important;
        min-height: calc(100dvh - 86px);
    }

    body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] .sr-sale-items-sticky {
        position: fixed !important;
        top: calc(var(--sr-navbar-height, 64px) + 6px) !important;
        left: 12px !important;
        right: 12px !important;
        z-index: 3500 !important;
        margin: 0 !important;
        padding: .55rem !important;
        border-radius: 20px !important;
        background: rgba(255, 255, 255, .98) !important;
        border: 1px solid rgba(148, 163, 184, .32) !important;
        box-shadow: 0 16px 36px rgba(15, 23, 42, .18) !important;
        backdrop-filter: blur(14px);
    }

    body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] .sr-sale-live-summary {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: .45rem !important;
        margin-bottom: .45rem !important;
    }

        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] .sr-sale-live-card,
        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] .sr-sale-live-summary > div {
            min-width: 0;
            padding: .48rem .58rem !important;
            border-radius: 15px !important;
            background: #f8fafc !important;
        }

        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] .sr-sale-live-summary small {
            display: block;
            color: #64748b;
            font-size: .58rem !important;
            font-weight: 950;
            letter-spacing: .05em;
            text-transform: uppercase;
            line-height: 1.1;
        }

        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] .sr-sale-live-summary strong {
            display: block;
            margin-top: .08rem;
            color: #0f172a;
            font-size: .9rem !important;
            font-weight: 950;
            line-height: 1.1;
        }

        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] .sr-sale-live-summary em {
            display: block;
            margin-top: .08rem;
            color: #64748b;
            font-size: .6rem !important;
            font-style: normal;
            font-weight: 800;
            line-height: 1.15;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

    body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] .sr-product-search-shell {
        position: relative !important;
        z-index: 3600 !important;
    }

    body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #productSearch {
        min-height: 44px !important;
        height: 44px !important;
        border-radius: 16px !important;
        font-size: 16px !important;
        padding: .5rem .8rem !important;
    }

    body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #searchResults {
        position: absolute !important;
        top: calc(100% + 6px) !important;
        bottom: auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: min(260px, 42vh) !important;
        z-index: 3900 !important;
        border-radius: 16px !important;
        box-shadow: 0 22px 48px rgba(15, 23, 42, .25) !important;
    }

    body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows {
        display: flex !important;
        flex-direction: row !important;
        gap: .85rem !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        scroll-padding-inline: 0 !important;
        padding: .15rem 0 .45rem !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows::-webkit-scrollbar {
            display: none;
        }

        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows .mobiletxn-row {
            flex: 0 0 100% !important;
            scroll-snap-align: center !important;
            scroll-snap-stop: always !important;
            min-height: calc(100dvh - 338px);
            max-height: calc(100dvh - 238px);
            overflow-y: auto;
            margin: 0 !important;
            padding: .72rem !important;
            border-radius: 22px !important;
            border: 1px solid rgba(148, 163, 184, .34) !important;
            border-left: 5px solid #2563eb !important;
            background: linear-gradient(135deg, #ffffff, #f8fafc) !important;
            box-shadow: 0 14px 32px rgba(15, 23, 42, .10) !important;
        }

            body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows .mobiletxn-row.is-active {
                border-color: rgba(37, 99, 235, .55) !important;
                box-shadow: 0 18px 38px rgba(15, 23, 42, .16) !important;
            }

            body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows .mobiletxn-row::before {
                content: attr(data-sale-item-label);
                display: inline-flex;
                width: fit-content;
                align-items: center;
                min-height: 21px;
                margin-bottom: .38rem;
                padding: .16rem .52rem;
                border-radius: 999px;
                background: #eff6ff;
                color: #1d4ed8;
                font-size: .66rem;
                font-weight: 950;
                letter-spacing: .04em;
                text-transform: uppercase;
            }

        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows .sr-sale-item-head {
            margin-bottom: .48rem !important;
        }

        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows .sr-item-title {
            font-size: .9rem !important;
            line-height: 1.15;
        }

        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows .sr-item-unit {
            font-size: .7rem !important;
        }

        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows .product,
        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows .unit,
        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows .form-control {
            min-height: 39px !important;
            height: 39px !important;
            border-radius: 14px !important;
            font-size: 16px !important;
            padding: .4rem .68rem !important;
        }

        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows .txn-entry-grid {
            display: grid !important;
            grid-template-columns: 1fr 1fr !important;
            gap: .5rem !important;
        }

        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows .txn-field-label {
            font-size: .62rem !important;
            margin-bottom: .12rem !important;
        }

        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows .removeRow {
            width: 40px !important;
            min-width: 40px !important;
            max-width: 40px !important;
            height: 36px !important;
            min-height: 36px !important;
            padding: 0 !important;
            border-radius: 13px !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
        }

        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows .transaction-row-note {
            margin-top: .4rem !important;
            padding: .38rem .48rem !important;
            font-size: .68rem !important;
            line-height: 1.25 !important;
            border-radius: 13px !important;
        }

        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows .sr-line-total-row {
            margin-top: .45rem !important;
            padding-top: .44rem !important;
        }

    body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] .sr-sale-step-actions {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(var(--sr-bottom-nav-height, 76px) + 8px);
        z-index: 2500;
        display: grid;
        grid-template-columns: .75fr 1.25fr;
        gap: .6rem;
        padding: .55rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, .96);
        border: 1px solid rgba(148, 163, 184, .24);
        box-shadow: 0 14px 32px rgba(15, 23, 42, .16);
        backdrop-filter: blur(12px);
    }

        body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] .sr-sale-step-actions .btn {
            min-height: 42px !important;
            border-radius: 15px !important;
            font-size: .82rem !important;
            font-weight: 900 !important;
        }
}

@media (max-width: 390px) {
    body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] .txn-step[data-step="2"] {
        padding-top: 130px !important;
    }

    body.sr-purchase-entry-mode .transaction-form[data-transaction-mode="purchase"] #mobileRows .mobiletxn-row {
        min-height: calc(100dvh - 328px);
        max-height: calc(100dvh - 232px);
    }
}

/* =========================================================
   HOME DASHBOARD KPI STRIP - PROFESSIONAL POLISH
========================================================= */

.sr-home-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.sr-home-kpi-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .7rem;
    padding: .85rem;
    border-radius: 18px;
    color: #0f172a;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

    .sr-home-kpi-card:hover {
        color: #0f172a;
        transform: translateY(-1px);
        border-color: rgba(37, 99, 235, .35);
        box-shadow: 0 16px 34px rgba(15, 23, 42, .1);
    }

    .sr-home-kpi-card > span {
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 15px;
        background: #eff6ff;
        font-size: 1.15rem;
    }

    .sr-home-kpi-card small {
        display: block;
        color: #64748b;
        font-size: .72rem;
        font-weight: 850;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .sr-home-kpi-card strong {
        display: block;
        margin-top: .12rem;
        color: #0f172a;
        font-size: .95rem;
        font-weight: 950;
        line-height: 1.15;
        word-break: break-word;
    }

    .sr-home-kpi-card em {
        display: block;
        margin-top: .1rem;
        color: #64748b;
        font-size: .7rem;
        font-style: normal;
        font-weight: 750;
    }

    .sr-home-kpi-card.success > span {
        background: #dcfce7;
    }

    .sr-home-kpi-card.warning > span {
        background: #fef3c7;
    }

    .sr-home-kpi-card.danger > span {
        background: #fee2e2;
    }

.low-stock-list-item > div > div {
    font-weight: 850;
    color: #0f172a;
}

@media (max-width: 767.98px) {
    .sr-home-kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .65rem;
    }

    .sr-home-kpi-card {
        grid-template-columns: 1fr;
        gap: .45rem;
        padding: .75rem;
        border-radius: 16px;
    }

        .sr-home-kpi-card > span {
            width: 36px;
            height: 36px;
            border-radius: 13px;
            font-size: 1rem;
        }

        .sr-home-kpi-card small {
            font-size: .65rem;
        }

        .sr-home-kpi-card strong {
            font-size: .84rem;
        }

        .sr-home-kpi-card em {
            font-size: .65rem;
        }
}

/* =========================================================
   INVENTORY UX POLISH - QUICK ACTIONS, FILTERS, FAB
========================================================= */

.sr-inventory-action-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .7rem;
    margin-bottom: .85rem;
}

.sr-inventory-action {
    display: grid;
    place-items: center;
    gap: .25rem;
    min-height: 74px;
    padding: .75rem .55rem;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 20px;
    color: #0f172a;
    text-align: center;
    text-decoration: none;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

    .sr-inventory-action:hover {
        color: #0f172a;
        transform: translateY(-1px);
        border-color: rgba(37, 99, 235, .35);
        box-shadow: 0 16px 34px rgba(15, 23, 42, .1);
    }

    .sr-inventory-action span {
        font-size: 1.25rem;
        line-height: 1;
    }

    .sr-inventory-action strong {
        font-size: .78rem;
        font-weight: 950;
    }

    .sr-inventory-action.primary {
        color: #ffffff;
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
        border-color: rgba(37, 99, 235, .4);
    }

    .sr-inventory-action.success {
        background: linear-gradient(135deg, #ecfdf5, #ffffff);
    }

.sr-inventory-filter-card {
    position: sticky;
    top: calc(var(--sr-navbar-height, 64px) + 6px);
    z-index: 900;
    margin-bottom: .95rem;
    padding: .85rem;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 22px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
    backdrop-filter: blur(14px);
}

.sr-inventory-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(190px, .75fr) auto;
    gap: .55rem;
}

    .sr-inventory-filter-grid .form-control,
    .sr-inventory-filter-grid .form-select,
    .sr-inventory-filter-grid .btn {
        min-height: 44px;
        border-radius: 15px;
        font-weight: 750;
    }

.sr-inventory-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .65rem;
}

    .sr-inventory-filter-pills button {
        min-height: 34px;
        border: 1px solid rgba(148, 163, 184, .28);
        border-radius: 999px;
        padding: .35rem .7rem;
        color: #334155;
        background: #f8fafc;
        font-size: .76rem;
        font-weight: 850;
    }

        .sr-inventory-filter-pills button.active {
            color: #ffffff;
            background: #2563eb;
            border-color: #2563eb;
        }

    .sr-inventory-filter-pills span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 20px;
        height: 20px;
        margin-left: .25rem;
        padding: 0 .35rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, .22);
        font-size: .68rem;
    }

.sr-inventory-fab {
    position: fixed;
    right: 18px;
    bottom: calc(var(--sr-bottom-nav-height, 76px) + 18px);
    z-index: 2500;
    min-height: 48px;
    padding: .7rem .95rem;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 18px 36px rgba(15, 23, 42, .25);
    font-size: .86rem;
    font-weight: 950;
}

.sr-adjust-tabbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    margin-bottom: .85rem;
    padding: .35rem;
    border-radius: 16px;
    background: #f1f5f9;
}

    .sr-adjust-tabbar button {
        min-height: 40px;
        border: 0;
        border-radius: 13px;
        color: #475569;
        background: transparent;
        font-weight: 900;
    }

        .sr-adjust-tabbar button.active {
            color: #ffffff;
            background: #2563eb;
            box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
        }

@media (max-width: 767.98px) {
    .sr-inventory-action-bar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: .45rem;
        margin-bottom: .7rem;
    }

    .sr-inventory-action {
        min-height: 62px;
        padding: .55rem .35rem;
        border-radius: 17px;
    }

        .sr-inventory-action span {
            font-size: 1.05rem;
        }

        .sr-inventory-action strong {
            font-size: .66rem;
            line-height: 1.1;
        }

    .sr-inventory-filter-card {
        top: calc(var(--sr-navbar-height, 64px) + 4px);
        padding: .65rem;
        border-radius: 20px;
    }

    .sr-inventory-filter-grid {
        grid-template-columns: 1fr;
    }

        .sr-inventory-filter-grid .btn {
            width: 100%;
        }

    .sr-inventory-filter-pills {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: .15rem;
        scrollbar-width: none;
    }

        .sr-inventory-filter-pills::-webkit-scrollbar {
            display: none;
        }

        .sr-inventory-filter-pills button {
            flex: 0 0 auto;
            white-space: nowrap;
        }

    .sr-adjust-panel-hidden {
        display: none !important;
    }

    #stockAdjustmentModal .modal-dialog {
        margin: .65rem;
    }

    #stockAdjustmentModal .modal-content {
        border-radius: 22px;
    }
}

/* =========================================================
   BRANCH DASHBOARD PROFESSIONAL POLISH
========================================================= */

.pro-branch-action-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .7rem;
}

.pro-branch-action {
    display: grid;
    place-items: center;
    gap: .25rem;
    min-height: 74px;
    padding: .75rem .55rem;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 20px;
    color: #0f172a;
    text-align: center;
    text-decoration: none;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

    .pro-branch-action:hover {
        color: #0f172a;
        transform: translateY(-1px);
        border-color: rgba(37, 99, 235, .35);
        box-shadow: 0 16px 34px rgba(15, 23, 42, .1);
    }

    .pro-branch-action span {
        font-size: 1.25rem;
        line-height: 1;
    }

    .pro-branch-action strong {
        font-size: .78rem;
        font-weight: 950;
    }

    .pro-branch-action.primary {
        color: #ffffff;
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
        border-color: rgba(37, 99, 235, .4);
    }

    .pro-branch-action.success {
        background: linear-gradient(135deg, #ecfdf5, #ffffff);
    }

.pro-branch-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pro-branch-kpi.warning {
    background: linear-gradient(135deg, #fffbeb, #ffffff);
}

@media (max-width: 992px) {
    .pro-branch-action-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pro-branch-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .pro-branch-action-strip {
        grid-template-columns: repeat(5, minmax(68px, 1fr));
        overflow-x: auto;
        padding-bottom: .2rem;
        scrollbar-width: none;
    }

        .pro-branch-action-strip::-webkit-scrollbar {
            display: none;
        }

    .pro-branch-action {
        min-height: 64px;
        padding: .55rem .4rem;
        border-radius: 17px;
    }

        .pro-branch-action span {
            font-size: 1.05rem;
        }

        .pro-branch-action strong {
            font-size: .66rem;
            line-height: 1.1;
        }

    .pro-branch-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .65rem;
    }

    .pro-branch-kpi strong {
        font-size: .92rem;
    }

    .pro-branch-kpi small {
        font-size: .66rem;
    }
}

/* =========================================================
   SALES / PURCHASE REVIEW AND PAYMENT POLISH
========================================================= */

.sr-review-shell,
.sr-payment-shell {
    display: grid;
    gap: .85rem;
}

.sr-review-header,
.sr-payment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .85rem;
    padding: 1rem;
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .06);
}

    .sr-review-header small,
    .sr-payment-header small {
        display: block;
        color: #2563eb;
        font-size: .72rem;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: .06em;
    }

    .sr-review-header h2,
    .sr-payment-header h2 {
        margin: .12rem 0;
        color: #0f172a;
        font-size: 1.08rem;
        font-weight: 950;
    }

    .sr-review-header p,
    .sr-payment-header p {
        margin: 0;
        color: #64748b;
        font-size: .82rem;
        line-height: 1.35;
    }

.sr-review-count-pill {
    min-width: 70px;
    padding: .55rem .7rem;
    border-radius: 17px;
    text-align: center;
    background: #eff6ff;
    color: #1d4ed8;
}

    .sr-review-count-pill strong {
        display: block;
        font-size: 1.1rem;
        font-weight: 950;
        line-height: 1;
    }

    .sr-review-count-pill span {
        display: block;
        margin-top: .12rem;
        font-size: .64rem;
        font-weight: 850;
    }

.sr-review-total-card,
.sr-payment-total-card {
    padding: 1rem;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #0f172a);
    box-shadow: 0 18px 38px rgba(30, 64, 175, .22);
}

    .sr-review-total-card span,
    .sr-payment-total-card small {
        display: block;
        color: rgba(255, 255, 255, .82);
        font-size: .75rem;
        font-weight: 850;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    .sr-review-total-card strong,
    .sr-payment-total-card strong {
        display: block;
        margin-top: .18rem;
        color: #ffffff;
        font-size: 1.45rem;
        font-weight: 950;
        line-height: 1.1;
    }

.sr-review-list-shell,
.sr-payment-input-card,
.sr-payment-method-card,
.sr-payment-breakdown-card,
.sr-below-cost-review-box {
    padding: .9rem;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.sr-review-list-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .65rem;
}

    .sr-review-list-title strong {
        color: #0f172a;
        font-size: .9rem;
        font-weight: 950;
    }

.sr-review-items-list {
    display: grid;
    gap: .55rem;
}

.sr-review-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    padding: .7rem;
    border-radius: 17px;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, .8);
}

    .sr-review-item strong {
        display: block;
        color: #0f172a;
        font-size: .86rem;
        font-weight: 950;
        line-height: 1.25;
    }

    .sr-review-item small {
        display: block;
        margin-top: .16rem;
        color: #64748b;
        font-size: .72rem;
        font-weight: 750;
    }

.sr-review-item-total {
    color: #0f172a;
    font-size: .85rem;
    font-weight: 950;
    white-space: nowrap;
}

.sr-review-empty {
    padding: .8rem;
    border-radius: 16px;
    color: #64748b;
    background: #f8fafc;
    font-size: .82rem;
    font-weight: 750;
    text-align: center;
}

.sr-payment-status-badge {
    min-width: 74px;
    padding: .45rem .65rem;
    border-radius: 999px;
    text-align: center;
    font-size: .72rem;
    font-weight: 950;
}

    .sr-payment-status-badge.paid {
        color: #166534;
        background: #dcfce7;
    }

    .sr-payment-status-badge.partial {
        color: #92400e;
        background: #fef3c7;
    }

    .sr-payment-status-badge.credit {
        color: #991b1b;
        background: #fee2e2;
    }

.sr-payment-input-card label,
.sr-payment-method-card label {
    display: block;
    margin-bottom: .4rem;
    color: #334155;
    font-size: .75rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.sr-payment-input-card .form-control {
    min-height: 52px;
    border-radius: 18px;
    font-size: 1.05rem;
    font-weight: 850;
}

.sr-payment-quick-fill {
    display: flex;
    gap: .45rem;
    margin-top: .65rem;
    overflow-x: auto;
    padding-bottom: .1rem;
    scrollbar-width: none;
}

    .sr-payment-quick-fill::-webkit-scrollbar {
        display: none;
    }

    .sr-payment-quick-fill button,
    .sr-payment-method-grid button {
        border: 1px solid rgba(148, 163, 184, .28);
        border-radius: 999px;
        color: #334155;
        background: #f8fafc;
        font-size: .78rem;
        font-weight: 900;
    }

    .sr-payment-quick-fill button {
        flex: 0 0 auto;
        min-height: 36px;
        padding: .38rem .75rem;
    }

.sr-payment-method-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
}

    .sr-payment-method-grid button {
        min-height: 42px;
        border-radius: 16px;
    }

        .sr-payment-method-grid button.active {
            color: #ffffff;
            background: #2563eb;
            border-color: #2563eb;
            box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
        }

.sr-payment-breakdown-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

    .sr-payment-breakdown-card > div {
        padding: .75rem;
        border-radius: 17px;
        background: #f8fafc;
    }

    .sr-payment-breakdown-card span {
        display: block;
        color: #64748b;
        font-size: .72rem;
        font-weight: 850;
    }

    .sr-payment-breakdown-card strong {
        display: block;
        margin-top: .12rem;
        color: #0f172a;
        font-size: .95rem;
        font-weight: 950;
    }

.sr-payment-credit-hint {
    padding: .75rem .85rem;
    border-radius: 17px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.35;
}

.sr-finalize-action-bar {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: .65rem;
    margin-top: .9rem;
}

    .sr-finalize-action-bar .btn {
        min-height: 46px;
        border-radius: 17px;
        font-weight: 950;
    }

.transaction-form[data-current-step="3"] .sale-action-bar,
.transaction-form[data-current-step="4"] .sale-action-bar {
    display: none !important;
}

@media (max-width: 767.98px) {
    body.sr-transaction-finalize-mode .pro-transaction-hero {
        display: none !important;
    }

    body.sr-transaction-finalize-mode .pro-txn-contextbar {
        margin-bottom: .55rem;
        padding: .65rem .75rem;
        border-radius: 18px;
    }

        body.sr-transaction-finalize-mode .pro-txn-contextbar small {
            font-size: .62rem;
        }

        body.sr-transaction-finalize-mode .pro-txn-contextbar strong {
            font-size: .78rem;
        }

    body.sr-transaction-finalize-mode .pro-txn-stepper {
        margin-bottom: .75rem;
        padding: .55rem;
        border-radius: 18px;
    }

    body.sr-transaction-finalize-mode .pro-txn-step small {
        display: none;
    }

    .sr-finalize-step {
        padding-bottom: calc(var(--sr-bottom-nav-height, 76px) + 86px);
    }

    .sr-review-header,
    .sr-payment-header {
        padding: .8rem;
        border-radius: 20px;
    }

        .sr-review-header h2,
        .sr-payment-header h2 {
            font-size: .98rem;
        }

        .sr-review-header p,
        .sr-payment-header p {
            font-size: .75rem;
        }

    .sr-review-total-card,
    .sr-payment-total-card {
        padding: .85rem;
        border-radius: 21px;
    }

        .sr-review-total-card strong,
        .sr-payment-total-card strong {
            font-size: 1.25rem;
        }

    .sr-review-list-shell,
    .sr-payment-input-card,
    .sr-payment-method-card,
    .sr-payment-breakdown-card,
    .sr-below-cost-review-box {
        padding: .75rem;
        border-radius: 20px;
    }

    .sr-review-item {
        padding: .62rem;
        border-radius: 15px;
    }

        .sr-review-item strong {
            font-size: .8rem;
        }

        .sr-review-item small {
            font-size: .68rem;
        }

    .sr-review-item-total {
        font-size: .78rem;
    }

    .sr-payment-input-card .form-control {
        min-height: 48px;
        border-radius: 16px;
        font-size: 16px;
    }

    .sr-finalize-action-bar {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(var(--sr-bottom-nav-height, 76px) + 8px);
        z-index: 2600;
        margin: 0;
        padding: .55rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, .96);
        border: 1px solid rgba(148, 163, 184, .24);
        box-shadow: 0 14px 32px rgba(15, 23, 42, .16);
        backdrop-filter: blur(12px);
    }

        .sr-finalize-action-bar .btn {
            min-height: 42px;
            border-radius: 15px;
            font-size: .82rem;
        }
}

@media (max-width: 380px) {
    .sr-payment-method-grid {
        grid-template-columns: 1fr;
    }

    .sr-review-item {
        grid-template-columns: 1fr;
    }

    .sr-review-item-total {
        text-align: left;
    }
}

/* =========================================================
   TRANSACTION CREATE SCREEN SHOULD NEVER SHOW OLD SUCCESS BAR
========================================================= */

.transaction-form .post-sale-bar,
body.sr-sale-entry-mode .post-sale-bar,
body.sr-purchase-entry-mode .post-sale-bar,
body.sr-transaction-entry-mode .post-sale-bar,
body.sr-transaction-finalize-mode .post-sale-bar {
    display: none !important;
}

/* =========================================================
   BAKERY PRODUCTION PREVIEW
========================================================= */

.sr-production-preview {
    margin-top: 1rem;
    padding: .9rem;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .07);
}

.sr-production-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
}

    .sr-production-preview-head small {
        display: block;
        color: #2563eb;
        font-size: .7rem;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: .06em;
    }

    .sr-production-preview-head strong {
        display: block;
        color: #0f172a;
        font-size: .98rem;
        font-weight: 950;
    }

.sr-production-preview-status {
    padding: .38rem .65rem;
    border-radius: 999px;
    color: #334155;
    background: #f1f5f9;
    font-size: .72rem;
    font-weight: 950;
    white-space: nowrap;
}

    .sr-production-preview-status.success {
        color: #166534;
        background: #dcfce7;
    }

    .sr-production-preview-status.danger {
        color: #991b1b;
        background: #fee2e2;
    }

.sr-production-preview-total {
    padding: .8rem;
    margin-bottom: .75rem;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #0f172a);
}

    .sr-production-preview-total span {
        display: block;
        color: rgba(255, 255, 255, .8);
        font-size: .72rem;
        font-weight: 850;
        text-transform: uppercase;
    }

    .sr-production-preview-total strong {
        display: block;
        margin-top: .1rem;
        color: #ffffff;
        font-size: 1.2rem;
        font-weight: 950;
    }

.sr-production-preview-list {
    display: grid;
    gap: .55rem;
}

.sr-production-preview-item {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, .9fr);
    gap: .65rem;
    align-items: center;
    padding: .7rem;
    border-radius: 17px;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, .85);
}

    .sr-production-preview-item.ok {
        border-left: 5px solid #22c55e;
    }

    .sr-production-preview-item.short {
        border-left: 5px solid #ef4444;
        background: #fff7ed;
    }

    .sr-production-preview-item strong {
        display: block;
        color: #0f172a;
        font-size: .82rem;
        font-weight: 950;
    }

    .sr-production-preview-item small,
    .sr-production-preview-item span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 750;
    }

@media (max-width: 767.98px) {
    .sr-production-preview {
        padding: .75rem;
        border-radius: 20px;
    }

    .sr-production-preview-item {
        grid-template-columns: 1fr;
        gap: .35rem;
        padding: .65rem;
    }
}

/* =========================================================
   BAKERY OPERATIONS QUICK ACTIONS
========================================================= */

.sr-bakery-action-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .7rem;
}

.sr-bakery-action {
    display: grid;
    place-items: center;
    gap: .28rem;
    min-height: 74px;
    padding: .75rem .55rem;
    border-radius: 20px;
    color: #0f172a;
    text-align: center;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

    .sr-bakery-action:hover {
        color: #0f172a;
        transform: translateY(-1px);
        border-color: rgba(37, 99, 235, .35);
    }

    .sr-bakery-action span {
        font-size: 1.2rem;
    }

    .sr-bakery-action strong {
        font-size: .75rem;
        font-weight: 950;
    }

    .sr-bakery-action.primary {
        color: #ffffff;
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
    }

    .sr-bakery-action.success {
        background: linear-gradient(135deg, #ecfdf5, #ffffff);
    }

@media (max-width: 767.98px) {
    .sr-bakery-action-strip {
        grid-template-columns: repeat(5, minmax(72px, 1fr));
        overflow-x: auto;
        padding-bottom: .25rem;
        scrollbar-width: none;
    }

        .sr-bakery-action-strip::-webkit-scrollbar {
            display: none;
        }

    .sr-bakery-action {
        min-height: 64px;
        border-radius: 17px;
        padding: .55rem .35rem;
    }

        .sr-bakery-action strong {
            font-size: .64rem;
            line-height: 1.1;
        }
}

/* =========================================================
   BAKERY WASTAGE / DAMAGED GOODS
========================================================= */

.sr-wastage-page {
    max-width: 920px;
}

.sr-wastage-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    border: 1px solid rgba(254, 215, 170, .9);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .07);
}

    .sr-wastage-hero small {
        display: block;
        color: #ea580c;
        font-size: .72rem;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: .06em;
    }

    .sr-wastage-hero h2 {
        margin: .15rem 0;
        color: #0f172a;
        font-size: 1.25rem;
        font-weight: 950;
    }

    .sr-wastage-hero p {
        margin: 0;
        color: #64748b;
        font-size: .86rem;
        line-height: 1.4;
    }

    .sr-wastage-hero > span {
        width: 52px;
        height: 52px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 52px;
        border-radius: 18px;
        background: #ffedd5;
        font-size: 1.45rem;
    }

.sr-wastage-card {
    padding: 1rem;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .07);
}

    .sr-wastage-card .form-label {
        color: #334155;
        font-size: .75rem;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    .sr-wastage-card .form-control,
    .sr-wastage-card .form-select {
        min-height: 46px;
        border-radius: 16px;
        font-weight: 750;
    }

.sr-wastage-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: .75rem;
    margin-bottom: .75rem;
}

.sr-wastage-branch-lock {
    margin-bottom: .85rem;
    padding: .75rem .85rem;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, .9);
}

    .sr-wastage-branch-lock small {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        text-transform: uppercase;
    }

    .sr-wastage-branch-lock strong {
        display: block;
        color: #0f172a;
        font-size: .95rem;
        font-weight: 950;
    }

.sr-wastage-info {
    margin: -.15rem 0 .85rem;
    padding: .6rem .75rem;
    border-radius: 16px;
    color: #475569;
    background: #f8fafc;
    font-size: .78rem;
    font-weight: 800;
}

.sr-wastage-warning {
    padding: .75rem .85rem;
    border-radius: 17px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-size: .8rem;
    font-weight: 800;
    line-height: 1.35;
}

.sr-wastage-actions {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: .7rem;
    margin-top: 1rem;
}

    .sr-wastage-actions .btn {
        min-height: 46px;
        border-radius: 17px;
        font-weight: 950;
    }

.sr-inventory-action.danger {
    background: linear-gradient(135deg, #fff7ed, #ffffff);
}

@media (max-width: 767.98px) {
    .sr-wastage-page {
        margin-top: .8rem !important;
        padding-bottom: calc(var(--sr-bottom-nav-height, 76px) + 24px);
    }

    .sr-wastage-hero {
        padding: .85rem;
        border-radius: 22px;
    }

        .sr-wastage-hero h2 {
            font-size: 1.05rem;
        }

        .sr-wastage-hero p {
            font-size: .78rem;
        }

        .sr-wastage-hero > span {
            width: 44px;
            height: 44px;
            flex-basis: 44px;
            border-radius: 16px;
            font-size: 1.2rem;
        }

    .sr-wastage-card {
        padding: .85rem;
        border-radius: 22px;
    }

    .sr-wastage-grid {
        grid-template-columns: 1fr;
        gap: .65rem;
    }

    .sr-wastage-card .form-control,
    .sr-wastage-card .form-select {
        min-height: 44px;
        font-size: 16px;
    }

    .sr-wastage-actions {
        position: sticky;
        bottom: calc(var(--sr-bottom-nav-height, 76px) + 8px);
        z-index: 1000;
        padding: .55rem;
        margin-left: -.25rem;
        margin-right: -.25rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, .96);
        border: 1px solid rgba(148, 163, 184, .24);
        box-shadow: 0 14px 32px rgba(15, 23, 42, .16);
        backdrop-filter: blur(12px);
    }

        .sr-wastage-actions .btn {
            min-height: 42px;
            border-radius: 15px;
            font-size: .82rem;
        }
}

/* =========================================================
   DAILY BAKERY SUMMARY
========================================================= */

.sr-bakery-summary-page {
    padding-bottom: 2rem;
}

.sr-bakery-summary-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 26px;
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    border: 1px solid rgba(254, 215, 170, .9);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .07);
}

    .sr-bakery-summary-hero small,
    .sr-bakery-panel-head small {
        display: block;
        color: #ea580c;
        font-size: .72rem;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: .06em;
    }

    .sr-bakery-summary-hero h2 {
        margin: .15rem 0;
        color: #0f172a;
        font-size: 1.35rem;
        font-weight: 950;
    }

    .sr-bakery-summary-hero p {
        margin: 0;
        color: #64748b;
        font-size: .86rem;
        line-height: 1.4;
    }

    .sr-bakery-summary-hero > span {
        width: 54px;
        height: 54px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 54px;
        border-radius: 19px;
        background: #ffedd5;
        font-size: 1.6rem;
    }

.sr-bakery-summary-filter {
    position: sticky;
    top: calc(var(--sr-navbar-height, 64px) + 6px);
    z-index: 850;
    display: grid;
    grid-template-columns: 180px minmax(190px, 1fr) auto;
    gap: .65rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: .85rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
    backdrop-filter: blur(14px);
}

    .sr-bakery-summary-filter label {
        display: block;
        margin-bottom: .25rem;
        color: #475569;
        font-size: .7rem;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    .sr-bakery-summary-filter .form-control,
    .sr-bakery-summary-filter .form-select,
    .sr-bakery-summary-filter .btn {
        min-height: 44px;
        border-radius: 15px;
        font-weight: 850;
    }

.sr-bakery-summary-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.sr-bakery-kpi {
    padding: .9rem;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

    .sr-bakery-kpi span {
        display: block;
        color: #64748b;
        font-size: .7rem;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    .sr-bakery-kpi strong {
        display: block;
        margin-top: .14rem;
        color: #0f172a;
        font-size: 1.05rem;
        font-weight: 950;
        line-height: 1.15;
    }

    .sr-bakery-kpi small {
        display: block;
        margin-top: .18rem;
        color: #64748b;
        font-size: .72rem;
        font-weight: 750;
    }

    .sr-bakery-kpi.primary {
        color: #ffffff;
        background: linear-gradient(135deg, #2563eb, #0f172a);
    }

        .sr-bakery-kpi.primary span,
        .sr-bakery-kpi.primary strong,
        .sr-bakery-kpi.primary small {
            color: #ffffff;
        }

    .sr-bakery-kpi.success {
        background: linear-gradient(135deg, #ecfdf5, #ffffff);
    }

    .sr-bakery-kpi.warning {
        background: linear-gradient(135deg, #fffbeb, #ffffff);
    }

    .sr-bakery-kpi.danger {
        background: linear-gradient(135deg, #fff7ed, #ffffff);
    }

.sr-bakery-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: .85rem;
}

.sr-bakery-panel {
    padding: .95rem;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.sr-bakery-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
}

    .sr-bakery-panel-head strong {
        display: block;
        color: #0f172a;
        font-size: .98rem;
        font-weight: 950;
    }

.sr-bakery-panel-actions {
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.sr-payment-breakdown-list,
.sr-lowstock-list {
    display: grid;
    gap: .55rem;
}

    .sr-payment-breakdown-list > div,
    .sr-lowstock-list > div {
        padding: .7rem;
        border-radius: 17px;
        background: #f8fafc;
        border: 1px solid rgba(226, 232, 240, .85);
    }

    .sr-payment-breakdown-list span,
    .sr-lowstock-list span {
        display: block;
        color: #64748b;
        font-size: .7rem;
        font-weight: 850;
    }

    .sr-payment-breakdown-list strong,
    .sr-lowstock-list strong {
        display: block;
        color: #0f172a;
        font-size: .9rem;
        font-weight: 950;
    }

    .sr-payment-breakdown-list small,
    .sr-lowstock-list small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .68rem;
        font-weight: 750;
    }

.sr-empty-soft {
    padding: .85rem;
    border-radius: 17px;
    color: #64748b;
    background: #f8fafc;
    font-size: .82rem;
    font-weight: 750;
    text-align: center;
}

.sr-mobile-stock-list {
    display: none;
}

.sr-mobile-stock-card {
    padding: .78rem;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .05);
}

.sr-mobile-stock-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .65rem;
    margin-bottom: .65rem;
}

    .sr-mobile-stock-head strong {
        display: block;
        color: #0f172a;
        font-size: .9rem;
        font-weight: 950;
    }

    .sr-mobile-stock-head small {
        display: block;
        color: #64748b;
        font-size: .7rem;
        font-weight: 750;
    }

    .sr-mobile-stock-head span {
        color: #0f172a;
        font-size: .8rem;
        font-weight: 950;
        white-space: nowrap;
    }

.sr-mobile-stock-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
}

    .sr-mobile-stock-grid > div {
        padding: .55rem;
        border-radius: 14px;
        background: #f8fafc;
    }

    .sr-mobile-stock-grid small {
        display: block;
        color: #64748b;
        font-size: .64rem;
        font-weight: 850;
        text-transform: uppercase;
    }

    .sr-mobile-stock-grid strong {
        display: block;
        margin-top: .1rem;
        color: #0f172a;
        font-size: .76rem;
        font-weight: 950;
    }

@media (max-width: 992px) {
    .sr-bakery-summary-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sr-bakery-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .sr-bakery-summary-page {
        padding-bottom: calc(var(--sr-bottom-nav-height, 76px) + 24px);
    }

    .sr-bakery-summary-hero {
        padding: .85rem;
        border-radius: 22px;
    }

        .sr-bakery-summary-hero h2 {
            font-size: 1.05rem;
        }

        .sr-bakery-summary-hero p {
            font-size: .78rem;
        }

        .sr-bakery-summary-hero > span {
            width: 44px;
            height: 44px;
            flex-basis: 44px;
            border-radius: 16px;
            font-size: 1.25rem;
        }

    .sr-bakery-summary-filter {
        grid-template-columns: 1fr;
        top: calc(var(--sr-navbar-height, 64px) + 4px);
        padding: .7rem;
        border-radius: 20px;
    }

    .sr-bakery-summary-kpis {
        gap: .6rem;
    }

    .sr-bakery-kpi {
        padding: .72rem;
        border-radius: 18px;
    }

        .sr-bakery-kpi strong {
            font-size: .86rem;
            word-break: break-word;
        }

        .sr-bakery-kpi small {
            font-size: .64rem;
        }

    .sr-bakery-panel {
        padding: .78rem;
        border-radius: 21px;
    }

    .sr-desktop-stock-table {
        display: none;
    }

    .sr-mobile-stock-list {
        display: grid;
        gap: .65rem;
    }
}

/* =========================================================
   STAFF / PAYROLL PROFESSIONAL POLISH
========================================================= */

.sr-staff-filter-card {
    position: sticky;
    top: calc(var(--sr-navbar-height, 64px) + 6px);
    z-index: 800;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: .65rem;
    margin-bottom: .85rem;
    padding: .75rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(226, 232, 240, .9);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
    backdrop-filter: blur(12px);
}

    .sr-staff-filter-card .form-control,
    .sr-staff-filter-card .form-select {
        min-height: 42px;
        border-radius: 15px;
        font-weight: 750;
    }

.sr-payroll-run-review {
    padding: .9rem;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 14px 32px rgba(15, 23, 42, .07);
}

.sr-payroll-run-review-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .85rem;
    margin-bottom: .75rem;
}

    .sr-payroll-run-review-head small,
    .sr-payroll-run-total small {
        display: block;
        color: #2563eb;
        font-size: .7rem;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: .06em;
    }

    .sr-payroll-run-review-head strong {
        display: block;
        color: #0f172a;
        font-size: 1rem;
        font-weight: 950;
    }

    .sr-payroll-run-review-head span {
        display: block;
        color: #64748b;
        font-size: .78rem;
        font-weight: 750;
    }

.sr-payroll-run-total {
    min-width: 160px;
    padding: .75rem;
    border-radius: 18px;
    text-align: right;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #0f172a);
}

    .sr-payroll-run-total small,
    .sr-payroll-run-total strong {
        color: #ffffff;
    }

    .sr-payroll-run-total strong {
        display: block;
        margin-top: .12rem;
        font-size: 1.05rem;
        font-weight: 950;
    }

.sr-payroll-run-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .6rem;
    margin-bottom: .75rem;
}

    .sr-payroll-run-kpis article {
        padding: .7rem;
        border-radius: 17px;
        background: #f8fafc;
        border: 1px solid rgba(226, 232, 240, .85);
    }

        .sr-payroll-run-kpis article.success {
            background: #ecfdf5;
        }

        .sr-payroll-run-kpis article.danger {
            background: #fff7ed;
        }

    .sr-payroll-run-kpis span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 950;
        text-transform: uppercase;
    }

    .sr-payroll-run-kpis strong {
        display: block;
        margin-top: .1rem;
        color: #0f172a;
        font-size: .95rem;
        font-weight: 950;
    }

.sr-payroll-staff-preview {
    display: grid;
    gap: .45rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: .15rem;
}

    .sr-payroll-staff-preview > div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
        padding: .65rem .7rem;
        border-radius: 16px;
        background: #f8fafc;
        border: 1px solid rgba(226, 232, 240, .85);
    }

        .sr-payroll-staff-preview > div.salary-missing {
            background: #fff7ed;
            border-color: #fed7aa;
        }

    .sr-payroll-staff-preview strong {
        display: block;
        color: #0f172a;
        font-size: .82rem;
        font-weight: 950;
    }

    .sr-payroll-staff-preview small {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 750;
    }

    .sr-payroll-staff-preview span {
        color: #0f172a;
        font-size: .82rem;
        font-weight: 950;
        white-space: nowrap;
    }

.sr-payroll-soft-warning {
    padding: .75rem .85rem;
    border-radius: 17px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-size: .8rem;
    font-weight: 800;
}

.sr-payroll-details-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

    .sr-payroll-details-actions .btn {
        min-height: 40px;
        border-radius: 15px;
        font-weight: 850;
    }

@media (max-width: 767.98px) {
    .sr-staff-filter-card {
        grid-template-columns: 1fr;
        top: calc(var(--sr-navbar-height, 64px) + 4px);
        padding: .65rem;
        border-radius: 18px;
    }

    .sr-payroll-run-review {
        padding: .75rem;
        border-radius: 21px;
    }

    .sr-payroll-run-review-head {
        display: grid;
        grid-template-columns: 1fr;
    }

    .sr-payroll-run-total {
        width: 100%;
        min-width: 0;
        text-align: left;
    }

    .sr-payroll-run-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .45rem;
    }

        .sr-payroll-run-kpis article {
            padding: .55rem;
            border-radius: 15px;
        }

        .sr-payroll-run-kpis span {
            font-size: .58rem;
        }

        .sr-payroll-run-kpis strong {
            font-size: .78rem;
        }

    .sr-payroll-staff-preview {
        max-height: 260px;
    }

        .sr-payroll-staff-preview > div {
            padding: .58rem;
            border-radius: 14px;
        }

        .sr-payroll-staff-preview strong,
        .sr-payroll-staff-preview span {
            font-size: .76rem;
        }

        .sr-payroll-staff-preview small {
            font-size: .63rem;
        }
}

/* =========================================================
   BUSINESS / TENANT ONBOARDING
========================================================= */

.sr-business-onboarding-form {
    text-align: left;
}

.sr-onboarding-section-title {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 1rem 0 .65rem;
    padding-top: .25rem;
}

    .sr-onboarding-section-title span {
        width: 28px;
        height: 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        color: #ffffff;
        background: #2563eb;
        font-size: .78rem;
        font-weight: 950;
    }

    .sr-onboarding-section-title strong {
        color: #0f172a;
        font-size: .88rem;
        font-weight: 950;
    }

.sr-onboarding-location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
}

.sr-onboarding-note {
    margin: .85rem 0;
    padding: .7rem .8rem;
    border-radius: 16px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, .85);
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.35;
}

@media (max-width: 640px) {
    .sr-onboarding-location-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* =========================================================
   AUTH LONG FORM FIX
   Allows registration/onboarding pages to scroll on desktop.
========================================================= */

body.sr-auth-body,
body:has(.sr-auth-page),
body.authenticated:has(.sr-auth-page) {
    height: auto !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

    body:has(.sr-auth-page) .sr-app,
    body:has(.sr-auth-page) .sr-content,
    body:has(.sr-auth-page) .sr-main,
    body:has(.sr-auth-page) main {
        height: auto !important;
        min-height: 100dvh !important;
        overflow: visible !important;
    }

.sr-auth-page {
    height: auto !important;
    min-height: 100dvh !important;
}

.sr-auth-page-long {
    justify-content: flex-start !important;
    padding-top: clamp(1.5rem, 3vh, 2.25rem) !important;
    padding-bottom: clamp(2rem, 5vh, 4rem) !important;
}

.sr-auth-card-wide {
    width: min(100%, 760px) !important;
    max-width: 760px !important;
}

    .sr-auth-card-wide .card-body {
        padding: clamp(1.4rem, 3vw, 2rem) !important;
    }

.sr-business-onboarding-form {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .sr-auth-card-wide .sr-onboarding-section-title,
    .sr-auth-card-wide .sr-onboarding-note,
    .sr-auth-card-wide .sr-auth-submit,
    .sr-auth-card-wide .text-center,
    .sr-auth-card-wide .sr-auth-error-summary,
    .sr-auth-card-wide [data-valmsg-summary],
    .sr-auth-card-wide .validation-summary-errors {
        grid-column: 1 / -1;
    }

    .sr-auth-card-wide .sr-business-onboarding-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1rem;
        row-gap: 1rem;
    }

    .sr-auth-card-wide .sr-onboarding-location-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .75rem;
    }

        .sr-auth-card-wide .sr-onboarding-location-grid .sr-auth-field {
            margin: 0;
        }
}

@media (max-width: 767.98px) {
    .sr-auth-card-wide {
        max-width: 390px !important;
    }

    .sr-auth-page-long {
        padding-top: 1.5rem !important;
        padding-bottom: 2rem !important;
    }
}

.sr-auth-card-wide .sr-auth-field .form-control,
.sr-auth-card-wide .sr-auth-field .form-select {
    min-height: 48px !important;
    border-radius: 15px !important;
    padding-top: .7rem !important;
    padding-bottom: .7rem !important;
}

/* =========================================================
   AUTH LOGIN SHOWCASE
   Makes login page double as a subtle product capability page.
========================================================= */

.sr-auth-layout-shell {
    width: min(100%, 1120px);
    margin: 0 auto;
    display: grid;
    place-items: center;
}

    .sr-auth-layout-shell.with-showcase {
        grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr);
        gap: 1.5rem;
        align-items: center;
    }

        .sr-auth-layout-shell.with-showcase .sr-auth-card {
            margin: 0 !important;
        }

.sr-auth-showcase {
    width: 100%;
    padding: 1.35rem;
    border-radius: 30px;
    color: #0f172a;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, .16), transparent 30%), linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .10);
}

.sr-auth-showcase-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: .35rem .7rem;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: .72rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.sr-auth-showcase h2 {
    margin: .9rem 0 .45rem;
    color: #0f172a;
    font-size: clamp(1.45rem, 2.4vw, 2.15rem);
    font-weight: 950;
    line-height: 1.05;
}

.sr-auth-showcase p {
    max-width: 620px;
    margin: 0 0 1rem;
    color: #64748b;
    font-size: .92rem;
    line-height: 1.5;
    font-weight: 650;
}

.sr-auth-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}

    .sr-auth-feature-grid > div {
        min-height: 112px;
        padding: .85rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, .88);
        border: 1px solid rgba(226, 232, 240, .9);
        box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
    }

    .sr-auth-feature-grid span {
        width: 36px;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-bottom: .45rem;
        border-radius: 14px;
        background: #eff6ff;
        font-size: 1.05rem;
    }

    .sr-auth-feature-grid strong {
        display: block;
        color: #0f172a;
        font-size: .82rem;
        font-weight: 950;
        line-height: 1.2;
    }

    .sr-auth-feature-grid small {
        display: block;
        margin-top: .18rem;
        color: #64748b;
        font-size: .7rem;
        font-weight: 750;
        line-height: 1.35;
    }

.sr-auth-showcase-footer {
    margin-top: 1rem;
    padding: .75rem .85rem;
    border-radius: 18px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, .9);
    font-size: .78rem;
    font-weight: 850;
}

@media (max-width: 991.98px) {
    .sr-auth-layout-shell.with-showcase {
        grid-template-columns: 1fr;
        max-width: 460px;
    }

    .sr-auth-showcase {
        order: 2;
        padding: 1rem;
        border-radius: 24px;
    }

    .sr-auth-layout-shell.with-showcase .sr-auth-card {
        order: 1;
    }

    .sr-auth-showcase h2 {
        font-size: 1.18rem;
    }

    .sr-auth-showcase p {
        font-size: .8rem;
    }

    .sr-auth-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .55rem;
    }

        .sr-auth-feature-grid > div {
            min-height: auto;
            padding: .7rem;
            border-radius: 17px;
        }
}

@media (max-width: 640px) {
    .sr-auth-showcase {
        display: none;
    }
}

/* =========================================================
   AUTH SHOWCASE LAYOUT FIX
   Prevents showcase from being squeezed inside login card.
========================================================= */

.sr-auth-page {
    min-height: 100dvh !important;
    height: auto !important;
    overflow-y: auto !important;
    padding: clamp(1.25rem, 3vh, 2rem) 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.sr-auth-brand {
    width: min(100%, 520px);
    margin: 0 auto 1.25rem;
    text-align: center;
}

    .sr-auth-brand img {
        max-width: 240px;
        height: auto;
    }

    .sr-auth-brand p {
        max-width: 520px;
        margin: .45rem auto 0;
        color: #0f172a;
        font-size: .95rem;
        font-weight: 700;
        line-height: 1.35;
    }

.sr-auth-layout-shell {
    width: min(100%, 1120px) !important;
    max-width: 1120px !important;
    margin: 0 auto !important;
    display: grid !important;
    justify-items: stretch !important;
    align-items: center !important;
}

    .sr-auth-layout-shell.with-showcase {
        grid-template-columns: minmax(0, 1.15fr) minmax(380px, 420px) !important;
        gap: 1.5rem !important;
    }

    .sr-auth-layout-shell:not(.with-showcase) {
        max-width: 460px !important;
    }

    .sr-auth-layout-shell .sr-auth-card {
        width: 100% !important;
        max-width: 460px !important;
        margin: 0 auto !important;
        border-radius: 28px !important;
        box-shadow: 0 24px 60px rgba(15, 23, 42, .10) !important;
    }

    .sr-auth-layout-shell.with-showcase .sr-auth-card {
        max-width: 420px !important;
    }

.sr-auth-showcase {
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

    .sr-auth-showcase h2,
    .sr-auth-showcase p,
    .sr-auth-feature-grid strong,
    .sr-auth-feature-grid small {
        writing-mode: horizontal-tb !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

@media (max-width: 991.98px) {
    .sr-auth-layout-shell.with-showcase {
        grid-template-columns: 1fr !important;
        max-width: 460px !important;
    }

    .sr-auth-showcase {
        order: 2;
    }

    .sr-auth-card {
        order: 1;
    }
}

@media (max-width: 640px) {
    .sr-auth-showcase {
        display: none !important;
    }

    .sr-auth-brand img {
        max-width: 210px;
    }

    .sr-auth-brand p {
        font-size: .82rem;
    }
}

/* =========================================================
   PROFESSIONAL UNIVERSAL SALES RECEIPT
   Screen preview only. Actual print styles are injected by universal-receipt.js.
========================================================= */

.sr-receipt-page {
    width: min(100%, 860px);
    margin: 0 auto;
    padding-bottom: 2rem;
}

.sr-receipt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
}

    .sr-receipt-toolbar .btn,
    .sr-receipt-toolbar .form-select {
        min-height: 42px;
        border-radius: 999px;
        font-weight: 850;
    }

.sr-receipt-print-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: .55rem;
    align-items: center;
}

.sr-receipt-help {
    margin-bottom: .85rem;
    color: #64748b;
    font-size: .78rem;
    font-weight: 750;
    text-align: right;
}

.sr-receipt-card {
    padding: 1.15rem;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.sr-receipt-header {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: .85rem;
    align-items: center;
    margin-bottom: 1rem;
}

.sr-receipt-logo {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: #eff6ff;
    font-size: 1.65rem;
}

.sr-receipt-header h1 {
    margin: 0;
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 950;
    line-height: 1.12;
}

.sr-receipt-header p {
    margin: .12rem 0 0;
    color: #64748b;
    font-size: .82rem;
    line-height: 1.35;
}

.sr-receipt-branch {
    color: #334155 !important;
    font-weight: 900;
}

.sr-receipt-business-line {
    overflow-wrap: anywhere;
}

.sr-receipt-title-row {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: center;
    margin-bottom: .85rem;
    padding: .85rem;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, .9);
}

    .sr-receipt-title-row small,
    .sr-receipt-meta span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    .sr-receipt-title-row strong {
        display: block;
        color: #0f172a;
        font-size: .96rem;
        font-weight: 950;
    }

.sr-receipt-status {
    padding: .35rem .7rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 950;
    white-space: nowrap;
}

    .sr-receipt-status.paid {
        color: #166534;
        background: #dcfce7;
    }

    .sr-receipt-status.partial {
        color: #92400e;
        background: #fef3c7;
    }

    .sr-receipt-status.credit {
        color: #991b1b;
        background: #fee2e2;
    }

.sr-receipt-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .6rem;
}

    .sr-receipt-meta > div {
        min-width: 0;
        padding: .7rem;
        border-radius: 17px;
        background: #f8fafc;
        border: 1px solid rgba(226, 232, 240, .85);
    }

    .sr-receipt-meta strong {
        display: block;
        margin-top: .15rem;
        color: #0f172a;
        font-size: .82rem;
        font-weight: 950;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.sr-receipt-rule {
    height: 1px;
    margin: 1rem 0;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, .5), transparent);
}

.sr-receipt-items {
    display: grid;
    gap: .35rem;
}

.sr-receipt-items-head,
.sr-receipt-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px 120px;
    gap: .65rem;
    align-items: center;
}

.sr-receipt-items-head {
    color: #64748b;
    font-size: .7rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.sr-receipt-item {
    padding: .72rem;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, .85);
    background: #ffffff;
}

    .sr-receipt-item strong {
        color: #0f172a;
        font-size: .86rem;
        font-weight: 950;
    }

    .sr-receipt-item small {
        display: block;
        margin-top: .15rem;
        color: #64748b;
        font-size: .72rem;
        font-weight: 750;
    }

    .sr-receipt-items-head span:nth-child(2),
    .sr-receipt-items-head span:nth-child(3),
    .sr-receipt-item > span,
    .sr-receipt-item > strong:last-child {
        text-align: right;
    }

    .sr-receipt-item > span {
        color: #0f172a;
        font-weight: 850;
    }

.sr-receipt-totals {
    width: min(100%, 360px);
    margin-left: auto;
    display: grid;
    gap: .45rem;
}

    .sr-receipt-totals > div {
        display: flex;
        justify-content: space-between;
        gap: .75rem;
    }

    .sr-receipt-totals span {
        color: #64748b;
        font-weight: 850;
    }

    .sr-receipt-totals strong {
        color: #0f172a;
        font-weight: 950;
    }

.sr-receipt-balance {
    margin-top: .25rem;
    padding-top: .55rem;
    border-top: 1px dashed rgba(148, 163, 184, .5);
}

    .sr-receipt-balance.has-balance strong {
        color: #b91c1c;
    }

    .sr-receipt-balance.settled strong {
        color: #166534;
    }

.sr-receipt-payments h2 {
    margin: 0 0 .5rem;
    color: #0f172a;
    font-size: .95rem;
    font-weight: 950;
}

.sr-receipt-payments {
    display: grid;
    gap: .45rem;
}

    .sr-receipt-payments > div {
        display: grid;
        grid-template-columns: 1fr auto auto;
        gap: .7rem;
        align-items: center;
        padding: .6rem .7rem;
        border-radius: 15px;
        background: #f8fafc;
    }

    .sr-receipt-payments span,
    .sr-receipt-payments small {
        color: #64748b;
        font-size: .78rem;
        font-weight: 800;
    }

    .sr-receipt-payments strong {
        color: #0f172a;
        font-size: .84rem;
        font-weight: 950;
    }

.sr-receipt-footer {
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(148, 163, 184, .5);
    text-align: center;
}

    .sr-receipt-footer strong,
    .sr-receipt-footer span,
    .sr-receipt-footer small {
        display: block;
    }

    .sr-receipt-footer strong {
        color: #0f172a;
        font-weight: 950;
    }

    .sr-receipt-footer span,
    .sr-receipt-footer small {
        margin-top: .15rem;
        color: #64748b;
        font-size: .75rem;
        font-weight: 750;
    }

@media (max-width: 768px) {
    .sr-receipt-page {
        padding: .75rem .65rem 6rem;
    }

    .sr-receipt-toolbar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .sr-receipt-print-panel {
        grid-template-columns: 1fr;
    }

    .sr-receipt-help {
        text-align: left;
        line-height: 1.45;
    }

    .sr-receipt-card {
        padding: .9rem;
        border-radius: 24px;
    }

    .sr-receipt-header {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: .65rem;
    }

    .sr-receipt-logo {
        width: 50px;
        height: 50px;
        border-radius: 17px;
    }

    .sr-receipt-header h1 {
        font-size: 1.05rem;
        overflow-wrap: anywhere;
    }

    .sr-receipt-header p {
        font-size: .74rem;
    }

    .sr-receipt-title-row {
        padding: .72rem;
        border-radius: 18px;
    }

    .sr-receipt-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sr-receipt-items-head,
    .sr-receipt-item {
        grid-template-columns: minmax(0, 1fr) 52px 86px;
        gap: .35rem;
    }

    .sr-receipt-item {
        padding: .65rem .55rem;
    }

        .sr-receipt-item strong {
            font-size: .8rem;
        }

        .sr-receipt-item small {
            font-size: .66rem;
        }

        .sr-receipt-item > span,
        .sr-receipt-item > strong:last-child {
            font-size: .76rem;
            white-space: nowrap;
        }

    .sr-receipt-totals {
        width: 100%;
        margin-left: 0;
    }

    .sr-receipt-payments > div {
        grid-template-columns: 1fr;
        gap: .2rem;
    }
}

@media (max-width: 420px) {
    .sr-receipt-meta {
        grid-template-columns: 1fr;
    }

    .sr-receipt-items-head,
    .sr-receipt-item {
        grid-template-columns: minmax(0, 1fr) 44px 76px;
    }
}

.sr-sale-completed-page {
    max-width: 760px;
}

.sr-sale-completed-card {
    padding: 1.2rem;
    border-radius: 28px;
    text-align: center;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.sr-sale-completed-icon {
    width: 64px;
    height: 64px;
    display: inline-grid;
    place-items: center;
    margin-bottom: .75rem;
    border-radius: 24px;
    background: #dcfce7;
    font-size: 2rem;
}

.sr-sale-completed-card small {
    display: block;
    color: #16a34a;
    font-size: .75rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.sr-sale-completed-card h2 {
    margin: .3rem 0 .4rem;
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 950;
}

.sr-sale-completed-card p {
    max-width: 520px;
    margin: 0 auto 1rem;
    color: #64748b;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.45;
}

.sr-sale-completed-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .65rem;
    margin: 1rem 0;
}

    .sr-sale-completed-summary > div {
        min-width: 0;
        padding: .75rem;
        border-radius: 18px;
        background: #f8fafc;
        border: 1px solid rgba(226, 232, 240, .85);
    }

    .sr-sale-completed-summary span {
        display: block;
        color: #64748b;
        font-size: .65rem;
        font-weight: 950;
        text-transform: uppercase;
    }

    .sr-sale-completed-summary strong {
        display: block;
        margin-top: .12rem;
        color: #0f172a;
        font-size: .86rem;
        font-weight: 950;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.sr-sale-completed-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .65rem;
}

    .sr-sale-completed-actions .btn {
        min-height: 44px;
        border-radius: 16px;
        font-weight: 900;
    }

@media (max-width: 767.98px) {
    .sr-sale-completed-page {
        padding-bottom: calc(var(--sr-bottom-nav-height, 76px) + 24px);
    }

    .sr-sale-completed-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sr-sale-completed-actions {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   DESKTOP TRANSACTION PRODUCT SEARCH FIX
   Keeps product search results directly under the search box.
========================================================= */

.transaction-form[data-current-step="2"] .sr-sale-items-sticky {
    overflow: visible !important;
    z-index: 2600 !important;
}

    .transaction-form[data-current-step="2"] .sr-sale-items-sticky .transaction-search-shell {
        position: relative !important;
        overflow: visible !important;
        z-index: 2700 !important;
    }

    .transaction-form[data-current-step="2"] .sr-sale-items-sticky .search-results {
        position: absolute !important;
        top: calc(100% + 8px) !important;
        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        width: 100% !important;
        max-height: min(320px, 45vh) !important;
        z-index: 2800 !important;
        background: #ffffff !important;
        border: 1px solid rgba(148, 163, 184, .35) !important;
        border-radius: 18px !important;
        box-shadow: 0 22px 50px rgba(15, 23, 42, .22) !important;
        overflow-y: auto !important;
    }

        .transaction-form[data-current-step="2"] .sr-sale-items-sticky .search-results.d-none {
            display: none !important;
        }

    .transaction-form[data-current-step="2"] .sr-sale-items-sticky .search-item {
        width: 100%;
        display: block;
        text-align: left;
        padding: .8rem .95rem;
        background: #ffffff;
    }

/* =========================================================
   STEP 1 CUSTOMER / SUPPLIER SEARCH FIX
   Keeps customer/supplier dropdown visible under the search box.
========================================================= */

.transaction-form .txn-step[data-step="1"] {
    overflow: visible !important;
    position: relative !important;
    z-index: 2200 !important;
}

    .transaction-form .txn-step[data-step="1"] .card-modern {
        overflow: visible !important;
        position: relative !important;
        z-index: 2200 !important;
    }

.transaction-form .transaction-search-shell {
    position: relative !important;
    overflow: visible !important;
}

.transaction-form .txn-step[data-step="1"] .transaction-search-shell {
    z-index: 2300 !important;
}

.transaction-form .txn-step[data-step="1"] .search-results {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    max-height: min(320px, 45vh) !important;
    z-index: 2400 !important;
    background: #ffffff !important;
    border: 1px solid rgba(148, 163, 184, .35) !important;
    border-radius: 18px !important;
    box-shadow: 0 22px 50px rgba(15, 23, 42, .22) !important;
    overflow-y: auto !important;
}

    .transaction-form .txn-step[data-step="1"] .search-results.d-none {
        display: none !important;
    }

.transaction-form .txn-step[data-step="1"] .search-item {
    width: 100%;
    display: block;
    text-align: left;
    padding: .8rem .95rem;
    background: #ffffff;
    border-bottom: 1px solid rgba(226, 232, 240, .75) !important;
}

    .transaction-form .txn-step[data-step="1"] .search-item:last-child {
        border-bottom: 0 !important;
    }

/* =========================================================
   GUIDED SETUP MODE
   Keeps new tenants focused until initial setup is complete.
========================================================= */

body.setup-mode .sr-app {
    display: block !important;
}

body.setup-mode .sr-sidebar {
    display: none !important;
}

body.setup-mode .sr-content,
body.setup-mode .sr-content-setup-mode {
    width: 100% !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

body.setup-mode .sr-main {
    width: min(100% - 2rem, 1180px);
    margin-left: auto !important;
    margin-right: auto !important;
}

body.setup-mode .sr-navbar {
    border-bottom: 1px solid rgba(226, 232, 240, .9);
}

body.setup-mode .sr-menu-toggle {
    display: none !important;
}

body.setup-mode .sr-brand-link {
    pointer-events: auto;
}

@media (max-width: 768px) {
    body.setup-mode .sr-main {
        width: min(100% - 1rem, 1180px);
    }
}

/* =========================================================
   TENANT MANAGEMENT / SUBSCRIPTION
========================================================= */

.sr-tenant-management-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.sr-tenant-card {
    padding: 1rem;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .07);
}

.sr-tenant-card-head {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

    .sr-tenant-card-head span:first-child {
        display: block;
        color: #64748b;
        font-size: .72rem;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: .06em;
    }

    .sr-tenant-card-head h3 {
        margin: .2rem 0 0;
        color: #0f172a;
        font-size: 1.05rem;
        font-weight: 950;
    }

.sr-tenant-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

    .sr-tenant-info-grid > div {
        min-width: 0;
        padding: .75rem;
        border-radius: 18px;
        background: #f8fafc;
        border: 1px solid rgba(226, 232, 240, .85);
    }

    .sr-tenant-info-grid span {
        display: block;
        color: #64748b;
        font-size: .67rem;
        font-weight: 950;
        text-transform: uppercase;
    }

    .sr-tenant-info-grid strong {
        display: block;
        margin-top: .15rem;
        color: #0f172a;
        font-size: .85rem;
        font-weight: 950;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.sr-tenant-form .form-control,
.sr-tenant-form .form-select {
    min-height: 46px;
    border-radius: 15px;
    font-weight: 750;
}

@media (max-width: 900px) {
    .sr-tenant-management-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .sr-tenant-info-grid {
        grid-template-columns: 1fr;
    }

    .sr-tenant-card {
        border-radius: 22px;
        padding: .85rem;
    }
}

/* =========================================================
   TENANT USAGE AGAINST PLAN
========================================================= */

.sr-tenant-usage-panel {
    padding: 1rem;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .95);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .07);
}

.sr-tenant-usage-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem;
}

.sr-tenant-usage-card {
    padding: .9rem;
    border-radius: 22px;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, .95);
}

.sr-tenant-usage-top {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: flex-start;
}

    .sr-tenant-usage-top span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: .06em;
    }

    .sr-tenant-usage-top strong {
        display: block;
        margin-top: .15rem;
        color: #0f172a;
        font-size: 1.25rem;
        font-weight: 950;
    }

    .sr-tenant-usage-top small {
        padding: .35rem .55rem;
        border-radius: 999px;
        background: #e2e8f0;
        color: #475569;
        font-size: .68rem;
        font-weight: 950;
        white-space: nowrap;
    }

.sr-tenant-usage-track {
    height: 9px;
    margin: .85rem 0 .55rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

    .sr-tenant-usage-track span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: #2563eb;
    }

.sr-tenant-usage-card p {
    margin: 0;
    color: #64748b;
    font-size: .8rem;
    font-weight: 700;
}

.sr-tenant-usage-card.success .sr-tenant-usage-track span {
    background: #22c55e;
}

.sr-tenant-usage-card.success .sr-tenant-usage-top small {
    background: #dcfce7;
    color: #166534;
}

.sr-tenant-usage-card.warning .sr-tenant-usage-track span {
    background: #f59e0b;
}

.sr-tenant-usage-card.warning .sr-tenant-usage-top small {
    background: #fef3c7;
    color: #92400e;
}

.sr-tenant-usage-card.danger .sr-tenant-usage-track span {
    background: #ef4444;
}

.sr-tenant-usage-card.danger .sr-tenant-usage-top small {
    background: #fee2e2;
    color: #991b1b;
}

.sr-tenant-usage-card.muted .sr-tenant-usage-top small {
    background: #f1f5f9;
    color: #64748b;
}

@media (max-width: 900px) {
    .sr-tenant-usage-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   STOCKRULER SPLIT SALES PAYMENT
========================================================= */

.sr-split-payment-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
}

    .sr-split-payment-shortcuts .btn {
        min-height: 44px;
        border-radius: 15px;
        font-weight: 900;
    }

.sr-split-payment-list {
    display: grid;
    gap: .7rem;
}

.sr-split-payment-row {
    display: grid;
    grid-template-columns: minmax(145px, .8fr) minmax(150px, 1fr) auto;
    gap: .65rem;
    align-items: end;
    padding: .8rem;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 18px;
    background: #f8fafc;
}

.sr-split-payment-field {
    min-width: 0;
}

    .sr-split-payment-field label {
        display: block;
        margin-bottom: .35rem;
        color: #475569;
        font-size: .72rem;
        font-weight: 900;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .sr-split-payment-field .form-control,
    .sr-split-payment-field .form-select {
        min-height: 46px;
        border-radius: 14px;
        font-weight: 800;
    }

.sr-split-payment-actions {
    display: flex;
    gap: .4rem;
}

    .sr-split-payment-actions .btn {
        min-height: 46px;
        border-radius: 14px;
        white-space: nowrap;
    }

.sr-payment-credit-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.sr-payment-status-badge.paid {
    color: #166534;
    background: #dcfce7;
}

.sr-payment-status-badge.partial {
    color: #92400e;
    background: #fef3c7;
}

.sr-payment-status-badge.credit {
    color: #991b1b;
    background: #fee2e2;
}

@media (max-width: 760px) {
    .sr-split-payment-row {
        grid-template-columns: 1fr 1fr;
    }

    .sr-split-payment-actions {
        grid-column: 1 / -1;
    }

        .sr-split-payment-actions .btn:first-child {
            flex: 1;
        }
}

@media (max-width: 460px) {
    .sr-split-payment-shortcuts,
    .sr-split-payment-row {
        grid-template-columns: 1fr;
    }

    .sr-split-payment-actions {
        grid-column: auto;
    }

    .sr-payment-credit-hint {
        align-items: stretch;
        flex-direction: column;
    }

        .sr-payment-credit-hint .btn {
            width: 100%;
        }
}

.sr-receipt-customer-account {
    margin-top: .85rem;
    padding-top: .75rem;
    border-top: 1px dashed rgba(100, 116, 139, .65);
}

.sr-receipt-customer-account-title {
    margin-bottom: .45rem;
    color: #0f172a;
    font-size: .78rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.sr-receipt-account-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding: .15rem 0;
}

    .sr-receipt-account-row span {
        color: #475569;
        font-size: .8rem;
        font-weight: 750;
    }

    .sr-receipt-account-row strong {
        color: #0f172a;
        font-size: .82rem;
        font-weight: 950;
        white-space: nowrap;
    }

    .sr-receipt-account-row.total {
        margin-top: .35rem;
        padding-top: .45rem;
        border-top: 1px dashed rgba(100, 116, 139, .55);
    }

        .sr-receipt-account-row.total span,
        .sr-receipt-account-row.total strong {
            color: #b91c1c;
            font-weight: 950;
        }

.sr-receipt-account-note {
    display: block;
    margin-top: .4rem;
    color: #64748b;
    font-size: .66rem;
    line-height: 1.35;
}

/* =========================================================
   HELD SALES
========================================================= */

.sr-held-sale-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}

    .sr-held-sale-actions .btn {
        min-height: 44px;
        border-radius: 14px;
        font-weight: 900;
    }

.sr-held-sales-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.sr-held-sale-card {
    padding: 1rem;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .07);
}

.sr-held-sale-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

    .sr-held-sale-card-head small {
        display: block;
        color: #64748b;
        font-size: .7rem;
        font-weight: 900;
    }

    .sr-held-sale-card-head h3 {
        margin: .2rem 0 0;
        color: #0f172a;
        font-size: 1rem;
        font-weight: 950;
    }

.sr-held-sale-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    margin: .85rem 0;
}

    .sr-held-sale-meta > div {
        padding: .65rem;
        border-radius: 16px;
        background: #f8fafc;
    }

    .sr-held-sale-meta span {
        display: block;
        color: #64748b;
        font-size: .65rem;
        font-weight: 900;
        text-transform: uppercase;
    }

    .sr-held-sale-meta strong {
        display: block;
        margin-top: .15rem;
        color: #0f172a;
        font-size: .82rem;
        font-weight: 950;
    }

.sr-held-sale-actions form {
    margin: 0;
}

    .sr-held-sale-actions form .btn {
        width: 100%;
    }

@media (max-width: 800px) {
    .sr-held-sales-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {
    .sr-held-sale-actions,
    .sr-held-sale-meta {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   ROLE-AWARE HOME DASHBOARD
========================================================= */

.pro-role-dashboard {
    display: grid;
    gap: 1rem;
}

.pro-role-dashboard-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem;
    border-radius: 26px;
    color: #fff;
    background: radial-gradient( circle at top right, rgba(96, 165, 250, .38), transparent 18rem), linear-gradient( 135deg, #0f172a, #1d4ed8);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
}

    .pro-role-dashboard-hero span {
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
        opacity: .78;
    }

    .pro-role-dashboard-hero h1 {
        margin: .18rem 0;
        font-size: clamp(1.25rem, 3vw, 1.75rem);
        font-weight: 950;
        letter-spacing: -.035em;
    }

    .pro-role-dashboard-hero p {
        margin: 0;
        font-size: .82rem;
        opacity: .82;
    }

.pro-role-badge {
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: .35rem .75rem;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
}

.pro-role-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.pro-role-metric {
    min-width: 0;
    padding: .95rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 22px;
    color: #0f172a;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    text-decoration: none;
}

    .pro-role-metric:hover {
        color: #0f172a;
        transform: translateY(-2px);
    }

    .pro-role-metric span {
        display: block;
        color: #64748b;
        font-size: .66rem;
        font-weight: 900;
        letter-spacing: .055em;
        text-transform: uppercase;
    }

    .pro-role-metric strong {
        display: block;
        overflow: hidden;
        margin-top: .22rem;
        font-size: clamp(1rem, 2.3vw, 1.35rem);
        font-weight: 950;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .pro-role-metric small {
        display: block;
        margin-top: .18rem;
        color: #64748b;
        font-size: .72rem;
    }

    .pro-role-metric.primary {
        background: linear-gradient(135deg, #eff6ff, #fff);
    }

    .pro-role-metric.success {
        background: linear-gradient(135deg, #ecfdf5, #fff);
    }

    .pro-role-metric.warning {
        background: linear-gradient(135deg, #fffbeb, #fff);
    }

    .pro-role-metric.danger {
        background: linear-gradient(135deg, #fef2f2, #fff);
    }

.pro-dashboard-attention,
.pro-dashboard-panel {
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.pro-dashboard-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .8rem;
}

    .pro-dashboard-section-title span {
        display: block;
        color: #2563eb;
        font-size: .66rem;
        font-weight: 900;
        letter-spacing: .07em;
        text-transform: uppercase;
    }

    .pro-dashboard-section-title strong {
        display: block;
        margin-top: .12rem;
        color: #0f172a;
        font-size: .98rem;
        font-weight: 950;
    }

.pro-dashboard-attention-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .65rem;
}

.pro-dashboard-attention-item {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .75rem;
    border-radius: 18px;
    color: #0f172a;
    background: #f8fafc;
    text-decoration: none;
}

    .pro-dashboard-attention-item > span {
        font-size: 1.2rem;
    }

    .pro-dashboard-attention-item strong {
        display: block;
        font-size: .84rem;
        font-weight: 950;
    }

    .pro-dashboard-attention-item small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .7rem;
    }

.pro-dashboard-low-stock-list,
.pro-dashboard-activity-list {
    display: grid;
    gap: .55rem;
}

    .pro-dashboard-low-stock-list article,
    .pro-dashboard-activity-list article {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: .75rem;
        padding: .7rem;
        border-radius: 17px;
        background: #f8fafc;
    }

    .pro-dashboard-low-stock-list strong,
    .pro-dashboard-activity-list strong {
        color: #0f172a;
        font-size: .82rem;
        font-weight: 900;
    }

    .pro-dashboard-low-stock-list small,
    .pro-dashboard-activity-list small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .72rem;
    }

    .pro-dashboard-low-stock-list article > span {
        padding: .2rem .55rem;
        border-radius: 999px;
        color: #b91c1c;
        background: #fee2e2;
        font-size: .68rem;
        font-weight: 900;
    }

@media (max-width: 900px) {
    .pro-role-metric-grid,
    .pro-dashboard-attention-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .pro-role-dashboard-hero {
        padding: .9rem;
        border-radius: 22px;
    }

    .pro-role-badge {
        display: none;
    }

    .pro-role-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pro-dashboard-attention-grid {
        grid-template-columns: 1fr;
    }

    .pro-role-metric {
        padding: .78rem;
        border-radius: 19px;
    }
}

/* =========================================================
   OWNER DECISION DASHBOARD
========================================================= */

.pro-owner-performance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem;
}

    .pro-owner-performance-grid article,
    .pro-receivables-grid article {
        min-width: 0;
        padding: .8rem;
        border-radius: 18px;
        background: #f8fafc;
    }

    .pro-owner-performance-grid span,
    .pro-receivables-grid span {
        display: block;
        color: #64748b;
        font-size: .66rem;
        font-weight: 900;
        letter-spacing: .055em;
        text-transform: uppercase;
    }

    .pro-owner-performance-grid strong,
    .pro-receivables-grid strong {
        display: block;
        margin-top: .18rem;
        color: #0f172a;
        font-size: 1rem;
        font-weight: 950;
    }

    .pro-owner-performance-grid small,
    .pro-receivables-grid small {
        display: block;
        margin-top: .16rem;
        color: #64748b;
        font-size: .7rem;
        line-height: 1.35;
    }

        .pro-owner-performance-grid small.positive {
            color: #047857;
        }

        .pro-owner-performance-grid small.negative {
            color: #b91c1c;
        }

        .pro-owner-performance-grid small.neutral {
            color: #64748b;
        }

.pro-owner-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.pro-payment-mix-list {
    display: grid;
    gap: .7rem;
}

    .pro-payment-mix-list article {
        display: grid;
        gap: .38rem;
    }

.pro-payment-mix-copy {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

    .pro-payment-mix-copy strong {
        color: #0f172a;
        font-size: .82rem;
        font-weight: 900;
    }

    .pro-payment-mix-copy small {
        display: block;
        margin-top: .1rem;
        color: #64748b;
        font-size: .68rem;
    }

.pro-payment-mix-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

    .pro-payment-mix-track span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient( 90deg, #2563eb, #22c55e);
    }

.pro-receivables-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

    .pro-receivables-grid .total {
        grid-column: 1 / -1;
        color: #fff;
        background: linear-gradient( 135deg, #0f172a, #1d4ed8);
    }

        .pro-receivables-grid .total span,
        .pro-receivables-grid .total strong,
        .pro-receivables-grid .total small {
            color: #fff;
        }

.pro-branch-ranking-table {
    margin-bottom: 0;
}

    .pro-branch-ranking-table th {
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .pro-branch-ranking-table td {
        vertical-align: middle;
        font-size: .78rem;
        white-space: nowrap;
    }

        .pro-branch-ranking-table td:first-child {
            white-space: normal;
        }

        .pro-branch-ranking-table td a {
            color: #0f172a;
            text-decoration: none;
        }

        .pro-branch-ranking-table td small {
            display: block;
            color: #b45309;
            font-size: .66rem;
        }

    .pro-branch-ranking-table tr.no-activity {
        background: #fffbeb;
    }

.pro-dashboard-attention-item.warning {
    background: #fffbeb;
}

.pro-dashboard-attention-item.success {
    background: #ecfdf5;
}

@media (max-width: 900px) {
    .pro-owner-performance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pro-owner-two-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .pro-owner-performance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .pro-owner-performance-grid article {
            padding: .7rem;
        }

    .pro-receivables-grid {
        grid-template-columns: 1fr;
    }

        .pro-receivables-grid .total {
            grid-column: auto;
        }
}

/* =========================================================
   SUBSCRIPTION, PLAN USAGE & OPERATIONAL RISK
========================================================= */

.pro-subscription-health {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
}

    .pro-subscription-health.attention {
        border-color: rgba(245, 158, 11, .38);
        background: linear-gradient(135deg, #fffbeb, #ffffff);
    }

.pro-subscription-summary {
    display: grid;
    grid-template-columns: 180px 220px minmax(0, 1fr);
    gap: .65rem;
}

    .pro-subscription-summary > div {
        padding: .75rem;
        border-radius: 17px;
        background: rgba(241, 245, 249, .82);
    }

    .pro-subscription-summary span {
        display: block;
        color: #64748b;
        font-size: .64rem;
        font-weight: 900;
        letter-spacing: .055em;
        text-transform: uppercase;
    }

    .pro-subscription-summary strong {
        display: block;
        margin-top: .18rem;
        color: #0f172a;
        font-size: .82rem;
        font-weight: 900;
    }

    .pro-subscription-summary .status {
        width: fit-content;
        padding: .24rem .6rem;
        border-radius: 999px;
    }

        .pro-subscription-summary .status.success {
            color: #047857;
            background: #d1fae5;
        }

        .pro-subscription-summary .status.warning {
            color: #92400e;
            background: #fef3c7;
        }

        .pro-subscription-summary .status.danger {
            color: #b91c1c;
            background: #fee2e2;
        }

.pro-plan-usage-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin-top: .75rem;
}

    .pro-plan-usage-grid article {
        padding: .75rem;
        border-radius: 17px;
        background: #f8fafc;
    }

        .pro-plan-usage-grid article > div:first-child {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: .5rem;
        }

    .pro-plan-usage-grid strong {
        color: #0f172a;
        font-size: .8rem;
        font-weight: 900;
    }

    .pro-plan-usage-grid span {
        color: #64748b;
        font-size: .72rem;
        font-weight: 800;
    }

    .pro-plan-usage-grid small {
        display: block;
        margin-top: .35rem;
        color: #64748b;
        font-size: .67rem;
    }

.pro-plan-usage-track {
    height: 7px;
    margin-top: .5rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

    .pro-plan-usage-track span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: #22c55e;
    }

.pro-plan-usage-grid article.warning
.pro-plan-usage-track span {
    background: #f59e0b;
}

.pro-plan-usage-grid article.danger
.pro-plan-usage-track span {
    background: #dc2626;
}

.pro-operational-risk-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem;
}

.pro-operational-risk-card {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    min-width: 0;
    padding: .85rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 19px;
    color: #0f172a;
    background: #f8fafc;
    text-decoration: none;
}

    .pro-operational-risk-card:hover {
        color: #0f172a;
        transform: translateY(-2px);
    }

    .pro-operational-risk-card.warning {
        background: #fffbeb;
    }

    .pro-operational-risk-card.danger {
        background: #fef2f2;
    }

    .pro-operational-risk-card.success {
        background: #ecfdf5;
    }

    .pro-operational-risk-card.neutral {
        background: #eff6ff;
    }

    .pro-operational-risk-card .icon {
        flex: 0 0 auto;
        font-size: 1.3rem;
    }

    .pro-operational-risk-card small {
        display: block;
        color: #64748b;
        font-size: .64rem;
        font-weight: 900;
        letter-spacing: .055em;
        text-transform: uppercase;
    }

    .pro-operational-risk-card strong {
        display: block;
        margin-top: .15rem;
        color: #0f172a;
        font-size: 1.05rem;
        font-weight: 950;
    }

    .pro-operational-risk-card p {
        margin: .16rem 0 0;
        color: #64748b;
        font-size: .7rem;
        line-height: 1.35;
    }

    .pro-operational-risk-card b {
        display: block;
        margin-top: .35rem;
        color: #0f172a;
        font-size: .72rem;
        font-weight: 900;
    }

.pro-risk-note {
    margin: .7rem 0 0;
    color: #64748b;
    font-size: .7rem;
}

@media (max-width: 900px) {
    .pro-subscription-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .pro-subscription-summary .message {
            grid-column: 1 / -1;
        }

    .pro-operational-risk-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .pro-subscription-summary,
    .pro-plan-usage-grid,
    .pro-operational-risk-grid {
        grid-template-columns: 1fr;
    }

        .pro-subscription-summary .message {
            grid-column: auto;
        }
}

/* =========================================================
   HOME DASHBOARD - FINAL MOBILE-FIRST OVERRIDE
========================================================= */

.pro-branch-ranking-mobile {
    display: none;
}

.pro-dashboard-view-all {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: .65rem;
    padding: .65rem .8rem;
    border-radius: 15px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: .76rem;
    font-weight: 900;
    text-decoration: none;
}

.pro-active-filter-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .8rem;
    padding: .75rem;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 18px;
    background: #eff6ff;
}

    .pro-active-filter-banner strong {
        display: block;
        color: #0f172a;
        font-size: .84rem;
        font-weight: 900;
    }

    .pro-active-filter-banner small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .7rem;
    }

@media (max-width: 767.98px) {
    .pro-role-dashboard {
        width: 100%;
        min-width: 0;
        gap: .7rem;
        overflow-x: hidden;
        padding-bottom: calc(92px + env(safe-area-inset-bottom));
    }

    .pro-dashboard-panel,
    .pro-dashboard-attention,
    .pro-home-actions {
        width: 100%;
        min-width: 0;
        margin-bottom: 0;
        padding: .72rem;
        border-radius: 19px;
    }

    .pro-dashboard-section-title {
        align-items: flex-start;
        margin-bottom: .65rem;
    }

        .pro-dashboard-section-title strong {
            font-size: .9rem;
            line-height: 1.25;
        }

    .pro-role-metric-grid,
    .pro-owner-performance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .5rem;
    }

        .pro-role-metric,
        .pro-owner-performance-grid article {
            padding: .68rem;
            border-radius: 16px;
        }

            .pro-role-metric strong,
            .pro-owner-performance-grid strong {
                font-size: .9rem;
                white-space: normal;
                overflow-wrap: anywhere;
            }

    .pro-owner-two-column,
    .pro-dashboard-attention-grid,
    .pro-operational-risk-grid,
    .pro-plan-usage-grid {
        grid-template-columns: 1fr;
        gap: .55rem;
    }

    .pro-home-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .5rem;
    }

    .pro-home-action {
        min-width: 0;
        min-height: 76px;
        align-items: flex-start;
        gap: .5rem;
        padding: .65rem;
        border-radius: 16px;
    }

        .pro-home-action > span {
            flex: 0 0 34px;
            width: 34px;
            height: 34px;
            display: grid;
            place-items: center;
            border-radius: 12px;
        }

        .pro-home-action strong {
            font-size: .78rem;
            line-height: 1.2;
        }

        .pro-home-action small {
            margin-top: .1rem;
            font-size: .64rem;
            line-height: 1.25;
        }

    .pro-operational-risk-card {
        min-height: auto;
        padding: .72rem;
        border-radius: 17px;
    }

        .pro-operational-risk-card strong {
            font-size: .94rem;
        }

        .pro-operational-risk-card p,
        .pro-operational-risk-card b {
            font-size: .66rem;
        }

    .pro-branch-ranking-desktop {
        display: none;
    }

    .pro-branch-ranking-mobile {
        display: grid;
        gap: .55rem;
    }

    .pro-branch-ranking-card {
        display: grid;
        gap: .65rem;
        padding: .75rem;
        border: 1px solid rgba(148, 163, 184, .16);
        border-radius: 17px;
        color: #0f172a;
        background: #f8fafc;
        text-decoration: none;
    }

        .pro-branch-ranking-card.inactive {
            background: #fffbeb;
        }

    .pro-branch-ranking-card-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: .5rem;
    }

        .pro-branch-ranking-card-head strong {
            display: block;
            font-size: .84rem;
            font-weight: 900;
        }

        .pro-branch-ranking-card-head small {
            display: block;
            margin-top: .1rem;
            color: #64748b;
            font-size: .66rem;
        }

        .pro-branch-ranking-card-head > span {
            flex: 0 0 auto;
            padding: .22rem .5rem;
            border-radius: 999px;
            color: #1d4ed8;
            background: #dbeafe;
            font-size: .68rem;
            font-weight: 900;
        }

    .pro-branch-ranking-card-metrics {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .4rem;
    }

        .pro-branch-ranking-card-metrics > div {
            min-width: 0;
            padding: .5rem;
            border-radius: 13px;
            background: #ffffff;
        }

        .pro-branch-ranking-card-metrics small {
            display: block;
            color: #64748b;
            font-size: .56rem;
            font-weight: 900;
            text-transform: uppercase;
        }

        .pro-branch-ranking-card-metrics strong {
            display: block;
            margin-top: .12rem;
            overflow-wrap: anywhere;
            font-size: .68rem;
            font-weight: 900;
        }

    .pro-dashboard-low-stock-list article {
        padding: .62rem;
        border-radius: 15px;
    }

    .pro-risk-note {
        font-size: .64rem;
        line-height: 1.35;
    }
}

@media (max-width: 390px) {
    .pro-role-metric-grid,
    .pro-owner-performance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pro-home-action small {
        display: none;
    }

    .pro-home-action {
        min-height: 66px;
        align-items: center;
    }

    .pro-branch-ranking-card-metrics {
        grid-template-columns: 1fr;
    }

        .pro-branch-ranking-card-metrics > div {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: .5rem;
        }
}

/* =========================================================
   TRANSACTION KEYBOARD STABILITY — FINAL MOBILE OVERRIDE
========================================================= */

:root {
    --sr-visible-viewport-height: 100dvh;
}

@media (max-width: 767.98px) {

    /*
     * Allow each item card to take its natural height.
     * The previous dynamic min/max heights changed whenever
     * the phone keyboard changed 100dvh.
     */
    body.sr-transaction-entry-mode
    .transaction-form
    #mobileRows {
        align-items: flex-start !important;
        overflow-y: visible !important;
    }

        body.sr-transaction-entry-mode
        .transaction-form
        #mobileRows
        .mobiletxn-row {
            height: auto !important;
            min-height: 0 !important;
            max-height: none !important;
            overflow: visible !important;
        }

    body.sr-transaction-entry-mode
    .transaction-form
    .txn-step[data-step="2"] {
        min-height: auto !important;
    }

    /*
     * While typing, remove fixed controls that compete with
     * the reduced keyboard viewport.
     */
    body.sr-mobile-keyboard-open
    .pro-mobile-bottom-nav,
    body.sr-mobile-keyboard-open
    .transaction-form
    .sr-sale-step-actions,
    body.sr-mobile-keyboard-open
    .transaction-form
    .sale-action-bar,
    body.sr-mobile-keyboard-open
    .transaction-form
    .post-sale-bar {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateY(120%) !important;
    }

    body.sr-mobile-keyboard-open
    .transaction-form
    #mobileRows {
        scroll-snap-type: none !important;
    }

    body.sr-mobile-keyboard-open,
    body.sr-mobile-keyboard-open * {
        scroll-behavior: auto !important;
    }

        body.sr-mobile-keyboard-open
        .transaction-form
        .txn-step[data-step="2"] {
            padding-bottom: 12px !important;
        }

    /*
     * Product search mode:
     * retain only the search field and results; hide the
     * summary cards to create keyboard space.
     */
    body.sr-mobile-product-search-open
    .transaction-form
    .sr-sale-live-summary {
        display: none !important;
    }

    body.sr-mobile-product-search-open
    .transaction-form
    .txn-step[data-step="2"] {
        padding-top: 72px !important;
    }

    body.sr-mobile-product-search-open
    .transaction-form
    #searchResults {
        max-height: min( 260px, calc( var( --sr-visible-viewport-height, 100dvh ) - 150px ) ) !important;
        overscroll-behavior: contain;
    }

    /*
     * Quantity/price editing mode:
     * hide the fixed search panel so the active item remains
     * comfortably visible above the keyboard.
     */
    body.sr-mobile-item-edit-open
    .transaction-form
    .sr-sale-items-sticky {
        display: none !important;
    }

    body.sr-mobile-item-edit-open
    .transaction-form
    .txn-step[data-step="2"] {
        padding-top: 8px !important;
    }

    body.sr-mobile-item-edit-open
    .transaction-form
    #mobileRows {
        padding-top: 4px !important;
    }

    /*
     * Customer/supplier search results must also fit within
     * the visual viewport when the keyboard is present.
     */
    body.sr-mobile-party-search-open
    .transaction-form
    .txn-step[data-step="1"]
    .search-results {
        max-height: min( 260px, calc( var( --sr-visible-viewport-height, 100dvh ) - 170px ) ) !important;
        overscroll-behavior: contain;
    }

    /*
     * Avoid animations during viewport resizing.
     */
    body.sr-mobile-keyboard-open
    .transaction-form
    .mobiletxn-row,
    body.sr-mobile-keyboard-open
    .transaction-form
    .sr-sale-items-sticky,
    body.sr-mobile-keyboard-open
    .transaction-form
    .sr-sale-step-actions {
        transition: none !important;
        animation: none !important;
    }
}

/* =========================================================
   SUPPLIER PAYABLES DASHBOARD
========================================================= */

.pro-payables-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .65rem;
}

    .pro-payables-grid article {
        min-width: 0;
        padding: .8rem;
        border-radius: 18px;
        background: #f8fafc;
    }

        .pro-payables-grid article.primary {
            background: #eff6ff;
        }

        .pro-payables-grid article.warning {
            background: #fffbeb;
        }

        .pro-payables-grid article.danger {
            background: #fef2f2;
        }

        .pro-payables-grid article.success {
            background: #ecfdf5;
        }

        .pro-payables-grid article.net {
            grid-column: 1 / -1;
            background: linear-gradient( 135deg, #0f172a, #1d4ed8);
        }

    .pro-payables-grid span {
        display: block;
        color: #64748b;
        font-size: .64rem;
        font-weight: 900;
        letter-spacing: .055em;
        text-transform: uppercase;
    }

    .pro-payables-grid strong {
        display: block;
        margin-top: .18rem;
        color: #0f172a;
        font-size: .96rem;
        font-weight: 950;
    }

    .pro-payables-grid small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .68rem;
        line-height: 1.35;
    }

    .pro-payables-grid .net span,
    .pro-payables-grid .net small,
    .pro-payables-grid .net strong {
        color: #ffffff;
    }

    .pro-payables-grid .positive {
        color: #bbf7d0 !important;
    }

    .pro-payables-grid .negative {
        color: #fecaca !important;
    }

.pro-supplier-owed-list {
    display: grid;
    gap: .55rem;
    margin-top: .85rem;
}

.pro-mini-section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: .7rem;
}

    .pro-mini-section-title strong {
        color: #0f172a;
        font-size: .85rem;
        font-weight: 900;
    }

    .pro-mini-section-title span {
        color: #64748b;
        font-size: .68rem;
    }

.pro-supplier-owed-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding: .7rem;
    border: 1px solid rgba(148, 163, 184, .15);
    border-radius: 16px;
    color: #0f172a;
    background: #ffffff;
    text-decoration: none;
}

    .pro-supplier-owed-row:hover {
        color: #0f172a;
        transform: translateY(-1px);
    }

    .pro-supplier-owed-row strong {
        font-size: .8rem;
        font-weight: 900;
    }

    .pro-supplier-owed-row small {
        display: block;
        margin-top: .1rem;
        color: #64748b;
        font-size: .67rem;
    }

@media (max-width: 900px) {
    .pro-payables-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .pro-payables-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .pro-payables-grid article {
            padding: .68rem;
            border-radius: 16px;
        }

        .pro-payables-grid strong {
            font-size: .82rem;
            overflow-wrap: anywhere;
        }

    .pro-supplier-owed-row {
        align-items: stretch;
        flex-direction: column;
        gap: .35rem;
    }

        .pro-supplier-owed-row > strong {
            text-align: right;
        }
}

/* =========================================================
   SUPPLIER PURCHASE BALANCE CARDS
========================================================= */

.pro-supplier-purchase-list {
    display: grid;
    gap: .75rem;
}

.pro-supplier-purchase-card {
    display: grid;
    gap: .75rem;
    padding: .85rem;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .04);
}

    .pro-supplier-purchase-card.unpaid {
        border-color: rgba(239, 68, 68, .22);
        background: linear-gradient( 135deg, rgba(254, 242, 242, .75), #ffffff 46%);
    }

    .pro-supplier-purchase-card.paid {
        border-color: rgba(34, 197, 94, .18);
        background: linear-gradient( 135deg, rgba(236, 253, 245, .72), #ffffff 46%);
    }

.pro-supplier-purchase-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .8rem;
}

    .pro-supplier-purchase-main strong {
        display: block;
        color: #0f172a;
        font-size: .92rem;
        font-weight: 900;
    }

    .pro-supplier-purchase-main small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .72rem;
    }

.pro-payment-status {
    flex: 0 0 auto;
    padding: .28rem .55rem;
    border-radius: 999px;
    font-size: .66rem;
    font-weight: 900;
    text-transform: uppercase;
}

    .pro-payment-status.paid {
        color: #047857;
        background: #d1fae5;
    }

    .pro-payment-status.partial {
        color: #92400e;
        background: #fef3c7;
    }

    .pro-payment-status.unpaid {
        color: #991b1b;
        background: #fee2e2;
    }

.pro-supplier-purchase-money {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
}

    .pro-supplier-purchase-money div {
        min-width: 0;
        padding: .58rem;
        border-radius: 14px;
        background: #f8fafc;
    }

    .pro-supplier-purchase-money span {
        display: block;
        color: #64748b;
        font-size: .62rem;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .pro-supplier-purchase-money strong {
        display: block;
        margin-top: .12rem;
        color: #0f172a;
        font-size: .82rem;
        font-weight: 950;
        overflow-wrap: anywhere;
    }

.pro-supplier-purchase-actions {
    display: flex;
    justify-content: flex-end;
    gap: .45rem;
    flex-wrap: wrap;
}

@media (max-width: 540px) {
    .pro-supplier-purchase-main {
        flex-direction: column;
        gap: .45rem;
    }

    .pro-supplier-purchase-money {
        grid-template-columns: 1fr;
    }

    .pro-supplier-purchase-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

        .pro-supplier-purchase-actions .btn {
            width: 100%;
        }
}

/* =========================================================
   SUPPLIER PAYABLES PAGE - MOBILE FIRST
   Applies to Views/Suppliers/Payables.cshtml
========================================================= */

.sr-supplier-payables-page {
    display: grid;
    gap: 1rem;
}

.sr-payables-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-radius: 26px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1d4ed8), radial-gradient(circle at top left, rgba(255, 255, 255, .20), transparent 16rem);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
}

    .sr-payables-hero span {
        display: block;
        color: #bfdbfe;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .09em;
        text-transform: uppercase;
    }

    .sr-payables-hero strong {
        display: block;
        margin-top: .12rem;
        font-size: clamp(1.35rem, 4vw, 2rem);
        font-weight: 950;
        letter-spacing: -.045em;
    }

    .sr-payables-hero small {
        display: block;
        max-width: 520px;
        margin-top: .18rem;
        color: rgba(255, 255, 255, .82);
        font-size: .78rem;
        line-height: 1.35;
    }

.sr-payables-hero-actions {
    flex: 0 0 auto;
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

    .sr-payables-hero-actions .btn {
        min-height: 42px;
        border-radius: 999px;
        font-weight: 900;
        white-space: nowrap;
    }

.sr-payables-kpi-grid,
.sr-payables-breakdown {
    display: grid;
    gap: .65rem;
}

.sr-payables-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sr-payables-breakdown {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

    .sr-payables-kpi-grid article,
    .sr-payables-breakdown > div {
        min-width: 0;
        padding: .85rem;
        border: 1px solid rgba(148, 163, 184, .16);
        border-radius: 20px;
        background: #ffffff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
    }

        .sr-payables-kpi-grid article.danger {
            background: linear-gradient(135deg, #fef2f2, #ffffff);
        }

        .sr-payables-kpi-grid article.warning {
            background: linear-gradient(135deg, #fffbeb, #ffffff);
        }

        .sr-payables-kpi-grid article.notice {
            background: linear-gradient(135deg, #eff6ff, #ffffff);
        }

        .sr-payables-kpi-grid article.success {
            background: linear-gradient(135deg, #ecfdf5, #ffffff);
        }

    .sr-payables-kpi-grid span,
    .sr-payables-breakdown span {
        display: block;
        color: #64748b;
        font-size: .64rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .sr-payables-kpi-grid strong,
    .sr-payables-breakdown strong {
        display: block;
        margin-top: .15rem;
        color: #0f172a;
        font-size: .96rem;
        font-weight: 950;
        overflow-wrap: anywhere;
    }

.sr-payables-kpi-grid small {
    display: block;
    margin-top: .1rem;
    color: #64748b;
    font-size: .69rem;
    line-height: 1.35;
}

.sr-payables-help {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem;
    border: 1px solid rgba(37, 99, 235, .16);
    border-radius: 22px;
    background: #eff6ff;
}

    .sr-payables-help > span {
        width: 38px;
        height: 38px;
        min-width: 38px;
        display: grid;
        place-items: center;
        border-radius: 14px;
        background: #dbeafe;
        font-size: 1.15rem;
    }

    .sr-payables-help strong {
        display: block;
        color: #0f172a;
        font-size: .86rem;
        font-weight: 900;
    }

    .sr-payables-help small {
        display: block;
        margin-top: .12rem;
        color: #475569;
        font-size: .76rem;
        line-height: 1.42;
    }

.sr-payables-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .7rem;
    align-items: center;
    padding: .8rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.sr-payables-search {
    position: relative;
    min-width: 0;
}

    .sr-payables-search span {
        position: absolute;
        left: .85rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1;
        color: #64748b;
    }

    .sr-payables-search .form-control {
        min-height: 46px;
        padding-left: 2.45rem;
        border-radius: 999px;
        border-color: rgba(148, 163, 184, .32);
        font-size: .9rem;
    }

.sr-payables-filter-tabs {
    display: inline-flex;
    gap: .35rem;
    padding: .25rem;
    border-radius: 999px;
    background: #f1f5f9;
}

    .sr-payables-filter-tabs button {
        min-height: 38px;
        padding: .35rem .85rem;
        border: 0;
        border-radius: 999px;
        color: #475569;
        background: transparent;
        font-size: .78rem;
        font-weight: 900;
        white-space: nowrap;
    }

        .sr-payables-filter-tabs button.active {
            color: #ffffff;
            background: #2563eb;
            box-shadow: 0 8px 18px rgba(37, 99, 235, .20);
        }

.sr-payables-result-count {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    padding-inline: .25rem;
    color: #64748b;
}

    .sr-payables-result-count span {
        color: #0f172a;
        font-size: .92rem;
        font-weight: 950;
    }

    .sr-payables-result-count small {
        font-size: .76rem;
        font-weight: 800;
    }

.sr-payables-mobile-list {
    display: grid;
    gap: .85rem;
}

.sr-payable-supplier-card {
    display: grid;
    gap: .78rem;
    padding: .9rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .07);
}

    .sr-payable-supplier-card.overdue {
        border-color: rgba(239, 68, 68, .28);
        background: linear-gradient(135deg, #fef2f2, #ffffff 46%);
    }

    .sr-payable-supplier-card.due-soon {
        border-color: rgba(245, 158, 11, .28);
        background: linear-gradient(135deg, #fffbeb, #ffffff 46%);
    }

    .sr-payable-supplier-card.ok {
        border-color: rgba(34, 197, 94, .18);
        background: linear-gradient(135deg, #ecfdf5, #ffffff 46%);
    }

.sr-payable-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

    .sr-payable-card-top strong {
        display: block;
        color: #0f172a;
        font-size: .98rem;
        font-weight: 950;
        line-height: 1.2;
    }

    .sr-payable-card-top small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .72rem;
        line-height: 1.35;
    }

.sr-payable-status {
    flex: 0 0 auto;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .3rem .65rem;
    border-radius: 999px;
    font-size: .67rem;
    font-weight: 950;
    text-transform: uppercase;
    white-space: nowrap;
}

    .sr-payable-status.overdue {
        color: #991b1b;
        background: #fee2e2;
    }

    .sr-payable-status.due-soon {
        color: #92400e;
        background: #fef3c7;
    }

    .sr-payable-status.ok {
        color: #047857;
        background: #d1fae5;
    }

.sr-payable-balance-box {
    padding: .8rem;
    border-radius: 20px;
    color: #ffffff;
    background: linear-gradient(135deg, #991b1b, #dc2626);
}

    .sr-payable-balance-box span {
        display: block;
        color: rgba(255, 255, 255, .78);
        font-size: .66rem;
        font-weight: 900;
        letter-spacing: .07em;
        text-transform: uppercase;
    }

    .sr-payable-balance-box strong {
        display: block;
        margin-top: .12rem;
        font-size: 1.25rem;
        font-weight: 950;
        letter-spacing: -.035em;
    }

.sr-payable-money-grid,
.sr-payable-alert-row {
    display: grid;
    gap: .55rem;
}

.sr-payable-money-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

    .sr-payable-money-grid > div,
    .sr-payable-alert-row > div {
        min-width: 0;
        padding: .65rem;
        border-radius: 16px;
        background: rgba(248, 250, 252, .92);
    }

.sr-payable-alert-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

    .sr-payable-alert-row .danger {
        background: #fef2f2;
    }

    .sr-payable-alert-row .warning {
        background: #fffbeb;
    }

    .sr-payable-money-grid span,
    .sr-payable-alert-row span {
        display: block;
        color: #64748b;
        font-size: .62rem;
        font-weight: 900;
        letter-spacing: .055em;
        text-transform: uppercase;
    }

    .sr-payable-money-grid strong,
    .sr-payable-alert-row strong {
        display: block;
        margin-top: .12rem;
        color: #0f172a;
        font-size: .8rem;
        font-weight: 950;
        overflow-wrap: anywhere;
    }

    .sr-payable-alert-row small {
        display: block;
        margin-top: .08rem;
        color: #64748b;
        font-size: .67rem;
    }

.sr-payable-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
}

    .sr-payable-card-actions .btn {
        min-height: 44px;
        border-radius: 999px;
        font-weight: 900;
    }

.sr-payables-desktop-table {
    display: none;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.sr-payables-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .85rem;
}

    .sr-payables-table-head strong {
        display: block;
        color: #0f172a;
        font-size: .95rem;
        font-weight: 950;
    }

    .sr-payables-table-head small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .75rem;
    }

.sr-payables-desktop-table table {
    margin-bottom: 0;
}

.sr-payables-desktop-table thead th {
    color: #64748b;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.sr-payables-desktop-table tbody td {
    color: #0f172a;
    font-size: .84rem;
    vertical-align: middle;
}

.sr-payable-table-badge {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: .25rem .55rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 900;
    white-space: nowrap;
}

    .sr-payable-table-badge.overdue {
        color: #991b1b;
        background: #fee2e2;
    }

    .sr-payable-table-badge.due-soon {
        color: #92400e;
        background: #fef3c7;
    }

    .sr-payable-table-badge.ok {
        color: #047857;
        background: #d1fae5;
    }

.sr-payables-empty {
    display: grid;
    place-items: center;
    gap: .45rem;
    padding: 2.2rem 1rem;
    border: 1px dashed rgba(148, 163, 184, .35);
    border-radius: 24px;
    color: #64748b;
    text-align: center;
    background: #ffffff;
}

    .sr-payables-empty > span {
        font-size: 2rem;
    }

    .sr-payables-empty strong {
        color: #0f172a;
        font-size: 1rem;
        font-weight: 950;
    }

    .sr-payables-empty small {
        max-width: 320px;
        line-height: 1.45;
    }

    .sr-payables-empty .btn {
        margin-top: .4rem;
        border-radius: 999px;
        font-weight: 900;
    }

@media (min-width: 992px) {
    .sr-payables-mobile-list {
        display: none;
    }

    .sr-payables-desktop-table {
        display: block;
    }
}

@media (max-width: 900px) {
    .sr-payables-hero {
        align-items: stretch;
        flex-direction: column;
        border-radius: 24px;
    }

    .sr-payables-hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .sr-payables-kpi-grid,
    .sr-payables-breakdown {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sr-payables-toolbar {
        grid-template-columns: 1fr;
    }

    .sr-payables-filter-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 540px) {
    .sr-supplier-payables-page {
        gap: .85rem;
    }

    .sr-payables-hero,
    .sr-payable-supplier-card,
    .sr-payables-toolbar {
        border-radius: 22px;
    }

    .sr-payables-hero {
        padding: .9rem;
    }

    .sr-payables-hero-actions {
        grid-template-columns: 1fr;
    }

    .sr-payables-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .55rem;
    }

    .sr-payables-breakdown,
    .sr-payable-money-grid,
    .sr-payable-alert-row {
        grid-template-columns: 1fr;
    }

        .sr-payables-kpi-grid article,
        .sr-payables-breakdown > div {
            padding: .72rem;
            border-radius: 18px;
        }

        .sr-payables-kpi-grid strong,
        .sr-payables-breakdown strong {
            font-size: .82rem;
        }

    .sr-payable-card-top {
        flex-direction: column;
        gap: .45rem;
    }

    .sr-payable-status {
        width: fit-content;
    }

    .sr-payable-card-actions {
        grid-template-columns: 1fr;
    }

    .sr-payables-help {
        border-radius: 20px;
    }
}

/* =========================================================
   SUPPLIER DETAILS PAGE - MOBILE FIRST
   Applies to Views/Suppliers/Details.cshtml
========================================================= */

.sr-supplier-details-page {
    display: grid;
    gap: 1rem;
}

.sr-supplier-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-radius: 26px;
    color: #ffffff;
    background: linear-gradient(135deg, #064e3b, #047857), radial-gradient(circle at top left, rgba(255, 255, 255, .20), transparent 16rem);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
}

.sr-supplier-hero-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .85rem;
}

.sr-supplier-avatar {
    width: 58px;
    height: 58px;
    min-width: 58px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    color: #064e3b;
    background: #d1fae5;
    font-size: 1.35rem;
    font-weight: 950;
}

.sr-supplier-hero-main span {
    display: block;
    color: #bbf7d0;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.sr-supplier-hero-main strong {
    display: block;
    margin-top: .08rem;
    overflow: hidden;
    color: #ffffff;
    font-size: clamp(1.15rem, 3vw, 1.65rem);
    font-weight: 950;
    letter-spacing: -.04em;
    text-overflow: ellipsis;
}

.sr-supplier-contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .38rem;
}

    .sr-supplier-contact-row small {
        min-height: 28px;
        display: inline-flex;
        align-items: center;
        padding: .25rem .6rem;
        border-radius: 999px;
        color: rgba(255, 255, 255, .86);
        background: rgba(255, 255, 255, .12);
        font-size: .72rem;
        font-weight: 800;
    }

.sr-supplier-hero-actions {
    flex: 0 0 auto;
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

    .sr-supplier-hero-actions .btn,
    .sr-supplier-action-strip .btn,
    .sr-supplier-purchase-actions .btn {
        min-height: 42px;
        border-radius: 999px;
        font-weight: 900;
    }

.sr-supplier-balance-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-radius: 24px;
    color: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .12);
}

    .sr-supplier-balance-card.owing {
        background: linear-gradient(135deg, #991b1b, #dc2626);
    }

    .sr-supplier-balance-card.settled {
        background: linear-gradient(135deg, #047857, #16a34a);
    }

    .sr-supplier-balance-card span {
        display: block;
        color: rgba(255, 255, 255, .82);
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .sr-supplier-balance-card strong {
        display: block;
        margin-top: .12rem;
        font-size: clamp(1.3rem, 4vw, 1.9rem);
        font-weight: 950;
        letter-spacing: -.04em;
    }

    .sr-supplier-balance-card small {
        display: block;
        margin-top: .12rem;
        color: rgba(255, 255, 255, .82);
        font-size: .76rem;
        line-height: 1.4;
    }

.sr-supplier-balance-status {
    flex: 0 0 auto;
    width: fit-content;
    min-height: 34px;
    display: inline-flex !important;
    align-items: center;
    padding: .35rem .8rem;
    border-radius: 999px;
    color: #ffffff !important;
    background: rgba(255, 255, 255, .16);
    white-space: nowrap;
}

.sr-supplier-kpi-mobile-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .65rem;
}

    .sr-supplier-kpi-mobile-grid article {
        min-width: 0;
        padding: .85rem;
        border: 1px solid rgba(148, 163, 184, .16);
        border-radius: 20px;
        background: #ffffff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
    }

        .sr-supplier-kpi-mobile-grid article.danger {
            background: linear-gradient(135deg, #fef2f2, #ffffff);
        }

        .sr-supplier-kpi-mobile-grid article.warning {
            background: linear-gradient(135deg, #fffbeb, #ffffff);
        }

        .sr-supplier-kpi-mobile-grid article.success {
            background: linear-gradient(135deg, #ecfdf5, #ffffff);
        }

    .sr-supplier-kpi-mobile-grid span,
    .sr-supplier-purchase-summary-row span,
    .sr-supplier-purchase-money span,
    .sr-supplier-outstanding-box span,
    .sr-supplier-last-payment span {
        display: block;
        color: #64748b;
        font-size: .64rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .sr-supplier-kpi-mobile-grid strong,
    .sr-supplier-purchase-summary-row strong {
        display: block;
        margin-top: .15rem;
        color: #0f172a;
        font-size: .96rem;
        font-weight: 950;
        overflow-wrap: anywhere;
    }

    .sr-supplier-kpi-mobile-grid small {
        display: block;
        margin-top: .08rem;
        color: #64748b;
        font-size: .69rem;
        line-height: 1.35;
    }

.sr-supplier-action-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    padding: .8rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.sr-supplier-insight-card {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem;
    border: 1px solid rgba(37, 99, 235, .16);
    border-radius: 22px;
    background: #eff6ff;
}

    .sr-supplier-insight-card > span {
        width: 38px;
        height: 38px;
        min-width: 38px;
        display: grid;
        place-items: center;
        border-radius: 14px;
        background: #dbeafe;
        font-size: 1.15rem;
    }

    .sr-supplier-insight-card strong {
        display: block;
        color: #0f172a;
        font-size: .86rem;
        font-weight: 900;
    }

    .sr-supplier-insight-card small {
        display: block;
        margin-top: .12rem;
        color: #475569;
        font-size: .76rem;
        line-height: 1.42;
    }

.sr-supplier-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .9rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

    .sr-supplier-section-head.compact {
        margin-bottom: .75rem;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .sr-supplier-section-head span {
        display: block;
        color: #2563eb;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .sr-supplier-section-head strong {
        display: block;
        margin-top: .08rem;
        color: #0f172a;
        font-size: .95rem;
        font-weight: 950;
    }

    .sr-supplier-section-head small {
        display: block;
        margin-top: .1rem;
        color: #64748b;
        font-size: .74rem;
    }

.sr-supplier-filter-tabs {
    display: inline-flex;
    gap: .35rem;
    padding: .25rem;
    border-radius: 999px;
    background: #f1f5f9;
}

    .sr-supplier-filter-tabs button {
        min-height: 38px;
        padding: .35rem .8rem;
        border: 0;
        border-radius: 999px;
        color: #475569;
        background: transparent;
        font-size: .76rem;
        font-weight: 900;
        white-space: nowrap;
    }

        .sr-supplier-filter-tabs button.active {
            color: #ffffff;
            background: #2563eb;
            box-shadow: 0 8px 18px rgba(37, 99, 235, .20);
        }

.sr-supplier-purchase-summary-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .6rem;
}

    .sr-supplier-purchase-summary-row > div {
        min-width: 0;
        padding: .72rem;
        border-radius: 18px;
        background: #ffffff;
        box-shadow: 0 8px 20px rgba(15, 23, 42, .045);
    }

.sr-supplier-purchase-card-list {
    display: grid;
    gap: .85rem;
}

.sr-supplier-purchase-card {
    display: grid;
    gap: .78rem;
    padding: .9rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .07);
}

    .sr-supplier-purchase-card.unpaid,
    .sr-supplier-purchase-card.overdue {
        border-color: rgba(239, 68, 68, .28);
        background: linear-gradient(135deg, #fef2f2, #ffffff 46%);
    }

    .sr-supplier-purchase-card.partial {
        border-color: rgba(245, 158, 11, .28);
        background: linear-gradient(135deg, #fffbeb, #ffffff 46%);
    }

    .sr-supplier-purchase-card.paid {
        border-color: rgba(34, 197, 94, .18);
        background: linear-gradient(135deg, #ecfdf5, #ffffff 46%);
    }

.sr-supplier-purchase-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

    .sr-supplier-purchase-top strong {
        display: block;
        color: #0f172a;
        font-size: .98rem;
        font-weight: 950;
        line-height: 1.2;
    }

    .sr-supplier-purchase-top small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .72rem;
        line-height: 1.35;
    }

.sr-supplier-purchase-status {
    flex: 0 0 auto;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: .3rem .65rem;
    border-radius: 999px;
    font-size: .67rem;
    font-weight: 950;
    text-transform: uppercase;
    white-space: nowrap;
}

    .sr-supplier-purchase-status.unpaid {
        color: #991b1b;
        background: #fee2e2;
    }

    .sr-supplier-purchase-status.partial {
        color: #92400e;
        background: #fef3c7;
    }

    .sr-supplier-purchase-status.paid {
        color: #047857;
        background: #d1fae5;
    }

.sr-supplier-outstanding-box {
    padding: .8rem;
    border-radius: 20px;
}

    .sr-supplier-outstanding-box.has-balance {
        color: #ffffff;
        background: linear-gradient(135deg, #991b1b, #dc2626);
    }

    .sr-supplier-outstanding-box.settled {
        color: #ffffff;
        background: linear-gradient(135deg, #047857, #16a34a);
    }

    .sr-supplier-outstanding-box span {
        color: rgba(255, 255, 255, .78);
    }

    .sr-supplier-outstanding-box strong {
        display: block;
        margin-top: .12rem;
        color: #ffffff;
        font-size: 1.18rem;
        font-weight: 950;
        letter-spacing: -.03em;
    }

.sr-supplier-purchase-money {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
}

    .sr-supplier-purchase-money > div,
    .sr-supplier-last-payment {
        min-width: 0;
        padding: .65rem;
        border-radius: 16px;
        background: #f8fafc;
    }

        .sr-supplier-purchase-money strong,
        .sr-supplier-last-payment strong {
            display: block;
            margin-top: .12rem;
            color: #0f172a;
            font-size: .82rem;
            font-weight: 950;
            overflow-wrap: anywhere;
        }

        .sr-supplier-last-payment small {
            display: block;
            margin-top: .08rem;
            color: #64748b;
            font-size: .7rem;
        }

.sr-supplier-purchase-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
}

.sr-supplier-desktop-card {
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.sr-supplier-item-list {
    display: grid;
    gap: .55rem;
}

.sr-supplier-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .75rem;
    border-radius: 18px;
    background: #f8fafc;
}

    .sr-supplier-item-row strong {
        color: #0f172a;
        font-weight: 900;
    }

    .sr-supplier-item-row small {
        display: block;
        margin-top: .14rem;
        color: #64748b;
        font-size: .76rem;
    }

.sr-supplier-empty {
    display: grid;
    place-items: center;
    gap: .45rem;
    padding: 2.2rem 1rem;
    border: 1px dashed rgba(148, 163, 184, .35);
    border-radius: 24px;
    color: #64748b;
    text-align: center;
    background: #ffffff;
}

    .sr-supplier-empty.small {
        padding: 1.5rem 1rem;
    }

    .sr-supplier-empty > span {
        font-size: 2rem;
    }

    .sr-supplier-empty strong {
        color: #0f172a;
        font-size: 1rem;
        font-weight: 950;
    }

    .sr-supplier-empty small {
        max-width: 320px;
        line-height: 1.45;
    }

    .sr-supplier-empty .btn {
        margin-top: .4rem;
        border-radius: 999px;
        font-weight: 900;
    }

@media (max-width: 900px) {
    .sr-supplier-hero,
    .sr-supplier-balance-card,
    .sr-supplier-section-head {
        align-items: stretch;
        flex-direction: column;
        border-radius: 24px;
    }

    .sr-supplier-hero-actions,
    .sr-supplier-action-strip {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .sr-supplier-kpi-mobile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sr-supplier-filter-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 540px) {
    .sr-supplier-details-page {
        gap: .85rem;
    }

    .sr-supplier-hero,
    .sr-supplier-balance-card,
    .sr-supplier-action-strip,
    .sr-supplier-section-head,
    .sr-supplier-purchase-card,
    .sr-supplier-desktop-card {
        border-radius: 22px;
    }

    .sr-supplier-hero {
        padding: .9rem;
    }

    .sr-supplier-hero-main {
        align-items: flex-start;
    }

    .sr-supplier-avatar {
        width: 50px;
        height: 50px;
        min-width: 50px;
        border-radius: 18px;
    }

    .sr-supplier-hero-actions,
    .sr-supplier-action-strip,
    .sr-supplier-purchase-actions {
        grid-template-columns: 1fr;
    }

    .sr-supplier-kpi-mobile-grid,
    .sr-supplier-purchase-summary-row,
    .sr-supplier-purchase-money {
        grid-template-columns: 1fr;
    }

    .sr-supplier-purchase-top {
        flex-direction: column;
        gap: .45rem;
    }

    .sr-supplier-purchase-status {
        width: fit-content;
    }

    .sr-supplier-item-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================================
   STOCKRULER HELP CENTRE
========================================================= */

.sr-help-page,
.sr-help-topic-page {
    display: grid;
    gap: 1rem;
}

.sr-help-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-radius: 26px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1d4ed8), radial-gradient(circle at top left, rgba(255, 255, 255, .20), transparent 16rem);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
}

    .sr-help-hero span {
        display: block;
        color: #bfdbfe;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .09em;
        text-transform: uppercase;
    }

    .sr-help-hero strong {
        display: block;
        margin-top: .1rem;
        font-size: clamp(1.2rem, 3vw, 1.7rem);
        font-weight: 950;
    }

    .sr-help-hero small {
        display: block;
        max-width: 560px;
        margin-top: .15rem;
        color: rgba(255, 255, 255, .82);
        font-size: .78rem;
        line-height: 1.4;
    }

    .sr-help-hero .btn {
        min-height: 42px;
        border-radius: 999px;
        font-weight: 900;
        white-space: nowrap;
    }

.sr-help-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .55rem;
    align-items: center;
    padding: .75rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

    .sr-help-search > span {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        border-radius: 14px;
        background: #eff6ff;
    }

    .sr-help-search .form-control {
        min-height: 44px;
        border-radius: 999px;
    }

    .sr-help-search .btn {
        min-height: 44px;
        border-radius: 999px;
        font-weight: 900;
    }

.sr-help-category-list {
    display: grid;
    gap: 1rem;
}

.sr-help-category-card {
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.sr-help-category-head {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .8rem;
}

    .sr-help-category-head strong {
        color: #0f172a;
        font-size: .98rem;
        font-weight: 950;
    }

    .sr-help-category-head small {
        color: #64748b;
        font-size: .74rem;
    }

.sr-help-topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.sr-help-topic-card {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .85rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 20px;
    color: #0f172a;
    background: #f8fafc;
    text-decoration: none;
}

    .sr-help-topic-card:hover {
        color: #0f172a;
        background: #eff6ff;
    }

    .sr-help-topic-card > span {
        width: 42px;
        height: 42px;
        min-width: 42px;
        display: grid;
        place-items: center;
        border-radius: 16px;
        background: #ffffff;
        font-size: 1.22rem;
    }

    .sr-help-topic-card strong {
        display: block;
        color: #0f172a;
        font-size: .86rem;
        font-weight: 950;
    }

    .sr-help-topic-card small {
        display: block;
        margin-top: .14rem;
        color: #64748b;
        font-size: .74rem;
        line-height: 1.35;
    }

.sr-help-article {
    padding: 1.1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

    .sr-help-article h2 {
        margin: 0 0 .75rem;
        color: #0f172a;
        font-size: 1.25rem;
        font-weight: 950;
    }

    .sr-help-article h3 {
        margin: 1rem 0 .45rem;
        color: #0f172a;
        font-size: 1rem;
        font-weight: 950;
    }

    .sr-help-article p,
    .sr-help-article li {
        color: #334155;
        font-size: .9rem;
        line-height: 1.6;
    }

    .sr-help-article ol,
    .sr-help-article ul {
        padding-left: 1.25rem;
    }

.sr-help-topic-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    justify-content: flex-end;
}

    .sr-help-topic-actions .btn {
        min-height: 42px;
        border-radius: 999px;
        font-weight: 900;
    }

.sr-help-empty {
    display: grid;
    place-items: center;
    gap: .4rem;
    padding: 2.2rem 1rem;
    border: 1px dashed rgba(148, 163, 184, .35);
    border-radius: 24px;
    color: #64748b;
    text-align: center;
    background: #ffffff;
}

    .sr-help-empty > span {
        font-size: 2rem;
    }

    .sr-help-empty strong {
        color: #0f172a;
        font-size: 1rem;
        font-weight: 950;
    }

.sr-context-help {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    z-index: 2500;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 44px;
    padding: .35rem .75rem .35rem .4rem;
    border-radius: 999px;
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    text-decoration: none !important;
    box-shadow: 0 14px 34px rgba(37, 99, 235, .32);
}

    .sr-context-help span {
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        color: #1d4ed8;
        background: #ffffff;
        font-weight: 950;
    }

    .sr-context-help strong {
        color: #ffffff;
        font-size: .8rem;
        font-weight: 950;
    }

@media (max-width: 992px) {
    .sr-help-topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .sr-help-hero {
        align-items: stretch;
        flex-direction: column;
        border-radius: 24px;
    }

        .sr-help-hero .btn {
            width: 100%;
        }

    .sr-help-search {
        grid-template-columns: 1fr;
    }

        .sr-help-search > span {
            display: none;
        }

    .sr-help-topic-grid {
        grid-template-columns: 1fr;
    }

    .sr-context-help {
        right: .85rem;
        bottom: calc(5.25rem + env(safe-area-inset-bottom));
        padding: .35rem;
    }

        .sr-context-help strong {
            display: none;
        }
}

/* =========================================================
   STOCKRULER SMART SEARCH
========================================================= */

.sr-list-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .55rem;
    align-items: center;
    margin-bottom: .85rem;
    padding: .75rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

    .sr-list-search > span {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        border-radius: 14px;
        background: #eff6ff;
    }

    .sr-list-search .form-control {
        min-height: 44px;
        border-radius: 999px;
        border-color: rgba(148, 163, 184, .32);
    }

    .sr-list-search small {
        color: #64748b;
        font-size: .74rem;
        font-weight: 800;
        white-space: nowrap;
    }

        .sr-list-search small span {
            color: #0f172a;
            font-weight: 950;
        }

.sr-smart-search-empty {
    display: grid;
    place-items: center;
    gap: .35rem;
    padding: 2rem 1rem;
    border: 1px dashed rgba(148, 163, 184, .35);
    border-radius: 24px;
    color: #64748b;
    text-align: center;
    background: #ffffff;
}

    .sr-smart-search-empty > span {
        font-size: 1.8rem;
    }

    .sr-smart-search-empty strong {
        color: #0f172a;
        font-size: 1rem;
        font-weight: 950;
    }

    .sr-smart-search-empty small {
        max-width: 320px;
        line-height: 1.45;
    }

@media (max-width: 640px) {
    .sr-list-search {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

        .sr-list-search > span {
            display: none;
        }

        .sr-list-search small {
            padding-left: .35rem;
        }
}

/* =========================================================
   STOCKRULER GLOBAL QUICK ACTIONS
========================================================= */

.sr-global-action-fab {
    position: fixed;
    right: 1rem;
    bottom: calc(4.8rem + env(safe-area-inset-bottom));
    z-index: 2600;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 48px;
    padding: .4rem .85rem .4rem .45rem;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #16a34a, #047857);
    box-shadow: 0 18px 38px rgba(4, 120, 87, .34);
}

    .sr-global-action-fab span {
        width: 36px;
        height: 36px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        color: #047857;
        background: #ffffff;
        font-size: 1.35rem;
        font-weight: 950;
        line-height: 1;
    }

    .sr-global-action-fab strong {
        color: #ffffff;
        font-size: .82rem;
        font-weight: 950;
    }

.sr-quick-action-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2700;
    background: rgba(15, 23, 42, .46);
    opacity: 0;
    transition: opacity .18s ease;
}

    .sr-quick-action-backdrop.is-open {
        opacity: 1;
    }

.sr-quick-action-panel {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 2750;
    width: min(520px, calc(100vw - 2rem));
    max-height: min(78vh, 720px);
    overflow-y: auto;
    padding: 1rem;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
    transform: translateY(18px) scale(.98);
    opacity: 0;
    transition: transform .18s ease, opacity .18s ease;
}

    .sr-quick-action-panel.is-open {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

.sr-quick-action-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .9rem;
}

    .sr-quick-action-head span {
        display: block;
        color: #16a34a;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .sr-quick-action-head strong {
        display: block;
        margin-top: .08rem;
        color: #0f172a;
        font-size: 1.15rem;
        font-weight: 950;
        letter-spacing: -.03em;
    }

    .sr-quick-action-head small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .78rem;
    }

.sr-quick-action-close {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border: 0;
    border-radius: 999px;
    color: #0f172a;
    background: #f1f5f9;
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1;
}

.sr-quick-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}

.sr-quick-action-tile {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .85rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 20px;
    color: #0f172a;
    background: #f8fafc;
    text-decoration: none;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

    .sr-quick-action-tile:hover {
        color: #0f172a;
        background: #eff6ff;
        border-color: rgba(37, 99, 235, .24);
        transform: translateY(-1px);
    }

    .sr-quick-action-tile > span {
        width: 42px;
        height: 42px;
        min-width: 42px;
        display: grid;
        place-items: center;
        border-radius: 16px;
        background: #ffffff;
        font-size: 1.22rem;
    }

    .sr-quick-action-tile strong {
        display: block;
        color: #0f172a;
        font-size: .86rem;
        font-weight: 950;
    }

    .sr-quick-action-tile small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .72rem;
        line-height: 1.32;
    }

    .sr-quick-action-tile.primary {
        background: #eff6ff;
    }

    .sr-quick-action-tile.success {
        background: #ecfdf5;
    }

    .sr-quick-action-tile.warning {
        background: #fffbeb;
    }

    .sr-quick-action-tile.danger {
        background: #fef2f2;
    }

body.sr-quick-action-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .sr-global-action-fab {
        right: .85rem;
        bottom: calc(5.15rem + env(safe-area-inset-bottom));
        padding: .35rem;
    }

        .sr-global-action-fab strong {
            display: none;
        }

    .sr-quick-action-panel {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 82vh;
        border-radius: 28px 28px 0 0;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .sr-quick-action-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   STOCKRULER QUICK ACTION + HELP POSITION FIX
========================================================= */

.sr-global-action-fab {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    z-index: 2600;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 48px;
    padding: .4rem .85rem .4rem .45rem;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #16a34a, #047857);
    box-shadow: 0 18px 38px rgba(4, 120, 87, .34);
}

    .sr-global-action-fab span {
        width: 36px;
        height: 36px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        color: #047857;
        background: #ffffff;
        font-size: 1.35rem;
        font-weight: 950;
        line-height: 1;
    }

    .sr-global-action-fab strong {
        color: #ffffff;
        font-size: .82rem;
        font-weight: 950;
    }

.sr-context-help {
    bottom: calc(4.75rem + env(safe-area-inset-bottom)) !important;
}

.sr-quick-action-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2700;
    background: rgba(15, 23, 42, .46);
    opacity: 0;
    transition: opacity .18s ease;
}

    .sr-quick-action-backdrop.is-open {
        opacity: 1;
    }

.sr-quick-action-panel {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 2750;
    width: min(520px, calc(100vw - 2rem));
    max-height: min(78vh, 720px);
    overflow-y: auto;
    padding: 1rem;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
    transform: translateY(18px) scale(.98);
    opacity: 0;
    transition: transform .18s ease, opacity .18s ease;
}

    .sr-quick-action-panel.is-open {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

.sr-quick-action-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .9rem;
}

    .sr-quick-action-head span {
        display: block;
        color: #16a34a;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .sr-quick-action-head strong {
        display: block;
        margin-top: .08rem;
        color: #0f172a;
        font-size: 1.15rem;
        font-weight: 950;
    }

    .sr-quick-action-head small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .78rem;
    }

.sr-quick-action-close {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border: 0;
    border-radius: 999px;
    color: #0f172a;
    background: #f1f5f9;
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1;
}

.sr-quick-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}

.sr-quick-action-tile {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .85rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 20px;
    color: #0f172a;
    background: #f8fafc;
    text-decoration: none;
}

    .sr-quick-action-tile:hover {
        color: #0f172a;
        background: #eff6ff;
    }

    .sr-quick-action-tile > span {
        width: 42px;
        height: 42px;
        min-width: 42px;
        display: grid;
        place-items: center;
        border-radius: 16px;
        background: #ffffff;
        font-size: 1.22rem;
    }

    .sr-quick-action-tile strong {
        display: block;
        color: #0f172a;
        font-size: .86rem;
        font-weight: 950;
    }

    .sr-quick-action-tile small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .72rem;
        line-height: 1.32;
    }

    .sr-quick-action-tile.primary {
        background: #eff6ff;
    }

    .sr-quick-action-tile.success {
        background: #ecfdf5;
    }

    .sr-quick-action-tile.warning {
        background: #fffbeb;
    }

    .sr-quick-action-tile.danger {
        background: #fef2f2;
    }

body.sr-quick-action-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .sr-global-action-fab {
        right: .85rem;
        bottom: calc(5.2rem + env(safe-area-inset-bottom));
        padding: .35rem;
    }

        .sr-global-action-fab strong {
            display: none;
        }

    .sr-context-help {
        right: .85rem !important;
        bottom: calc(8.95rem + env(safe-area-inset-bottom)) !important;
    }

    .sr-quick-action-panel {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 82vh;
        border-radius: 28px 28px 0 0;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .sr-quick-action-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   STOCKRULER TODAY MODE
========================================================= */

.sr-today-page {
    display: grid;
    gap: 1rem;
}

.sr-today-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem;
    border-radius: 28px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(255,255,255,.20), transparent 16rem), linear-gradient(135deg, #0f172a, #166534);
    box-shadow: 0 22px 52px rgba(15, 23, 42, .18);
}

    .sr-today-hero span {
        display: block;
        color: #bbf7d0;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .1em;
        text-transform: uppercase;
    }

    .sr-today-hero strong {
        display: block;
        margin-top: .1rem;
        font-size: clamp(1.8rem, 5vw, 2.6rem);
        font-weight: 950;
        letter-spacing: -.05em;
    }

    .sr-today-hero small {
        display: block;
        margin-top: .2rem;
        color: rgba(255,255,255,.82);
        font-size: .85rem;
    }

.sr-today-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

    .sr-today-hero-actions .btn {
        min-height: 42px;
        border-radius: 999px;
        font-weight: 900;
    }

.sr-today-kpi-grid,
.sr-today-money-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

.sr-today-kpi,
.sr-today-money-card {
    min-width: 0;
    padding: .95rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 22px;
    color: #0f172a;
    background: #ffffff;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

    .sr-today-kpi:hover {
        color: #0f172a;
        background: #eff6ff;
    }

    .sr-today-kpi span,
    .sr-today-money-card span {
        display: block;
        color: #64748b;
        font-size: .72rem;
        font-weight: 900;
    }

    .sr-today-kpi strong,
    .sr-today-money-card strong {
        display: block;
        margin-top: .18rem;
        color: #0f172a;
        font-size: 1.05rem;
        font-weight: 950;
    }

    .sr-today-kpi small {
        display: block;
        margin-top: .12rem;
        color: #64748b;
        font-size: .72rem;
    }

    .sr-today-kpi.warning {
        background: #fffbeb;
    }

.sr-today-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .85fr);
    gap: 1rem;
}

.sr-today-panel {
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.sr-today-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .8rem;
}

    .sr-today-panel-head strong {
        display: block;
        color: #0f172a;
        font-size: .98rem;
        font-weight: 950;
    }

    .sr-today-panel-head small {
        display: block;
        color: #64748b;
        font-size: .74rem;
    }

.sr-today-attention-list,
.sr-today-sale-list,
.sr-today-product-list {
    display: grid;
    gap: .6rem;
}

.sr-today-attention,
.sr-today-sale,
.sr-today-product,
.sr-today-stock-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .8rem;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 18px;
    color: #0f172a;
    background: #f8fafc;
    text-decoration: none;
}

    .sr-today-attention:hover,
    .sr-today-sale:hover,
    .sr-today-product:hover,
    .sr-today-stock-card:hover {
        color: #0f172a;
        background: #eff6ff;
    }

.sr-today-attention {
    justify-content: flex-start;
}

    .sr-today-attention > span {
        width: 42px;
        height: 42px;
        min-width: 42px;
        display: grid;
        place-items: center;
        border-radius: 16px;
        background: #ffffff;
        font-size: 1.2rem;
    }

    .sr-today-attention strong,
    .sr-today-sale strong,
    .sr-today-product strong,
    .sr-today-stock-card strong {
        display: block;
        color: #0f172a;
        font-size: .86rem;
        font-weight: 950;
    }

    .sr-today-attention small,
    .sr-today-sale small,
    .sr-today-product small,
    .sr-today-stock-card small {
        display: block;
        margin-top: .1rem;
        color: #64748b;
        font-size: .72rem;
        line-height: 1.35;
    }

    .sr-today-attention.warning {
        background: #fffbeb;
    }

    .sr-today-attention.danger {
        background: #fef2f2;
    }

.sr-today-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}

    .sr-today-action-grid a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: .65rem .75rem;
        border-radius: 16px;
        color: #0f172a;
        background: #f8fafc;
        text-decoration: none;
        font-size: .82rem;
        font-weight: 900;
    }

        .sr-today-action-grid a:hover {
            background: #eff6ff;
        }

.sr-today-stock-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.sr-today-stock-card {
    align-items: flex-start;
    flex-direction: column;
}

.sr-today-empty {
    display: grid;
    place-items: center;
    gap: .35rem;
    min-height: 150px;
    padding: 1.4rem;
    border: 1px dashed rgba(148, 163, 184, .35);
    border-radius: 20px;
    color: #64748b;
    text-align: center;
    background: #ffffff;
}

    .sr-today-empty span {
        font-size: 1.8rem;
    }

    .sr-today-empty strong {
        color: #0f172a;
        font-size: .95rem;
        font-weight: 950;
    }

    .sr-today-empty small {
        max-width: 340px;
        font-size: .75rem;
        line-height: 1.45;
    }

@media (max-width: 992px) {
    .sr-today-kpi-grid,
    .sr-today-money-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sr-today-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .sr-today-hero {
        align-items: stretch;
        flex-direction: column;
        border-radius: 24px;
    }

    .sr-today-hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .sr-today-kpi-grid,
    .sr-today-money-grid,
    .sr-today-stock-grid {
        grid-template-columns: 1fr;
    }

    .sr-today-action-grid {
        grid-template-columns: 1fr;
    }

    .sr-today-panel {
        border-radius: 22px;
    }
}

/* =========================================================
   STOCKRULER FREQUENTLY SOLD / QUICK PICKS
========================================================= */

.sr-frequent-products {
    margin-top: .55rem;
    margin-bottom: .75rem;
    padding: .65rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.sr-frequent-products-head {
    margin-bottom: .55rem;
}

.sr-frequent-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border: 0;
    padding: 0;
    color: #0f172a;
    background: transparent;
    text-align: left;
}

    .sr-frequent-toggle strong {
        display: block;
        color: #0f172a;
        font-size: .86rem;
        font-weight: 950;
    }

    .sr-frequent-toggle small {
        display: block;
        color: #64748b;
        font-size: .72rem;
    }

    .sr-frequent-toggle > span {
        min-width: 56px;
        padding: .35rem .6rem;
        border-radius: 999px;
        color: #047857;
        background: #ecfdf5;
        font-size: .72rem;
        font-weight: 900;
        text-align: center;
    }

.sr-frequent-products-body {
    overflow: hidden;
    transition: max-height .2s ease, opacity .18s ease, margin-top .18s ease;
}

.sr-frequent-products-scroll {
    display: flex;
    gap: .55rem;
    overflow-x: auto;
    padding-bottom: .2rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.sr-frequent-product-chip {
    min-width: 220px;
    max-width: 260px;
    scroll-snap-align: start;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .55rem;
    align-items: center;
    padding: .65rem .75rem;
    border: 1px solid rgba(22, 163, 74, .18);
    border-radius: 18px;
    color: #0f172a;
    background: #f0fdf4;
    text-align: left;
}

    .sr-frequent-product-chip.just-added {
        border-color: rgba(37, 99, 235, .45);
        background: #eff6ff;
        transform: scale(.98);
    }

    .sr-frequent-product-chip > span {
        width: 36px;
        height: 36px;
        display: grid;
        place-items: center;
        border-radius: 14px;
        background: #ffffff;
        font-size: 1.05rem;
    }

.sr-frequent-product-text {
    min-width: 0;
}

    .sr-frequent-product-text strong {
        display: -webkit-box;
        overflow: hidden;
        color: #0f172a;
        font-size: .84rem;
        font-weight: 950;
        line-height: 1.18;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .sr-frequent-product-text small {
        display: block;
        margin-top: .16rem;
        overflow: hidden;
        color: #64748b;
        font-size: .68rem;
        font-weight: 750;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

@media (max-width: 640px) {
    .sr-frequent-products {
        margin-top: .45rem;
        margin-bottom: .55rem;
        padding: .55rem .6rem;
        border-radius: 18px;
    }

    .sr-frequent-products-head {
        margin-bottom: 0;
    }

    .sr-frequent-products:not(.is-collapsed) .sr-frequent-products-head {
        margin-bottom: .45rem;
    }

    .sr-frequent-products.is-collapsed {
        box-shadow: none;
    }

        .sr-frequent-products.is-collapsed .sr-frequent-products-body {
            max-height: 0;
            opacity: 0;
            margin-top: 0;
            pointer-events: none;
        }

    .sr-frequent-products:not(.is-collapsed) .sr-frequent-products-body {
        max-height: 150px;
        opacity: 1;
    }

    .sr-frequent-toggle strong {
        font-size: .82rem;
    }

    .sr-frequent-toggle small {
        font-size: .66rem;
    }

    .sr-frequent-product-chip {
        min-width: min(72vw, 245px);
        max-width: min(72vw, 245px);
        min-height: 74px;
        padding: .6rem .65rem;
        border-radius: 17px;
    }

        .sr-frequent-product-chip > span {
            width: 34px;
            height: 34px;
            border-radius: 13px;
            font-size: 1rem;
        }

    .sr-frequent-product-text strong {
        font-size: .82rem;
        line-height: 1.16;
    }

    .sr-frequent-product-text small {
        font-size: .66rem;
    }
}

@media (max-width: 640px) {
    .sr-frequent-products {
        margin-top: .55rem;
        margin-bottom: .7rem;
        padding: .65rem;
        border-radius: 18px;
    }

    .sr-frequent-products-head {
        margin-bottom: .45rem;
    }

        .sr-frequent-products-head strong {
            font-size: .82rem;
        }

        .sr-frequent-products-head small {
            font-size: .66rem;
        }

    .sr-frequent-products-scroll {
        gap: .5rem;
        padding-bottom: .2rem;
    }

    .sr-frequent-product-chip {
        min-width: min(72vw, 245px);
        max-width: min(72vw, 245px);
        min-height: 74px;
        padding: .6rem .65rem;
        border-radius: 17px;
    }

        .sr-frequent-product-chip > span {
            width: 34px;
            height: 34px;
            border-radius: 13px;
            font-size: 1rem;
        }

    .sr-frequent-product-text strong {
        font-size: .82rem;
        line-height: 1.16;
        -webkit-line-clamp: 2;
    }

    .sr-frequent-product-text small {
        font-size: .66rem;
    }
}

/* =========================================================
   STOCKRULER DRAFT BANNER REFINEMENT
========================================================= */

.transaction-draft-banner {
    transition: padding .18s ease, box-shadow .18s ease, background .18s ease;
}

    .transaction-draft-banner.transaction-draft-restored.is-collapsed {
        padding: .55rem .7rem;
        border-radius: 18px;
        background: #f8fafc;
        box-shadow: none;
    }

        .transaction-draft-banner.transaction-draft-restored.is-collapsed strong {
            font-size: .82rem;
        }

        .transaction-draft-banner.transaction-draft-restored.is-collapsed small {
            font-size: .68rem;
        }

        .transaction-draft-banner.transaction-draft-restored.is-collapsed .btn {
            min-height: 34px;
            padding: .25rem .55rem;
            border-radius: 999px;
            font-size: .72rem;
        }

/* =========================================================
   STOCKRULER FLOATING ASSISTIVE DOCK
========================================================= */

/*.sr-floating-dock {
    position: fixed;
    right: .9rem;
    bottom: calc(5.35rem + env(safe-area-inset-bottom));
    z-index: 2650;
    display: grid;
    gap: .4rem;
    justify-items: end;
    touch-action: none;
}*/

    .sr-floating-dock.dock-left {
        left: .9rem;
        right: auto;
        justify-items: start;
    }

/*.sr-floating-dock-tools {
    display: flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
    backdrop-filter: blur(10px);
}*/

/*.sr-floating-dock-tool {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    color: #0f172a;
    background: #f1f5f9;
    font-size: .78rem;
    font-weight: 950;
    line-height: 1;
}*/

/*    .sr-floating-dock-tool:hover {
        background: #e0f2fe;
    }*/

.sr-floating-dock [data-sr-dock-handle] {
    cursor: grab;
}

.sr-floating-dock.is-dragging [data-sr-dock-handle] {
    cursor: grabbing;
}

/*.sr-floating-dock-buttons {
    display: grid;
    gap: .45rem;
    justify-items: end;
}*/

.sr-floating-dock.dock-left .sr-floating-dock-buttons {
    justify-items: start;
}

/*
   Override the old fixed positioning because the dock now controls placement.
*/
.sr-floating-dock .sr-global-action-fab,
.sr-floating-dock .sr-context-help {
    position: static !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: auto !important;
}

/*
   Collapsed mode: keep Action visible, hide Help.
   Users can expand again from the small minus/plus control.
*/
.sr-floating-dock.is-collapsed .sr-context-help {
    display: none !important;
}

.sr-floating-dock.is-collapsed .sr-global-action-fab strong {
    display: none;
}

.sr-floating-dock.is-collapsed .sr-global-action-fab {
    padding: .35rem;
}

@media (max-width: 768px) {
    .sr-floating-dock {
        right: .65rem;
        bottom: calc(5.35rem + env(safe-area-inset-bottom));
    }

        .sr-floating-dock.dock-left {
            left: .65rem;
            right: auto;
        }

    .sr-floating-dock-tools {
        transform: scale(.92);
        transform-origin: right center;
    }

    .sr-floating-dock.dock-left .sr-floating-dock-tools {
        transform-origin: left center;
    }
}

/* =========================================================
   STOCKRULER MOBILE ITEM QUICK CONTROLS
========================================================= */

.sr-item-quick-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
    margin-top: .65rem;
    margin-bottom: .55rem;
}

.sr-qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 999px;
    background: #f8fafc;
}

.sr-item-action-btn {
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 999px;
    color: #0f172a;
    background: #ffffff;
    font-size: .78rem;
    font-weight: 900;
    line-height: 1;
}

    .sr-item-action-btn:hover {
        background: #eff6ff;
        border-color: rgba(37, 99, 235, .28);
    }

    .sr-item-action-btn.danger {
        color: #dc2626;
        border-color: rgba(220, 38, 38, .22);
        background: #fff7f7;
    }

        .sr-item-action-btn.danger:hover {
            background: #fef2f2;
        }

.sr-sale-item-head .sr-item-action-btn {
    min-width: 36px;
    min-height: 36px;
}

@media (max-width: 640px) {
    .sr-item-quick-actions {
        gap: .45rem;
        margin-top: .55rem;
        margin-bottom: .5rem;
    }

    .sr-item-action-btn {
        min-width: 36px;
        min-height: 36px;
        font-size: .74rem;
    }

    .sr-item-quick-actions > .sr-item-action-btn {
        flex: 1;
    }

    .sr-qty-stepper {
        flex: 0 0 auto;
    }
}

/* =========================================================
   STOCKRULER SAFE FLOATING ACTION BUTTON
========================================================= */

.sr-global-action-fab {
    position: fixed;
    right: .85rem;
    bottom: calc(5.35rem + env(safe-area-inset-bottom));
    z-index: 2600;
}

    .sr-global-action-fab.sr-fab-left {
        left: .85rem;
        right: auto;
    }

    .sr-global-action-fab.sr-fab-compact {
        padding: .35rem !important;
    }

        .sr-global-action-fab.sr-fab-compact strong {
            display: none !important;
        }

/*
   On transaction pages, Help is still accessible from Quick Action.
   This avoids clutter around Review Sale and item cards.
*/
/*.sr-transaction-floating-safe .sr-context-help,
.sr-context-help.sr-help-hidden-on-transaction {
    display: none !important;
}*/

.sr-floating-panel-controls {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: -.15rem 0 .85rem;
    padding: .55rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 18px;
    background: #f8fafc;
}

.sr-floating-panel-btn {
    min-height: 34px;
    padding: .35rem .7rem;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 999px;
    color: #0f172a;
    background: #ffffff;
    font-size: .74rem;
    font-weight: 900;
}

    .sr-floating-panel-btn:hover {
        background: #eff6ff;
        border-color: rgba(37, 99, 235, .28);
    }

@media (max-width: 768px) {
    .sr-global-action-fab {
        right: .65rem;
        bottom: calc(5.35rem + env(safe-area-inset-bottom));
    }

        .sr-global-action-fab.sr-fab-left {
            left: .65rem;
            right: auto;
        }

        .sr-global-action-fab strong {
            display: none !important;
        }

    .sr-global-action-fab {
        padding: .35rem !important;
    }
}

/* =========================================================
   STOCKRULER FLOATING HELP + ACTION
========================================================= */

.sr-global-action-fab {
    position: fixed;
    right: .9rem;
    bottom: calc(5.3rem + env(safe-area-inset-bottom));
    z-index: 2600;
}

.sr-context-help {
    position: fixed;
    right: .9rem;
    bottom: calc(8.55rem + env(safe-area-inset-bottom));
    z-index: 2600;
}

.sr-floating-left .sr-global-action-fab,
.sr-global-action-fab.sr-fab-left {
    left: .9rem;
    right: auto;
}

.sr-floating-left .sr-context-help {
    left: .9rem;
    right: auto;
}

.sr-floating-compact .sr-global-action-fab,
.sr-global-action-fab.sr-fab-compact {
    padding: .35rem !important;
}

    .sr-floating-compact .sr-global-action-fab strong,
    .sr-global-action-fab.sr-fab-compact strong {
        display: none !important;
    }

/*
   Hide Help only when user chooses Hide Help
   from the Action panel.
*/
.sr-floating-help-hidden .sr-context-help {
    display: none !important;
}

/*
   Transaction pages need the buttons above the sticky
   Review Sale / Complete Purchase area.
*/
.sr-transaction-floating-mode .sr-global-action-fab {
    bottom: calc(8.8rem + env(safe-area-inset-bottom));
}

.sr-transaction-floating-mode .sr-context-help {
    bottom: calc(12rem + env(safe-area-inset-bottom));
}

    .sr-transaction-floating-mode .sr-global-action-fab strong,
    .sr-transaction-floating-mode .sr-context-help strong {
        display: none !important;
    }

.sr-transaction-floating-mode .sr-global-action-fab {
    padding: .35rem !important;
}

/*
   Controls live inside Quick Action panel, not on the screen.
*/
.sr-floating-panel-controls {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: -.15rem 0 .85rem;
    padding: .55rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 18px;
    background: #f8fafc;
}

.sr-floating-panel-btn {
    min-height: 34px;
    padding: .35rem .7rem;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 999px;
    color: #0f172a;
    background: #ffffff;
    font-size: .74rem;
    font-weight: 900;
}

    .sr-floating-panel-btn:hover {
        background: #eff6ff;
        border-color: rgba(37, 99, 235, .28);
    }

    .sr-floating-panel-btn.subtle {
        color: #64748b;
        background: #f8fafc;
    }

@media (max-width: 768px) {
    .sr-global-action-fab {
        right: .65rem;
        bottom: calc(5.25rem + env(safe-area-inset-bottom));
        padding: .35rem !important;
    }

    .sr-context-help {
        right: .65rem;
        bottom: calc(8.35rem + env(safe-area-inset-bottom));
    }

    .sr-floating-left .sr-global-action-fab,
    .sr-floating-left .sr-context-help {
        left: .65rem;
        right: auto;
    }

    .sr-global-action-fab strong,
    .sr-context-help strong {
        display: none !important;
    }

    .sr-transaction-floating-mode .sr-global-action-fab {
        bottom: calc(8.65rem + env(safe-area-inset-bottom));
    }

    .sr-transaction-floating-mode .sr-context-help {
        bottom: calc(11.75rem + env(safe-area-inset-bottom));
    }
}

/* =========================================================
   STOCKRULER FINAL FLOATING HELP + ACTION POSITIONING
========================================================= */

/* Base positioning */
.sr-global-action-fab {
    position: fixed !important;
    right: .9rem !important;
    bottom: calc(5.35rem + env(safe-area-inset-bottom)) !important;
    z-index: 2800 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.sr-context-help {
    position: fixed !important;
    right: .9rem !important;
    bottom: calc(8.65rem + env(safe-area-inset-bottom)) !important;
    z-index: 2800 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

/* Left-side preference */
.sr-floating-left .sr-global-action-fab,
.sr-global-action-fab.sr-fab-left {
    left: .9rem !important;
    right: auto !important;
}

.sr-floating-left .sr-context-help {
    left: .9rem !important;
    right: auto !important;
}

/* Compact mode */
.sr-floating-compact .sr-global-action-fab,
.sr-global-action-fab.sr-fab-compact {
    padding: .35rem !important;
}

    .sr-floating-compact .sr-global-action-fab strong,
    .sr-global-action-fab.sr-fab-compact strong {
        display: none !important;
    }

/* Hide Help only when user explicitly chooses Hide Help */
.sr-floating-help-hidden .sr-context-help {
    display: none !important;
}

/* Transaction pages: lift above bottom nav and transaction buttons */
.sr-transaction-floating-mode .sr-global-action-fab {
    bottom: calc(6.45rem + env(safe-area-inset-bottom)) !important;
}

.sr-transaction-floating-mode .sr-context-help {
    bottom: calc(9.75rem + env(safe-area-inset-bottom)) !important;
}

    .sr-transaction-floating-mode .sr-global-action-fab strong,
    .sr-transaction-floating-mode .sr-context-help strong {
        display: none !important;
    }

.sr-transaction-floating-mode .sr-global-action-fab {
    padding: .35rem !important;
}

/* Controls inside Quick Action panel */
.sr-floating-panel-controls {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: -.15rem 0 .85rem;
    padding: .55rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 18px;
    background: #f8fafc;
}

.sr-floating-panel-btn {
    min-height: 34px;
    padding: .35rem .7rem;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 999px;
    color: #0f172a;
    background: #ffffff;
    font-size: .74rem;
    font-weight: 900;
}

    .sr-floating-panel-btn:hover {
        background: #eff6ff;
        border-color: rgba(37, 99, 235, .28);
    }

    .sr-floating-panel-btn.subtle {
        color: #64748b;
        background: #f8fafc;
    }

@media (max-width: 768px) {
    .sr-global-action-fab {
        right: .65rem !important;
        bottom: calc(5.35rem + env(safe-area-inset-bottom)) !important;
        width: 52px;
        height: 52px;
        min-width: 52px;
        min-height: 52px;
        padding: .35rem !important;
        border-radius: 999px !important;
    }

    .sr-context-help {
        right: .65rem !important;
        bottom: calc(8.65rem + env(safe-area-inset-bottom)) !important;
        min-width: 52px;
        min-height: 52px;
        border-radius: 999px !important;
    }

    .sr-floating-left .sr-global-action-fab,
    .sr-floating-left .sr-context-help {
        left: .65rem !important;
        right: auto !important;
    }

    .sr-global-action-fab strong,
    .sr-context-help strong {
        display: none !important;
    }

    .sr-transaction-floating-mode .sr-global-action-fab {
        bottom: calc(6.7rem + env(safe-area-inset-bottom)) !important;
    }

    .sr-transaction-floating-mode .sr-context-help {
        bottom: calc(10rem + env(safe-area-inset-bottom)) !important;
    }
}

/* =========================================================
   STOCKRULER IN-PAGE CONTEXT HELP
========================================================= */

.sr-help-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2850;
    background: rgba(15, 23, 42, .42);
    opacity: 0;
    transition: opacity .18s ease;
}

    .sr-help-drawer-backdrop.is-open {
        opacity: 1;
    }

.sr-help-drawer {
    position: fixed;
    top: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 2860;
    width: min(430px, calc(100vw - 2rem));
    display: flex;
    flex-direction: column;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
    transform: translateX(24px);
    opacity: 0;
    overflow: hidden;
    transition: transform .18s ease, opacity .18s ease;
}

    .sr-help-drawer.is-open {
        transform: translateX(0);
        opacity: 1;
    }

.sr-help-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .8rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, .18);
    background: #f8fafc;
}

    .sr-help-drawer-head span {
        display: block;
        color: #2563eb;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .sr-help-drawer-head strong {
        display: block;
        margin-top: .1rem;
        color: #0f172a;
        font-size: 1.05rem;
        font-weight: 950;
    }

    .sr-help-drawer-head button {
        width: 38px;
        height: 38px;
        border: 0;
        border-radius: 999px;
        color: #0f172a;
        background: #e2e8f0;
        font-size: 1.35rem;
        font-weight: 900;
        line-height: 1;
    }

.sr-help-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.sr-inline-help-topic {
    display: grid;
    gap: .85rem;
}

.sr-inline-help-topic-head span {
    display: block;
    color: #2563eb;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sr-inline-help-topic-head strong {
    display: block;
    color: #0f172a;
    font-size: 1.18rem;
    font-weight: 950;
}

.sr-inline-help-topic-head small {
    display: block;
    margin-top: .2rem;
    color: #64748b;
    font-size: .8rem;
    line-height: 1.45;
}

.sr-inline-help-body {
    color: #334155;
    font-size: .88rem;
    line-height: 1.55;
}

    .sr-inline-help-body h3,
    .sr-inline-help-body h4 {
        margin-top: 1rem;
        color: #0f172a;
        font-weight: 950;
    }

    .sr-inline-help-body ul,
    .sr-inline-help-body ol {
        padding-left: 1.1rem;
    }

    .sr-inline-help-body li {
        margin-bottom: .35rem;
    }

.sr-inline-help-footer {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(148, 163, 184, .18);
}

.sr-help-loading,
.sr-help-empty {
    display: grid;
    gap: .5rem;
    place-items: center;
    min-height: 180px;
    padding: 1rem;
    border: 1px dashed rgba(148, 163, 184, .34);
    border-radius: 20px;
    color: #64748b;
    text-align: center;
    background: #ffffff;
}

body.sr-help-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .sr-help-drawer {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 82vh;
        border-radius: 28px 28px 0 0;
        transform: translateY(24px);
    }

        .sr-help-drawer.is-open {
            transform: translateY(0);
        }

    .sr-help-drawer-content {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
}

.sr-split-payment-shortcuts .active {
    color: #ffffff !important;
    background: #2563eb !important;
    border-color: #2563eb !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .22);
}

/* =========================================================
   SALES CUSTOMER ACCOUNT MEMO
========================================================= */

.sr-customer-account-memo {
    display: grid;
    gap: .85rem;
    padding: 1rem;
    border: 1px solid rgba(37, 99, 235, .16);
    border-radius: 24px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

    .sr-customer-account-memo small {
        display: block;
        color: #2563eb;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .sr-customer-account-memo > div > strong {
        display: block;
        color: #0f172a;
        font-size: 1.05rem;
        font-weight: 950;
    }

    .sr-customer-account-memo > div > span {
        display: block;
        margin-top: .15rem;
        color: #64748b;
        font-size: .78rem;
    }

.sr-customer-account-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .6rem;
}

    .sr-customer-account-grid > div {
        padding: .75rem;
        border-radius: 18px;
        background: #ffffff;
        border: 1px solid rgba(148, 163, 184, .16);
    }

    .sr-customer-account-grid span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 850;
    }

    .sr-customer-account-grid strong {
        display: block;
        margin-top: .2rem;
        color: #0f172a;
        font-size: .95rem;
        font-weight: 950;
    }

@media (max-width: 768px) {
    .sr-customer-account-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
   STOCKRULER MOBILE TRANSACTION ASSIST
   Replaces floating Help/Action on mobile transaction pages
========================================================= */

@media (max-width: 768px) {
/*    body.sr-transaction-assist-mode .sr-context-help,
    body.sr-transaction-assist-mode .sr-global-action-fab {
        display: none !important;
    }*/

    .sr-transaction-assist-tab {
        position: fixed;
        right: 0;
        top: 46%;
        z-index: 2820;
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        min-height: 48px;
        padding: .45rem .5rem .45rem .45rem;
        border: 0;
        border-radius: 999px 0 0 999px;
        color: #ffffff;
        background: linear-gradient(135deg, #2563eb, #16a34a);
        box-shadow: 0 16px 34px rgba(15, 23, 42, .24);
        transform: translateY(-50%);
    }

    body:not(.sr-transaction-assist-mode) .sr-transaction-assist-tab {
        display: none !important;
    }

    .sr-transaction-assist-tab span {
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        color: #2563eb;
        background: #ffffff;
        font-size: 1rem;
        font-weight: 950;
    }

    .sr-transaction-assist-tab strong {
        font-size: .72rem;
        font-weight: 950;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        letter-spacing: .02em;
    }

    body.sr-floating-left .sr-transaction-assist-tab {
        left: 0;
        right: auto;
        border-radius: 0 999px 999px 0;
        padding: .45rem .45rem .45rem .5rem;
    }

    .sr-transaction-assist-backdrop {
        position: fixed;
        inset: 0;
        z-index: 2860;
        background: rgba(15, 23, 42, .42);
        opacity: 0;
        transition: opacity .18s ease;
    }

        .sr-transaction-assist-backdrop.is-open {
            opacity: 1;
        }

    .sr-transaction-assist-sheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2870;
        padding: 1rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
        border-radius: 28px 28px 0 0;
        background: #ffffff;
        box-shadow: 0 -24px 70px rgba(15, 23, 42, .28);
        transform: translateY(24px);
        opacity: 0;
        transition: transform .18s ease, opacity .18s ease;
    }

        .sr-transaction-assist-sheet.is-open {
            transform: translateY(0);
            opacity: 1;
        }

    .sr-transaction-assist-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: .75rem;
        margin-bottom: .85rem;
    }

        .sr-transaction-assist-head span {
            display: block;
            color: #2563eb;
            font-size: .68rem;
            font-weight: 900;
            letter-spacing: .08em;
            text-transform: uppercase;
        }

        .sr-transaction-assist-head strong {
            display: block;
            color: #0f172a;
            font-size: 1.1rem;
            font-weight: 950;
        }

        .sr-transaction-assist-head small {
            display: block;
            margin-top: .15rem;
            color: #64748b;
            font-size: .76rem;
            line-height: 1.4;
        }

        .sr-transaction-assist-head button {
            width: 38px;
            height: 38px;
            border: 0;
            border-radius: 999px;
            color: #0f172a;
            background: #f1f5f9;
            font-size: 1.35rem;
            font-weight: 950;
            line-height: 1;
        }

    .sr-transaction-assist-options {
        display: grid;
        gap: .65rem;
    }

        .sr-transaction-assist-options button {
            width: 100%;
            display: flex;
            align-items: center;
            gap: .75rem;
            padding: .85rem;
            border: 1px solid rgba(148, 163, 184, .18);
            border-radius: 20px;
            color: #0f172a;
            background: #f8fafc;
            text-align: left;
        }

            .sr-transaction-assist-options button span {
                width: 42px;
                height: 42px;
                min-width: 42px;
                display: grid;
                place-items: center;
                border-radius: 16px;
                color: #2563eb;
                background: #eff6ff;
                font-size: 1.1rem;
                font-weight: 950;
            }

            .sr-transaction-assist-options button strong {
                display: block;
                color: #0f172a;
                font-size: .9rem;
                font-weight: 950;
            }

            .sr-transaction-assist-options button small {
                display: block;
                margin-top: .1rem;
                color: #64748b;
                font-size: .72rem;
                line-height: 1.35;
            }

    body.sr-transaction-assist-open {
        overflow: hidden;
    }
}

/* =========================================================
   STOCKRULER MOBILE QUICK PICKS BOTTOM SHEET
========================================================= */

@media (max-width: 768px) {
    /*
       Do not allow old inline frequently-sold panel
       to sit over the sales item card on mobile.
    */
    .transaction-form[data-current-step="2"] .sr-frequent-products {
        display: none !important;
    }

    .sr-quick-picks-trigger {
        width: 100%;
        display: flex;
        align-items: center;
        gap: .65rem;
        margin: .55rem 0 .65rem;
        padding: .72rem .8rem;
        border: 1px solid rgba(22, 163, 74, .16);
        border-radius: 18px;
        color: #0f172a;
        background: #f0fdf4;
        text-align: left;
        box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
    }

        .sr-quick-picks-trigger > span {
            width: 38px;
            height: 38px;
            display: grid;
            place-items: center;
            border-radius: 14px;
            color: #047857;
            background: #ffffff;
            font-size: 1.05rem;
        }

        .sr-quick-picks-trigger div {
            min-width: 0;
            flex: 1;
        }

        .sr-quick-picks-trigger strong {
            display: block;
            color: #0f172a;
            font-size: .88rem;
            font-weight: 950;
        }

        .sr-quick-picks-trigger small {
            display: block;
            color: #64748b;
            font-size: .7rem;
        }

        .sr-quick-picks-trigger em {
            padding: .35rem .65rem;
            border-radius: 999px;
            color: #047857;
            background: #ffffff;
            font-style: normal;
            font-size: .72rem;
            font-weight: 900;
        }

    .sr-quick-picks-backdrop {
        position: fixed;
        inset: 0;
        z-index: 2880;
        background: rgba(15, 23, 42, .44);
        opacity: 0;
        transition: opacity .18s ease;
    }

        .sr-quick-picks-backdrop.is-open {
            opacity: 1;
        }

    .sr-quick-picks-sheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2890;
        display: flex;
        flex-direction: column;
        max-height: 72vh;
        padding: 1rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
        border-radius: 28px 28px 0 0;
        background: #ffffff;
        box-shadow: 0 -24px 70px rgba(15, 23, 42, .28);
        transform: translateY(24px);
        opacity: 0;
        transition: transform .18s ease, opacity .18s ease;
    }

        .sr-quick-picks-sheet.is-open {
            transform: translateY(0);
            opacity: 1;
        }

    .sr-quick-picks-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: .75rem;
        margin-bottom: .85rem;
    }

        .sr-quick-picks-head span {
            display: block;
            color: #16a34a;
            font-size: .68rem;
            font-weight: 900;
            letter-spacing: .08em;
            text-transform: uppercase;
        }

        .sr-quick-picks-head strong {
            display: block;
            color: #0f172a;
            font-size: 1.15rem;
            font-weight: 950;
        }

        .sr-quick-picks-head small {
            display: block;
            margin-top: .15rem;
            color: #64748b;
            font-size: .76rem;
        }

        .sr-quick-picks-head button {
            width: 38px;
            height: 38px;
            border: 0;
            border-radius: 999px;
            color: #0f172a;
            background: #f1f5f9;
            font-size: 1.35rem;
            font-weight: 950;
            line-height: 1;
        }

    .sr-quick-picks-scroll {
        display: grid;
        grid-template-columns: 1fr;
        gap: .65rem;
        overflow-y: auto;
        padding-right: .15rem;
    }

        .sr-quick-picks-scroll .sr-frequent-product-chip {
            width: 100%;
            min-width: 0;
            max-width: none;
            min-height: 72px;
        }

    body.sr-quick-picks-open {
        overflow: hidden;
    }

    /*
       Ensure item cards have enough bottom breathing room
       above Review Sale and mobile bottom nav.
    */
    .transaction-form[data-current-step="2"] #mobileRows,
    .transaction-form[data-current-step="2"] .mobiletxn-viewport,
    .transaction-form[data-current-step="2"] .sr-sale-items-carousel {
        padding-bottom: 7.5rem !important;
    }
}

@media (max-width: 768px) {
    .sr-frequent-products {
        display: none !important;
    }

    .sr-quick-picks-trigger {
        position: relative;
        z-index: 1;
    }

    .sr-quick-picks-sheet .sr-frequent-product-chip {
        width: 100%;
        min-width: 0;
        max-width: none;
    }
}

/* =========================================================
   FINAL MOBILE QUICK PICKS UX LOCK
========================================================= */

@media (max-width: 768px) {
    /*
       Never allow the full frequently sold strip inline on mobile.
       Mobile must use Quick Picks trigger + bottom sheet only.
    */
    .sr-frequent-products {
        display: none !important;
    }

    .sr-quick-picks-trigger {
        position: static !important;
        z-index: 1;
        width: 100%;
        min-height: 46px;
        display: flex;
        align-items: center;
        gap: .6rem;
        margin: .45rem 0 .55rem;
        padding: .6rem .7rem;
        border: 1px solid rgba(22, 163, 74, .16);
        border-radius: 16px;
        color: #0f172a;
        background: #f0fdf4;
        text-align: left;
        box-shadow: 0 6px 16px rgba(15, 23, 42, .04);
    }

        .sr-quick-picks-trigger > span {
            width: 34px;
            height: 34px;
            min-width: 34px;
            display: grid;
            place-items: center;
            border-radius: 13px;
            color: #047857;
            background: #ffffff;
            font-size: 1rem;
        }

        .sr-quick-picks-trigger div {
            min-width: 0;
            flex: 1;
        }

        .sr-quick-picks-trigger strong {
            display: block;
            color: #0f172a;
            font-size: .84rem;
            font-weight: 950;
        }

        .sr-quick-picks-trigger small {
            display: block;
            color: #64748b;
            font-size: .66rem;
        }

        .sr-quick-picks-trigger em {
            padding: .28rem .58rem;
            border-radius: 999px;
            color: #047857;
            background: #ffffff;
            font-style: normal;
            font-size: .68rem;
            font-weight: 900;
        }

    .sr-quick-picks-backdrop {
        position: fixed !important;
        inset: 0 !important;
        z-index: 2990 !important;
        background: rgba(15, 23, 42, .46);
        opacity: 0;
        transition: opacity .18s ease;
    }

        .sr-quick-picks-backdrop.d-none {
            display: none !important;
        }

        .sr-quick-picks-backdrop.is-open {
            opacity: 1;
        }

    .sr-quick-picks-sheet {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        z-index: 3000 !important;
        display: flex !important;
        flex-direction: column;
        max-height: 72vh;
        min-height: 280px;
        padding: .95rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
        border-radius: 28px 28px 0 0;
        background: #ffffff;
        box-shadow: 0 -24px 70px rgba(15, 23, 42, .28);
        transform: translateY(100%);
        opacity: 0;
        transition: transform .18s ease, opacity .18s ease;
    }

        .sr-quick-picks-sheet.d-none {
            display: none !important;
        }

        .sr-quick-picks-sheet.is-open {
            transform: translateY(0);
            opacity: 1;
        }

    .sr-quick-picks-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: .75rem;
        margin-bottom: .75rem;
        flex: 0 0 auto;
    }

        .sr-quick-picks-head span {
            display: block;
            color: #16a34a;
            font-size: .66rem;
            font-weight: 900;
            letter-spacing: .08em;
            text-transform: uppercase;
        }

        .sr-quick-picks-head strong {
            display: block;
            color: #0f172a;
            font-size: 1.1rem;
            font-weight: 950;
        }

        .sr-quick-picks-head small {
            display: block;
            margin-top: .12rem;
            color: #64748b;
            font-size: .74rem;
        }

        .sr-quick-picks-head button {
            width: 38px;
            height: 38px;
            min-width: 38px;
            border: 0;
            border-radius: 999px;
            color: #0f172a;
            background: #f1f5f9;
            font-size: 1.35rem;
            font-weight: 950;
            line-height: 1;
        }

    .sr-quick-picks-scroll {
        flex: 1 1 auto;
        display: grid;
        grid-template-columns: 1fr;
        gap: .65rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-right: .1rem;
    }

        .sr-quick-picks-scroll .sr-frequent-product-chip {
            width: 100%;
            min-width: 0;
            max-width: none;
            min-height: 72px;
        }

    body.sr-quick-picks-open {
        overflow: hidden !important;
    }

    /*
       Prevent the search/quick-picks area from sitting on top of the item card.
    */
    .transaction-search-shell,
    .sr-quick-picks-trigger {
        transform: none !important;
    }

    #mobileRows {
        margin-top: .35rem;
        padding-bottom: 7rem !important;
    }
}

/* =========================================================
   STOCKRULER MOBILE SEARCH + QUICK PICKS INLINE
========================================================= */

@media (max-width: 768px) {
    .sr-search-with-quick-picks {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: .45rem;
    }

        .sr-search-with-quick-picks #productSearch {
            min-width: 0;
            width: 100%;
            grid-column: 1;
        }

        .sr-search-with-quick-picks .sr-quick-picks-trigger-inline {
            grid-column: 2;
            width: auto;
            min-width: 76px;
            min-height: 44px;
            margin: 0 !important;
            padding: .45rem .6rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: .35rem;
            border: 1px solid rgba(22, 163, 74, .18);
            border-radius: 999px;
            color: #047857;
            background: #ecfdf5;
            box-shadow: none;
            white-space: nowrap;
        }

            .sr-search-with-quick-picks .sr-quick-picks-trigger-inline > span {
                width: 26px;
                height: 26px;
                min-width: 26px;
                display: grid;
                place-items: center;
                border-radius: 999px;
                color: #047857;
                background: #ffffff;
                font-size: .86rem;
            }

            .sr-search-with-quick-picks .sr-quick-picks-trigger-inline strong {
                display: inline;
                color: #047857;
                font-size: .74rem;
                font-weight: 950;
            }

            .sr-search-with-quick-picks .sr-quick-picks-trigger-inline small,
            .sr-search-with-quick-picks .sr-quick-picks-trigger-inline em,
            .sr-search-with-quick-picks .sr-quick-picks-trigger-inline div {
                display: none !important;
            }

        /*
       If the search results dropdown lives inside the same shell,
       allow it to span the full row below search + button.
    */
        .sr-search-with-quick-picks #searchResults,
        .sr-search-with-quick-picks .search-results,
        .sr-search-with-quick-picks .product-search-results {
            grid-column: 1 / -1;
        }
}

@media (max-width: 380px) {
    .sr-search-with-quick-picks {
        gap: .35rem;
    }

        .sr-search-with-quick-picks .sr-quick-picks-trigger-inline {
            min-width: 48px;
            padding: .45rem;
        }

            .sr-search-with-quick-picks .sr-quick-picks-trigger-inline strong {
                display: none;
            }
}

/* =========================================================
   STOCKRULER MOBILE HELP / ACTION SHEET HEADROOM FIX
========================================================= */

@media (max-width: 768px) {
    :root {
        /*
           This creates breathing room below the mobile top bar /
           transaction summary / search area.
           Increase to 7rem if your top bar feels taller on some phones.
        */
        --sr-mobile-sheet-top-gap: 15rem;
    }

    /*
       Context Help drawer should sit below the top working area,
       not cover the transaction top bar.
    */
    .sr-help-drawer {
        top: var(--sr-mobile-sheet-top-gap) !important;
        left: .65rem !important;
        right: .65rem !important;
        bottom: 0 !important;
        width: auto !important;
        max-height: calc(100dvh - var(--sr-mobile-sheet-top-gap)) !important;
        border-radius: 24px 24px 0 0 !important;
        transform: translateY(100%) !important;
    }

        .sr-help-drawer.is-open {
            transform: translateY(0) !important;
        }

    /*
       Quick Action panel should follow the same rule.
    */
    .sr-quick-action-panel {
        top: var(--sr-mobile-sheet-top-gap) !important;
        left: .65rem !important;
        right: .65rem !important;
        bottom: 0 !important;
        width: auto !important;
        max-height: calc(100dvh - var(--sr-mobile-sheet-top-gap)) !important;
        border-radius: 24px 24px 0 0 !important;
        transform: translateY(100%) !important;
    }

        .sr-quick-action-panel.is-open {
            transform: translateY(0) !important;
        }

    /*
       Keep the headings visible while scrolling through long help/action content.
    */
    .sr-help-drawer-head,
    .sr-quick-action-head {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #ffffff;
    }

    .sr-help-drawer-content,
    .sr-quick-action-panel {
        -webkit-overflow-scrolling: touch;
    }

    /*
       Give content enough bottom space above phone safe area.
    */
    .sr-help-drawer-content {
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom)) !important;
    }

    .sr-quick-action-grid {
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom)) !important;
    }

    /*
       Backdrop can still cover the whole page,
       but drawer/panel itself must respect top headroom.
    */
    .sr-help-drawer-backdrop,
    .sr-quick-action-backdrop {
        z-index: 2850 !important;
    }

    .sr-help-drawer,
    .sr-quick-action-panel {
        z-index: 2860 !important;
    }
}

/* =========================================================
   CUSTOMER ACCOUNT MEMO - MOBILE READABILITY
========================================================= */

.sr-customer-account-grid strong {
    margin-top: .25rem;
    font-size: 1.12rem;
    font-weight: 950;
    letter-spacing: -.02em;
}

.sr-customer-account-grid span {
    font-size: .7rem;
    font-weight: 900;
}

@media (max-width: 640px) {
    .sr-customer-account-memo {
        padding: .85rem;
        border-radius: 22px;
    }

    .sr-customer-account-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .55rem;
    }

        .sr-customer-account-grid > div {
            padding: .75rem .7rem;
            border-radius: 16px;
        }

        .sr-customer-account-grid strong {
            font-size: 1.22rem;
            line-height: 1.1;
        }
}

/* =========================================================
   PAYMENT SUMMARY FIGURES - MOBILE READABILITY
========================================================= */

.sr-payment-summary strong,
.sr-payment-summary-card strong,
.payment-summary strong,
.payment-totals strong,
#splitPaymentPaid,
#splitPaymentBalance,
#paymentPaidTotal,
#paymentBalanceTotal {
    font-size: 1.22rem !important;
    font-weight: 950 !important;
    letter-spacing: -.02em;
}

@media (max-width: 640px) {
    .sr-payment-summary strong,
    .sr-payment-summary-card strong,
    .payment-summary strong,
    .payment-totals strong,
    #splitPaymentPaid,
    #splitPaymentBalance,
    #paymentPaidTotal,
    #paymentBalanceTotal {
        font-size: 1.3rem !important;
    }
}

/* =========================================================
   CUSTOMER ACCOUNT PAYMENT PAGE
========================================================= */

.sr-customer-payment-page {
    display: grid;
    gap: 1rem;
}

.sr-customer-payment-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr);
    gap: .85rem;
    padding: 1rem;
    border-radius: 26px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(255,255,255,.2), transparent 18rem), linear-gradient(135deg, #0f172a, #2563eb);
    box-shadow: 0 20px 50px rgba(15, 23, 42, .18);
}

    .sr-customer-payment-hero span,
    .sr-customer-payment-card span,
    .sr-customer-debt-card span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .sr-customer-payment-hero span {
        color: #bfdbfe;
    }

    .sr-customer-payment-hero strong {
        display: block;
        margin-top: .12rem;
        color: #ffffff;
        font-size: 1.35rem;
        font-weight: 950;
    }

    .sr-customer-payment-hero small {
        display: block;
        margin-top: .18rem;
        color: rgba(255,255,255,.78);
        font-size: .8rem;
    }

.sr-customer-payment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.sr-customer-payment-card {
    padding: .9rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

    .sr-customer-payment-card strong {
        display: block;
        margin-top: .2rem;
        color: #0f172a;
        font-size: 1.18rem;
        font-weight: 950;
    }

    .sr-customer-payment-card.primary {
        background: #ecfdf5;
        border-color: rgba(22, 163, 74, .18);
    }

.sr-customer-payment-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

    .sr-customer-payment-form .full {
        grid-column: 1 / -1;
    }

.sr-customer-debt-list {
    display: grid;
    gap: .65rem;
    padding: 1rem;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.sr-customer-debt-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
    padding: .8rem;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 18px;
    background: #f8fafc;
}

    .sr-customer-debt-card strong {
        display: block;
        margin-top: .12rem;
        color: #0f172a;
        font-size: .95rem;
        font-weight: 950;
    }

    .sr-customer-debt-card small {
        display: block;
        margin-top: .08rem;
        color: #64748b;
        font-size: .72rem;
    }

.sr-customer-payment-actions {
    display: flex;
    justify-content: flex-end;
    gap: .65rem;
    padding-bottom: 1rem;
}

    .sr-customer-payment-actions .btn {
        min-height: 44px;
        border-radius: 999px;
        font-weight: 900;
    }

@media (max-width: 768px) {
    .sr-customer-payment-hero,
    .sr-customer-payment-grid,
    .sr-customer-payment-form {
        grid-template-columns: 1fr;
    }

    .sr-customer-payment-actions {
        position: sticky;
        bottom: calc(4.8rem + env(safe-area-inset-bottom));
        z-index: 20;
        display: grid;
        grid-template-columns: .75fr 1.25fr;
        padding: .65rem;
        border: 1px solid rgba(148, 163, 184, .16);
        border-radius: 20px;
        background: rgba(255,255,255,.96);
        box-shadow: 0 -10px 30px rgba(15, 23, 42, .12);
        backdrop-filter: blur(10px);
    }

    .sr-customer-debt-card {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================================
   CUSTOMER PAYMENT RECEIPT PAGE
========================================================= */

.sr-payment-receipt-page {
    display: grid;
    gap: 1rem;
}

.sr-payment-receipt-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr);
    gap: .85rem;
    padding: 1rem;
    border-radius: 26px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(255,255,255,.2), transparent 18rem), linear-gradient(135deg, #0f172a, #16a34a);
    box-shadow: 0 20px 50px rgba(15, 23, 42, .18);
}

    .sr-payment-receipt-hero span,
    .sr-payment-receipt-summary span,
    .sr-payment-receipt-note span,
    .sr-payment-allocation-card span {
        display: block;
        color: #64748b;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .sr-payment-receipt-hero span {
        color: #bbf7d0;
    }

    .sr-payment-receipt-hero strong {
        display: block;
        margin-top: .12rem;
        color: #ffffff;
        font-size: 1.4rem;
        font-weight: 950;
    }

    .sr-payment-receipt-hero small {
        display: block;
        margin-top: .18rem;
        color: rgba(255,255,255,.78);
        font-size: .8rem;
    }

.sr-payment-receipt-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

    .sr-payment-receipt-summary > div,
    .sr-payment-receipt-note,
    .sr-payment-allocation-list {
        padding: .9rem;
        border: 1px solid rgba(148, 163, 184, .16);
        border-radius: 22px;
        background: #ffffff;
        box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
    }

    .sr-payment-receipt-summary strong {
        display: block;
        margin-top: .2rem;
        color: #0f172a;
        font-size: 1.08rem;
        font-weight: 950;
    }

.sr-payment-receipt-note p {
    margin: .3rem 0 0;
    color: #334155;
    font-size: .88rem;
}

.sr-payment-allocation-list {
    display: grid;
    gap: .65rem;
}

.sr-payment-allocation-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
    padding: .85rem;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 18px;
    background: #f8fafc;
}

    .sr-payment-allocation-card strong {
        display: block;
        margin-top: .12rem;
        color: #0f172a;
        font-size: .96rem;
        font-weight: 950;
    }

    .sr-payment-allocation-card small {
        display: block;
        margin-top: .08rem;
        color: #64748b;
        font-size: .72rem;
    }

    .sr-payment-allocation-card > div:last-child {
        text-align: right;
    }

        .sr-payment-allocation-card > div:last-child strong {
            color: #047857;
            font-size: 1.08rem;
        }

@media (max-width: 768px) {
    .sr-payment-receipt-hero,
    .sr-payment-receipt-summary {
        grid-template-columns: 1fr;
    }

    .sr-payment-allocation-card {
        align-items: flex-start;
        flex-direction: column;
    }

        .sr-payment-allocation-card > div:last-child {
            text-align: left;
        }
}

.sr-clear-balance-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: .35rem .7rem;
    border-radius: 999px;
    color: #047857;
    background: #ecfdf5;
    font-size: .74rem;
    font-weight: 900;
}

/* =========================================================
   STOCKRULER GLOBAL MOBILE ASSIST
   Replaces floating Help + Action on mobile pages
========================================================= */

@media (max-width: 768px) {
    /*
       On mobile, hide the separate floating Help and Action buttons.
       Assist becomes the single entry point.
    */
    body.sr-mobile-assist-mode .sr-context-help,
    body.sr-mobile-assist-mode .sr-global-action-fab {
        display: none !important;
    }

    .sr-mobile-assist-tab {
        position: fixed;
        right: 0;
        top: 48%;
        z-index: 2820;
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        min-height: 48px;
        padding: .45rem .5rem .45rem .45rem;
        border: 0;
        border-radius: 999px 0 0 999px;
        color: #ffffff;
        background: linear-gradient(135deg, #2563eb, #16a34a);
        box-shadow: 0 16px 34px rgba(15, 23, 42, .24);
        transform: translateY(-50%);
    }

    body:not(.sr-mobile-assist-mode) .sr-mobile-assist-tab {
        display: none !important;
    }

    .sr-mobile-assist-tab span {
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        color: #2563eb;
        background: #ffffff;
        font-size: 1rem;
        font-weight: 950;
    }

    .sr-mobile-assist-tab strong {
        font-size: .72rem;
        font-weight: 950;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        letter-spacing: .02em;
    }

    body.sr-floating-left .sr-mobile-assist-tab {
        left: 0;
        right: auto;
        border-radius: 0 999px 999px 0;
        padding: .45rem .45rem .45rem .5rem;
    }

    .sr-mobile-assist-backdrop {
        position: fixed;
        inset: 0;
        z-index: 2860;
        background: rgba(15, 23, 42, .42);
        opacity: 0;
        transition: opacity .18s ease;
    }

        .sr-mobile-assist-backdrop.is-open {
            opacity: 1;
        }

    .sr-mobile-assist-sheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2870;
        padding: 1rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
        border-radius: 28px 28px 0 0;
        background: #ffffff;
        box-shadow: 0 -24px 70px rgba(15, 23, 42, .28);
        transform: translateY(24px);
        opacity: 0;
        transition: transform .18s ease, opacity .18s ease;
    }

        .sr-mobile-assist-sheet.is-open {
            transform: translateY(0);
            opacity: 1;
        }

    .sr-mobile-assist-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: .75rem;
        margin-bottom: .85rem;
    }

        .sr-mobile-assist-head span {
            display: block;
            color: #2563eb;
            font-size: .68rem;
            font-weight: 900;
            letter-spacing: .08em;
            text-transform: uppercase;
        }

        .sr-mobile-assist-head strong {
            display: block;
            color: #0f172a;
            font-size: 1.1rem;
            font-weight: 950;
        }

        .sr-mobile-assist-head small {
            display: block;
            margin-top: .15rem;
            color: #64748b;
            font-size: .76rem;
            line-height: 1.4;
        }

        .sr-mobile-assist-head button {
            width: 38px;
            height: 38px;
            border: 0;
            border-radius: 999px;
            color: #0f172a;
            background: #f1f5f9;
            font-size: 1.35rem;
            font-weight: 950;
            line-height: 1;
        }

    .sr-mobile-assist-options {
        display: grid;
        gap: .65rem;
    }

        .sr-mobile-assist-options button {
            width: 100%;
            display: flex;
            align-items: center;
            gap: .75rem;
            padding: .85rem;
            border: 1px solid rgba(148, 163, 184, .18);
            border-radius: 20px;
            color: #0f172a;
            background: #f8fafc;
            text-align: left;
        }

            .sr-mobile-assist-options button span {
                width: 42px;
                height: 42px;
                min-width: 42px;
                display: grid;
                place-items: center;
                border-radius: 16px;
                color: #2563eb;
                background: #eff6ff;
                font-size: 1.1rem;
                font-weight: 950;
            }

            .sr-mobile-assist-options button strong {
                display: block;
                color: #0f172a;
                font-size: .9rem;
                font-weight: 950;
            }

            .sr-mobile-assist-options button small {
                display: block;
                margin-top: .1rem;
                color: #64748b;
                font-size: .72rem;
                line-height: 1.35;
            }

    body.sr-mobile-assist-open {
        overflow: hidden;
    }
}

/* =========================================================
   STOCKRULER UNIFIED ASSIST
   One Assist button for Help + Quick Actions
========================================================= */

/* Hide old separate Help and Action buttons when unified assist is active */
body.sr-unified-assist-mode .sr-context-help,
body.sr-unified-assist-mode .sr-global-action-fab {
    display: none !important;
}

.sr-global-assist-button {
    position: fixed;
    z-index: 2820;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #16a34a);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .24);
}

    .sr-global-assist-button span {
        display: grid;
        place-items: center;
        border-radius: 999px;
        color: #2563eb;
        background: #ffffff;
        font-weight: 950;
    }

    .sr-global-assist-button strong {
        font-weight: 950;
    }

/* Desktop / tablet floating pill */
@media (min-width: 769px) {
    .sr-global-assist-button {
        right: 1.4rem;
        bottom: 1.4rem;
        display: inline-flex;
        align-items: center;
        gap: .55rem;
        min-height: 54px;
        padding: .55rem .95rem .55rem .55rem;
        border-radius: 999px;
    }

        .sr-global-assist-button span {
            width: 38px;
            height: 38px;
            font-size: 1rem;
        }

        .sr-global-assist-button strong {
            font-size: .85rem;
            letter-spacing: .01em;
        }
}

/* Mobile slim side tab */
@media (max-width: 768px) {
    .sr-global-assist-button {
        right: 0;
        top: 48%;
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        min-height: 48px;
        padding: .45rem .5rem .45rem .45rem;
        border-radius: 999px 0 0 999px;
        transform: translateY(-50%);
    }

        .sr-global-assist-button span {
            width: 34px;
            height: 34px;
            font-size: 1rem;
        }

        .sr-global-assist-button strong {
            font-size: .72rem;
            writing-mode: vertical-rl;
            text-orientation: mixed;
            letter-spacing: .02em;
        }

    body.sr-floating-left .sr-global-assist-button {
        left: 0;
        right: auto;
        border-radius: 0 999px 999px 0;
        padding: .45rem .45rem .45rem .5rem;
    }
}

/* Backdrop */
.sr-global-assist-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2860;
    background: rgba(15, 23, 42, .42);
    opacity: 0;
    transition: opacity .18s ease;
}

    .sr-global-assist-backdrop.is-open {
        opacity: 1;
    }

/* Assist panel base */
.sr-global-assist-sheet {
    position: fixed;
    z-index: 2870;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
    opacity: 0;
    transition: transform .18s ease, opacity .18s ease;
}

    .sr-global-assist-sheet.is-open {
        opacity: 1;
    }

/* Desktop assist popover */
@media (min-width: 769px) {
    .sr-global-assist-sheet {
        right: 1.4rem;
        bottom: 5.3rem;
        width: min(390px, calc(100vw - 2rem));
        padding: 1rem;
        border-radius: 28px;
        transform: translateY(14px) scale(.98);
    }

        .sr-global-assist-sheet.is-open {
            transform: translateY(0) scale(1);
        }
}

/* Mobile bottom sheet */
@media (max-width: 768px) {
    .sr-global-assist-sheet {
        left: 0;
        right: 0;
        bottom: 0;
        padding: 1rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
        border-radius: 28px 28px 0 0;
        transform: translateY(24px);
    }

        .sr-global-assist-sheet.is-open {
            transform: translateY(0);
        }

    body.sr-assist-open {
        overflow: hidden;
    }
}

.sr-global-assist-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .85rem;
}

    .sr-global-assist-head span {
        display: block;
        color: #2563eb;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .sr-global-assist-head strong {
        display: block;
        color: #0f172a;
        font-size: 1.1rem;
        font-weight: 950;
    }

    .sr-global-assist-head small {
        display: block;
        margin-top: .15rem;
        color: #64748b;
        font-size: .76rem;
        line-height: 1.4;
    }

    .sr-global-assist-head button {
        width: 38px;
        height: 38px;
        border: 0;
        border-radius: 999px;
        color: #0f172a;
        background: #f1f5f9;
        font-size: 1.35rem;
        font-weight: 950;
        line-height: 1;
    }

.sr-global-assist-options {
    display: grid;
    gap: .65rem;
}

    .sr-global-assist-options button,
    .sr-global-assist-option-link {
        width: 100%;
        display: flex;
        align-items: center;
        gap: .75rem;
        padding: .85rem;
        border: 1px solid rgba(148, 163, 184, .18);
        border-radius: 20px;
        color: #0f172a;
        background: #f8fafc;
        text-align: left;
        text-decoration: none;
    }

        .sr-global-assist-options button:hover,
        .sr-global-assist-option-link:hover {
            background: #eef6ff;
        }

        .sr-global-assist-options button span,
        .sr-global-assist-option-link span {
            width: 42px;
            height: 42px;
            min-width: 42px;
            display: grid;
            place-items: center;
            border-radius: 16px;
            color: #2563eb;
            background: #eff6ff;
            font-size: 1.1rem;
            font-weight: 950;
        }

        .sr-global-assist-options button strong,
        .sr-global-assist-option-link strong {
            display: block;
            color: #0f172a;
            font-size: .9rem;
            font-weight: 950;
        }

        .sr-global-assist-options button small,
        .sr-global-assist-option-link small {
            display: block;
            margin-top: .1rem;
            color: #64748b;
            font-size: .72rem;
            line-height: 1.35;
        }

/* =========================================================
   HELP DRAWER TOPBAR SAFE HEIGHT
   Keeps Help drawer below the fixed top menu
========================================================= */

:root {
    --sr-topbar-safe-height: 82px;
    --sr-drawer-safe-gap: 14px;
}

@media (min-width: 769px) {
    .sr-help-drawer {
        top: calc(var(--sr-topbar-safe-height) + var(--sr-drawer-safe-gap)) !important;
        right: 1rem !important;
        bottom: var(--sr-drawer-safe-gap) !important;
        height: auto !important;
        max-height: calc(100dvh - var(--sr-topbar-safe-height) - (var(--sr-drawer-safe-gap) * 2)) !important;
        overflow: hidden !important;
        border-radius: 24px !important;
    }

    .sr-help-drawer-content {
        max-height: calc(100dvh - var(--sr-topbar-safe-height) - 120px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .sr-help-drawer-head {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #ffffff;
    }
}

@media (min-width: 769px) {
    .sr-quick-action-panel {
        top: calc(var(--sr-topbar-safe-height) + var(--sr-drawer-safe-gap)) !important;
        bottom: var(--sr-drawer-safe-gap) !important;
        height: auto !important;
        max-height: calc(100dvh - var(--sr-topbar-safe-height) - (var(--sr-drawer-safe-gap) * 2)) !important;
        overflow-y: auto !important;
        border-radius: 24px !important;
    }
}

/* =========================================================
   STOCKRULER LIVE OPERATIONS / ONLINE USERS
========================================================= */

.sr-live-users-card {
    display: grid;
    gap: .85rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.sr-live-users-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

    .sr-live-users-head span:first-child {
        display: block;
        color: #2563eb;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .sr-live-users-head strong {
        display: block;
        margin-top: .15rem;
        color: #0f172a;
        font-size: 1.05rem;
        font-weight: 950;
    }

    .sr-live-users-head small {
        display: block;
        margin-top: .1rem;
        color: #64748b;
        font-size: .76rem;
    }

.sr-live-count {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: .3rem .65rem;
    border-radius: 999px;
    color: #047857;
    background: #ecfdf5;
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

.sr-live-users-list {
    display: grid;
    gap: .65rem;
}

.sr-live-user {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
    padding: .75rem;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 20px;
    background: #f8fafc;
}

.sr-live-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #16a34a);
    font-weight: 950;
}

.sr-live-main {
    min-width: 0;
}

    .sr-live-main strong {
        display: block;
        color: #0f172a;
        font-size: .88rem;
        font-weight: 950;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sr-live-main small {
        display: block;
        margin-top: .08rem;
        color: #64748b;
        font-size: .7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sr-live-main span {
        display: block;
        margin-top: .18rem;
        color: #334155;
        font-size: .76rem;
        font-weight: 800;
    }

.sr-live-status {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .5rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 900;
    white-space: nowrap;
}

    .sr-live-status i {
        width: 8px;
        height: 8px;
        border-radius: 999px;
    }

    .sr-live-status.active {
        color: #047857;
        background: #ecfdf5;
    }

        .sr-live-status.active i {
            background: #16a34a;
        }

    .sr-live-status.idle {
        color: #92400e;
        background: #fffbeb;
    }

        .sr-live-status.idle i {
            background: #f59e0b;
        }

.sr-live-empty {
    padding: .85rem;
    border-radius: 18px;
    color: #64748b;
    background: #f8fafc;
    font-size: .84rem;
    text-align: center;
}

@media (max-width: 640px) {
    .sr-live-user {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .sr-live-status {
        grid-column: 2;
        justify-self: start;
    }
}

/* =========================================================
   STOCKRULER LIVE OPERATIONS / ONLINE USERS
========================================================= */

.sr-live-users-card {
    display: grid;
    gap: .85rem;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.sr-live-users-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}

    .sr-live-users-head span:first-child {
        display: block;
        color: #2563eb;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .sr-live-users-head strong {
        display: block;
        margin-top: .15rem;
        color: #0f172a;
        font-size: 1.05rem;
        font-weight: 950;
    }

    .sr-live-users-head small {
        display: block;
        margin-top: .1rem;
        color: #64748b;
        font-size: .76rem;
    }

.sr-live-count {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: .3rem .65rem;
    border-radius: 999px;
    color: #047857;
    background: #ecfdf5;
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

.sr-live-users-list {
    display: grid;
    gap: .65rem;
}

.sr-live-user {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
    padding: .75rem;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 20px;
    background: #f8fafc;
}

.sr-live-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #16a34a);
    font-weight: 950;
}

.sr-live-main {
    min-width: 0;
}

    .sr-live-main strong {
        display: block;
        color: #0f172a;
        font-size: .88rem;
        font-weight: 950;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sr-live-main small {
        display: block;
        margin-top: .08rem;
        color: #64748b;
        font-size: .7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sr-live-main span {
        display: block;
        margin-top: .18rem;
        color: #334155;
        font-size: .76rem;
        font-weight: 800;
    }

.sr-live-status {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .5rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 900;
    white-space: nowrap;
}

    .sr-live-status i {
        width: 8px;
        height: 8px;
        border-radius: 999px;
    }

    .sr-live-status.active {
        color: #047857;
        background: #ecfdf5;
    }

        .sr-live-status.active i {
            background: #16a34a;
        }

    .sr-live-status.idle {
        color: #92400e;
        background: #fffbeb;
    }

        .sr-live-status.idle i {
            background: #f59e0b;
        }

.sr-live-empty {
    padding: .85rem;
    border-radius: 18px;
    color: #64748b;
    background: #f8fafc;
    font-size: .84rem;
    text-align: center;
}

@media (max-width: 640px) {
    .sr-live-user {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .sr-live-status {
        grid-column: 2;
        justify-self: start;
    }
}