:root {
    --sp-primary: #9C27B0;
    --sp-primary-dark: #8E24AA;
    --sp-primary-light: #AB47BC;
    --sp-secondary: #1F2937;
    --sp-accent: #AB47BC;
    --sp-sidebar: #FFFFFF;
    --sp-header: #FFFFFF;
    --sp-primary-text: #FFFFFF;
    --sp-on-sidebar: #3C4858;
    --sp-on-header: #3C4858;
    --sp-primary-rgb: 156, 39, 176;
    --sp-accent-rgb: 171, 71, 188;
    --md-primary: var(--sp-primary);
    --md-primary-dark: var(--sp-primary-dark);
    --md-warning: #ff9800;
    --md-success: #4caf50;
    --md-danger: #f44336;
    --md-info: #00bcd4;
    --md-rose: #e91e63;
    --md-text: #3c4858;
    --md-muted: #999;
    --md-bg: #eeeeee;
    --md-rail: 84px;
    --md-sidebar: 236px;
    --md-radius: 6px;
}

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

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--md-bg);
    color: var(--md-text);
    font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 300;
    font-size: .9375rem;
}

a {
    color: var(--md-primary);
}

.text-muted {
    color: var(--md-muted) !important;
}

.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
    vertical-align: middle;
    font-size: 24px;
    line-height: 1;
}

.md-app {
    min-height: 100vh;
    overflow-x: hidden;
}

.md-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    width: var(--md-sidebar);
    flex-direction: column;
    overflow: hidden;
    background: var(--sp-sidebar);
    color: var(--sp-on-sidebar);
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
    transition: width .2s ease;
}

.md-brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-shrink: 0;
    min-height: 3.75rem;
    padding: .9rem .85rem .65rem;
    color: var(--sp-on-sidebar);
    font-size: 1.125rem;
    font-weight: 500;
    letter-spacing: .04em;
    text-decoration: none;
    text-transform: uppercase;
    overflow: hidden;
}

.md-brand.has-wide-logo {
    flex-wrap: wrap;
}

.md-brand-mark-img {
    display: block;
    flex-shrink: 0;
    width: 2.35rem;
    height: 2.35rem;
    object-fit: contain;
    border-radius: 8px;
}

.md-brand-logo {
    display: none;
    width: 100%;
    max-width: 100%;
    max-height: 3.4rem;
    object-fit: contain;
    object-position: left center;
}

.md-brand.has-wide-logo .md-brand-logo {
    display: block;
}

.md-brand.has-wide-logo .md-brand-mark-img,
.md-brand.has-wide-logo .md-brand-mark {
    display: none;
}

.md-brand.has-wide-logo .md-brand-name {
    display: none;
}

.md-settings-logo {
    max-width: 8rem;
    max-height: 3rem;
    object-fit: contain;
}

.md-brand:hover {
    color: var(--sp-on-sidebar);
    filter: brightness(0.9);
}

.md-sidebar nav {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: .35rem;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: .35rem .75rem .75rem;
    scrollbar-color: rgba(var(--sp-primary-rgb), .45) rgba(var(--sp-primary-rgb), .12);
    scrollbar-width: auto;
}

.md-sidebar nav::-webkit-scrollbar {
    width: 8px;
}

.md-sidebar nav::-webkit-scrollbar-track {
    background: rgba(var(--sp-primary-rgb), .12);
}

.md-sidebar nav::-webkit-scrollbar-thumb {
    background: rgba(var(--sp-primary-rgb), .45);
    border-radius: 8px;
}

.md-nav-section {
    height: 1px;
    margin: .4rem .55rem;
    overflow: hidden;
    background: rgba(0, 0, 0, .08);
}

.md-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem .75rem;
    border-radius: 12px;
    color: var(--sp-on-sidebar);
    font-size: .875rem;
    font-weight: 400;
    text-decoration: none;
}

.md-sidebar .nav-link .material-symbols-outlined {
    color: #9e9e9e;
    font-size: 30px;
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.md-sidebar .nav-link:hover {
    background: rgba(200, 200, 200, .2);
    color: var(--sp-on-sidebar);
}

.md-sidebar .nav-link.active {
    color: var(--sp-primary);
    background: rgba(var(--sp-primary-rgb), .12);
    box-shadow: none;
}

.md-sidebar .nav-link.active .material-symbols-outlined {
    color: var(--sp-primary);
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.md-main {
    margin-left: var(--md-sidebar);
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .2s ease;
}

html.is-fullscreen .md-sidebar {
    display: none;
}

html.is-fullscreen .md-main {
    margin-left: 0;
}

html.is-fullscreen .md-menu-toggle,
html.is-fullscreen .md-backdrop {
    display: none;
}

html.is-fullscreen .md-topbar-icon[data-shell-fullscreen] {
    color: var(--md-primary);
}

.md-topbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: nowrap;
    min-height: 3.5rem;
    padding: .35rem 1rem .35rem .75rem;
    background: var(--sp-header);
    color: var(--sp-on-header);
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    flex-shrink: 0;
}

.md-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--sp-on-header);
    cursor: pointer;
}

.md-page-title {
    flex: 1 1 auto;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    color: var(--sp-on-header);
    font-size: 1.125rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.md-topbar-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-left: auto;
}

.md-topbar-actions a,
.md-topbar-user {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .4rem .7rem;
    color: var(--sp-on-header);
    font-size: .8rem;
    font-weight: 400;
    text-decoration: none;
}

.md-topbar-actions a:hover {
    color: var(--md-primary);
}

.md-tabs {
    display: flex;
    align-items: stretch;
    align-self: stretch;
    gap: .1rem;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.md-tabs a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    flex-shrink: 0;
    padding: 0 .85rem;
    border-bottom: 2px solid transparent;
    color: var(--sp-on-header);
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    opacity: .72;
}

.md-tabs a .material-symbols-outlined {
    font-size: 22px;
}

.md-tabs a:hover {
    color: var(--sp-primary);
    background: rgba(var(--sp-primary-rgb), .06);
    opacity: 1;
}

.md-tabs a.is-active {
    color: var(--sp-primary);
    border-bottom-color: var(--sp-primary);
    font-weight: 600;
    opacity: 1;
}

.md-tabs a.is-active .material-symbols-outlined {
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.md-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: .75rem 1.5rem 2rem;
    overflow-x: hidden;
}

.md-alert {
    border: 0;
    border-radius: var(--md-radius);
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .14);
}

.md-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
    gap: .85rem;
}

.md-stat {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    min-height: 5.25rem;
    margin: 0;
    padding: 1rem 1.05rem;
    background: #fff;
    border-radius: var(--md-radius);
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .14);
}

.md-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    color: #fff;
}

.md-stat-icon .material-symbols-outlined {
    font-size: 26px;
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.md-stat-body {
    min-width: 0;
    flex: 1;
    text-align: left;
    overflow: hidden;
}

.md-stat-label {
    margin: 0;
    color: var(--md-muted);
    font-size: .8rem;
    font-weight: 400;
}

.md-stat-value {
    margin: .2rem 0 0;
    color: #3c4858;
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.2;
}

.md-stat-value a {
    color: inherit;
    text-decoration: none;
}

.md-stat-value a:hover {
    text-decoration: underline;
}

.md-panel {
    position: relative;
    margin-top: 0;
    max-width: 100%;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .1);
}

.md-panel + .md-panel,
.md-stat-grid + .md-panel,
.md-panel + .md-stat-grid {
    margin-top: 1.15rem;
}

.md-panel-header {
    margin: 0;
    padding: 1rem 1.25rem .95rem;
    border: 0;
    border-bottom: 1px solid #ececec;
    border-radius: 10px 10px 0 0;
    background: #fff;
    color: var(--md-text);
    box-shadow: none;
    transform: none;
}

.md-panel-header.md-bg-primary,
.md-panel-header.md-bg-warning,
.md-panel-header.md-bg-success,
.md-panel-header.md-bg-danger,
.md-panel-header.md-bg-info,
.md-panel-header.md-bg-rose {
    background: #fff;
    color: var(--md-text);
    box-shadow: none;
}

.md-panel-header h2,
.md-panel-header h4 {
    margin: 0;
    color: #2c3a4a;
    font-size: 1.2rem;
    font-weight: 500;
}

.md-panel-header p {
    margin: .3rem 0 0;
    opacity: 1;
    color: var(--md-muted);
    font-size: .875rem;
}

.md-panel-header .form-select {
    min-height: 42px;
    background-color: #fff;
    color: var(--md-text);
}

.md-panel-body {
    padding: 1.1rem 1.25rem 1.35rem;
}

.md-panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.md-panel:not(:has(.md-panel-body)) {
    background: transparent;
    box-shadow: none;
}

.md-panel:not(:has(.md-panel-body)) .md-panel-header {
    padding: .35rem .15rem .85rem;
    border-bottom: 0;
    border-radius: 0;
    background: transparent;
}

.md-store-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin: 0 0 1rem;
}

.md-store-tab {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: .4rem .9rem;
    border: 1.5px solid #e5e5e5;
    border-radius: 999px;
    background: #fff;
    color: #555;
    font-size: .92rem;
    text-decoration: none;
}

.md-store-tab:hover {
    border-color: rgba(var(--sp-primary-rgb), .4);
    color: var(--md-primary-dark);
}

.md-store-tab.is-active {
    border-color: var(--md-primary);
    background: rgba(var(--sp-primary-rgb), .1);
    color: var(--md-primary-dark);
    font-weight: 500;
}

.md-stock-page {
    max-width: 100%;
}

.md-stock-page-lead {
    margin: 0 0 .85rem;
    color: var(--md-muted);
    font-size: .92rem;
}

.md-stock-store {
    max-width: 240px;
    margin: 0 0 .75rem;
}

.md-stock-toolbar {
    margin: 0 0 .85rem;
}

.md-stock-search-field {
    position: relative;
    margin-bottom: .65rem;
}

.md-stock-search-field .material-symbols-outlined {
    position: absolute;
    top: 50%;
    left: .75rem;
    color: var(--md-muted);
    font-size: 1.2rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.md-stock-search-field .md-control {
    padding-left: 2.45rem;
    min-height: 42px;
    font-size: .95rem;
}

.md-stock-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0 0 .55rem;
}

.md-stock-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: .25rem .75rem;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    background: #fff;
    color: #666;
    font-size: .88rem;
    text-decoration: none;
}

.md-stock-chip.is-active,
.md-stock-chip:focus-visible {
    border-color: var(--md-primary);
    background: rgba(var(--sp-primary-rgb), .07);
    color: var(--md-primary-dark);
    font-weight: 500;
}

.md-stock-more {
    margin: 0;
}

.md-stock-more-trigger {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 32px;
    padding: .2rem .65rem;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    background: #fafafa;
    color: #666;
    font-size: .85rem;
    cursor: pointer;
    list-style: none;
}

.md-stock-more-trigger::after {
    content: "▾";
    font-size: .75rem;
    line-height: 1;
}

.md-stock-more[open] .md-stock-more-trigger::after {
    content: "▴";
}

.md-stock-more-trigger::-webkit-details-marker {
    display: none;
}

.md-stock-more[open] .md-stock-more-trigger {
    border-color: var(--md-primary);
    color: var(--md-primary-dark);
}

.md-stock-advanced {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem .75rem;
    align-items: end;
    width: 100%;
    margin-top: .65rem;
    padding: .75rem;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
}

.md-stock-filter-field {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 0;
}

.md-stock-filter-label {
    margin: 0;
    color: #666;
    font-size: .82rem;
    font-weight: 500;
}

.md-stock-filter-control {
    display: block;
    width: 100%;
    min-height: 38px;
    padding: .35rem 2rem .35rem .65rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .65rem center;
    background-size: 12px 10px;
    color: var(--md-text);
    font-size: .9rem;
    line-height: 1.4;
    appearance: none;
}

.md-stock-filter-control:focus {
    border-color: var(--md-primary);
    box-shadow: 0 0 0 .15rem rgba(var(--sp-primary-rgb), .12);
    outline: 0;
}

.md-stock-filter-actions {
    display: flex;
    align-items: center;
    grid-column: 1 / -1;
    margin-top: .15rem;
}

.md-stock-filter-actions .btn {
    min-height: 34px;
    padding: .3rem 1rem;
    font-size: .88rem;
}

@media (min-width: 768px) {
    .md-stock-advanced {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .md-stock-filter-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .md-stock-advanced {
        grid-template-columns: 1fr;
    }
}

.md-stock-results {
    margin-top: .35rem;
}

.md-stock-list {
    border: 1px solid #ececec;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.md-stock-item {
    padding: .65rem .85rem .55rem;
    border-bottom: 1px solid #f0f0f0;
}

.md-stock-item:last-child {
    border-bottom: 0;
}

.md-stock-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
}

.md-stock-item-name {
    margin: 0;
    color: var(--md-text);
    font-size: .98rem;
    font-weight: 500;
    line-height: 1.25;
}

.md-stock-item-row .md-list-id {
    flex: 1;
    min-width: 0;
}

.md-stock-item-row .md-list-id-title {
    color: var(--md-text);
    font-size: .98rem;
}

.md-stock-item-meta {
    margin-top: .12rem;
    font-size: .84rem;
}

.md-stock-item-brand {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--md-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.md-stock-item-count {
    flex-shrink: 0;
    color: #555;
    font-weight: 500;
    white-space: nowrap;
}

.md-stock-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    min-height: 22px;
    padding: .05rem .55rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 500;
    white-space: nowrap;
}

.md-stock-badge.is-normal {
    background: #e8f5e9;
    color: #2e7d32;
}

.md-stock-badge.is-low {
    background: #fff3e0;
    color: #ef6c00;
}

.md-stock-badge.is-out {
    background: #f5f5f5;
    color: #616161;
}

.md-stock-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .45rem;
}

.md-stock-item-actions .btn {
    min-height: 32px;
    padding: .2rem .75rem;
    font-size: .84rem;
}

.md-stock-details-link {
    margin-left: auto;
    color: var(--md-primary);
    font-size: .84rem;
    font-weight: 500;
    text-decoration: none;
}

.md-stock-details-link:hover {
    text-decoration: underline;
}

.md-stock-grid-wrap {
    overflow-x: auto;
    margin: .35rem 0 0;
    -webkit-overflow-scrolling: touch;
}

.md-stock-grid {
    width: 100%;
    margin: 0;
    color: var(--md-text);
    font-size: .84rem;
}

.md-stock-grid th,
.md-stock-grid td {
    padding: .12rem .4rem;
    text-align: center;
    vertical-align: middle;
    border: 0;
}

.md-stock-grid thead th {
    color: var(--md-muted);
    font-size: .75rem;
    font-weight: 500;
}

.md-stock-grid th:first-child,
.md-stock-grid td:first-child,
.md-stock-grid tbody th {
    padding-left: 0;
    text-align: left;
    white-space: nowrap;
}

.md-stock-grid tbody th {
    color: #555;
    font-size: .82rem;
    font-weight: 500;
}

.md-stock-qty,
.md-stock-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    min-height: 1.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--md-text);
    font-size: .88rem;
    font-weight: 500;
}

button.md-stock-qty {
    border-radius: 4px;
    cursor: pointer;
}

button.md-stock-qty:hover,
button.md-stock-qty:focus-visible {
    background: rgba(var(--sp-primary-rgb), .08);
}

.md-stock-qty.is-zero,
.md-stock-mobile-row.is-zero strong,
.md-stock-single-row.is-zero strong,
.md-stock-single-btn.is-zero strong {
    color: #bdbdbd;
}

.md-stock-empty {
    color: #c4c4c4;
}

.md-stock-single {
    margin-top: .3rem;
}

.md-stock-single-btn,
.md-stock-single-row {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: .15rem 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: .84rem;
    text-align: left;
}

.md-stock-single-btn {
    cursor: pointer;
    border-radius: 4px;
}

.md-stock-single-btn:hover,
.md-stock-single-btn:focus-visible {
    background: rgba(var(--sp-primary-rgb), .06);
}

.md-stock-grid-mobile,
.md-stock-plain {
    display: none;
    margin: .35rem 0 0;
    padding: 0;
    list-style: none;
}

.md-stock-mobile-color {
    margin-bottom: .45rem;
}

.md-stock-mobile-label {
    display: block;
    margin-bottom: .15rem;
    color: #555;
    font-size: .82rem;
    font-weight: 500;
}

.md-stock-mobile-color ul,
.md-stock-plain {
    margin: 0;
    padding: 0;
    list-style: none;
}

.md-stock-mobile-row {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    min-height: 32px;
    padding: .15rem 0;
    border: 0;
    border-bottom: 1px solid #f5f5f5;
    background: transparent;
    color: inherit;
    font-size: .84rem;
    text-align: left;
}

.md-stock-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin: 0 0 1rem;
}

.md-stock-detail-stats div {
    padding: .85rem 1rem;
    border: 1px solid #eee;
    border-radius: 10px;
}

.md-stock-detail-stats span {
    display: block;
    color: var(--md-muted);
    font-size: .85rem;
}

.md-stock-detail-stats strong {
    display: block;
    margin-top: .2rem;
    font-size: 1.35rem;
    font-weight: 500;
}

.md-stock-history-title {
    margin: 1.75rem 0 .75rem;
    font-size: 1.05rem;
    font-weight: 500;
}

.md-stock-history {
    margin: 0;
    padding: 0;
    list-style: none;
}

.md-stock-history li {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.md-stock-history-qty {
    color: var(--md-text);
    font-size: 1.05rem;
    font-weight: 500;
}

.md-stock-history-label {
    color: var(--md-text);
    font-size: .95rem;
}

.md-stock-history-combo,
.md-stock-history-meta {
    color: #666;
    font-size: .9rem;
}

.md-stock-history-link {
    width: 100%;
    margin-bottom: .35rem;
    text-align: center;
}

.md-stock-what {
    margin: .85rem 0 .55rem;
    font-weight: 500;
}

.md-stock-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .85rem;
}

.md-stock-action-row .btn,
.md-stock-dialog .btn {
    min-height: 36px;
}

.md-stock-action-row-compact .btn {
    min-height: 34px;
    padding: .25rem .65rem;
    font-size: .85rem;
}

.md-stock-dialog-combo {
    margin: 0 0 .35rem;
    color: #666;
}

.md-stock-form-error {
    margin: 0 0 .65rem;
    padding: .45rem .65rem;
    border-radius: 6px;
    background: #fdecea;
    color: #c62828;
    font-size: .88rem;
}

.md-stock-form-error[hidden] {
    display: none;
}

.md-customer-stat {
    padding: .75rem .9rem;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
}

.md-customer-stat span {
    display: block;
    color: var(--md-muted);
    font-size: .85rem;
}

.md-customer-stat strong {
    display: block;
    margin-top: .2rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.md-customer-section {
    margin: 0 0 .75rem;
    font-size: 1rem;
    font-weight: 500;
}

.md-customer-history {
    margin: 0 0 1.25rem;
    padding-left: 1.1rem;
}

.md-content:has(.md-pos) {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 1rem;
}

.md-pos {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: .75rem;
}

.md-pos-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .65rem 1rem;
}

.md-pos-store {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 10rem;
}

.md-pos-store span,
.md-pos-store-label {
    color: var(--md-muted);
    font-size: .8rem;
}

.md-pos-search-wrap {
    position: relative;
    flex: 1 1 16rem;
    min-width: 0;
}

.md-pos-search {
    position: relative;
    display: flex;
    align-items: center;
}

.md-pos-search .material-symbols-outlined {
    position: absolute;
    left: .75rem;
    color: var(--md-muted);
    pointer-events: none;
}

.md-pos-search .form-control {
    padding-left: 2.5rem;
    height: 2.75rem;
    font-size: 1rem;
}

.md-pos-scanner-hint {
    margin-top: .3rem;
    font-size: .75rem;
}

.md-pos-results {
    position: absolute;
    z-index: 20;
    top: calc(100% + .35rem);
    left: 0;
    right: 0;
    max-height: 20rem;
    overflow: auto;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.md-pos-result {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .15rem;
    width: 100%;
    padding: .65rem .85rem;
    border: 0;
    border-bottom: 1px solid #f0f0f0;
    background: transparent;
    text-align: left;
}

.md-pos-result:has(.md-pos-result-thumb) {
    flex-direction: row;
    align-items: center;
    gap: .75rem;
}

.md-pos-result-copy {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: .15rem;
}

.md-pos-result-thumb {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 1px solid #ececec;
    border-radius: 8px;
    background: #f4f4f4;
}

.md-pos-result:last-child {
    border-bottom: 0;
}

.md-pos-result:hover,
.md-pos-result:focus-visible {
    background: #f7f9fc;
}

.md-pos-result-label {
    font-weight: 500;
}

.md-pos-result-meta {
    color: var(--md-muted);
    font-size: .8rem;
}

.md-pos-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 26rem);
    gap: 1rem;
    align-items: stretch;
    flex: 1;
    min-height: 0;
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .md-pos-body {
        grid-template-columns: minmax(0, 1fr) minmax(20rem, 22rem);
    }
}

.md-pos-stage {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    gap: .75rem;
}

.md-pos-cart {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 18rem;
    border: 1px solid #ececec;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.md-pos-cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .7rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.md-pos-cart-head h2,
.md-pos-panel h2 {
    margin: 0;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--md-muted);
}

.md-pos-cart-table {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.md-pos-table {
    table-layout: fixed;
    width: 100%;
}

.md-pos-table th,
.md-pos-table td {
    vertical-align: middle;
}

.md-pos-table th {
    white-space: nowrap;
    font-size: .8rem;
    font-weight: 500;
    color: var(--md-muted);
}

.md-pos-table th:nth-child(1),
.md-pos-table td:nth-child(1) {
    width: auto;
}

.md-pos-table th:nth-child(2),
.md-pos-table td:nth-child(2) {
    width: 5.5rem;
}

.md-pos-table th:nth-child(3),
.md-pos-table td:nth-child(3),
.md-pos-table th:nth-child(4),
.md-pos-table td:nth-child(4) {
    width: 7.25rem;
}

.md-pos-table th:nth-child(5),
.md-pos-table td:nth-child(5) {
    width: 3rem;
    padding-right: .75rem;
}

.md-pos-qty {
    width: 4.25rem;
    margin-left: auto;
    text-align: center;
}

.md-pos-line-label {
    font-weight: 500;
}

.md-pos-line-id {
    max-width: 100%;
}

.md-pos-line-id .md-list-id-title {
    color: inherit;
}

.md-pos-line-id .md-pos-line-sku {
    display: block;
}

.md-pos-line-total {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.md-pos-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 12rem;
    padding: 2rem 1rem;
    color: var(--md-muted);
    text-align: center;
}

.md-pos-empty .material-symbols-outlined {
    font-size: 2.4rem;
    opacity: .45;
}

.md-pos-empty p {
    margin: 0;
    font-weight: 500;
    color: var(--md-text);
}

.md-pos-empty small {
    max-width: 22rem;
}

.md-pos-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--md-muted);
    line-height: 1;
}

.md-pos-icon-btn:hover,
.md-pos-icon-btn:focus-visible {
    background: rgba(244, 67, 54, .08);
    color: var(--md-danger);
}

.md-pos-icon-btn .material-symbols-outlined {
    font-size: 18px;
}

.md-pos-summary {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border: 1px solid #ececec;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.md-pos-summary-scroll {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.md-pos-panel {
    position: relative;
    padding: .75rem 1rem;
    border-bottom: 1px solid #f2f2f2;
}

.md-pos-panel h2 {
    margin: 0 0 .45rem;
}

.md-pos-fold {
    padding: 0;
}

.md-pos-fold > summary {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1rem;
    list-style: none;
    cursor: pointer;
}

.md-pos-fold > summary::-webkit-details-marker,
.md-pos-fold > summary::marker {
    display: none;
}

.md-pos-fold-chevron {
    margin-left: .15rem;
    font-size: 1.25rem;
    color: var(--md-muted);
    transition: transform .15s ease;
}

.md-pos-fold[open] > summary .md-pos-fold-chevron {
    transform: rotate(180deg);
}

.md-pos-fold-label {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--md-muted);
}

.md-pos-fold-value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    font-size: .9rem;
    font-weight: 500;
    color: var(--md-text);
}

.md-pos-fold-body {
    padding: 0 1rem .8rem;
}

.md-pos-totals .md-pos-fold {
    margin: .35rem -1rem -0.75rem;
    border-top: 1px solid #f2f2f2;
}

.md-pos-customer-search {
    width: 100%;
}

.md-pos-customer .md-pos-results {
    left: 0;
    right: 0;
    width: auto;
}

.md-pos-customer-selected {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-top: .5rem;
    padding: .5rem .65rem;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #f7f9fc;
}

.md-pos-customer-selected .material-symbols-outlined {
    color: var(--md-primary);
    font-size: 20px;
}

.md-pos-customer-selected strong {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.md-pos-customer-selected[hidden] {
    display: none !important;
}

.md-pos-totals {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.md-pos-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    font-size: .95rem;
}

.md-pos-discount {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.md-pos-discount-head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
}

.md-pos-discount-mode {
    display: inline-flex;
    border: 1px solid #ddd;
    border-radius: .35rem;
    overflow: hidden;
    flex: 0 0 auto;
}

.md-pos-discount-mode .btn {
    border: 0;
    border-radius: 0;
    background: #fff;
    padding: .28rem .55rem;
    min-width: 2.4rem;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: none;
}

.md-pos-discount-mode .btn + .btn {
    border-left: 1px solid #ddd;
}

.md-pos-discount-mode .btn:hover:not(.is-active):not([aria-pressed="true"]) {
    background: #f3f3f3;
    color: var(--md-text);
}

.md-pos-discount-mode .btn.is-active,
.md-pos-discount-mode .btn[aria-pressed="true"] {
    background: var(--md-primary);
    color: #fff;
}

.md-pos-discount-input {
    display: flex;
    align-items: center;
    gap: .45rem;
    width: 100%;
    padding: 0 .75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.md-pos-discount-input .form-control {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    border: 0;
    box-shadow: none;
    text-align: right;
    padding-left: 0;
    padding-right: 0;
}

.md-pos-discount-input[hidden] {
    display: none !important;
}

.md-pos-grand {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
}

.md-pos-grand span {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .06em;
    color: var(--md-muted);
}

.md-pos-grand strong {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.md-pos-payments {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.md-pos-pay-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .45rem;
}

.btn.md-pos-pay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .1rem;
    min-height: 3.1rem;
    padding: .3rem .2rem;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    color: var(--md-text);
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: .02em;
    box-shadow: none;
}

.btn.md-pos-pay .material-symbols-outlined {
    font-size: 22px;
    color: var(--md-muted);
}

.btn.md-pos-pay small,
.md-pos-panel h2 small,
.md-pos-discount-head small,
.md-pos-fold-label small {
    font-size: .65rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--md-muted);
}

.btn.md-pos-pay:hover:not(.is-active),
.btn.md-pos-pay:focus-visible:not(.is-active) {
    border-color: var(--md-primary);
    background: #f7f9fc;
    color: var(--md-text);
}

.btn.md-pos-pay.is-active {
    border-color: var(--md-primary);
    background: var(--md-primary);
    color: #fff;
}

.btn.md-pos-pay.is-active .material-symbols-outlined {
    color: #fff;
}

.md-pos-pay-lines {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.md-pos-results[hidden],
.md-pos-pay-lines[hidden],
.md-pos-customer-selected[hidden],
.md-pos-due[hidden],
.md-pos-results-empty[hidden],
.md-pos-pay-empty[hidden],
.md-pos-pay-status[hidden],
.md-pos-total-row[hidden] {
    display: none !important;
}

.md-pos-pay-line {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    padding: .7rem .75rem;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    background: #fafafa;
}

.md-pos-pay-line-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.md-pos-pay-line-label {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--md-primary);
}

.md-pos-pay-line-input {
    display: flex;
    align-items: center;
    gap: .45rem;
    width: 100%;
    padding: 0 .75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}

.md-pos-pay-currency {
    flex: 0 0 auto;
    color: var(--md-muted);
    font-weight: 500;
}

.md-pos-pay-line-input .form-control {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    border: 0;
    box-shadow: none;
    text-align: right;
    font-size: 1.15rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    padding: .55rem 0;
}

.md-pos-pay-empty {
    font-size: .8rem;
}

.md-pos-due {
    display: grid;
    gap: .25rem;
}

.md-pos-due label {
    font-size: .8rem;
    color: var(--md-muted);
}

.md-pos-fiscal {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .65rem;
}

.md-pos-fiscal-toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    color: var(--md-text);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
}

.md-pos-fiscal-toggle input {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    accent-color: var(--sp-primary);
}

.md-pos-fiscal-toggle:has(input:disabled) {
    cursor: not-allowed;
    color: var(--md-muted);
}

.md-pos-fiscal-type {
    margin: 0;
    flex: 0 1 7.5rem;
}

.md-pos-fiscal-type .form-select {
    min-height: 2.1rem;
    padding: .25rem .5rem;
    font-size: .8rem;
}

.md-pos-summary-cta {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    padding: .9rem 1rem 1rem;
    border-top: 1px solid #ececec;
    background: #fafafa;
}

.md-pos-pay-status {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    font-size: .85rem;
    color: var(--md-muted);
}

.md-pos-pay-status strong {
    color: var(--md-text);
    font-variant-numeric: tabular-nums;
}

.md-pos-pay-status strong.is-due {
    color: var(--md-warning);
}

.md-pos-finalize {
    font-weight: 700;
    letter-spacing: .04em;
}

.md-pos-finalize small {
    margin-left: .35rem;
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: 0;
    opacity: .8;
}

.md-pos-note {
    font-size: .85rem;
}

.md-pos-dialog {
    width: min(100% - 2rem, 26rem);
    padding: 1.5rem 1.35rem 1.25rem;
    border: 0;
    border-radius: 12px;
    text-align: center;
    background: #fff;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .22);
}

.md-pos-dialog::backdrop {
    background: rgba(20, 18, 24, .45);
}

.md-pos-dialog-icon {
    margin-bottom: .35rem;
}

.md-pos-dialog-icon .material-symbols-outlined {
    font-size: 4rem;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
}

.md-pos-dialog.is-success .md-pos-dialog-icon {
    color: var(--md-success);
}

.md-pos-dialog.is-error .md-pos-dialog-icon {
    color: var(--md-warning);
}

.md-pos-dialog h2 {
    margin: .15rem 0 .35rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.md-pos-dialog-number {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.md-pos-dialog-total {
    margin: .2rem 0 .65rem;
    font-size: 1.7rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--md-primary);
}

.md-pos-dialog-note {
    margin: 0 0 .85rem;
    color: var(--md-muted);
    font-size: .9rem;
}

.md-pos-dialog-note.is-warning {
    color: var(--md-warning);
}

.md-pos-dialog [data-pos-dialog-ok] {
    width: 100%;
    margin-top: .35rem;
}

.md-pos-dialog [data-pos-dialog-ok] small {
    margin-left: .35rem;
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: 0;
    opacity: .8;
}

.md-cash-summary th {
    width: 40%;
    font-weight: 500;
}

.md-cash-summary td {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.md-cash-expected th,
.md-cash-expected td {
    font-weight: 700;
}

.md-dashboard-store {
    min-width: 12rem;
}

.md-report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.md-report-card {
    display: block;
    padding: .9rem 1rem;
    border: 1px solid #ececec;
    border-radius: 8px;
    background: #fff;
    color: #3c4858;
    text-decoration: none;
    font-weight: 500;
}

.md-report-card:hover {
    border-color: #d2d2d2;
    color: #3c4858;
    background: #fafafa;
}

.md-report-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    align-items: flex-end;
    margin-bottom: 1.25rem;
}

.md-report-filters > div {
    min-width: 10rem;
}

.md-report-filters-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.md-report-toolbar {
    margin-bottom: 1rem;
}

@media print {
    .md-report-toolbar {
        display: none;
    }
}

.md-cash-store {
    min-width: 12rem;
}

.md-cash-session {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .85rem;
    align-items: center;
    margin-bottom: 1.1rem;
    color: var(--md-text);
    font-weight: 500;
}

.md-status.is-open {
    background: #e8f5e9;
    color: #1b5e20;
}

.md-cash-hint {
    margin: .65rem 0 1.1rem;
    color: var(--md-muted);
    font-size: .88rem;
}

.md-cash-kpis {
    margin-bottom: .15rem;
}

.md-cash-kpis .md-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.md-cash-kpis .md-stat:has([data-stat="expected"]) {
    background: #f6eef8;
    box-shadow: 0 1px 4px 0 rgba(156, 39, 176, .16);
}

.md-cash-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 0 0 1.35rem;
}

.md-cash-block {
    padding: .9rem 1rem;
    border: 1px solid #ececec;
    border-radius: 10px;
    background: #fafafa;
}

.md-cash-block h3 {
    margin: 0 0 .65rem;
    font-size: .95rem;
    font-weight: 600;
}

.md-cash-formula,
.md-cash-methods,
.md-cash-moves {
    margin: 0;
    padding: 0;
    list-style: none;
}

.md-cash-formula li,
.md-cash-methods li,
.md-cash-moves li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .42rem 0;
    border-bottom: 1px solid #eee;
    font-variant-numeric: tabular-nums;
}

.md-cash-formula li:last-child,
.md-cash-methods li:last-child,
.md-cash-moves li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.md-cash-formula .is-total {
    margin-top: .2rem;
    padding-top: .65rem;
    border-top: 1px solid #ddd;
    border-bottom: 0;
    font-weight: 700;
}

.md-cash-methods .is-drawer {
    font-weight: 500;
}

.md-cash-methods .is-zero {
    color: var(--md-muted);
}

.md-cash-open {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    max-width: 36rem;
    padding: 1.15rem 1.2rem;
    border: 1px solid #ececec;
    border-radius: 12px;
    background: #fafafa;
}

.md-cash-open-copy {
    flex: 1;
    min-width: 0;
}

.md-cash-open-copy h3 {
    margin: 0 0 .25rem;
    font-size: 1.1rem;
}

.md-cash-open-copy p {
    margin: 0 0 1rem;
    color: var(--md-muted);
}

.md-cash-open-form,
.md-cash-action form,
.md-cash-close-form {
    display: grid;
    gap: .55rem;
}

.md-cash-open-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.md-cash-action {
    padding: 1rem 1.05rem;
    border: 1px solid #ececec;
    border-radius: 12px;
    background: #fff;
}

.md-cash-action h3 {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin: 0 0 .25rem;
    font-size: 1rem;
}

.md-cash-action p {
    margin: 0 0 .85rem;
    color: var(--md-muted);
    font-size: .86rem;
}

.md-cash-action.is-out {
    border-color: #f3d6d6;
}

.md-cash-action.is-in {
    border-color: #d7ead8;
}

.md-cash-close {
    margin-top: 1.5rem;
    padding: 1.1rem 1.15rem;
    border: 1px solid #e4d4ea;
    border-radius: 12px;
    background: #fbf7fc;
}

.md-cash-close h3 {
    margin: 0 0 .25rem;
    font-size: 1.05rem;
}

.md-cash-close p {
    margin: 0 0 1rem;
    color: var(--md-muted);
}

.md-cash-close-form {
    grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr) auto;
    align-items: end;
}

.md-cash-moves {
    margin-bottom: 0;
}

.md-cash-moves li {
    padding: .55rem 0;
}

.md-cash-moves .md-list-id-title {
    color: inherit;
}

@media (max-width: 767.98px) {
    .md-stock-grid-desktop {
        display: none;
    }

    .md-stock-grid-mobile,
    .md-stock-plain {
        display: block;
    }

    .md-stock-detail-stats {
        grid-template-columns: 1fr;
    }

    .md-stock-item-actions {
        flex-wrap: wrap;
    }

    .md-stock-details-link {
        margin-left: 0;
    }

    .md-pos-body {
        grid-template-columns: 1fr;
    }

    .md-pos-cart {
        min-height: 12rem;
    }

    .md-pos-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .md-pos-store,
    .md-pos-search-wrap,
    .md-pos-search {
        width: 100%;
        min-width: 0;
        flex: 1 1 auto;
    }

    .md-pos-search .form-control,
    .md-pos-qty {
        min-height: 44px;
    }

    .md-pos-summary-cta {
        position: sticky;
        bottom: 0;
        z-index: 6;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, .08);
    }

    .md-pos-pay,
    .md-pos-finalize,
    .md-pos-discount-mode .btn {
        min-height: 44px;
    }

    .md-content .md-pos-icon-btn {
        min-width: 40px;
        min-height: 40px;
        padding: 0;
    }

    .md-report-grid {
        grid-template-columns: 1fr;
    }

    .md-report-card {
        min-height: 44px;
    }

    .md-report-filters > div,
    .md-report-filters-actions,
    .md-report-filters-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .md-table-stack thead {
        display: none;
    }

    .md-table-stack tbody,
    .md-table-stack tfoot {
        display: block;
    }

    .md-table-stack tr {
        display: block;
        margin: 0 0 .7rem;
        padding: .55rem .7rem;
        border: 1px solid #eee;
        border-radius: 8px;
        background: #fff;
    }

    .md-table-stack td,
    .md-table-stack tfoot th {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: .75rem;
        padding: .28rem 0;
        border: 0;
        text-align: right;
    }

    .md-table-stack td::before,
    .md-table-stack tfoot th::before {
        content: attr(data-label);
        flex: 0 0 42%;
        color: var(--md-muted);
        font-weight: 500;
        text-align: left;
    }

    .md-table-stack td:has(.md-product-name),
    .md-table-stack td:has(.md-list-id) {
        align-items: center;
    }

    .md-table-stack [data-pos-empty] td,
    .md-table-stack td[colspan] {
        display: block;
        text-align: center;
    }

    .md-table-stack [data-pos-empty] td::before,
    .md-table-stack td[colspan]::before,
    .md-table-stack td:not([data-label])::before {
        content: none;
    }

    .md-stat {
        margin-top: 12px;
    }

    .md-stock-chip {
        min-height: 40px;
    }

    .md-content {
        padding-bottom: 1.25rem;
    }

    .md-content .form-control,
    .md-content .form-select,
    .md-content .btn {
        min-height: 44px;
    }
}

.md-table {
    margin: 0;
    color: var(--md-text);
}

.md-table thead th {
    color: var(--md-warning);
    font-size: .8rem;
    font-weight: 500;
    border-bottom-width: 1px;
}

.md-table > :not(caption) > * > * {
    background: transparent;
    box-shadow: none;
    vertical-align: middle;
}

.md-table tbody tr:hover > * {
    background: rgba(156, 39, 176, .05);
}

.md-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.md-row-actions form {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
    margin: 0;
}

.md-row-actions .form-select {
    width: auto;
    min-width: 7.5rem;
}

.md-bg-primary {
    background: linear-gradient(60deg, var(--sp-primary-light), var(--sp-primary-dark));
    color: var(--sp-primary-text);
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, .14), 0 7px 10px -5px rgba(var(--sp-primary-rgb), .4);
}

.md-bg-warning {
    background: linear-gradient(60deg, #ffa726, #fb8c00);
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, .14), 0 7px 10px -5px rgba(255, 152, 0, .4);
}

.md-bg-success {
    background: linear-gradient(60deg, #66bb6a, #43a047);
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, .14), 0 7px 10px -5px rgba(76, 175, 80, .4);
}

.md-bg-danger {
    background: linear-gradient(60deg, #ef5350, #e53935);
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, .14), 0 7px 10px -5px rgba(244, 67, 54, .4);
}

.md-bg-info {
    background: linear-gradient(60deg, #26c6da, #00acc1);
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, .14), 0 7px 10px -5px rgba(0, 188, 212, .4);
}

.md-bg-rose {
    background: linear-gradient(60deg, #ec407a, #d81b60);
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, .14), 0 7px 10px -5px rgba(233, 30, 99, .4);
}

.btn {
    font-weight: 500;
    letter-spacing: .02em;
    text-transform: uppercase;
    border: 1px solid transparent;
    border-radius: 8px;
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, filter .15s ease;
}

.btn:focus-visible {
    outline: 2px solid var(--sp-primary);
    outline-offset: 2px;
}

.btn:disabled,
.btn.disabled {
    opacity: .55;
}

.btn-primary {
    background: var(--sp-primary);
    border-color: var(--sp-primary);
    color: var(--sp-primary-text);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--sp-primary-dark);
    border-color: var(--sp-primary-dark);
    color: var(--sp-primary-text);
}

.btn-primary:active {
    filter: brightness(.92);
}

.btn-outline-primary {
    background: #fff;
    border-color: var(--sp-primary);
    color: var(--sp-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
    background: var(--sp-primary);
    border-color: var(--sp-primary);
    color: var(--sp-primary-text);
}

.btn-outline-secondary {
    background: #fff;
    border-color: #d5d5d5;
    color: #555;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus-visible {
    background: #f3f3f3;
    border-color: #bdbdbd;
    color: #2c3a4a;
}

.btn-outline-danger {
    background: #fff;
    border-color: #e53935;
    color: #e53935;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus-visible {
    background: #e53935;
    border-color: #e53935;
    color: #fff;
}

.btn-danger {
    background: #e53935;
    border-color: #e53935;
    color: #fff;
}

.btn-danger:hover,
.btn-danger:focus-visible {
    background: #c62828;
    border-color: #c62828;
    color: #fff;
}

.btn-white,
.btn-white:focus-visible {
    background: var(--sp-primary);
    border-color: var(--sp-primary);
    color: var(--sp-primary-text);
}

.btn-white:hover {
    background: var(--sp-primary-dark);
    border-color: var(--sp-primary-dark);
    color: var(--sp-primary-text);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--md-primary);
    box-shadow: 0 0 0 .2rem rgba(var(--sp-primary-rgb), .18);
}

.md-auth {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8vh 1rem 3rem;
}

.md-auth-card {
    width: min(100%, 420px);
    margin-top: 30px;
}

.md-auth .md-panel-header {
    margin: 0 15px;
    padding: 15px;
    border: 0;
    border-radius: 3px;
    color: #fff;
    transform: translateY(-20px);
}

.md-auth .md-panel-header.md-bg-primary {
    background: linear-gradient(60deg, var(--sp-primary-light), var(--sp-primary-dark));
    color: var(--sp-primary-text);
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, .14), 0 7px 10px -5px rgba(var(--sp-primary-rgb), .4);
}

.md-auth .md-panel-header h2,
.md-auth .md-panel-header h4 {
    color: inherit;
    font-weight: 300;
}

.md-auth .md-panel-header p {
    color: inherit;
    opacity: .85;
}

.md-option-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .85rem;
}

.md-option-grid .form-check {
    min-width: 5.5rem;
    margin: 0;
}

.md-product-form {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1.35rem 1.5rem 2rem;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

.md-product-intro h2 {
    margin: 0;
    color: #333;
    font-size: 1.45rem;
    font-weight: 500;
}

.md-product-intro p {
    margin: .35rem 0 0;
    color: var(--md-muted);
    font-size: .95rem;
}

.md-product-stack,
.md-more-body,
.md-field {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.md-product-stack {
    margin-top: 1.5rem;
}

.md-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.md-field-label,
.md-product-form .form-label {
    margin-bottom: .4rem;
    color: #555;
    font-size: .92rem;
    font-weight: 500;
}

.md-control,
.md-product-form .form-control,
.md-product-form .form-select {
    min-height: 48px;
    padding: .7rem .9rem;
    border-color: #e4e4e4;
    border-radius: 10px;
    font-size: 1rem;
}

.md-price {
    display: flex;
    align-items: stretch;
    border: 1px solid #e4e4e4;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.md-price span {
    display: flex;
    align-items: center;
    padding: 0 .95rem;
    color: var(--md-muted);
    background: #fafafa;
    font-weight: 500;
}

.md-price .form-control {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 48px;
    text-align: right;
}

.md-price.md-price-sm {
    border-radius: 8px;
}

.md-price.md-price-sm span {
    padding: 0 .55rem;
    font-size: .82rem;
}

.md-price.md-price-sm .form-control,
.md-price.md-price-sm .form-control-sm {
    min-height: 32px;
    height: auto;
    padding-top: .2rem;
    padding-bottom: .2rem;
}

.md-price .form-control:focus {
    box-shadow: none;
}

.md-product-rule {
    margin: 1.1rem 0 .95rem;
    border: 0;
    border-top: 1px solid #eee;
}

.md-product-search,
.md-product-base {
    margin: 1.1rem 0 0;
}

.md-product-search .md-control {
    max-width: 36rem;
}

.md-search-results {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    margin-top: .75rem;
}

.md-search-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fafafa;
}

.md-search-card strong {
    display: block;
    font-weight: 500;
}

.md-search-meta,
.md-search-price,
.md-product-base-meta,
.md-product-base-kicker {
    margin: .15rem 0 0;
    color: var(--md-muted);
    font-size: .9rem;
}

.md-search-price {
    color: #444;
    font-weight: 500;
}

.md-product-base {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .95rem 1.05rem;
    border: 1px solid rgba(var(--sp-primary-rgb), .18);
    border-radius: 12px;
    background: rgba(var(--sp-primary-rgb), .06);
}

.md-product-base strong {
    font-size: 1.05rem;
    font-weight: 500;
}

.md-product-base-clear {
    padding: 0;
    border: 0;
    background: none;
    color: var(--md-primary);
    font-size: .9rem;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
    cursor: pointer;
}

.md-variant-heading {
    margin: 0 0 .85rem;
    color: #333;
    font-size: 1.05rem;
    font-weight: 500;
}

.md-variant-ignored,
.md-variant-group {
    margin: 0 0 .45rem;
    color: #777;
    font-size: .9rem;
}

.md-variant-preview.is-existing {
    color: #888;
}

.md-product-form .row.g-3 {
    --bs-gutter-y: .85rem;
}

.md-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.md-chip {
    margin: 0;
    cursor: pointer;
}

.md-chip-face,
.md-chip-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 44px;
    padding: .65rem 1.05rem;
    border: 1.5px solid #e5e5e5;
    border-radius: 999px;
    background: #fff;
    color: #444;
    font-size: .95rem;
    font-weight: 400;
    line-height: 1.1;
}

.md-chip-add {
    color: var(--md-primary);
    border-color: rgba(var(--sp-primary-rgb), .35);
    background: #fff;
    cursor: pointer;
}

.md-chip-mark {
    width: .85rem;
    opacity: 0;
    font-weight: 700;
}

.md-chip:has(:checked) .md-chip-mark {
    opacity: 1;
}

.md-chip:has(:checked) .md-chip-face,
.md-chip:has(:focus-visible) .md-chip-face {
    border-color: var(--md-primary);
    background: rgba(var(--sp-primary-rgb), .1);
    color: var(--md-primary-dark);
    font-weight: 500;
    box-shadow: 0 0 0 3px rgba(var(--sp-primary-rgb), .12);
}

.md-variant-summary {
    margin-top: .35rem;
}

.md-variant-count {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0 0 .6rem;
    color: var(--md-primary-dark);
    font-weight: 500;
}

.md-variant-count::before {
    content: "✓";
    font-weight: 700;
}

.md-variant-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: .35rem .85rem;
    margin: 0 0 .85rem;
    padding: 0;
    color: #666;
    list-style: none;
}

.md-variant-toggle {
    padding: 0;
    border: 0;
    background: none;
    color: var(--md-primary);
    font-size: .92rem;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.md-variant-editor {
    margin-top: 1rem;
}

.md-more {
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fafafa;
}

.md-more summary {
    padding: .95rem 1rem;
    color: #555;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}

.md-more summary::-webkit-details-marker {
    display: none;
}

.md-more summary::after {
    content: "↓";
    float: right;
    color: var(--md-muted);
}

.md-more[open] summary::after {
    content: "↑";
}

.md-more-body {
    padding: 0 1rem 1.1rem;
}

.md-product-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: .75rem 0 0;
}

.md-list-id {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    min-width: 0;
    max-width: 100%;
    color: inherit;
    text-decoration: none;
}

.md-list-id-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: .08rem;
}

.md-list-id-title {
    overflow: hidden;
    color: var(--md-primary);
    font-weight: 500;
    line-height: 1.25;
    text-overflow: ellipsis;
}

.md-list-id-meta {
    overflow: hidden;
    color: var(--md-muted);
    font-size: .82rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.md-list-id-thumb,
.md-list-id-avatar,
.md-list-id-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.md-list-id-avatar,
.md-list-id-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.md-list-id-avatar {
    background: hsl(var(--md-avatar-hue, 210) 48% 92%);
    color: hsl(var(--md-avatar-hue, 210) 42% 32%);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.md-list-id-icon {
    background: #f4f0f7;
    color: var(--md-primary);
}

.md-list-id-icon .material-symbols-outlined {
    font-size: 1.25rem;
}

.md-product-name {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.md-product-name-label {
    color: var(--md-primary);
    font-weight: 500;
}

.md-product-name-thumb {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 1px solid #ececec;
    border-radius: 8px;
    background: #f4f4f4;
}

.md-product-thumbs img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--md-line, #e5e7eb);
    background: #fff;
}

.md-product-thumbs img.is-primary {
    outline: 2px solid var(--sp-primary, #7c3aed);
    outline-offset: 2px;
}

.md-product-upload {
    margin-top: 1rem;
    max-width: 420px;
}

.md-product-upload .md-control {
    margin-bottom: .35rem;
}

.md-product-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .7rem;
    margin-top: 1.35rem;
}

.md-btn-save {
    width: min(100%, 320px);
    min-height: 54px;
    padding: 0 2rem;
    border-radius: 12px;
    font-size: 1rem;
    letter-spacing: .06em;
}

.md-cancel {
    color: var(--md-muted);
    font-size: .95rem;
    text-decoration: none;
}

.md-cancel:hover {
    color: #555;
}

.md-option-dialog {
    width: min(100% - 2rem, 420px);
    padding: 1.25rem;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}

.md-option-dialog::backdrop {
    background: rgba(40, 30, 45, .35);
}

.md-option-dialog h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.md-option-actions {
    display: flex;
    justify-content: flex-end;
    gap: .6rem;
    margin-top: 1rem;
}

.md-option-actions .btn {
    min-height: 44px;
}

@media (max-width: 767.98px) {
    .md-product-form {
        padding: 1.1rem .9rem 1.75rem;
        border-radius: 10px;
    }
}

.md-backdrop {
    display: none;
}

html.is-nav-open,
html.is-nav-open body {
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .md-menu-toggle {
        display: inline-flex;
    }

    .md-sidebar {
        transform: translateX(-110%);
        transition: transform .2s ease;
    }

    .md-app.is-sidebar-open .md-sidebar {
        transform: translateX(0);
    }

    .md-main {
        margin-left: 0;
    }

    .md-backdrop {
        position: fixed;
        inset: 0;
        z-index: 25;
        background: rgba(0, 0, 0, .35);
    }

    .md-app.is-sidebar-open .md-backdrop {
        display: block;
    }

    .md-topbar {
        flex-wrap: nowrap;
        padding: .7rem .9rem;
        gap: .5rem;
    }

    .md-topbar-actions {
        gap: 0;
    }

    .md-tabs {
        min-height: 0;
        padding: 0;
    }

    .md-tabs a {
        min-height: 2.75rem;
        padding: 0 .7rem;
        font-size: .9rem;
    }

    .md-tabs a .material-symbols-outlined {
        font-size: 22px;
    }

    .md-topbar-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .md-sidebar .nav-link {
        min-height: 44px;
    }

    .md-content {
        padding: .65rem .9rem 2rem;
    }

    .md-panel {
        margin-top: 0;
    }

    .md-panel + .md-panel,
    .md-stat-grid + .md-panel,
    .md-panel + .md-stat-grid {
        margin-top: 1rem;
    }

    .md-panel-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .md-panel-toolbar .btn,
    .md-dashboard-store,
    .md-dashboard-store .form-select {
        width: 100%;
    }
}

.md-label-toolbar {
    padding: 1rem 1.25rem;
}

.md-label-sheet {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50mm, 1fr));
    gap: 4mm;
    padding: 1rem 1.25rem 2rem;
}

.md-label {
    width: 50mm;
    min-height: 30mm;
    border: 1px solid #cfd8dc;
    border-radius: 2px;
    padding: 2mm 2.5mm;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    page-break-inside: avoid;
    break-inside: avoid;
    font-family: Arial, Helvetica, sans-serif;
    color: #111;
    background: #fff;
}

.md-label-brand {
    margin: 0;
    font-size: 7pt;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.md-label-name {
    margin: 1mm 0 0;
    font-size: 8pt;
    font-weight: 500;
    line-height: 1.15;
}

.md-label-dims {
    margin: .5mm 0 0;
    font-size: 7.5pt;
    font-weight: 700;
}

.md-label-bars {
    width: 100%;
    height: 10mm;
    margin: 1.2mm 0 .4mm;
}

.md-label-bars svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: #111;
}

.md-label-code {
    margin: 0;
    font-size: 7pt;
    letter-spacing: .04em;
}

.md-label-price {
    margin: .4mm 0 0;
    font-size: 9pt;
    font-weight: 700;
}

@media print {
    .md-label-toolbar {
        display: none !important;
    }

    body.md-label-print {
        background: #fff;
    }

    .md-label-sheet {
        padding: 0;
        gap: 2mm;
    }

    .md-label {
        border: none;
        border-radius: 0;
    }

    @page {
        margin: 8mm;
    }
}

.md-settings-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 0 0 1rem;
}

.md-settings-nav a {
    display: inline-flex;
    align-items: center;
    padding: .45rem .9rem;
    border-radius: 3px;
    color: var(--md-text);
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
    background: #fff;
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .14);
}

.md-settings-nav a.is-active {
    background: var(--sp-primary);
    color: var(--sp-primary-text);
}

.md-settings-logo-sm {
    max-width: 2.5rem;
    max-height: 2.5rem;
}

.md-color-field {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.md-color-swatch {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.md-color-field .form-control {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.md-branding-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 1.5rem;
    align-items: start;
    max-width: 100%;
}

.md-branding-block {
    margin-bottom: 1.5rem;
}

.md-branding-block h3 {
    margin: 0 0 .75rem;
    color: var(--md-text);
    font-size: .95rem;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.md-branding-swatches {
    margin: 0;
    padding: 0;
    list-style: none;
}

.md-branding-swatches li {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 .45rem;
}

.md-branding-swatches span {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .12);
}

.md-branding-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .75rem;
}

.md-branding-preview-label {
    margin: 0 0 .5rem;
    color: var(--md-muted);
    font-size: .75rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.md-brand-mini {
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 6px;
    background: var(--md-bg);
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .1);
}

.md-brand-mini-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .45rem .6rem;
    background: var(--sp-header);
    color: var(--sp-on-header);
    font-size: .7rem;
}

.md-brand-mini-logo {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
    font-weight: 500;
}

.md-brand-mini-logo img {
    width: 1rem;
    height: 1rem;
    object-fit: contain;
}

.md-brand-mini-user {
    opacity: .75;
}

.md-brand-mini-body {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 120px;
}

.md-brand-mini-sidebar {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: .5rem .4rem;
    background: var(--sp-sidebar);
    color: var(--sp-on-sidebar);
    font-size: .65rem;
}

.md-brand-mini-sidebar span {
    padding: .2rem .35rem;
    border-radius: 3px;
}

.md-brand-mini-sidebar .is-active {
    background: var(--sp-primary);
    color: var(--sp-primary-text);
}

.md-brand-mini-main {
    padding: .6rem .7rem;
    background: #fff;
}

.md-brand-mini-main p {
    margin: 0 0 .6rem;
    font-size: .8rem;
}

@media (max-width: 991.98px) {
    .md-branding-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .md-branding-actions {
        flex-direction: column-reverse;
    }

    .md-branding-actions .btn {
        width: 100%;
    }

    .md-color-field {
        width: 100%;
    }
}

.md-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 8px;
    background: var(--sp-primary);
    color: var(--sp-primary-text);
    font-size: 1.05rem;
}

.md-brand-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.md-sidebar .nav-link .material-symbols-outlined,
.md-rail-toggle .material-symbols-outlined {
    flex-shrink: 0;
}

.md-rail-toggle {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-shrink: 0;
    margin: .35rem .75rem .75rem;
    padding: .5rem .75rem;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--sp-on-sidebar);
    font-size: .8rem;
    text-align: left;
    cursor: pointer;
}

.md-rail-toggle .material-symbols-outlined {
    font-size: 28px;
}

.md-rail-toggle:hover {
    background: rgba(200, 200, 200, .2);
}

.md-topbar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--sp-on-header);
    cursor: pointer;
}

.md-topbar-icon:hover,
.md-topbar-actions a:hover {
    color: var(--md-primary);
}

.md-topbar-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.md-topbar-actions a,
.md-topbar-user {
    width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0;
}

.btn.md-btn,
.md-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 40px;
}

.btn.md-btn .material-symbols-outlined,
.md-btn .material-symbols-outlined {
    font-size: 20px;
}

.btn.md-btn-lg,
.md-btn-lg {
    min-height: 48px;
    font-size: 1rem;
    font-weight: 500;
}

.btn.md-btn-lg .material-symbols-outlined,
.md-btn-lg .material-symbols-outlined {
    font-size: 28px;
}

.md-status {
    display: inline-flex;
    align-items: center;
    padding: .25rem .7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
    color: inherit;
    font-size: .8rem;
    font-weight: 500;
}

.md-panel-header .md-status {
    background: #f3f4f6;
    color: var(--md-text);
}

.md-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    min-height: 12rem;
    padding: 2rem 1rem;
    color: var(--md-muted);
    text-align: center;
}

.md-empty .material-symbols-outlined {
    font-size: 3rem;
    opacity: .4;
}

.md-empty p {
    margin: 0;
    max-width: 28rem;
    color: var(--md-text);
}

.md-launch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: .85rem;
    margin-top: 1rem;
}

.md-launch-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
    min-height: 7.5rem;
    padding: 1rem 1.05rem;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .14);
    color: var(--md-text);
    text-decoration: none;
}

.md-launch-card:hover {
    color: var(--md-text);
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, .14);
}

.md-launch-card .material-symbols-outlined {
    font-size: 40px;
    color: var(--sp-primary);
}

.md-launch-card strong {
    font-size: 1rem;
    font-weight: 500;
}

.md-launch-card small {
    color: var(--md-muted);
    font-size: .75rem;
}

.md-launch-grid.is-pictogram {
    grid-template-columns: repeat(auto-fit, minmax(7.25rem, 1fr));
    gap: .75rem 1rem;
    width: 100%;
}

.md-launch-grid.is-pictogram .md-launch-card {
    align-items: center;
    min-height: 0;
    padding: 1.1rem .6rem 1rem;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

.md-launch-grid.is-pictogram .md-launch-card:hover {
    background: #fff;
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, .1);
}

.md-launch-pictogram {
    width: clamp(96px, 72%, 148px);
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    filter: drop-shadow(0 4px 7px rgba(0, 0, 0, .16));
    transition: transform .15s ease;
}

.md-launch-grid.is-pictogram .md-launch-card:hover .md-launch-pictogram {
    transform: translateY(-4px);
}

.md-launch-grid.is-pictogram strong {
    color: var(--sp-primary);
    font-size: 1.05rem;
    font-weight: 500;
}

.md-launch-grid.is-pictogram small {
    margin-top: -.1rem;
    font-size: .8rem;
}

.md-page-tabs,
.md-settings-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: .35rem;
    margin: 0 0 1rem;
    overflow-x: auto;
}

.md-page-tabs a,
.md-settings-nav a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .9rem;
    border-radius: 3px;
    color: var(--md-text);
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
    background: #fff;
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .14);
    white-space: nowrap;
}

.md-page-tabs a .material-symbols-outlined,
.md-settings-nav a .material-symbols-outlined {
    font-size: 18px;
}

.md-page-tabs a.is-active,
.md-settings-nav a.is-active {
    background: var(--sp-primary);
    color: var(--sp-primary-text);
}

.md-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem;
    margin-bottom: 1rem;
}

.md-list-toolbar .md-list-search {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex: 1 1 16rem;
    min-width: 12rem;
    padding: 0 .75rem;
    border: 1px solid #ddd;
    border-radius: var(--md-radius);
    background: #fff;
}

.md-list-toolbar .md-list-search .material-symbols-outlined {
    color: var(--md-muted);
}

.md-list-toolbar .md-list-search .form-control {
    border: 0;
    box-shadow: none;
}

.md-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1.25rem;
}

.md-product-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding-top: .75rem;
    background: linear-gradient(transparent, #fff 30%);
}

.md-palette,
.md-cheatsheet {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 1rem 1rem;
    background: rgba(0, 0, 0, .35);
}

.md-palette[hidden],
.md-cheatsheet[hidden] {
    display: none;
}

.md-palette-card {
    width: min(32rem, 100%);
    padding: 1rem;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
}

.md-cheatsheet-card {
    width: min(40rem, 100%);
    padding: 1rem;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
}

.md-palette-card ul {
    list-style: none;
    margin: .75rem 0 0;
    padding: 0;
    max-height: 18rem;
    overflow: auto;
}

.md-palette-card a {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .45rem;
    border-radius: 4px;
    color: var(--md-text);
    text-decoration: none;
}

.md-palette-card a:hover,
.md-palette-card a.is-active {
    background: rgba(var(--sp-primary-rgb), .1);
}

.md-cheatsheet-card h2 {
    margin: 0 0 .75rem;
    font-size: 1.1rem;
}

.md-cheatsheet-card dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .45rem 1.25rem;
    margin: 0 0 1rem;
}

@media (max-width: 640px) {
    .md-cheatsheet-card dl {
        grid-template-columns: 1fr;
    }
}

.md-cheatsheet-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.md-cheatsheet-card dt {
    font-family: ui-monospace, monospace;
    font-weight: 500;
}

.md-cash-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.md-cash-hero {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.md-cash-hero div {
    padding: .85rem 1rem;
    border: 1px solid #ececec;
    border-radius: 8px;
    background: #fafafa;
}

.md-cash-hero .text-muted {
    font-size: .8rem;
}

@media (min-width: 992px) {
    .md-app:not(.is-rail-expanded),
    .md-app.is-workspace {
        --md-sidebar: var(--md-rail);
    }

    .md-app:not(.is-rail-expanded) .md-brand,
    .md-app.is-workspace .md-brand {
        justify-content: center;
        flex-wrap: nowrap;
        padding-left: .5rem;
        padding-right: .5rem;
    }

    .md-app:not(.is-rail-expanded) .md-brand-name,
    .md-app:not(.is-rail-expanded) .nav-link-label,
    .md-app:not(.is-rail-expanded) .md-brand-logo,
    .md-app.is-workspace .md-brand-name,
    .md-app.is-workspace .nav-link-label,
    .md-app.is-workspace .md-brand-logo {
        display: none;
    }

    .md-app:not(.is-rail-expanded) .md-brand.has-wide-logo .md-brand-mark-img,
    .md-app:not(.is-rail-expanded) .md-brand.has-wide-logo .md-brand-mark,
    .md-app.is-workspace .md-brand.has-wide-logo .md-brand-mark-img,
    .md-app.is-workspace .md-brand.has-wide-logo .md-brand-mark {
        display: block;
    }

    .md-app:not(.is-rail-expanded) .md-brand.has-wide-logo .md-brand-mark,
    .md-app.is-workspace .md-brand.has-wide-logo .md-brand-mark {
        display: inline-flex;
    }

    .md-app.is-rail-expanded .md-brand.has-wide-logo {
        flex-direction: column;
        align-items: flex-start;
        gap: .45rem;
        padding: 1rem .9rem .75rem;
    }

    .md-app:not(.is-rail-expanded) .md-sidebar nav,
    .md-app.is-workspace .md-sidebar nav {
        padding-left: .55rem;
        padding-right: .55rem;
        gap: .45rem;
    }

    .md-app:not(.is-rail-expanded) .md-sidebar .nav-link,
    .md-app.is-workspace .md-sidebar .nav-link {
        width: 3.15rem;
        height: 3.15rem;
        margin-inline: auto;
        padding: 0;
        justify-content: center;
        border-radius: 12px;
    }

    .md-app:not(.is-rail-expanded) .md-rail-toggle,
    .md-app.is-workspace .md-rail-toggle {
        justify-content: center;
        width: 3.15rem;
        height: 3.15rem;
        margin-left: auto;
        margin-right: auto;
        padding: 0;
        border-radius: 12px;
    }

    .md-app.is-workspace .md-rail-toggle {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .md-app.is-rail-expanded,
    .md-app:not(.is-rail-expanded) {
        --md-sidebar: 236px;
    }

    .md-cash-hero,
    .md-cash-actions,
    .md-cash-split,
    .md-cash-kpis .md-stat-grid,
    .md-cash-open-form,
    .md-cash-close-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .md-launch-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md-launch-grid.is-pictogram {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
