:root,
.billing-body {
    --billing-primary: var(--fm-primary, #409eff);
    --billing-primary-dark: var(--fm-primary-dark, #337ecc);
    --billing-primary-soft: #ecf5ff;
    --billing-primary-border: #b3d8ff;
    --billing-text: var(--fm-text, #303133);
    --billing-muted: var(--fm-muted, #909399);
    --billing-border: var(--fm-border, #ebeef5);
    --billing-bg: var(--fm-bg, #f5f7fa);
    --billing-card: var(--fm-card, #ffffff);
    --billing-danger: var(--fm-danger, #f56c6c);
    --billing-danger-soft: #fef0f0;
    --billing-danger-border: #fde2e2;
}

.billing-body {
    background: var(--billing-bg);
    min-height: 100vh;
    padding-bottom: calc(120px + env(safe-area-inset-bottom, 0));
}

[x-cloak] {
    display: none !important;
}

.billing-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--billing-primary);
    color: #fff;
    padding: 10px 12px;
    padding-top: calc(10px + env(safe-area-inset-top, 0));
    position: sticky;
    top: 0;
    z-index: 40;
    flex-wrap: wrap;
}

.billing-menu-btn {
    display: none;
    border: 0;
    background: rgba(255,255,255,.12);
    color: #fff;
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.billing-brand {
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 42vw;
}

.billing-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.billing-nav a {
    color: rgba(255,255,255,.88);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
}

.billing-nav a.active,
.billing-nav a:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
}

.billing-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.billing-logout {
    background: transparent;
    border: 1px solid rgba(255,255,255,.4);
    color: #fff;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 13px;
}

.billing-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.45);
    z-index: 45;
}

.billing-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    background: #fff;
    z-index: 50;
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,.12);
    display: flex;
    flex-direction: column;
}

.billing-drawer--open { transform: translateX(0); }

.billing-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--billing-border);
}

.billing-drawer-close {
    border: 0;
    background: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--billing-muted);
}

.billing-drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 8px;
}

.billing-drawer-nav a,
.billing-drawer-logout {
    display: block;
    padding: 12px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--billing-text);
    font-size: 15px;
    border: 0;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.billing-drawer-nav a:hover,
.billing-drawer-logout:hover {
    background: var(--billing-bg);
}

.billing-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    display: none;
    align-items: stretch;
    justify-content: space-around;
    background: var(--billing-card);
    border-top: 1px solid var(--billing-border);
    padding: 4px 0 calc(4px + env(safe-area-inset-bottom, 0));
    box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.04);
}

.billing-tabbar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    text-decoration: none;
    color: var(--billing-muted);
    font-size: 11px;
    min-height: 52px;
}

.billing-tabbar__item--active {
    color: var(--billing-primary);
    font-weight: 600;
}

.billing-tabbar__icon {
    width: 20px;
    height: 20px;
    line-height: 1;
}

.billing-tabbar__icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.billing-tabbar__badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    border: 1.5px solid var(--billing-card);
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.35);
}

.billing-drawer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
}

.billing-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 12px;
    padding-bottom: calc(120px + env(safe-area-inset-bottom, 0));
}

/* ── Slim bars: sticky filter + doc row ── */
.billing-slim-bar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.billing-slim-bar--filter {
    position: sticky;
    top: calc(44px + env(safe-area-inset-top, 0));
    z-index: 38;
    margin: -10px -12px 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    flex-wrap: wrap;
    width: auto;
    overflow: visible;
    gap: 8px;
}

.billing-slim-bar--filter > .billing-slim-select,
.billing-slim-bar--filter > .billing-model-combobox {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
}

.billing-slim-bar--filter > .billing-slim-clear {
    flex: 0 0 28px;
}

.billing-slim-bar--filter > .billing-slim-chips {
    flex: 1 1 100%;
    min-width: 0;
}

.billing-doc-card {
    position: relative;
    z-index: 25;
    margin-bottom: 8px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.billing-doc-card__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.billing-doc-card__row--doc {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.billing-doc-card__topline {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.billing-doc-card__row--doc .billing-slim-more {
    flex-shrink: 0;
    margin-left: auto;
}

.billing-doc-card__row--customer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(96px, 1.25fr) auto;
    gap: 6px;
    align-items: center;
}

.billing-doc-card__chips {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex-shrink: 0;
}

.billing-doc-card__info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    overflow: hidden;
    white-space: nowrap;
}

.billing-doc-card__info--editable {
    cursor: pointer;
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
}

.billing-doc-card__info--editable:active {
    background: #f1f5f9;
}

.billing-doc-card__docno {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.billing-doc-card__sep {
    flex-shrink: 0;
    font-size: 11px;
    color: #cbd5e1;
}

.billing-doc-card__time {
    flex-shrink: 0;
    font-size: 11px;
    color: #94a3b8;
}

.billing-doc-card__type {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 22px 4px 8px;
    font-size: 13px;
    font-weight: 600;
    min-height: 30px;
    color: #0f172a;
    background: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2394a3b8' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.billing-doc-card__type:disabled {
    opacity: 0.55;
    background-color: #f8fafc;
}

.billing-doc-card__amount {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    line-height: 1.3;
}

.billing-doc-card__amount-label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

.billing-doc-settle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

.billing-doc-finance-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.billing-doc-finance {
    display: grid;
    gap: 6px;
    margin: 0;
    min-width: 0;
}

.billing-doc-finance--both {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.billing-doc-finance--stored-only,
.billing-doc-finance--debt-only {
    grid-template-columns: 1fr;
}

.billing-finance-tile {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    min-width: 0;
    min-height: 32px;
    padding: 5px 8px;
    border-radius: 8px;
}

.billing-finance-tile--stored {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.billing-finance-tile--debt {
    background: #fff1f2;
    border: 1px solid #fecdd3;
}

.billing-finance-tile__label {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.billing-finance-tile--stored .billing-finance-tile__label {
    color: #2563eb;
}

.billing-finance-tile--debt .billing-finance-tile__label {
    color: #be123c;
}

.billing-finance-tile__amount {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.billing-finance-tile--stored .billing-finance-tile__amount {
    color: #1e40af;
}

.billing-finance-tile--debt .billing-finance-tile__amount {
    color: #dc2626;
}

.billing-finance-tile__meta {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
    color: #be123c;
    line-height: 1;
    opacity: 0.9;
}

.billing-finance-tile__grow {
    flex: 1 1 auto;
    min-width: 4px;
}

.billing-finance-tile__link {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #be123c;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.billing-finance-tile__btn {
    flex-shrink: 0;
    border: none;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    min-height: 24px;
}

.billing-finance-tile__btn:active {
    background: #b91c1c;
}

.billing-doc-finance-wrap .billing-doc-settle-detail {
    margin-top: 4px;
    padding: 4px 8px 6px;
    border-radius: 0 0 8px 8px;
}

.billing-doc-finance-wrap .billing-doc-settle-detail__row {
    padding: 3px 0;
    font-size: 11px;
}

.billing-doc-settle__tag {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #991b1b;
    line-height: 1.2;
}

.billing-doc-settle__center {
    flex: 1 1 auto;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    text-align: center;
}

.billing-doc-settle__amount {
    font-size: 16px;
    font-weight: 700;
    color: #dc2626;
    line-height: 1.2;
}

.billing-doc-settle__meta {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 500;
    color: #b91c1c;
    line-height: 1.2;
}

.billing-doc-settle__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.billing-doc-settle__ghost {
    border: none;
    background: transparent;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 2px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.billing-doc-settle__primary {
    border: none;
    background: #dc2626;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    min-height: 30px;
}

.billing-doc-settle__primary:active {
    background: #b91c1c;
}

.billing-doc-settle-detail {
    margin-top: -4px;
    padding: 6px 10px 8px;
    background: #fff7f7;
    border: 1px solid #fecaca;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.billing-doc-settle-detail__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
    font-size: 12px;
    line-height: 1.35;
}

.billing-doc-settle-detail__row + .billing-doc-settle-detail__row {
    border-top: 1px dashed #fecaca;
}

.billing-doc-settle-detail__docno {
    color: #7f1d1d;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.billing-doc-settle-detail__due {
    flex-shrink: 0;
    font-weight: 600;
    color: #dc2626;
}

.billing-doc-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.billing-doc-pill--stored {
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
}

.billing-pay-way {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.billing-pay-way__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.billing-pay-way__label {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.billing-pay-way__avail {
    margin: 0;
    font-size: 12px;
    color: #0369a1;
    text-align: right;
    white-space: nowrap;
}

.billing-pay-way__avail strong {
    font-weight: 700;
}

.billing-pay-way__grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    min-width: 0;
}

.billing-pay-way__btn {
    flex: 1 1 0;
    min-width: 0;
    height: 28px;
    padding: 0 4px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.billing-pay-way__btn--balance {
    color: #0369a1;
    border-color: #bae6fd;
    background: #f0f9ff;
}

.billing-pay-way__btn.is-active {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
    box-shadow: inset 0 0 0 1px #2563eb;
}

.billing-pay-way__btn--balance.is-active {
    border-color: #0284c7;
    background: #0284c7;
    box-shadow: inset 0 0 0 1px #0284c7;
}

.billing-pay-way__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.billing-pay-way__note {
    margin: 0;
    font-size: 11px;
    color: #64748b;
    line-height: 1.35;
}

.billing-pay-way__warn {
    margin: 0;
    font-size: 11px;
    color: #b45309;
    line-height: 1.35;
}

.billing-modal-hint__stored {
    color: #0369a1;
    font-weight: 600;
}

.billing-meta-grid__cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.billing-meta-grid__label {
    font-size: 12px;
    color: #64748b;
}

.billing-checkout-fields__cell--method {
    grid-column: 1 / -1;
}

.billing-dropdown-item__balance {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: #0369a1;
    white-space: nowrap;
}

.billing-doc-card__debt {
    margin-left: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #dc2626;
}

.billing-doc-card__link {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #2563eb;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 2px;
    cursor: pointer;
    white-space: nowrap;
}

.billing-doc-card__link--inline {
    align-self: center;
    padding: 0 2px;
    font-size: 11px;
}

.billing-doc-field {
    margin: 0;
    min-width: 0;
    position: relative;
}

.billing-doc-field--name:focus-within {
    z-index: 40;
}

.billing-doc-card__row--customer:has(.billing-autocomplete__field:focus-within) {
    position: relative;
    z-index: 50;
}

.billing-doc-field--labeled {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 10px 0 8px;
    background: #fff;
    min-height: 34px;
    box-sizing: border-box;
}

.billing-doc-field--labeled.billing-meta-compact__customer {
    display: flex;
}

.billing-doc-field--labeled:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.billing-doc-field--labeled .billing-doc-field__input {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 6px 0;
    min-height: 32px;
    box-shadow: none;
    background: transparent;
    font-size: 14px;
}

.billing-doc-field--name.billing-doc-field--labeled {
    padding: 0 6px 0 5px;
}

.billing-doc-field--phone.billing-doc-field--labeled {
    padding: 0 8px 0 6px;
}

.billing-doc-field--labeled .billing-doc-field__input:focus {
    border: none;
    box-shadow: none;
}

.billing-doc-field__label {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
}

.billing-doc-field__input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    min-height: 30px;
    color: #0f172a;
    background: #fff;
}

.billing-doc-field__input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.billing-doc-field__input:disabled {
    background: #f8fafc;
    color: #64748b;
}

.billing-doc-debt--compact {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

.billing-doc-debt--compact .billing-doc-debt__text {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    color: #b91c1c;
    line-height: 1.35;
}

.billing-doc-debt--compact .billing-doc-debt__btn {
    padding: 5px 10px;
    font-size: 12px;
    min-height: 30px;
}

.billing-doc-debt--compact .billing-doc-debt__link {
    font-size: 12px;
}

.billing-doc-debt-detail--compact {
    margin-top: -4px;
    padding: 4px 8px;
}

.billing-doc-card .billing-slim-badge {
    font-size: 10px;
    padding: 2px 6px;
}

.billing-doc-card .billing-meta-more--inline summary {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    list-style: none;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.billing-doc-card .billing-meta-more--inline summary::-webkit-details-marker {
    display: none;
}

.billing-doc-card .billing-meta-more--inline[open] summary {
    color: #2563eb;
    border-color: #bfdbfe;
    background: #eff6ff;
}

/* 底部右侧悬浮：挂单 / 取单（仅在底栏上方，不遮挡内容区） */
.billing-hold-fab {
    position: fixed;
    right: 10px;
    bottom: calc(52px + env(safe-area-inset-bottom, 0) + 10px);
    z-index: 27;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

/* 选品模式：购物车底栏上方 */
.billing-hold-fab--above-cart {
    bottom: calc(52px + env(safe-area-inset-bottom, 0) + 72px);
}

/* 输入模式：收银底栏上方 */
.billing-hold-fab--above-footer {
    bottom: calc(52px + env(safe-area-inset-bottom, 0) + 118px);
}

.billing-hold-fab--hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
}

.billing-hold-fab__btn {
    position: relative;
    pointer-events: auto;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 36px;
    padding: 8px 14px;
    border: none;
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.2);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.billing-hold-fab__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.billing-hold-fab__btn--pick {
    background: var(--billing-primary);
    color: #fff;
}

.billing-hold-fab__btn--pick:active:not(:disabled) {
    background: var(--billing-primary-dark);
}

.billing-hold-fab__btn--park {
    background: linear-gradient(145deg, #fb923c 0%, #ea580c 100%);
    color: #fff;
}

.billing-hold-fab__btn--park:active:not(:disabled) {
    background: linear-gradient(145deg, #f97316 0%, #c2410c 100%);
}

.billing-hold-fab__label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
}

.billing-hold-fab__badge {
    position: absolute;
    top: -6px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.billing-held-modal {
    max-width: 420px;
    width: 100%;
    max-height: min(80vh, 640px);
    display: flex;
    flex-direction: column;
}

.billing-held-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.billing-held-modal__title {
    margin: 0;
    font-size: 17px;
}

.billing-held-modal__close {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.billing-held-modal__hint {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
}

.billing-held-modal__loading {
    padding: 24px 0;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

.billing-held-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    max-height: 50vh;
}

.billing-held-item {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.billing-held-item:hover {
    border-color: #93c5fd;
}

.billing-held-item--active {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.billing-held-item__pick {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 10px 10px 12px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.billing-held-item__pick:hover {
    background: #f8fafc;
}

.billing-held-item--active .billing-held-item__pick {
    background: #eff6ff;
}

.billing-held-item__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.billing-held-item__main {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
    flex: 1 1 auto;
}

.billing-held-item__tag {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 999px;
}

.billing-held-item__tag--order {
    background: #dbeafe;
    color: #1d4ed8;
}

.billing-held-item__tag--quote {
    background: #f3e8ff;
    color: #7e22ce;
}

.billing-held-item__tag--quote-checkout {
    background: linear-gradient(135deg, #f3e8ff 0%, #ffedd5 100%);
    color: #7e22ce;
}

.billing-held-item__tag--held {
    background: #e2e8f0;
    color: #475569;
}

.billing-held-item__no {
    font-size: 14px;
    color: #0f172a;
}

.billing-held-item__customer {
    font-size: 13px;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.billing-held-item__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: #64748b;
}

.billing-held-item__amount {
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 700;
    color: #dc2626;
    line-height: 1.2;
}

.billing-held-item__time {
    font-size: 11px;
    color: #94a3b8;
}

.billing-held-item__delete {
    flex: 0 0 40px;
    align-self: stretch;
    border: none;
    border-left: 1px solid #e2e8f0;
    background: #fff;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.billing-held-item__delete:hover {
    background: #fef2f2;
    color: #dc2626;
}

.billing-held-item__delete:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.billing-held-modal__actions {
    margin-top: 0;
}

.billing-held-empty {
    margin: 0;
    padding: 20px 8px;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

.billing-slim-select {
    flex-shrink: 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 12px;
    min-height: 28px;
    max-width: 96px;
    color: #334155;
    background: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2394a3b8' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 20px;
}

.billing-slim-select--type {
    max-width: 72px;
    font-weight: 600;
}

.billing-slim-select:disabled {
    opacity: 0.55;
    background-color: #f8fafc;
}

.billing-model-combobox {
    position: relative;
}

.billing-model-combobox__input {
    width: 100%;
    max-width: none;
    padding-right: 34px;
}

.billing-model-combobox__arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #94a3b8;
    font-size: 10px;
    line-height: 1;
}

.billing-model-combobox__clear {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}

.billing-model-combobox__clear:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.billing-model-combobox__panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 50;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.billing-model-combobox__option {
    display: block;
    width: 100%;
    border: 0;
    background: #fff;
    color: #334155;
    text-align: left;
    padding: 8px 10px;
    font-size: 13px;
    cursor: pointer;
}

.billing-model-combobox__option:hover,
.billing-model-combobox__option.is-selected {
    background: #eff6ff;
}

.billing-model-combobox__option.is-disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

.billing-model-combobox__empty {
    margin: 0;
    padding: 10px;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
}

.billing-model-combobox.is-open {
    z-index: 39;
}

.billing-slim-clear {
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.billing-slim-chips {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.billing-slim-chips::-webkit-scrollbar {
    display: none;
}

.billing-slim-chip {
    flex-shrink: 0;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.billing-slim-chip--active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

.billing-slim-docno {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.billing-slim-badge {
    flex-shrink: 0;
    font-size: 11px;
    line-height: 1.2;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
}

.billing-slim-badge--quote-checkout {
    background: #f3e8ff;
    color: #7e22ce;
}

.billing-slim-grow {
    min-width: 0;
    position: relative;
}

.billing-slim-grow:focus-within {
    z-index: 40;
}

.billing-slim-grow.billing-meta-compact__customer {
    margin-bottom: 0;
}

.billing-slim-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    min-height: 28px;
    color: #334155;
    background: #fff;
    min-width: 0;
}

.billing-slim-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.billing-slim-input--phone {
    width: 100%;
    min-width: 0;
}

.billing-slim-more {
    flex-shrink: 0;
}

.billing-doc-debt__link {
    border: none;
    background: transparent;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 600;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    flex-shrink: 0;
}

.billing-doc-debt__btn {
    border: 1px solid #ef4444;
    background: #fff;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.billing-doc-debt-detail {
    background: #fff7f7;
    border: 1px solid #fecaca;
    border-top: none;
    border-radius: 0 0 6px 6px;
}

.billing-doc-debt-detail__row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: #7f1d1d;
    line-height: 1.4;
}

.billing-slim-payline {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 540px) {
    .billing-hold-fab__btn {
        min-height: 34px;
        padding: 7px 12px;
    }

    .billing-hold-fab__label {
        font-size: 12px;
    }

    .billing-slim-select--type {
        max-width: 64px;
        padding-left: 4px;
        font-size: 11px;
    }

    .billing-slim-input,
    .billing-slim-select {
        font-size: 11px;
        min-height: 26px;
        padding-top: 3px;
        padding-bottom: 3px;
    }
}

.billing-filter-float {
    position: sticky;
    top: calc(44px + env(safe-area-inset-top, 0));
    z-index: 38;
    margin: -10px -12px 12px;
    padding: 0 12px 4px;
    background: linear-gradient(180deg, #f1f5f9 70%, rgba(241, 245, 249, 0));
}

.billing-filter-float__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #5eead4;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 12px 16px;
    min-height: 48px;
    box-shadow: 0 3px 14px rgba(15, 118, 110, 0.16);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #134e4a;
}

.billing-filter-float__icon {
    flex-shrink: 0;
    font-size: 20px;
    line-height: 1;
}

.billing-filter-float__summary {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
}

.billing-filter-float__caret {
    flex-shrink: 0;
    color: #64748b;
    font-size: 13px;
}

.billing-filter-float__panel {
    margin-top: 10px;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.billing-filter-float__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}

.billing-filter-float .billing-meta-compact__grid label {
    font-size: 13px;
    gap: 5px;
}

.billing-filter-float select {
    min-height: 42px;
    font-size: 15px;
    padding: 9px 12px;
    border-radius: 10px;
}

.billing-filter-float .billing-chip {
    padding: 6px 12px;
    font-size: 13px;
}

.billing-filter-float .billing-btn--xs {
    padding: 4px 10px;
    font-size: 13px;
    min-height: 32px;
}

.billing-product-cell {
    min-width: 0;
}

.billing-product-cell--with-vehicle {
    position: relative;
    padding-top: 22px;
}

.billing-product-cell--with-vehicle .billing-row-vehicle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.billing-row-vehicle {
    display: block;
    margin-bottom: 0;
    padding: 1px 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #0f766e;
    font-size: 11px;
    line-height: 18px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
}

.billing-product-cell {
    min-width: 0;
}

.billing-entry-row--active,
.billing-entry-row:focus-within {
    background: #f8fffb;
}

.billing-vehicle-filter__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.billing-chip {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
}

.billing-chip--active {
    border-color: #0f766e;
    background: #ecfdf5;
    color: #0f766e;
}

.billing-btn--xs {
    padding: 2px 8px;
    font-size: 12px;
    min-height: auto;
}

.billing-card {
    background: var(--billing-card);
    border-radius: 8px;
    border: 1px solid var(--billing-border);
    box-shadow: none;
    padding: 12px;
    margin-bottom: 12px;
    overflow: visible;
}

.billing-card--entry {
    position: relative;
    z-index: 1;
    padding: 10px 10px 8px;
    margin-bottom: 8px;
    border-radius: 10px;
}

.billing-card--meta {
    position: relative;
    z-index: 25;
    padding: 6px 8px;
    margin-bottom: 6px;
}

.billing-meta-compact__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.billing-meta-compact__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.billing-meta-type {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px 4px;
    font-size: 12px;
    min-height: 26px;
    max-width: 76px;
    color: #334155;
    background: #fff;
}

.billing-meta-compact__fields {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 6px;
}

.billing-meta-field {
    margin: 0;
}

.billing-meta-field input {
    width: 100%;
}

.billing-meta-compact__payline {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.billing-meta-compact__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.billing-meta-compact__title {
    font-size: 14px;
}

.billing-meta-compact__docno {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}

.billing-meta-compact__badge {
    font-size: 10px;
    line-height: 1.2;
    padding: 1px 5px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
}

.billing-meta-compact__payment {
    font-size: 13px;
    color: #475569;
    margin: 4px 0 8px;
    line-height: 1.5;
}

.billing-meta-compact__debt {
    color: #dc2626;
    font-weight: 600;
}

.billing-meta-compact__customer {
    margin-bottom: 0;
}

.billing-meta-compact__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.billing-meta-compact__grid--main {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 84px;
}

.billing-meta-compact__grid label,
.billing-meta-field {
    display: block;
}

.billing-meta-compact__customer:not(.billing-doc-field--labeled) {
    display: block;
}

.billing-meta-compact input,
.billing-meta-compact select,
.billing-meta-field input,
.billing-meta-type {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    min-height: 28px;
}

.billing-meta-more {
    margin-top: 0;
}

.billing-meta-more--inline {
    position: relative;
}

.billing-meta-more--inline summary {
    cursor: pointer;
    font-size: 11px;
    color: #64748b;
    padding: 4px 2px;
    list-style: none;
    user-select: none;
    white-space: nowrap;
}

.billing-doc-card .billing-meta-more--inline[open] .billing-meta-grid {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 30;
    width: min(280px, calc(100vw - 24px));
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.billing-doc-more-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 0;
}

.billing-doc-more-panel__hint {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
    color: #94a3b8;
}

.billing-doc-more-panel__field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
}

.billing-doc-more-panel__field--full {
    grid-column: 1 / -1;
}

.billing-doc-more-panel input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 8px;
    min-height: 34px;
    font-size: 13px;
    color: #0f172a;
    background: #fff;
}

.billing-doc-more-panel input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.billing-doc-more-panel input:disabled {
    background: #f8fafc;
    color: #64748b;
}

@media (max-width: 359px) {
    .billing-doc-more-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 479px) {
    .billing-meta-compact__top {
        flex-wrap: wrap;
    }

    .billing-meta-compact__actions {
        width: 100%;
        justify-content: flex-end;
    }

    .billing-meta-compact__fields {
        grid-template-columns: 1fr 1fr;
    }
}

.billing-meta-more--inline[open] summary {
    margin-bottom: 0;
    color: #334155;
}

.billing-meta-more summary {
    cursor: pointer;
    font-size: 12px;
    color: #64748b;
    padding: 2px 0;
    list-style: none;
    user-select: none;
}

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

.billing-meta-more[open] summary {
    margin-bottom: 4px;
    color: #334155;
}

.billing-meta-grid--compact {
    gap: 6px;
}

.billing-meta-grid--compact label {
    font-size: 11px;
    gap: 2px;
}

.billing-meta-grid--compact input,
.billing-meta-grid--compact select {
    min-height: 32px;
    font-size: 14px;
    padding: 5px 8px;
}

.billing-action-bar {
    margin-bottom: 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
    background: #fff;
    padding: 10px 12px;
}

.billing-footer.billing-action-bar {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
}

.billing-entry-head {
    margin-bottom: 8px;
}

.billing-entry-head__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 32px;
}

.billing-entry-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.billing-entry-hint {
    margin: 2px 0 0;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.45;
}

.billing-entry-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.billing-entry-tool--add:active {
    background: #f1f5f9;
}

.billing-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.billing-card-head__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.billing-btn--sm {
    min-height: 32px;
    padding: 4px 10px;
    font-size: 13px;
}

.billing-entry-mode {
    display: inline-flex;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #f8fafc;
}

.billing-entry-mode__btn {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    min-height: 28px;
    cursor: pointer;
    white-space: nowrap;
}

.billing-entry-mode__btn--active {
    background: #2563eb;
    color: #fff;
}

.billing-catalog {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.billing-catalog__search-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    min-height: 42px;
    background: #fff;
}

.billing-catalog__body {
    display: flex;
    gap: 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    min-height: 360px;
    height: calc(100dvh - 340px);
    max-height: 560px;
}

.billing-catalog__sidebar {
    flex-shrink: 0;
    width: 88px;
    background: #f1f5f9;
    border-right: 1px solid #e2e8f0;
}

.billing-catalog__cats {
    height: 100%;
    width: auto;
    background: transparent;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.billing-catalog__cats-empty {
    padding: 16px 6px;
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    margin: 0;
}

.billing-catalog__cat {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: center;
    padding: 12px 6px;
    font-size: 13px;
    line-height: 1.35;
    color: #475569;
    cursor: pointer;
    word-break: break-all;
}

.billing-catalog__cat:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.billing-catalog__cat--active {
    background: #fff;
    color: #2563eb;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #2563eb;
}

.billing-catalog__list {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}

.billing-catalog__status {
    padding: 24px 12px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.billing-catalog-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.billing-catalog-item:last-child {
    border-bottom: 0;
}

.billing-catalog-item__pic {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.billing-catalog-item__pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.billing-catalog-item__ph {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: linear-gradient(135deg, #cbd5e1 0%, #e2e8f0 100%);
}

.billing-catalog-item__body {
    flex: 1;
    min-width: 0;
}

.billing-catalog-item__name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
    word-break: break-word;
}

.billing-catalog-item__meta {
    margin-top: 1px;
    font-size: 11px;
    color: #64748b;
    line-height: 1.35;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.billing-catalog-item__spec {
    margin-top: 1px;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.3;
}

.billing-catalog-item__stock {
    margin-top: 2px;
    font-size: 12px;
    color: #059669;
    line-height: 1.3;
}

.billing-catalog-item__stock--oos {
    color: #dc2626;
    font-weight: 600;
}

.billing-catalog-item__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}

.billing-catalog-item__price {
    margin-top: 0;
    font-size: 13px;
    font-weight: 700;
    color: #dc2626;
    min-width: 0;
    flex: 1;
}

.billing-catalog-item__unit {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
}

.billing-catalog-item__stepper {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    background: transparent;
}

.billing-catalog-item__stepper--active {
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.billing-qty-btn {
    width: 22px;
    height: 22px;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.billing-catalog-item__stepper:not(.billing-catalog-item__stepper--active) .billing-qty-btn--plus {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #2563eb;
    font-size: 15px;
}

.billing-qty-btn--plus {
    color: #2563eb;
}

.billing-qty-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.billing-qty-btn:active:not(:disabled) {
    background: #f1f5f9;
}

.billing-catalog-item__stepper--active .billing-qty-btn--plus:active:not(:disabled) {
    background: #dbeafe;
}

.billing-catalog-item__stepper--active .billing-qty-btn:not(.billing-qty-btn--plus):active:not(:disabled) {
    background: #f1f5f9;
}

.billing-catalog-item__stepper:not(.billing-catalog-item__stepper--active) .billing-qty-btn--plus:active:not(:disabled) {
    background: #dbeafe;
}

.billing-qty-val {
    min-width: 16px;
    max-width: 36px;
    padding: 0 2px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    line-height: 22px;
    cursor: text;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.billing-qty-input {
    width: 30px;
    height: 22px;
    padding: 0 2px;
    border: 0;
    background: #fff;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    -moz-appearance: textfield;
}

.billing-qty-input::-webkit-outer-spin-button,
.billing-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.billing-qty-input:focus {
    outline: none;
    background: #eff6ff;
}

.billing-catalog__more {
    display: block;
    width: calc(100% - 24px);
    margin: 10px 12px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
    padding: 10px;
    cursor: pointer;
}

.billing-cart-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff;
}

.billing-catalog-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(52px + env(safe-area-inset-bottom, 0));
    z-index: 28;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
}

.billing-quote-bar--dock {
    margin: 0;
    padding: 6px 12px;
    border-top: none;
    border-bottom: 1px solid #f1f5f9;
}

.billing-quote-dock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.billing-quote-dock__status {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.billing-footer__quote {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.billing-footer__quote-left {
    flex: 1;
    min-width: 0;
}

.billing-footer__quote-status {
    margin-top: 2px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
}

.billing-quote-actions {
    flex-shrink: 0;
}

.billing-quote-actions__btns {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.billing-quote-actions__primary {
    min-width: 72px;
    padding: 0 12px;
}

.billing-quote-actions__btn {
    flex-shrink: 0;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--billing-border);
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
}

.billing-quote-actions__btn--icon {
    min-width: 32px;
    width: 32px;
    padding: 0;
    font-size: 16px;
    color: var(--billing-muted);
}

.billing-quote-actions__btn--icon.is-open,
.billing-quote-actions__btn--icon:hover {
    color: var(--billing-primary);
    border-color: var(--billing-primary);
    background: var(--billing-primary-soft);
}

.billing-quote-more {
    position: relative;
}

.billing-quote-more__menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    z-index: 40;
    min-width: 112px;
    padding: 4px;
    border: 1px solid var(--billing-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.billing-quote-more__item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-size: 13px;
    text-align: left;
    color: #334155;
    cursor: pointer;
}

.billing-quote-more__item:hover {
    background: #f8fafc;
}

.billing-quote-more__item--danger {
    color: #dc2626;
}

.billing-cart-bar__actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
}

.billing-cart-bar__icon {
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.billing-cart-bar__badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.billing-cart-bar__summary {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0;
    cursor: pointer;
}

.billing-cart-bar__total {
    font-size: 13px;
    color: #334155;
}

.billing-cart-bar__total strong {
    color: #dc2626;
    font-size: 18px;
}

.billing-cart-bar__meta {
    margin-top: 2px;
    font-size: 12px;
    color: #64748b;
}

.billing-cart-bar__discount {
    margin-left: 8px;
    color: #dc2626;
}

.billing-cart-bar__checkout {
    flex-shrink: 0;
    min-width: 88px;
    min-height: 42px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
}

.billing-cart-sheet {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.billing-cart-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.billing-cart-sheet__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: min(78dvh, 640px);
    background: #fff;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

.billing-cart-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 15px;
}

.billing-cart-sheet__head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.billing-cart-sheet__close {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.billing-cart-sheet__action {
    border: 0;
    background: transparent;
    color: #2563eb;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 0;
}

.billing-cart-sheet__action--warn {
    color: #dc2626;
}

.billing-cart-sheet__list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
}

.billing-cart-sheet__empty {
    padding: 32px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.billing-cart-item {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.billing-cart-item__body {
    flex: 1;
    min-width: 0;
}

.billing-cart-item__name {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
}

.billing-cart-item__meta {
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

.billing-cart-item__price {
    margin-top: 6px;
    font-size: 13px;
    color: #475569;
}

.billing-cart-item__price-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #64748b;
}

.billing-cart-item__price-input {
    width: 72px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 13px;
    color: #334155;
    background: #fff;
}

.billing-cart-item__price-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.billing-cart-item__side {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.billing-cart-item__amount {
    font-size: 15px;
    font-weight: 700;
    color: #dc2626;
}

.billing-cart-item__qty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.billing-cart-item__qty button {
    width: 32px;
    height: 32px;
    border: 0;
    background: #f8fafc;
    color: #2563eb;
    font-size: 18px;
    cursor: pointer;
}

.billing-cart-item__qty span {
    min-width: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.billing-cart-item__remove {
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
}

.billing-cart-sheet__foot {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0));
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.billing-cart-summary__total {
    font-size: 14px;
    color: #334155;
}

.billing-cart-summary__total strong {
    color: #dc2626;
    font-size: 22px;
}

.billing-cart-summary__meta {
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

.billing-cart-summary__discount {
    margin-left: 10px;
    color: #dc2626;
}

.billing-cart-summary__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.billing-cart-sheet__checkout {
    width: 100%;
    margin-top: 12px;
    min-height: 44px;
    font-size: 16px;
    font-weight: 700;
}

.billing-cart-sheet__actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.billing-cart-sheet__actions .billing-cart-sheet__checkout {
    flex: 1;
    width: auto;
    margin-top: 0;
}

.billing-main--has-cart {
    padding-bottom: calc(260px + env(safe-area-inset-bottom, 0));
}

.billing-checkout-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.billing-checkout-field__label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.billing-tag--sm {
    font-size: 11px;
    padding: 1px 7px;
}

.billing-tag--list {
    background: #f1f5f9;
    color: #475569;
}

.billing-tag--price {
    background: #fee2e2;
    color: #b91c1c;
}

.billing-tag--paid {
    background: #dcfce7;
    color: #15803d;
}

.billing-tag--partial {
    background: #fef3c7;
    color: #b45309;
}

.billing-tag--debt {
    background: #ffedd5;
    color: #c2410c;
}

.billing-tag--quote-accepted {
    background: #dcfce7;
    color: #15803d;
}

.billing-tag--checkout-pending {
    background: #fef2f2;
    color: #dc2626;
    font-weight: 600;
}

.billing-catalog__footer {
    padding: 10px 12px;
    border-radius: 8px;
    background: #eff6ff;
    color: #334155;
    font-size: 13px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.billing-catalog__checkout {
    width: 100%;
    max-width: 280px;
    min-height: 42px;
    font-size: 15px;
    font-weight: 600;
}

.billing-btn-checkout {
    font-size: 15px;
    font-weight: 700;
    min-height: 42px;
}

.billing-catalog__total {
    color: #dc2626;
}

.billing-footer__discount {
    margin-left: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

.billing-checkout-modal {
    max-width: 400px;
    width: 100%;
}

.billing-checkout-modal .billing-modal-actions--bar {
    justify-content: stretch;
}

.billing-checkout-modal .billing-modal-actions--bar .billing-btn {
    flex: unset;
    max-width: none;
}

.billing-checkout-title {
    margin: 0;
    font-size: 15px;
}

.billing-checkout-intro {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.45;
    color: #6b21a8;
}

.billing-checkout-modal--quote {
    border-top: 3px solid #9333ea;
}

.billing-checkout-modal--quote .billing-checkout-title {
    color: #6b21a8;
}

.billing-checkout-modal--quote .billing-checkout-bill {
    background: #faf5ff;
    border-color: #e9d5ff;
}

.billing-checkout-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.billing-checkout-bill {
    padding: 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.billing-checkout-bill__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    font-size: 14px;
    color: #475569;
}

.billing-checkout-bill__row strong {
    color: #334155;
    font-weight: 600;
}

.billing-checkout-bill__row--paid strong {
    color: #15803d;
}

.billing-checkout-bill__minus {
    color: #dc2626 !important;
}

.billing-checkout-bill__formula {
    margin: 4px 0 0;
    padding: 6px 8px;
    border-radius: 6px;
    background: #eff6ff;
    font-size: 12px;
    color: #1d4ed8;
    line-height: 1.5;
}

.billing-checkout-bill__note {
    margin: 4px 0 0;
    font-size: 12px;
    color: #64748b;
}

.billing-checkout-bill__row--total {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
    font-size: 15px;
}

.billing-checkout-bill__row--total strong {
    color: #0f172a;
    font-size: 16px;
}

.billing-checkout-pay-panel {
    margin-top: 6px;
    padding: 8px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--billing-border);
}

.billing-checkout-segment {
    display: flex;
    gap: 6px;
    padding: 0;
    background: transparent;
}

.billing-checkout-segment__btn {
    flex: 1;
    min-width: 0;
    padding: 8px 4px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.billing-checkout-segment__btn--full {
    border-color: #86efac;
    background: #f0fdf4;
    color: #15803d;
}

.billing-checkout-segment__btn--full.is-active {
    border-color: #16a34a;
    background: #bbf7d0;
    color: #14532d;
    box-shadow: inset 0 0 0 1px #16a34a;
}

.billing-checkout-segment__btn--partial {
    border-color: #fdba74;
    background: #fff7ed;
    color: #c2410c;
}

.billing-checkout-segment__btn--partial.is-active {
    border-color: #ea580c;
    background: #fed7aa;
    color: #9a3412;
    box-shadow: inset 0 0 0 1px #ea580c;
}

.billing-checkout-segment__btn--none {
    border-color: #c4b5fd;
    background: #faf5ff;
    color: #6d28d9;
}

.billing-checkout-segment__btn--none.is-active {
    border-color: #7c3aed;
    background: #ddd6fe;
    color: #5b21b6;
    box-shadow: inset 0 0 0 1px #7c3aed;
}

.billing-checkout-segment__btn--none.is-blocked,
.billing-checkout-segment__btn--partial.is-blocked {
    opacity: 0.55;
}

.billing-checkout-pay-status {
    margin: 6px 0 0;
    padding: 0 2px;
    font-size: 11px;
    line-height: 1.35;
    color: #7c3aed;
}

.billing-checkout-fields {
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.billing-checkout-collect {
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px dashed #cbd5e1;
    text-align: center;
}

.billing-checkout-collect__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.billing-checkout-collect__field {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    margin: 6px 0 4px;
    cursor: text;
}

.billing-checkout-collect__currency {
    font-size: 20px;
    font-weight: 700;
    color: #ea580c;
}

.billing-checkout-collect__input {
    width: 120px;
    padding: 0 0 4px;
    border: none;
    border-bottom: 2px solid #fdba74;
    background: transparent;
    font-size: 32px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
    line-height: 1;
    color: #ea580c;
    -moz-appearance: textfield;
}

.billing-checkout-collect__input:focus {
    outline: none;
    border-bottom-color: #ea580c;
}

.billing-checkout-collect__input::-webkit-outer-spin-button,
.billing-checkout-collect__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.billing-checkout-collect__hint {
    display: block;
    margin: 0;
    font-size: 11px;
    line-height: 1.35;
    text-align: center;
    color: #c2410c;
}

.billing-checkout-fields__grid {
    display: grid;
    grid-template-columns: 108px 1fr;
    gap: 8px;
}

.billing-checkout-fields__cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    margin: 0;
}

.billing-checkout-fields__label {
    font-size: 12px;
    font-weight: 500;
    color: var(--billing-muted);
}

.billing-checkout-fields__cell select,
.billing-checkout-fields__cell input {
    width: 100%;
    min-height: 32px;
    padding: 5px 8px;
    border: 1px solid var(--billing-border);
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: var(--billing-text);
    box-sizing: border-box;
}

.billing-checkout-fields__cell select:focus,
.billing-checkout-fields__cell input:focus {
    outline: none;
    border-color: var(--billing-primary);
    box-shadow: 0 0 0 2px var(--billing-primary-soft);
}

.billing-checkout-prior {
    margin: 10px 0 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.billing-checkout-prior--open {
    border-color: #fdba74;
    background: #fffaf5;
    box-shadow: 0 1px 4px rgba(251, 146, 60, 0.12);
}

.billing-checkout-prior__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.billing-checkout-prior__bar:hover:not(:disabled) {
    background: rgba(255, 251, 235, 0.6);
}

.billing-checkout-prior--open .billing-checkout-prior__bar:hover:not(:disabled) {
    background: transparent;
}

.billing-checkout-prior__bar--disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.billing-checkout-prior__mark {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
}

.billing-checkout-prior--open .billing-checkout-prior__mark,
.billing-checkout-prior__mark--on {
    background: #f97316;
    border-color: #f97316;
}

.billing-checkout-prior__mark--on::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.billing-checkout-prior__main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.billing-checkout-prior__title {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

.billing-checkout-prior__amount {
    font-size: 15px;
    font-weight: 700;
    color: #ea580c;
    letter-spacing: -0.01em;
}

.billing-checkout-prior__meta {
    font-size: 12px;
    color: #94a3b8;
}

.billing-checkout-prior__chip {
    flex-shrink: 0;
    padding: 3px 9px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.02em;
}

.billing-checkout-prior__chip--on {
    background: #ffedd5;
    border-color: #fdba74;
    color: #c2410c;
}

.billing-checkout-prior__note {
    margin: 0;
    padding: 0 12px 8px;
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
}

.billing-checkout-prior__panel {
    padding: 0 12px 10px;
    border-top: 1px dashed #fed7aa;
}

.billing-checkout-prior__row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
}

.billing-checkout-prior__row-label {
    font-size: 13px;
    color: #78716c;
}

.billing-checkout-prior__row-total {
    flex: 1;
    font-size: 17px;
    font-weight: 700;
    color: #c2410c;
    letter-spacing: -0.02em;
}

.billing-checkout-prior__link {
    flex-shrink: 0;
    padding: 0;
    border: none;
    background: none;
    font-size: 12px;
    color: #2563eb;
    cursor: pointer;
}

.billing-checkout-prior__link:hover {
    text-decoration: underline;
}

.billing-checkout-prior__detail {
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #fde68a;
}

.billing-checkout-prior__detail-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 3px 0;
    font-size: 12px;
    color: #78716c;
}

.billing-checkout-prior__detail-row + .billing-checkout-prior__detail-row {
    border-top: 1px dashed #fde68a;
}

.billing-checkout-prior__hint {
    margin: 6px 0 0;
    font-size: 11px;
    color: #a8a29e;
    line-height: 1.45;
}

.billing-checkout-due {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
    text-align: center;
}

.billing-checkout-due__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.billing-checkout-due__field {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    margin: 4px 0 2px;
    cursor: text;
}

.billing-checkout-due__currency {
    font-size: 16px;
    font-weight: 700;
    color: #dc2626;
}

.billing-checkout-due__input {
    width: 96px;
    border: none;
    border-bottom: 2px solid #fecaca;
    background: transparent;
    font-size: 26px;
    font-weight: 700;
    color: #dc2626;
    text-align: center;
    padding: 0 0 2px;
    line-height: 1;
    -moz-appearance: textfield;
}

.billing-checkout-due__input::-webkit-outer-spin-button,
.billing-checkout-due__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.billing-checkout-due__input:focus {
    outline: none;
    border-bottom-color: #dc2626;
}

.billing-checkout-due__hint {
    display: block;
    font-size: 11px;
    color: #94a3b8;
}

.billing-checkout-ledger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid #e2e8f0;
}

.billing-checkout-ledger__hero {
    flex-shrink: 0;
    min-width: 96px;
    text-align: center;
}

.billing-checkout-ledger__price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 1px;
    margin: 0;
    cursor: text;
}

.billing-checkout-ledger__currency {
    font-size: 18px;
    font-weight: 700;
    color: #dc2626;
    line-height: 1.1;
}

.billing-checkout-ledger__input {
    width: 96px;
    max-width: 100%;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    font-size: 26px;
    font-weight: 700;
    color: #dc2626;
    text-align: center;
    padding: 0 0 2px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    -moz-appearance: textfield;
}

.billing-checkout-ledger__input::-webkit-outer-spin-button,
.billing-checkout-ledger__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.billing-checkout-ledger__input:focus {
    outline: none;
    border-bottom-color: #dc2626;
}

.billing-checkout-ledger__tip {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #94a3b8;
}

.billing-checkout-ledger__amount {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: #dc2626;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.billing-checkout-ledger__label {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #64748b;
}

.billing-checkout-ledger__meta {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

.billing-checkout-adjust {
    font-size: 12px;
    color: #64748b;
}

.billing-checkout-adjust summary {
    cursor: pointer;
    padding: 2px 0;
    user-select: none;
}

.billing-checkout-adjust[open] {
    margin-bottom: 2px;
}

.billing-checkout-pay {
    padding: 10px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.billing-checkout-field--compact {
    margin: 0;
}

.billing-checkout-field--compact span {
    font-size: 12px;
}

.billing-checkout-field--pay {
    margin: 8px 0 0;
}

.billing-checkout-pay__input {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    padding: 8px 10px;
    letter-spacing: 0.02em;
}

.billing-checkout-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.billing-checkout-field--remark {
    margin-top: 8px;
}

.billing-checkout-hint--inline {
    margin: 6px 0 0;
    text-align: center;
    padding: 8px 10px;
    border-radius: 8px;
    line-height: 1.5;
}

.billing-checkout-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #334155;
}

.billing-checkout-line--accent {
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 15px;
}

.billing-checkout-line--accent strong {
    color: #dc2626;
    font-size: 18px;
}

.billing-checkout-notice {
    margin: 4px 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.billing-checkout-notice__formula {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #334155;
}

.billing-checkout-notice__formula strong {
    color: #1e40af;
}

.billing-checkout-notice__due {
    color: #dc2626 !important;
    font-size: 15px;
}

.billing-checkout-notice__sub {
    margin: 6px 0 0;
    font-size: 12px;
    color: #64748b;
}

.billing-checkout-section {
    margin-top: 4px;
    padding: 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.billing-checkout-section__title {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 10px;
}

.billing-checkout-quick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}

.billing-checkout-quick__btn {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 8px 4px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    color: #64748b;
    cursor: pointer;
    line-height: 1.3;
}

.billing-checkout-quick__btn strong {
    display: none;
}

.billing-checkout-quick__btn--active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.billing-checkout-quick__btn--full {
    border-color: #86efac;
    background: #f0fdf4;
    color: #15803d;
}

.billing-checkout-quick__btn--full.billing-checkout-quick__btn--active {
    border-color: #16a34a;
    background: #bbf7d0;
    color: #14532d;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px #16a34a;
}

.billing-checkout-quick__btn--partial {
    border-color: #fdba74;
    background: #fff7ed;
    color: #c2410c;
}

.billing-checkout-quick__btn--partial.billing-checkout-quick__btn--active {
    border-color: #ea580c;
    background: #fed7aa;
    color: #9a3412;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px #ea580c;
}

.billing-checkout-quick__btn--none {
    border-color: #c4b5fd;
    background: #faf5ff;
    color: #6d28d9;
}

.billing-checkout-quick__btn--none.billing-checkout-quick__btn--active {
    border-color: #7c3aed;
    background: #ddd6fe;
    color: #5b21b6;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px #7c3aed;
}

.billing-checkout-quick__btn--none:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.billing-checkout-hint--muted {
    margin: 6px 0 0;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    background: transparent;
    border: none;
}

.billing-checkout-quick__btn--active strong {
    color: #dc2626;
}

.billing-checkout-hint--full {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.billing-checkout-hint--partial {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #c2410c;
}

.billing-checkout-hint--none {
    background: #faf5ff;
    border: 1px solid #ddd6fe;
    color: #6d28d9;
}

.billing-checkout-hint--pill {
    display: block;
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    text-align: center;
}

.billing-checkout-result {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px dashed #cbd5e1;
    font-size: 13px;
    color: #64748b;
}

.billing-checkout-result strong {
    color: #334155;
}

.billing-checkout-result__sep {
    color: #94a3b8;
}

.billing-checkout-result__paid {
    color: #15803d !important;
}

.billing-checkout-result__debt {
    color: #dc2626 !important;
}

.billing-checkout-discount {
    display: block;
    font-size: 12px;
    color: #64748b;
    font-weight: normal;
    margin-top: 2px;
}

.billing-checkout-due {
    color: #ea580c;
}

.billing-checkout-line--paid {
    padding: 6px 10px;
    border-radius: 8px;
    background: #f0fdf4;
}

.billing-checkout-paid {
    color: #15803d;
}

.billing-checkout-progress {
    margin: 6px 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.billing-checkout-progress__bar {
    display: flex;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

.billing-checkout-progress__segment {
    height: 100%;
    min-width: 0;
    transition: width 0.2s ease;
}

.billing-checkout-progress__segment--paid {
    background: #22c55e;
}

.billing-checkout-progress__segment--current {
    background: #3b82f6;
}

.billing-checkout-progress__segment--debt {
    background: #fca5a5;
}

.billing-checkout-progress__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 8px;
    font-size: 12px;
}

.billing-checkout-progress__item--paid {
    color: #15803d;
    font-weight: 600;
}

.billing-checkout-progress__item--current {
    color: #2563eb;
    font-weight: 600;
}

.billing-checkout-progress__item--debt {
    color: #dc2626;
    font-weight: 600;
}

.billing-footer__paid {
    color: #15803d;
    font-weight: 600;
}

.billing-footer__debt {
    color: #dc2626;
    font-weight: 600;
}

.billing-catalog__debt {
    color: #dc2626;
    font-weight: 600;
}

.billing-history-paid {
    color: #15803d;
    font-size: 13px;
    font-weight: 600;
}

.billing-checkout-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #475569;
}

.billing-checkout-field--full {
    grid-column: 1 / -1;
}

.billing-checkout-field input,
.billing-checkout-field select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 15px;
    min-height: 40px;
}

.billing-checkout-hint {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

.billing-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--billing-text);
}

.billing-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
}

.billing-entry-list {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.billing-entry-list--frozen {
    visibility: hidden;
    pointer-events: none;
}

.billing-entry-list__head,
.billing-entry-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 72px 64px 52px 64px 36px;
    gap: 6px;
    align-items: center;
}

.billing-entry-list__head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 6px 4px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.billing-col-short { display: inline; }
.billing-col-full { display: none; }

.billing-entry-row {
    padding: 5px 4px;
    border-bottom: 1px solid #f1f5f9;
}

.billing-entry-row:last-child {
    border-bottom: 0;
}

.billing-entry-row input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 14px;
    min-height: 34px;
    box-sizing: border-box;
}

.billing-entry-row__price input,
.billing-entry-row__qty input,
.billing-entry-row__unit input {
    text-align: center;
}

.billing-entry-row__price input,
.billing-entry-row__qty input {
    padding-left: 4px;
    padding-right: 4px;
}

.billing-entry-row__unit input {
    padding-left: 2px;
    padding-right: 2px;
    font-size: 13px;
}

.billing-entry-row__price input::-webkit-outer-spin-button,
.billing-entry-row__price input::-webkit-inner-spin-button,
.billing-entry-row__qty input::-webkit-outer-spin-button,
.billing-entry-row__qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.billing-entry-row__price input,
.billing-entry-row__qty input {
    -moz-appearance: textfield;
    appearance: textfield;
}

.billing-entry-list__head span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.billing-entry-list__head span:first-child {
    text-align: left;
}

.billing-entry-list__head span:not(:first-child):not(:last-child) {
    text-align: center;
}

.billing-entry-row__amount {
    text-align: right;
    font-weight: 600;
    color: #dc2626;
    font-size: 13px;
    white-space: nowrap;
    padding-right: 2px;
}

.billing-entry-row__actions {
    display: flex;
    align-items: center;
    justify-content: center;
}

.billing-row-remove {
    min-width: 32px;
    min-height: 32px;
    font-size: 20px;
}

@media (min-width: 768px) {
    .billing-table-wrap {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
        overflow-x: visible;
    }

    .billing-entry-list {
        min-width: 520px;
    }

    .billing-entry-list__head,
    .billing-entry-row {
        grid-template-columns: 1fr 88px 72px 64px 72px 40px;
        gap: 8px;
    }

    .billing-col-short { display: none; }
    .billing-col-full { display: inline; }

    .billing-entry-list__head {
        border-radius: 8px 8px 0 0;
        padding: 8px 6px;
    }

    .billing-entry-row input {
        min-height: 36px;
    }
}

.billing-dropdown--fixed {
    position: fixed;
    top: auto;
    bottom: auto;
    right: auto;
    left: auto;
    z-index: 280;
}

.billing-dropdown--customer {
    border-radius: 14px;
    box-shadow: 0 20px 56px rgba(15, 23, 42, 0.22);
    -webkit-overflow-scrolling: touch;
}

.billing-dropdown__head {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.billing-popover {
    position: fixed;
    z-index: 300;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.2);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.billing-popover__head {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.billing-popover__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    cursor: pointer;
    text-align: left;
    min-height: 56px;
}

.billing-popover__thumb {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.billing-popover__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.billing-popover__thumb-ph {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    background: linear-gradient(135deg, #cbd5e1 0%, #e2e8f0 100%);
}

.billing-popover__item:last-child {
    border-bottom: 0;
}

.billing-popover__item:hover,
.billing-popover__item:active {
    background: #eff6ff;
}

.billing-popover__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.billing-popover__name {
    font-size: 14px;
    color: #1e293b;
    line-height: 1.35;
    word-break: break-word;
}

.billing-popover__figure {
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
    word-break: break-all;
}

.billing-popover__prices {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 96px;
}

.billing-popover__catalog {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.billing-popover__price {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: #dc2626;
}

.billing-popover__item--oos {
    opacity: 0.55;
    cursor: not-allowed;
}

.billing-popover__item--oos:hover,
.billing-popover__item--oos:active {
    background: transparent;
}

.billing-popover__stock {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #059669;
    line-height: 1.3;
}

.billing-popover__stock--oos {
    color: #dc2626;
    font-weight: 600;
}

.billing-popover__cost {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

@media (max-width: 767px) {
    .billing-popover {
        border-radius: 14px;
        box-shadow: 0 20px 56px rgba(15, 23, 42, 0.24);
    }

    .billing-dropdown--customer .billing-dropdown-item--rich {
        gap: 5px;
        padding: 14px 16px;
    }

    .billing-dropdown--customer .billing-dropdown-item__head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px 16px;
        flex-wrap: nowrap;
    }

    .billing-dropdown--customer .billing-dropdown-item__main {
        grid-column: 1;
        flex: none;
        max-width: 100%;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.35;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .billing-dropdown--customer .billing-dropdown-item__tags {
        grid-column: 2;
        flex: none;
        justify-content: flex-end;
        margin-left: 0;
        gap: 8px;
    }

    .billing-dropdown--customer .billing-dropdown-item__debt,
    .billing-dropdown--customer .billing-dropdown-item__balance {
        font-size: 12px;
        padding: 2px 8px;
        border-radius: 999px;
        background: #fef2f2;
    }

    .billing-dropdown--customer .billing-dropdown-item__balance {
        background: #eff6ff;
    }

    .billing-dropdown--customer .billing-dropdown-item__sub {
        grid-column: 1 / -1;
        font-size: 13px;
        width: 100%;
        padding-top: 2px;
    }

    .billing-autocomplete__field .billing-dropdown:not(.billing-dropdown--fixed) {
        left: -8px;
        right: -8px;
        z-index: 60;
        max-height: min(300px, 50vh);
        border-radius: 12px;
        box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    }

    .billing-dropdown-item--rich {
        gap: 6px;
        padding: 12px 14px;
    }

    .billing-dropdown-item__head {
        flex-wrap: wrap;
        align-items: flex-start;
        row-gap: 4px;
    }

    .billing-dropdown-item__main {
        flex: 1 1 100%;
        max-width: 100%;
        font-size: 15px;
        line-height: 1.35;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }

    .billing-dropdown-item__tags {
        flex: 1 1 100%;
        justify-content: flex-start;
        margin-left: 0;
        gap: 10px;
    }

    .billing-dropdown-item__debt,
    .billing-dropdown-item__balance {
        font-size: 12px;
    }

    .billing-dropdown-item__sub {
        font-size: 13px;
        width: 100%;
    }

    .billing-popover__head {
        padding: 12px 14px;
        font-size: 13px;
    }

    .billing-popover__item {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: start;
        gap: 8px 12px;
        padding: 12px 14px;
        min-height: 0;
    }

    .billing-popover__thumb {
        grid-row: 1 / span 2;
        width: 52px;
        height: 52px;
        border-radius: 8px;
    }

    .billing-popover__info {
        grid-column: 2;
        gap: 4px;
    }

    .billing-popover__name {
        font-size: 15px;
        line-height: 1.4;
    }

    .billing-popover__figure,
    .billing-popover__stock {
        font-size: 13px;
    }

    .billing-popover__prices {
        grid-column: 2;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 6px 14px;
        min-width: 0;
    }

    .billing-popover__catalog {
        font-size: 14px;
    }

    .billing-popover__price,
    .billing-popover__cost {
        font-size: 13px;
    }
}

.billing-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 14px;
}

.billing-table th,
.billing-table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 6px;
    vertical-align: middle;
}

.billing-table th {
    text-align: left;
    color: #64748b;
    font-weight: 600;
    background: #f8fafc;
    font-size: 12px;
}

.billing-table input,
.billing-table textarea,
.billing-table select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 16px;
    min-height: 42px;
    box-sizing: border-box;
}

.billing-table textarea {
    min-height: 42px;
    resize: vertical;
    line-height: 1.35;
}

.billing-table .col-price,
.billing-table .col-qty { width: 88px; }
.billing-table .col-unit { width: 64px; }
.billing-table .col-amount {
    width: 88px;
    text-align: right;
    white-space: nowrap;
    font-weight: 600;
    color: #dc2626;
}
.billing-table .col-actions { width: 40px; text-align: center; }

.billing-row-remove {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    min-width: 36px;
    min-height: 36px;
}

.billing-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.billing-meta-grid__span2 {
    grid-column: span 2;
}

@media (max-width: 640px) {
    .billing-meta-grid__span2 {
        grid-column: 1 / -1;
    }
}

.billing-meta-grid label {
    display: block;
    font-size: 13px;
    color: #475569;
    line-height: 1.35;
}

.billing-meta-grid input,
.billing-meta-grid select {
    display: block;
    width: 100%;
    margin-top: 4px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 16px;
    min-height: 42px;
    box-sizing: border-box;
}

.billing-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0));
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

.billing-footer--compact {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.billing-footer__main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.billing-footer__total {
    flex: 0 0 auto;
    font-size: 15px;
    white-space: nowrap;
}

.billing-footer__total strong {
    color: #dc2626;
    margin-left: 4px;
    font-size: 17px;
}

.billing-total {
    font-size: 18px;
}

.billing-total strong {
    color: #dc2626;
    margin-left: 6px;
}

.billing-actions--inline {
    flex: 1 1 160px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    min-width: 0;
}

.billing-actions--pair {
    max-width: 280px;
}

.billing-actions--inline .billing-btn {
    min-width: 0;
}

.billing-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.billing-footer-extras {
    flex: 1 1 100%;
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    flex-wrap: wrap;
}

/* Quote share toolbar in footer */
.billing-quote-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.billing-quote-bar__meta {
    flex: 1 1 auto;
    min-width: 0;
}

.billing-quote-bar__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.billing-quote-bar__actions::-webkit-scrollbar {
    display: none;
}

.billing-quote-chip {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.3;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 999px;
    vertical-align: middle;
}

.billing-quote-chip--draft {
    color: #b45309;
    background: #fffbeb;
}

.billing-quote-chip--pending {
    color: #1d4ed8;
    background: #eff6ff;
}

.billing-quote-chip--forever {
    color: #16a34a;
    background: #ecfdf5;
}

.billing-quote-bar__btn {
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    color: #475569;
    min-height: 28px;
    cursor: pointer;
    white-space: nowrap;
}

.billing-quote-bar__btn--primary {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

.billing-quote-bar__btn--accent {
    border-color: #bbf7d0;
    background: #ecfdf5;
    color: #15803d;
    font-weight: 600;
}

.billing-quote-bar__btn--danger {
    border-color: #fecaca;
    background: #fef2f2;
    color: #dc2626;
}

.billing-quote-bar__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.billing-btn {
    border: 1px solid var(--billing-border);
    background: var(--billing-card);
    border-radius: 4px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 14px;
    min-height: 40px;
    text-align: center;
    color: var(--billing-text);
}

.billing-btn--text {
    border-color: transparent;
    background: transparent;
    color: var(--billing-primary);
    min-height: 32px;
    padding: 4px 8px;
    font-size: 13px;
}

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

.billing-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.billing-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    z-index: 100;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    max-height: min(220px, 40vh);
    overflow: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.billing-dropdown-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    min-height: 44px;
}

.billing-dropdown-item:hover,
.billing-dropdown-item:active {
    background: var(--billing-primary-soft);
}

.billing-dropdown-item--create {
    color: var(--billing-primary);
    font-weight: 500;
    border-top: 1px dashed var(--billing-border);
}

.billing-dropdown-item--rich {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.billing-dropdown-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.billing-dropdown-item__main {
    flex: 1 1 auto;
    font-size: 14px;
    color: #0f172a;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.billing-dropdown-item__tags {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
    margin-left: auto;
}

.billing-dropdown-item__debt {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: #dc2626;
    white-space: nowrap;
}

.billing-dropdown-item__sub {
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
}

.billing-product-cell { position: relative; }

.billing-autocomplete {
    position: relative;
}

.billing-autocomplete__field {
    flex: 1;
    min-width: 0;
    position: relative;
}

.billing-autocomplete__field .billing-doc-field__input {
    width: 100%;
}

.billing-toast {
    position: fixed;
    top: calc(60px + env(safe-area-inset-top, 0));
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: #0f172a;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    max-width: 90vw;
}

.billing-sync-hint {
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
}

.billing-sync-hint--compact {
    margin: 0 0 8px;
    font-size: 11px;
}

.billing-history-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.billing-card-head--compact {
    margin-bottom: 10px;
}

.billing-card-head--compact .billing-card-title {
    margin: 0;
}

.billing-link-btn {
    font-size: 13px;
    color: var(--billing-primary);
    text-decoration: none;
    padding: 4px 8px;
}

.billing-link-btn--primary {
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--billing-primary, #2563eb);
    color: #fff !important;
}

.billing-stocktake-list__tip {
    margin: 0 0 10px;
    padding: 0 4px;
    font-size: 12px;
    color: var(--billing-muted);
    line-height: 1.5;
}

.billing-card-head--actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.billing-history-todos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
}

.billing-history-todo {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 0;
    padding: 5px 4px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.billing-history-todo:active {
    transform: scale(0.98);
}

.billing-history-todo--quote {
    background: linear-gradient(180deg, #f0f9ff 0%, #fff 100%);
    border-color: #bae6fd;
}

.billing-history-todo--checkout {
    background: linear-gradient(180deg, #fff7ed 0%, #fff 100%);
    border-color: #fed7aa;
}

.billing-history-todo--held {
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-color: #e2e8f0;
}

.billing-history-todo--debt {
    background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
    border-color: #fecaca;
}

.billing-history-todo__label {
    font-size: 10px;
    color: #64748b;
    line-height: 1.1;
    font-weight: 500;
    white-space: nowrap;
}

.billing-history-todo__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    min-height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: #64748b;
    background: rgba(255, 255, 255, 0.85);
}

.billing-history-todo--quote.has-count .billing-history-todo__count {
    color: #0369a1;
    background: #e0f2fe;
}

.billing-history-todo--checkout.has-count .billing-history-todo__count {
    color: #c2410c;
    background: #ffedd5;
}

.billing-history-todo--held.has-count .billing-history-todo__count {
    color: #475569;
    background: #e2e8f0;
}

.billing-history-todo--debt.has-count .billing-history-todo__count {
    color: #dc2626;
    background: #fee2e2;
}

.billing-history-todo.is-active {
    border-color: var(--billing-primary);
    box-shadow: 0 0 0 1.5px rgba(45, 108, 223, 0.18);
}

.billing-history-todo--quote.is-active .billing-history-todo__count {
    color: #fff;
    background: #0284c7;
}

.billing-history-todo--checkout.is-active .billing-history-todo__count {
    color: #fff;
    background: #ea580c;
}

.billing-history-todo--held.is-active .billing-history-todo__count {
    color: #fff;
    background: #64748b;
}

.billing-history-todo--debt.is-active .billing-history-todo__count {
    color: #fff;
    background: #dc2626;
}

.billing-history-todo__count:not(:empty) {
    font-variant-numeric: tabular-nums;
}

.billing-history-toolbar {
    display: flex;
    gap: 6px;
    align-items: stretch;
    margin-bottom: 8px;
}

.billing-history-search-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    border: 1px solid #dce3ed;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.billing-history-search-wrap:focus-within {
    border-color: #4d96ff;
    box-shadow: 0 0 0 2px rgba(77, 150, 255, 0.12);
}

.billing-history-search__icon {
    flex-shrink: 0;
    margin-left: 10px;
    color: #94a3b8;
}

.billing-history-search {
    flex: 1;
    min-width: 0;
    border: none;
    border-radius: 0;
    padding: 0 8px;
    font-size: 14px;
    min-height: 36px;
    color: var(--billing-text);
    background: transparent;
}

.billing-history-search:focus {
    border-color: transparent;
    outline: none;
    box-shadow: none;
}

.billing-history-search__submit {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    min-height: 36px;
    margin: 0;
    padding: 0;
    border: none;
    border-left: 1px solid #e2e8f0;
    border-radius: 0;
    background: linear-gradient(135deg, #2d6cdf 0%, #4d96ff 100%);
    color: #fff;
    cursor: pointer;
    transition: filter 0.15s;
}

.billing-history-search__submit:active {
    filter: brightness(0.95);
}

.billing-history-filter-btn {
    flex-shrink: 0;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    padding: 0 10px;
    min-height: 36px;
    border: 1px solid #dce3ed;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.billing-history-filter-btn:active {
    transform: scale(0.98);
}

.billing-history-filter-btn.is-active {
    border-color: #4d96ff;
    background: #eff6ff;
    color: #2563eb;
    box-shadow: 0 0 0 1.5px rgba(77, 150, 255, 0.14);
}

.billing-history-filters--compact {
    margin-bottom: 6px;
}

.billing-history-filters--compact select {
    flex: 1 1 calc(33.333% - 6px);
    min-height: 38px;
    padding: 6px 8px;
    font-size: 14px;
}

.billing-history-active-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--billing-muted);
}

.billing-history-active-filter button {
    border: none;
    background: none;
    padding: 0;
    color: var(--billing-primary);
    font-size: 12px;
    cursor: pointer;
}

.billing-history-filters input,
.billing-history-filters select {
    border: 1px solid var(--billing-border);
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 16px;
    min-height: 42px;
    flex: 1 1 120px;
    color: var(--billing-text);
    background: var(--billing-card);
}

.billing-history-filters input:focus,
.billing-history-filters select:focus {
    border-color: var(--billing-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.12);
}

.billing-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.billing-history-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    padding: 12px;
    background: var(--billing-card);
    border-radius: 8px;
    border: 1px solid var(--billing-border);
    font-size: 14px;
}

.billing-history-item--pending {
    border-color: var(--billing-danger-border);
    background: linear-gradient(180deg, var(--billing-card) 0%, var(--billing-danger-soft) 100%);
    box-shadow: none;
}

.billing-history-item__main {
    flex: 1 1 200px;
    min-width: 0;
}

.billing-history-item__head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.billing-history-status {
    color: var(--billing-muted);
    font-size: 13px;
}

.billing-history-item__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.billing-history-amount {
    color: #dc2626;
    font-weight: 600;
}

.billing-history-vehicle {
    font-size: 12px;
    color: #0f766e;
    background: #ecfdf5;
    border-radius: 999px;
    padding: 2px 8px;
}

.billing-history-item__sub {
    margin-top: 4px;
    font-size: 12px;
    color: var(--billing-muted);
}

.billing-history-expire {
    color: #64748b;
}

.billing-history-expire--forever {
    color: #16a34a;
}

.billing-history-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.billing-history-more {
    position: relative;
}

.billing-history-more__btn {
    min-width: 52px;
    padding-inline: 10px;
}

.billing-history-more__btn--open {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.billing-history-more__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 132px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    z-index: 30;
    padding: 4px;
}

.billing-history-more__item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border: 0;
    background: transparent;
    font-size: 13px;
    cursor: pointer;
    border-radius: 7px;
    color: #334155;
    text-decoration: none;
    line-height: 1.3;
}

.billing-history-more__item:hover {
    background: #f8fafc;
}

.billing-history-more__item--warn {
    color: #b45309;
}

.billing-history-more__item--danger {
    color: #dc2626;
}

.billing-history-action {
    border: 1px solid var(--billing-border);
    background: var(--billing-card);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    min-height: 36px;
    cursor: pointer;
    text-decoration: none;
    color: var(--billing-text);
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
}

.billing-history-action--primary {
    background: var(--billing-primary-soft);
    border-color: var(--billing-primary-border);
    color: var(--billing-primary);
    font-weight: 600;
}

.billing-history-action--checkout {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
    font-weight: 600;
}

.billing-history-action--checkout:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

.billing-history-action--quote-checkout {
    background: #9333ea;
    border-color: #9333ea;
    color: #fff;
    font-weight: 600;
}

.billing-history-action--quote-checkout:hover {
    background: #7e22ce;
    border-color: #7e22ce;
    color: #fff;
}

.billing-history-quote-accepted {
    color: #15803d;
}

.billing-history-action--warn {
    color: #b45309;
    border-color: #fcd34d;
}

.billing-history-action--danger {
    color: var(--billing-danger);
    border-color: var(--billing-danger-border);
    background: var(--billing-danger-soft);
}

.billing-history-empty {
    color: var(--billing-muted);
    text-align: center;
    padding: 24px;
    margin: 0;
}

.billing-history-loadmore {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 8px 0 4px;
}

.billing-history-loadmore__hint {
    font-size: 13px;
    color: var(--billing-muted);
}

.billing-history-loadmore__hint--muted {
    opacity: 0.75;
}

/* 订单卡片：三行简洁布局 */
.billing-order-card {
    display: block;
    padding: 0;
}

.billing-order-card--void {
    opacity: 0.72;
}

.billing-order-card__body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 12px;
}

.billing-order-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.billing-order-card__title {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.billing-order-card__title--link {
    border: none;
    padding: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.billing-order-card__title--link:hover .billing-order-card__docno {
    color: var(--billing-primary);
}

.billing-order-card__type {
    flex-shrink: 0;
    padding: 0 5px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 18px;
    color: var(--billing-primary);
    background: var(--billing-primary-soft);
}

.billing-order-card--quote .billing-order-card__type {
    color: #409eff;
    background: #ecf5ff;
}

.billing-order-card--quote .billing-order-card__btn--primary {
    background: var(--billing-primary);
}

.billing-order-card--quote .billing-order-card__btn--primary:hover {
    background: var(--billing-primary-dark);
}

.billing-order-card--order.billing-order-card--pay-unpaid .billing-order-card__type {
    color: var(--billing-danger);
    background: var(--billing-danger-soft);
}

.billing-order-card--order.billing-order-card--pay-paid .billing-order-card__type {
    color: #67c23a;
    background: #f0f9eb;
}

.billing-order-card--checkout .billing-order-card__type,
.billing-order-card--quote-checkout .billing-order-card__type {
    color: #e6a23c;
    background: #fdf6ec;
}

.billing-order-card--held .billing-order-card__type {
    color: #475569;
    background: #f1f5f9;
}

.billing-order-card--void .billing-order-card__type {
    color: var(--billing-muted);
    background: #f4f4f5;
}

.billing-order-card__docno {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.billing-order-card__money {
    flex-shrink: 0;
    text-align: right;
    line-height: 1.2;
}

.billing-order-card__total {
    display: block;
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--billing-text);
}

.billing-order-card__debt {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--billing-danger);
}

.billing-order-card__sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--billing-muted);
}

.billing-order-card__sep {
    opacity: 0.45;
    user-select: none;
}

.billing-order-card__time-hint {
    color: #94a3b8;
    font-size: 11px;
}

.billing-order-card__customer {
    min-width: 0;
    max-width: 9em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.billing-order-card__pay {
    font-weight: 500;
}

.billing-order-card__pay--unpaid {
    color: var(--billing-danger);
}

.billing-order-card__pay--partial {
    color: #e6a23c;
}

.billing-order-card__pay--paid {
    color: #67c23a;
}

.billing-order-card__pay--muted {
    color: var(--billing-muted);
}

.billing-order-card__pay--info {
    color: var(--billing-primary);
}

.billing-order-card__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 2px;
}

.billing-order-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    background: transparent;
    transition: background 0.15s, color 0.15s;
}

.billing-order-card__btn--primary {
    padding: 0 14px;
    background: var(--billing-primary);
    color: #fff;
}

.billing-order-card__btn--primary:hover {
    background: var(--billing-primary-dark);
    color: #fff;
}

.billing-order-card--checkout .billing-order-card__btn--primary,
.billing-order-card--quote-checkout .billing-order-card__btn--primary {
    background: #e6a23c;
}

.billing-order-card--checkout .billing-order-card__btn--primary:hover,
.billing-order-card--quote-checkout .billing-order-card__btn--primary:hover {
    background: #cf9236;
}

.billing-order-card--held .billing-order-card__btn--primary {
    background: #64748b;
}

.billing-order-card--held .billing-order-card__btn--primary:hover {
    background: #475569;
}

.billing-order-card__btn--text {
    color: var(--billing-primary);
}

.billing-order-card__btn--text:hover {
    background: var(--billing-primary-soft);
}

.billing-order-card__btn--icon {
    min-width: 28px;
    width: 28px;
    padding: 0;
    font-size: 15px;
    color: var(--billing-muted);
}

.billing-order-card__btn--icon.is-open,
.billing-order-card__btn--icon:hover {
    color: var(--billing-primary);
    background: var(--billing-primary-soft);
}

@media (max-width: 640px) {
    .billing-history-item:not(.billing-order-card) {
        flex-wrap: wrap;
    }

    .billing-history-item:not(.billing-order-card) .billing-history-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .billing-card-head .billing-btn:not(.billing-btn-primary) {
        min-height: 32px;
        padding: 4px 10px;
        font-size: 13px;
    }

    .billing-order-card__body {
        padding: 9px 10px;
    }

    .billing-order-card__docno,
    .billing-order-card__total {
        font-size: 14px;
    }
}

.billing-order-detail-modal {
    max-width: min(480px, 96vw);
    width: 100%;
    max-height: min(82vh, 640px);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.billing-order-detail__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--billing-border);
}

.billing-order-detail__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.billing-order-detail__close {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.billing-order-detail__loading {
    padding: 24px 14px;
    text-align: center;
    color: var(--billing-muted);
    font-size: 13px;
}

.billing-order-detail__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 14px 14px;
}

.billing-order-detail__meta {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--billing-border);
}

.billing-order-detail__meta-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.billing-order-detail__docno {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    word-break: break-all;
}

.billing-order-detail__copy {
    border: none;
    background: transparent;
    color: var(--billing-primary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.billing-order-detail__tag {
    flex-shrink: 0;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    color: var(--billing-primary);
    background: var(--billing-primary-soft);
}

.billing-order-detail__meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
}

.billing-order-detail__meta-line + .billing-order-detail__meta-line {
    margin-top: 2px;
}

.billing-order-detail__dot {
    margin: 0 4px;
    color: #cbd5e1;
}

.billing-order-detail__items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.billing-order-detail__item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #f1f5f9;
}

.billing-order-detail__item:last-child {
    border-bottom: none;
}

.billing-order-detail__item-main {
    flex: 1 1 auto;
    min-width: 0;
}

.billing-order-detail__item-name {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
    line-height: 1.35;
}

.billing-order-detail__item-sub {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    color: var(--billing-muted);
    line-height: 1.3;
}

.billing-order-detail__item-right {
    flex-shrink: 0;
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.billing-order-detail__item-qty {
    font-size: 12px;
    color: #64748b;
}

.billing-order-detail__item-sep {
    font-size: 12px;
    color: #cbd5e1;
}

.billing-order-detail__item-amt {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.billing-order-detail__empty {
    margin: 12px 0;
    font-size: 13px;
    color: var(--billing-muted);
    text-align: center;
}

.billing-order-detail__totals {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--billing-border);
}

.billing-order-detail__totals-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.billing-order-detail__totals-row + .billing-order-detail__totals-row {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f0;
}

.billing-order-detail__totals-row.is-pay,
.billing-order-detail__totals-row.is-discount {
    justify-content: flex-start;
    gap: 8px;
    font-size: 12px;
}

.billing-order-detail__totals-cell {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
}

.billing-order-detail__totals-cell.is-right {
    margin-left: auto;
    justify-content: flex-end;
}

.billing-order-detail__totals-label {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--billing-muted);
}

.billing-order-detail__totals-cell strong,
.billing-order-detail__totals-row.is-discount strong {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.billing-order-detail__totals-cell .is-total {
    font-size: 16px;
    color: #dc2626;
}

.billing-order-detail__totals-cell .is-debt,
.billing-order-detail__totals-row .is-debt {
    color: #dc2626;
}

.billing-order-detail__totals-pay {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    color: #334155;
    text-align: right;
    line-height: 1.45;
}

.billing-order-detail__remark {
    display: flex;
    gap: 8px;
    margin: 8px 0 0;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-size: 12px;
    color: #92400e;
    line-height: 1.45;
}

.billing-order-detail__remark .billing-order-detail__totals-label {
    color: #b45309;
}

.billing-customer-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.billing-customer-item__contact {
    font-size: 14px;
}

.billing-customer-muted {
    color: var(--billing-muted);
}

.billing-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    font-size: 13px;
    color: var(--billing-muted);
}

.billing-modal--wide {
    max-width: 520px;
    width: 100%;
}

.billing-export-modal {
    max-width: min(920px, 96vw);
    max-height: calc(100vh - 32px);
    overflow: visible;
}

.billing-export-preview-wrap {
    overflow: visible;
    background: #e2e8f0;
    border-radius: 8px;
    padding: 12px;
}

.billing-export-preview {
    display: flex;
    justify-content: center;
    overflow: visible;
}

.billing-export-preview .billing-export-sheet {
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.12);
    flex-shrink: 0;
}

.billing-tag--muted {
    background: #f1f5f9;
    color: #64748b;
}

.billing-payment-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.billing-payment-badge--sm {
    font-size: 11px;
    padding: 1px 7px;
}

.billing-payment-badge--unpaid {
    background: var(--billing-danger-soft);
    color: var(--billing-danger);
}

.billing-payment-badge--partial {
    background: #fef3c7;
    color: #b45309;
}

.billing-payment-badge--paid {
    background: #dcfce7;
    color: #15803d;
}

.billing-payment-badge--settle {
    background: var(--billing-primary-soft);
    color: var(--billing-primary);
}

.billing-payment-records-modal {
    max-height: min(90vh, 720px);
    overflow: auto;
}

.billing-payment-records-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.billing-payment-records-modal__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

.billing-payment-records-modal__close {
    flex-shrink: 0;
    margin: -2px -4px 0 0;
    border: none;
    background: transparent;
    color: var(--billing-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.billing-payment-records-modal__close:hover {
    color: var(--billing-text);
}

.billing-payment-records-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--billing-primary-soft);
    font-size: 12px;
    color: var(--billing-text);
}

.billing-payment-records-summary strong {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.billing-payment-records-summary__debt {
    color: var(--billing-danger);
}

.billing-date-range {
    margin-bottom: 8px;
}

.billing-date-range__presets {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    margin-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.billing-date-range__presets::-webkit-scrollbar {
    display: none;
}

.billing-date-range__chip {
    flex-shrink: 0;
    padding: 3px 10px;
    border: 1px solid var(--billing-border);
    border-radius: 999px;
    background: var(--billing-card);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--billing-muted);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.billing-date-range__chip:hover {
    border-color: var(--billing-primary-border);
    color: var(--billing-primary);
}

.billing-date-range__chip.is-active {
    border-color: var(--billing-primary);
    background: var(--billing-primary-soft);
    color: var(--billing-primary);
}

.billing-date-range__summary {
    margin: 0 0 2px;
    padding: 0 2px;
    font-size: 11px;
    line-height: 1.35;
    color: var(--billing-muted);
}

.billing-date-range__bar {
    display: flex;
    align-items: center;
    min-height: 34px;
    margin-top: 4px;
    padding: 0 4px 0 8px;
    border: 1px solid var(--billing-border);
    border-radius: 6px;
    background: var(--billing-card);
}

.billing-date-range__bar:focus-within {
    border-color: var(--billing-primary);
    box-shadow: 0 0 0 2px var(--billing-primary-soft);
}

.billing-date-range__input {
    flex: 1;
    min-width: 0;
    width: 0;
    padding: 5px 2px;
    border: none;
    background: transparent;
    font-size: 12px;
    color: var(--billing-text);
    color-scheme: light;
}

.billing-date-range__input:focus {
    outline: none;
}

.billing-date-range__sep {
    flex-shrink: 0;
    padding: 0 2px;
    font-size: 11px;
    color: var(--billing-muted);
    user-select: none;
}

.billing-date-range__clear {
    flex-shrink: 0;
    margin-left: 2px;
    padding: 4px 8px;
    border: none;
    border-left: 1px solid var(--billing-border);
    background: transparent;
    font-size: 11px;
    font-weight: 500;
    color: var(--billing-primary);
    cursor: pointer;
    white-space: nowrap;
}

.billing-date-range__clear:hover {
    background: var(--billing-primary-soft);
}

.billing-payment-records-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--billing-text);
}

.billing-payment-records-section-count {
    padding: 0 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    line-height: 18px;
    color: var(--billing-danger);
    background: var(--billing-danger-soft);
}

.billing-payment-records-outstanding {
    margin-bottom: 10px;
}

.billing-payment-records-section {
    margin-bottom: 6px;
}

.billing-payment-records-list--outstanding {
    max-height: none;
}

.billing-payment-record__pay {
    font-weight: 500;
}

.billing-payment-record__pay--unpaid {
    color: var(--billing-danger);
}

.billing-payment-record__pay--partial {
    color: #e6a23c;
}

.billing-payment-record__pay--paid {
    color: #67c23a;
}

.billing-payment-record__collect {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--billing-primary);
    text-decoration: none;
    white-space: nowrap;
}

.billing-payment-record__collect:hover {
    text-decoration: underline;
}

.billing-payment-records-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 320px;
    overflow: auto;
    padding: 1px;
}

.billing-payment-record {
    padding: 7px 9px;
    border: 1px solid var(--billing-border);
    border-radius: 6px;
    background: var(--billing-card);
}

.billing-payment-record--compact {
    padding: 6px 8px;
}

.billing-payment-record--partial {
    border-color: #f3d19e;
}

.billing-payment-record--unpaid {
    border-color: var(--billing-danger-border);
}

.billing-payment-record__debt-inline {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--billing-text);
    white-space: nowrap;
}

.billing-payment-record__debt-inline strong {
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.billing-payment-record--partial .billing-payment-record__debt-inline strong,
.billing-payment-record--partial .billing-payment-record__debt-inline--sm strong {
    color: #e6a23c;
}

.billing-payment-record--unpaid .billing-payment-record__debt-inline strong,
.billing-payment-record--unpaid .billing-payment-record__debt-inline--sm strong {
    color: var(--billing-danger);
}

.billing-payment-record__debt-inline--sm {
    font-size: 11px;
}

.billing-payment-record__debt-inline .billing-payment-record__debt-tag {
    margin-right: 4px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
}

.billing-payment-record--partial .billing-payment-record__debt-inline .billing-payment-record__debt-tag {
    color: #e6a23c;
    background: #fdf6ec;
}

.billing-payment-record--unpaid .billing-payment-record__debt-inline .billing-payment-record__debt-tag {
    color: var(--billing-danger);
    background: var(--billing-danger-soft);
}

.billing-payment-record__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.billing-payment-record__title {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.billing-payment-record__type {
    flex-shrink: 0;
    padding: 0 5px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 18px;
}

.billing-payment-record__type--order {
    color: var(--billing-primary);
    background: var(--billing-primary-soft);
}

.billing-payment-record__type--quote {
    color: #409eff;
    background: #ecf5ff;
}

.billing-payment-record__docno {
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--billing-text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.billing-payment-record__docno:hover {
    color: var(--billing-primary);
}

.billing-payment-record__plain {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--billing-text);
}

.billing-payment-record__amount {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--billing-text);
}

.billing-payment-record__sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.35;
    color: var(--billing-muted);
}

.billing-payment-record__sub--actions {
    justify-content: space-between;
    gap: 8px;
}

.billing-payment-record__sep {
    opacity: 0.45;
    user-select: none;
}

.billing-payment-record__scene {
    font-weight: 500;
}

.billing-payment-record__scene--paid {
    color: #67c23a;
}

.billing-payment-record__scene--settle {
    color: var(--billing-primary);
}

.billing-payment-record__remark {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed var(--billing-border);
    font-size: 12px;
    color: var(--billing-muted);
    line-height: 1.4;
}

@media (max-width: 540px) {
    .billing-date-range__bar {
        flex-wrap: wrap;
        padding: 4px 6px;
    }

    .billing-date-range__input {
        flex: 1 1 calc(50% - 16px);
        width: auto;
        min-width: 110px;
    }

    .billing-date-range__clear {
        flex: 1 1 100%;
        margin-left: 0;
        border-left: none;
        border-top: 1px solid var(--billing-border);
        text-align: center;
    }

    .billing-payment-records-summary {
        gap: 4px 10px;
    }
}

.billing-payment-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 36px;
}

.billing-payment-detail {
    font-size: 13px;
    color: #64748b;
}

.billing-payment-history {
    margin-top: 8px;
    max-height: 160px;
    overflow: auto;
}

.billing-payment-history-item {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
}

.billing-history-debt {
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
}

.billing-settle-list {
    max-height: 220px;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px 8px;
}

.billing-settle-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}

.billing-settle-item:last-child {
    border-bottom: 0;
}

.billing-settle-item__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}

.billing-settle-item__docno {
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: #2563eb;
    cursor: pointer;
    text-align: left;
}

.billing-settle-item__docno:hover {
    text-decoration: underline;
}

.billing-settle-item__docno:active {
    color: #1d4ed8;
}

.billing-settle-item__amount {
    font-weight: 600;
    color: #dc2626;
    white-space: nowrap;
}

.billing-btn--block {
    width: 100%;
}

.billing-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 250;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.billing-card.billing-modal {
    padding: 0;
    overflow: hidden;
    max-width: 400px;
}

.billing-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px 8px;
    border-bottom: 1px solid var(--billing-border);
}

.billing-modal__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    min-width: 0;
    color: #0f172a;
}

.billing-modal__close {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    margin: -2px -2px 0 0;
}

.billing-modal__close:hover:not(:disabled) {
    color: #0f172a;
}

.billing-modal__close:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.billing-modal__body {
    padding: 10px 12px 0;
}

.billing-modal {
    max-width: 400px;
    width: 100%;
    margin: 0;
}

.billing-modal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 0 12px 12px;
}

.billing-modal-actions--bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: nowrap;
}

.billing-modal-actions--single {
    display: block;
    padding: 0 12px 12px;
}

.billing-modal-actions--single .billing-btn {
    width: 100%;
    min-height: 40px;
}

.billing-modal-actions--bar .billing-btn {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
}

.billing-modal-actions--bar:not(.billing-modal-actions--dual) {
    grid-template-columns: 1fr;
}

.billing-modal-actions--dual {
    grid-template-columns: 1fr 1fr;
}

.billing-settle-modal .billing-modal-hint {
    margin-bottom: 10px;
}

.billing-modal-hint {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--billing-muted);
    line-height: 1.45;
}

.billing-confirm-backdrop {
    z-index: 300;
}

.billing-confirm-modal {
    max-width: 280px;
    width: calc(100% - 24px);
}

.billing-confirm-modal .billing-modal__head {
    border-bottom: none;
    padding-bottom: 4px;
}

.billing-confirm-modal__body {
    padding: 0 14px 14px;
    text-align: center;
}

.billing-confirm-modal__title {
    font-size: 16px;
    font-weight: 700;
}

.billing-confirm-modal__sub {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    word-break: break-all;
}

.billing-confirm-modal__hint {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--billing-muted);
}

.billing-confirm-modal .billing-modal-actions--single {
    padding: 0;
    margin-top: 0;
}

.billing-confirm-modal--danger .billing-confirm-modal__title {
    color: #991b1b;
}

.billing-confirm-modal--warn .billing-confirm-modal__title {
    color: #9a3412;
}

.billing-btn--warn {
    background: #ea580c;
    border-color: #ea580c;
    color: #fff;
}

.billing-btn--warn:hover:not(:disabled) {
    background: #c2410c;
    border-color: #c2410c;
}

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

.billing-btn--danger:hover:not(:disabled) {
    background: #b91c1c;
    border-color: #b91c1c;
}

.billing-btn--warn:disabled,
.billing-btn--danger:disabled {
    opacity: 0.65;
}

.billing-print-options {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.billing-check-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.billing-check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.billing-print-preview {
    margin-top: 12px;
    max-height: 200px;
    overflow: auto;
    background: #f8fafc;
    padding: 8px;
    font-size: 12px;
    white-space: pre-wrap;
    border-radius: 8px;
}

.billing-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    background: var(--billing-primary-soft);
    color: var(--billing-primary);
}

.billing-tag.billing-tag--order {
    background: var(--billing-primary-soft);
    color: var(--billing-primary);
}

.billing-tag.billing-tag--checkout-doc {
    background: #ffedd5;
    color: #c2410c;
    font-weight: 600;
}

.billing-tag.billing-tag--held {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
}

.billing-tag.billing-tag--quote {
    background: #f3e8ff;
    color: #7e22ce;
}

.billing-tag.billing-tag--quote-checkout {
    background: linear-gradient(135deg, #f3e8ff 0%, #ffedd5 100%);
    color: #7e22ce;
    font-weight: 600;
}

.billing-footer-extras .billing-quote-expire {
    font-size: 12px;
    color: #64748b;
    margin-left: 8px;
}

.billing-footer-extras .billing-quote-expire--forever {
    color: #16a34a;
}

.billing-publish-modal {
    max-width: 400px;
}

.billing-publish-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.billing-publish-custom span {
    flex-shrink: 0;
    font-size: 13px;
    color: #64748b;
}

.billing-publish-custom input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.billing-checkout-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 12px 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
    border: 1px solid #fecaca;
}

.billing-checkout-banner__text {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #7f1d1d;
    line-height: 1.5;
}

.billing-checkout-banner__text strong {
    color: #dc2626;
}

.billing-checkout-banner--quote {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-color: #d8b4fe;
}

.billing-checkout-banner--quote .billing-checkout-banner__text {
    color: #581c87;
}

.billing-checkout-banner--quote .billing-checkout-banner__text strong {
    color: #7e22ce;
}

.billing-btn--sm {
    min-height: 34px;
    padding: 6px 14px;
    font-size: 13px;
}

.quote-share-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 12px 12px calc(24px + env(safe-area-inset-bottom, 0));
}

.quote-share-page--has-contact {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0));
}

.quote-share-page--has-contact.quote-share-page--has-wechat {
    padding-bottom: calc(98px + env(safe-area-inset-bottom, 0));
}

.quote-share-hero {
    text-align: center;
    padding: 20px 12px 16px;
}

.quote-share-hero__brand {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.quote-share-hero__title {
    margin: 6px 0 4px;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

.quote-share-hero__no {
    margin: 0;
    font-size: 14px;
    color: #475569;
}

.quote-share-hero__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 14px;
    margin-top: 10px;
    font-size: 13px;
    color: #64748b;
}

.quote-share-hero__expire {
    color: #b45309;
}

.quote-share-hero__expire--forever {
    color: #16a34a;
}

.quote-share-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    padding: 16px;
    margin-bottom: 12px;
}

.quote-share-card--empty {
    margin-top: 24px;
    text-align: center;
}

.quote-share-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.quote-share-item {
    display: flex;
    gap: 12px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    padding: 12px;
}

.quote-share-item__thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-share-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quote-share-item__placeholder {
    font-size: 12px;
    color: #94a3b8;
}

.quote-share-item__body {
    flex: 1;
    min-width: 0;
}

.quote-share-item__name {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
}

.quote-share-item__fig {
    margin: 0 0 8px;
    font-size: 12px;
    color: #64748b;
}

.quote-share-item__row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.quote-share-item__price {
    font-size: 13px;
    color: #475569;
}

.quote-share-item__qty {
    font-size: 13px;
    color: #64748b;
}

.quote-share-item__amount {
    margin-left: auto;
    font-size: 16px;
    color: #dc2626;
}

.quote-share-remark {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}

.quote-share-remark__label {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.quote-share-summary {
    position: sticky;
    bottom: calc(12px + env(safe-area-inset-bottom, 0));
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 -2px 16px rgba(15, 23, 42, 0.1);
    padding: 14px 16px;
    margin-bottom: 12px;
    z-index: 2;
}

.quote-share-summary__line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 14px;
    color: #334155;
}

.quote-share-summary__total {
    font-size: 22px;
    color: #dc2626;
}

.quote-share-summary__meta {
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
    display: flex;
    gap: 12px;
}

.quote-share-summary__discount {
    color: #dc2626;
}

.quote-share-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.quote-share-actions__hint {
    margin: 0;
    text-align: center;
    font-size: 12px;
    color: #64748b;
    line-height: 1.45;
}

.quote-share-btn {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s;
}

.quote-share-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.quote-share-btn--primary {
    background: #2563eb;
    color: #fff;
}

.quote-share-btn--accent {
    background: #dc2626;
    color: #fff;
}

.quote-share-btn--secondary {
    display: inline-block;
    width: auto;
    margin-top: 12px;
    background: #f1f5f9;
    color: #334155;
    font-size: 14px;
    padding: 10px 18px;
}

.quote-share-status {
    text-align: center;
    padding: 24px 16px;
}

.quote-share-status__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 22px;
    margin-bottom: 10px;
}

.quote-share-status--success .quote-share-status__icon {
    background: #dcfce7;
    color: #16a34a;
}

.quote-share-status--expired .quote-share-status__icon {
    background: #fef3c7;
    color: #d97706;
}

.quote-share-status h2 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #0f172a;
}

.quote-share-status p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
}

.quote-share-contact {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

.quote-share-contact a {
    color: #2563eb;
    text-decoration: none;
}

.share-contact-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0));
    background: rgba(248, 250, 252, 0.88);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border-top: 1px solid rgba(15, 23, 42, 0.05);
}

.share-contact-dock__inner {
    max-width: 616px;
    margin: 0 auto;
}

.share-contact-dock__call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    border-radius: 13px;
    background: #0f172a;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.14);
    transition: transform 0.12s ease, background 0.12s ease;
}

.share-contact-dock__call:hover {
    background: #1e293b;
}

.share-contact-dock__call:active {
    transform: scale(0.988);
    background: #020617;
}

.share-contact-dock__icon {
    flex-shrink: 0;
    opacity: 0.88;
}

.share-contact-dock__phone {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}

.share-contact-dock__wechat {
    margin: 7px 0 0;
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 0.04em;
}

.share-contact-dock__wechat span {
    color: #64748b;
    font-weight: 500;
}

.quote-share-toast {
    position: fixed;
    left: 50%;
    bottom: calc(68px + env(safe-area-inset-bottom, 0));
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 999px;
    z-index: 20;
    margin: 0;
    pointer-events: none;
}

.quote-share-header { text-align: center; margin-bottom: 16px; }

.quote-share-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    font-size: 14px;
}

.quote-share-table th,
.quote-share-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.quote-share-total {
    text-align: right;
    font-size: 20px;
    margin-top: 16px;
    color: #dc2626;
    font-weight: 700;
}

@media (min-width: 768px) {
    .billing-body {
        padding-bottom: 80px;
    }

    .billing-menu-btn { display: none !important; }
    .billing-drawer-backdrop,
    .billing-drawer { display: none !important; }
    .billing-tabbar { display: none !important; }

    .billing-nav--desktop {
        display: flex;
        flex: 1 1 auto;
        justify-content: center;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .billing-nav--desktop::-webkit-scrollbar {
        display: none;
    }

    .billing-user--desktop { display: flex; }

    .billing-footer--compact {
        gap: 0;
    }

    .billing-footer__main {
        flex-wrap: nowrap;
        gap: 12px;
    }

    .billing-footer__total {
        margin-right: auto;
    }

    .billing-actions--inline {
        flex: 0 0 auto;
        width: auto;
        max-width: 280px;
    }

    .billing-footer-extras {
        flex: 0 0 auto;
    }

    .billing-quote-bar {
        padding-top: 6px;
        margin-top: 6px;
    }

    .billing-quote-bar__meta {
        flex: 0 1 auto;
    }

    .billing-table input,
    .billing-table textarea,
    .billing-meta-grid input,
    .billing-meta-grid select {
        font-size: 14px;
        min-height: 36px;
    }
}

@media (max-width: 767px) {
    .billing-nav--desktop,
    .billing-user--desktop {
        display: none;
    }

    .billing-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .billing-tabbar {
        display: flex;
    }

    .billing-confirm-backdrop {
        align-items: center;
        justify-content: center;
        padding: 16px;
    }

    .billing-confirm-modal {
        max-width: 300px;
        width: calc(100% - 32px);
        border-radius: 14px;
        padding: 20px 18px 18px;
        text-align: center;
    }

    .billing-body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 0));
    }

    .billing-footer {
        bottom: calc(52px + env(safe-area-inset-bottom, 0));
    }

    .billing-slim-bar--filter > .billing-slim-select,
    .billing-model-combobox__input {
        min-height: 36px;
        font-size: 14px;
        padding-top: 6px;
        padding-bottom: 6px;
        border-radius: 8px;
    }

    .billing-slim-bar--filter > .billing-model-combobox {
        flex: 1.35 1 0;
    }

    .billing-slim-bar--filter > .billing-slim-select {
        flex: 0.85 1 0;
    }

    .billing-model-combobox__input {
        padding-left: 10px;
        padding-right: 38px;
    }

    .billing-slim-clear {
        width: 32px;
        height: 32px;
        font-size: 17px;
        border-radius: 8px;
    }

    .billing-doc-card {
        padding: 8px;
        gap: 6px;
    }

    .billing-doc-card__row--customer {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
        gap: 6px;
        align-items: center;
    }

    .billing-doc-card__row--customer .billing-doc-field--name,
    .billing-doc-card__row--customer .billing-doc-field--phone {
        min-width: 0;
    }

    .billing-doc-card__row--customer .billing-doc-card__link--inline {
        grid-column: auto;
        justify-self: end;
        align-self: center;
    }

    .billing-doc-field--labeled {
        min-height: 32px;
        padding: 0 8px 0 6px;
    }

    .billing-doc-field--labeled .billing-doc-field__input {
        min-height: 30px;
        font-size: 13px;
    }

    .billing-doc-finance--both {
        gap: 5px;
    }

    .billing-finance-tile {
        min-height: 30px;
        padding: 4px 7px;
        gap: 5px;
    }

    .billing-finance-tile__amount {
        font-size: 13px;
    }

    .billing-finance-tile__btn {
        min-height: 22px;
        padding: 3px 7px;
        font-size: 10px;
    }

    .billing-table-wrap {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
        overflow-x: auto;
    }

    .billing-entry-list {
        min-width: 360px;
    }

    .billing-entry-list__head,
    .billing-entry-row {
        grid-template-columns: minmax(0, 1fr) 60px 50px 32px 54px 26px;
        gap: 4px;
        padding-left: 0;
        padding-right: 0;
    }

    .billing-entry-list__head {
        font-size: 11px;
        padding: 6px 0;
        letter-spacing: 0;
    }

    .billing-entry-list__head span:nth-child(2),
    .billing-entry-list__head span:nth-child(3),
    .billing-entry-list__head span:nth-child(4),
    .billing-entry-list__head span:nth-child(5) {
        overflow: visible;
        text-overflow: clip;
    }

    .billing-entry-list__head span:nth-child(5) {
        text-align: right;
    }

    .billing-entry-row {
        padding: 5px 0;
    }

    .billing-entry-row input {
        min-height: 34px;
        padding-top: 6px;
        padding-bottom: 6px;
        font-size: 13px;
    }

    .billing-product-cell input {
        padding-left: 8px;
        padding-right: 8px;
        text-align: left;
    }

    .billing-entry-row__amount {
        font-size: 11px;
        padding-right: 0;
    }

    .billing-row-remove {
        min-width: 22px;
        min-height: 22px;
        font-size: 16px;
        line-height: 1;
        padding: 0;
    }

    .billing-doc-field--labeled {
        min-height: 36px;
        padding: 0 10px 0 8px;
    }

    .billing-doc-field--labeled .billing-doc-field__input {
        min-height: 34px;
        font-size: 14px;
    }

    .billing-doc-field__label {
        font-size: 13px;
    }

    .billing-doc-card__type {
        min-height: 32px;
        font-size: 13px;
    }

    .billing-card--entry {
        padding: 10px;
    }

    .billing-card-title {
        font-size: 15px;
    }

    .billing-main {
        padding-bottom: calc(130px + env(safe-area-inset-bottom, 0));
    }

    .billing-main--has-cart {
        padding-bottom: calc(155px + env(safe-area-inset-bottom, 0));
    }

    .billing-cart-bar__checkout {
        min-width: 72px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .billing-footer__main {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .billing-footer__quote {
        flex-wrap: wrap;
        gap: 8px;
    }

    .billing-footer__quote-left {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
    }

    .billing-footer__quote-status {
        margin-top: 0;
        flex-shrink: 0;
    }

    .billing-quote-actions {
        width: 100%;
    }

    .billing-quote-actions__btns {
        width: 100%;
    }

    .billing-quote-actions__primary {
        flex: 1;
        min-width: 0;
    }

    .billing-footer__total {
        width: 100%;
        white-space: normal;
        font-size: 13px;
        line-height: 1.45;
    }

    .billing-footer__total strong {
        font-size: 16px;
    }

    .billing-actions--inline,
    .billing-actions--pair {
        flex: 1 1 100%;
        width: 100%;
        max-width: none;
        display: flex;
        gap: 8px;
    }

    .billing-actions--inline .billing-btn {
        flex: 1;
        min-width: 0;
        min-height: 44px;
        padding: 8px 10px;
        font-size: 14px;
    }

    .billing-footer--compact {
        padding: 8px 10px;
    }

    .billing-cart-sheet__actions {
        display: flex;
        gap: 8px;
    }

    .billing-cart-sheet__actions .billing-btn {
        flex: 1;
        min-width: 0;
        min-height: 44px;
    }

    .billing-cart-bar__actions {
        flex: 1;
        min-width: 0;
    }

    .billing-cart-bar__actions .billing-btn {
        flex: 1;
        min-width: 0;
        min-height: 44px;
        padding: 8px 10px;
        font-size: 14px;
    }

    .billing-brand {
        flex: 1;
        text-align: center;
        max-width: none;
    }

    .billing-card-head {
        flex-direction: row;
        align-items: center;
    }

    .billing-entry-head__row {
        flex-wrap: nowrap;
    }

    .billing-entry-mode__btn {
        padding: 4px 8px;
        font-size: 11px;
        min-height: 26px;
    }

    .billing-entry-tool {
        min-width: 26px;
        min-height: 26px;
        font-size: 16px;
    }

    .billing-card-head .billing-btn {
        width: auto;
        flex-shrink: 0;
    }

    .billing-catalog__body {
        height: calc(100dvh - 260px);
        min-height: 320px;
    }

    .billing-catalog__sidebar {
        width: 76px;
    }

    .billing-catalog__cats {
        width: auto;
    }

    .billing-catalog__cat {
        font-size: 12px;
        padding: 10px 4px;
    }
}

@media (min-width: 768px) {
    .billing-hold-fab {
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0));
    }

    .billing-hold-fab--above-footer {
        bottom: calc(80px + env(safe-area-inset-bottom, 0));
    }

    .billing-hold-fab--above-cart {
        bottom: calc(88px + env(safe-area-inset-bottom, 0));
    }

    .billing-main {
        padding-bottom: 32px;
    }

    .billing-catalog__body {
        height: 520px;
        max-height: none;
    }

    .billing-catalog__sidebar {
        width: 108px;
    }

    .billing-catalog__cats {
        width: auto;
    }
}

/* ── Unified admin blue/white theme overrides ── */
.billing-body .billing-meta-grid input,
.billing-body .billing-meta-grid select,
.billing-body .billing-meta-grid textarea,
.billing-body .billing-slim-select,
.billing-body .billing-table input,
.billing-body .billing-table textarea,
.billing-body .billing-table select {
    border: 1px solid var(--billing-border);
    border-radius: 4px;
    color: var(--billing-text);
    background: var(--billing-card);
}

.billing-body .billing-meta-grid input:focus,
.billing-body .billing-meta-grid select:focus,
.billing-body .billing-meta-grid textarea:focus,
.billing-body .billing-slim-select:focus,
.billing-body .billing-table input:focus,
.billing-body .billing-table textarea:focus,
.billing-body .billing-table select:focus {
    border-color: var(--billing-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.12);
}

.billing-body .billing-date-range__bar {
    border-color: var(--billing-border);
    background: var(--billing-card);
}

.billing-body .billing-date-range__bar:focus-within {
    border-color: var(--billing-primary);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.12);
}

.billing-body .billing-slim-bar--filter {
    border-bottom-color: var(--billing-border);
    background: rgba(255, 255, 255, 0.97);
}

.billing-body .billing-doc-card,
.billing-body .billing-modal,
.billing-body .billing-dropdown {
    border-color: var(--billing-border);
}

.billing-body .billing-history-item__sub,
.billing-body .billing-modal-hint,
.billing-body .billing-sync-hint,
.billing-body .billing-footer-extras .billing-quote-expire {
    color: var(--billing-muted);
}

.billing-body .billing-catalog__cat--active {
    color: var(--billing-primary);
    background: var(--billing-primary-soft);
    box-shadow: inset 3px 0 0 var(--billing-primary);
}

.billing-body .billing-catalog__sidebar,
.billing-body .billing-entry-mode,
.billing-body .billing-history-more__btn--open {
    border-color: var(--billing-border);
    background: var(--billing-bg);
}

.billing-body .billing-tag.billing-tag--checkout-doc,
.billing-body .billing-tag.billing-tag--quote,
.billing-body .billing-tag.billing-tag--quote-checkout {
    background: var(--billing-primary-soft);
    color: var(--billing-primary);
}

.billing-body .billing-tag.billing-tag--paid,
.billing-body .billing-payment-badge--paid {
    background: #f0f9eb;
    color: #67c23a;
}

.billing-body .billing-tag.billing-tag--partial,
.billing-body .billing-payment-badge--partial {
    background: #fdf6ec;
    color: #e6a23c;
}

.billing-body .billing-tag.billing-tag--debt {
    background: var(--billing-danger-soft);
    color: var(--billing-danger);
}

.billing-body .billing-history-more__menu {
    border-color: var(--billing-border);
}

.billing-body .billing-history-more__item {
    color: var(--billing-text);
}

.billing-body .billing-history-more__item:hover {
    background: var(--billing-primary-soft);
}

.billing-body .billing-history-more__item--danger {
    color: var(--billing-danger);
}

.billing-body .billing-payment-record__docno {
    color: var(--billing-text);
}

.billing-body .billing-payment-record__docno:hover {
    color: var(--billing-primary);
}

.billing-body a.billing-history-action--primary {
}

.billing-inquiry-meta {
  padding: 0 16px 12px;
  font-size: 14px;
  line-height: 1.7;
}

.billing-inquiry-meta--compact {
  padding-bottom: 8px;
}

.billing-inquiry-meta__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
}

.billing-inquiry-meta__sub {
  margin: 6px 0 0;
  font-size: 13px;
}

.billing-inquiry-name-hint {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 12px;
  line-height: 1.55;
  color: #92400e;
}

.billing-inquiry-banner {
  margin: 0 16px 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.55;
}

.billing-inquiry-banner--ref {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.billing-inquiry-banner--quote {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-weight: 600;
}

.billing-inquiry-banner--checkout {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1e40af;
  font-weight: 600;
}

.billing-inquiry-banner--done {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}

.billing-inquiry-linkbar {
  margin: 0 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.billing-inquiry-linkbar--primary {
  margin-bottom: 16px;
}

.billing-inquiry-linkbar__extra {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: center;
  font-size: 13px;
}

.billing-inquiry-table__price {
  width: 88px;
  min-width: 72px;
}

.billing-inquiry-table__note {
  margin-top: 6px;
  font-size: 12px;
}

.billing-inquiry-items__tip {
  margin: 8px 0 0;
  font-size: 12px;
}

.billing-inquiry-items {
  padding: 0 16px 16px;
  overflow: auto;
}

.billing-inquiry-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 16px;
}

.billing-inquiry-actions__quote {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.billing-inquiry-flow-hint {
  margin: 0 16px 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-size: 13px;
  line-height: 1.6;
}

.billing-inquiry-flow-hint strong {
  display: block;
  margin-bottom: 4px;
}

.billing-inquiry-steps {
  margin: 0 16px 12px;
  padding: 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.billing-inquiry-steps__track {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.billing-inquiry-steps__item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 52px;
  flex-shrink: 0;
  color: #94a3b8;
}

.billing-inquiry-steps__dot {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  color: #64748b;
}

.billing-inquiry-steps__label {
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.billing-inquiry-steps__sep {
  color: #cbd5e1;
  font-size: 14px;
  flex-shrink: 0;
  margin: 0 1px;
  transform: translateY(-8px);
}

.billing-inquiry-steps__item.is-active {
  color: #1d4ed8;
}

.billing-inquiry-steps__item.is-active .billing-inquiry-steps__dot {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.billing-inquiry-steps__item.is-done {
  color: #0f766e;
}

.billing-inquiry-steps__item.is-done .billing-inquiry-steps__dot {
  background: #14b8a6;
  color: #fff;
}

.billing-inquiry-steps__item.is-skipped {
  opacity: 0.45;
}

.billing-inquiry-steps__hint {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: #475569;
}

.billing-inquiry-share {
  margin: 0 16px 16px;
  padding: 12px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.billing-inquiry-share--compact {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.billing-inquiry-share--primary {
  background: #ecfdf5;
  border-color: #6ee7b7;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
}

.billing-inquiry-share__label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.billing-inquiry-share__row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.billing-inquiry-share__row .fm-input {
  flex: 1;
  min-width: 180px;
}

.billing-inquiry-ref-hint {
  margin: 0 16px 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}

.billing-inquiry-ref-hint--warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.billing-inquiry-ref-list {
  margin: 0 16px 16px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}

.billing-inquiry-ref-list__title {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 8px;
}

.billing-inquiry-ref-list__items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.billing-inquiry-ref-list__items li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.6;
  padding: 6px 0;
  border-top: 1px solid #e2e8f0;
}

.billing-inquiry-ref-list__items li:first-child {
  border-top: 0;
  padding-top: 0;
}

.billing-sale-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}

.billing-sale-tag--reference {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.billing-inquiry-row--reference td {
  background: #fafafa;
}

.billing-inquiry-row--reference td:first-child {
  box-shadow: inset 3px 0 0 #94a3b8;
}

.billing-inquiry-page .billing-card-head {
  margin-bottom: 4px;
}

.billing-inquiry-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 10px;
  padding: 0 2px;
}

.billing-inquiry-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.billing-inquiry-tab:active {
  transform: scale(0.98);
}

.billing-inquiry-tab__label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.2;
}

.billing-inquiry-tab__count {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.1;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.billing-inquiry-tab--pending {
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
  border-color: #bfdbfe;
}

.billing-inquiry-tab--pending .billing-inquiry-tab__count {
  color: #2563eb;
}

.billing-inquiry-tab--quoted {
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
  border-color: #a7f3d0;
}

.billing-inquiry-tab--quoted .billing-inquiry-tab__count {
  color: #059669;
}

.billing-inquiry-tab--closed {
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-color: #e2e8f0;
}

.billing-inquiry-tab--all {
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
  border-color: #e5e7eb;
}

.billing-inquiry-tab.is-active {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18), 0 2px 8px rgba(37, 99, 235, 0.12);
}

.billing-inquiry-tab--pending.is-active {
  border-color: #60a5fa;
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
}

.billing-inquiry-tab--quoted.is-active {
  border-color: #34d399;
  background: linear-gradient(180deg, #d1fae5 0%, #ecfdf5 100%);
}

.billing-inquiry-tab--closed.is-active {
  border-color: #94a3b8;
  background: linear-gradient(180deg, #e2e8f0 0%, #f8fafc 100%);
}

.billing-inquiry-tab--all.is-active {
  border-color: #64748b;
  background: linear-gradient(180deg, #e2e8f0 0%, #f8fafc 100%);
}

.billing-inquiry-tab.has-count:not(.is-active) .billing-inquiry-tab__count {
  color: inherit;
}

.billing-inquiry-card--pending {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.billing-inquiry-card--pending .billing-order-card__type {
  color: #2563eb;
  background: #dbeafe;
}

.billing-inquiry-card--quoted {
  border-color: #a7f3d0;
}

.billing-inquiry-card--quoted .billing-order-card__type {
  color: #059669;
  background: #d1fae5;
}

.billing-inquiry-card--closed {
  opacity: 0.82;
}

.billing-inquiry-card--closed .billing-order-card__type {
  color: #64748b;
  background: #f1f5f9;
}

.billing-inquiry-card__count {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}

.billing-inquiry-card--pending .billing-inquiry-card__count {
  color: #2563eb;
}

.billing-inquiry-loading,
.billing-inquiry-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--billing-muted);
  font-size: 14px;
}

.billing-inquiry-empty p {
  margin: 0;
}

.inquiry-share-page .quote-share-hero__meta {
  align-items: center;
}

.inquiry-share-status-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.inquiry-share-status-tag--pending {
  background: #fef3c7;
  color: #92400e;
}

.inquiry-share-status-tag--quoted {
  background: #dbeafe;
  color: #1d4ed8;
}

.inquiry-share-status-tag--closed {
  background: #f3f4f6;
  color: #4b5563;
}

.inquiry-share-steps {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 16px;
}

.inquiry-share-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  min-width: 0;
}

.inquiry-share-step__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e5e7eb;
  border: 2px solid #d1d5db;
}

.inquiry-share-step__label {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.3;
}

.inquiry-share-step--done .inquiry-share-step__dot {
  background: #16a34a;
  border-color: #16a34a;
}

.inquiry-share-step--done .inquiry-share-step__label {
  color: #166534;
  font-weight: 600;
}

.inquiry-share-step--active .inquiry-share-step__dot {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.inquiry-share-step--active .inquiry-share-step__label {
  color: #1d4ed8;
  font-weight: 600;
}

.inquiry-share-step--skipped .inquiry-share-step__dot {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.inquiry-share-step--skipped .inquiry-share-step__label {
  color: #9ca3af;
}

.inquiry-share-hint p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
}

.inquiry-share-item__pending {
  color: #9ca3af;
  font-size: 13px;
}

.inquiry-share-contact p {
  margin: 0 0 6px;
  font-size: 13px;
}

.inquiry-share-contact p:last-child {
  margin-bottom: 0;
}

.wf-inquiry-success-share {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.wf-inquiry-success-share__label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.wf-inquiry-success-share__row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.wf-inquiry-success-share__row .fm-input {
  flex: 1;
  min-width: 0;
  font-size: 12px;
}

/* ── 我的 ── */
.billing-mine {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.billing-mine__profile {
  display: flex;
  align-items: center;
  gap: 14px;
    padding: 18px 16px;
}

.billing-mine__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
    background: linear-gradient(135deg, #409eff, #2563eb);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.billing-mine__name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.billing-mine__role {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--billing-muted);
}

.billing-mine__section-title {
    margin: 0 0 4px;
    padding: 0 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--billing-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.billing-mine__menu {
    padding: 8px 0;
}

.billing-mine__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid var(--billing-border);
}

.billing-mine__menu .billing-mine__item:last-child {
    border-bottom: none;
}

.billing-mine__item:active {
    background: var(--billing-bg);
}

.billing-mine__item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.billing-mine__item-icon svg {
    width: 22px;
    height: 22px;
}

.billing-mine__item-icon--customer { background: #eff6ff; color: #2563eb; }
.billing-mine__item-icon--stocktake { background: #f0fdf4; color: #16a34a; }
.billing-mine__item-icon--admin { background: #faf5ff; color: #9333ea; }
.billing-mine__item-icon--logout { background: #fef2f2; color: #dc2626; }

.billing-mine__item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.billing-mine__item-body strong {
    font-size: 15px;
    font-weight: 600;
}

.billing-mine__item-desc {
    font-size: 12px;
    color: var(--billing-muted);
}

.billing-mine__item-arrow {
    color: var(--billing-muted);
    font-size: 20px;
    line-height: 1;
}

.billing-mine__item-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

.billing-stocktake-list__body {
    padding: 8px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.billing-stocktake-list__body.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.billing-stocktake-empty {
    text-align: center;
    padding: 32px 16px;
}

.billing-stocktake-card {
    display: block;
    padding: 14px;
    border: 1px solid var(--billing-border);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    background: var(--billing-card);
}

.billing-stocktake-card:active {
    background: var(--billing-bg);
}

.billing-stocktake-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.billing-stocktake-card__status {
    font-size: 12px;
    color: var(--billing-primary);
    font-weight: 600;
}

.billing-stocktake-card__progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--billing-muted);
}

.billing-stocktake-card__bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.billing-stocktake-card__bar span {
    display: block;
    height: 100%;
    background: var(--billing-primary);
    border-radius: 999px;
}

.billing-stocktake-reject {
    margin: 0 0 12px;
    padding: 10px 12px;
    background: #fef2f2;
    color: #b91c1c;
    border-radius: 8px;
    font-size: 13px;
}

.billing-stocktake-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 240px;
    overflow: auto;
}

.billing-stocktake-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--billing-border);
    border-radius: 8px;
    font-size: 13px;
}

.billing-stocktake-item.is-done {
    background: #f9fafb;
}

.billing-stocktake-card__hint {
    margin: 8px 0 0;
    font-size: 12px;
}

.billing-stocktake-submit {
    margin-top: 16px;
}

.po-btn--block {
    width: 100%;
    justify-content: center;
}

.billing-customers-wrap .billing-card-head {
    margin-bottom: 0;
}

.billing-recharge-quick {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.billing-recharge-quick button {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 0;
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.billing-recharge-quick button:active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: var(--billing-primary, #2563eb);
}

/* ── 手机端客户管理（紧凑） ── */
.billing-main--cu-mobile {
    max-width: none;
    margin: 0;
    padding: 0;
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0));
    background: #f5f6f8;
    min-height: calc(100dvh - 44px);
}

.cu-mobile-page {
    display: flex;
    flex-direction: column;
}

.cu-mobile-top {
    position: sticky;
    top: calc(44px + env(safe-area-inset-top, 0));
    z-index: 40;
    background: #fff;
    border-bottom: 1px solid #eceef2;
}

.cu-mobile-nav {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
}

.cu-mobile-nav__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #475569;
    text-decoration: none;
}

.cu-mobile-nav__back svg {
    width: 20px;
    height: 20px;
}

.cu-mobile-nav__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cu-mobile-nav__action {
    border: 0;
    background: transparent;
    color: var(--billing-primary, #2563eb);
    font-size: 13px;
    font-weight: 600;
    padding: 4px 2px;
    white-space: nowrap;
}

.cu-mobile-toolbar {
    padding: 0 10px 8px;
}

.cu-mobile-search {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 4px 0 10px;
    border-radius: 8px;
    background: #f5f6f8;
    border: 1px solid #e5e7eb;
}

.cu-mobile-search__icon {
    width: 16px;
    height: 16px;
    color: #94a3b8;
    flex-shrink: 0;
}

.cu-mobile-search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    font-size: 14px;
    color: #0f172a;
    outline: none;
}

.cu-mobile-search__input::placeholder {
    color: #94a3b8;
}

.cu-mobile-search__btn {
    flex-shrink: 0;
    border: 0;
    border-radius: 6px;
    padding: 6px 12px;
    background: var(--billing-primary, #2563eb);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.cu-mobile-search__btn:disabled {
    opacity: 0.55;
}

.cu-mobile-summary {
    margin: 6px 2px 0;
    font-size: 11px;
    color: #94a3b8;
}

.cu-mobile-body {
    flex: 1;
    padding: 8px 10px 12px;
}

.cu-mobile-body.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.cu-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cu-mobile-empty {
    margin: 32px 0;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

.cu-mobile-card {
    border-radius: 10px;
    background: #fff;
    border: 1px solid #eceef2;
    overflow: hidden;
}

.cu-mobile-card.has-debt {
    border-color: #fecaca;
}

.cu-mobile-card__head {
    display: flex;
    gap: 10px;
    padding: 10px 10px 8px;
}

.cu-mobile-card__avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--billing-primary, #2563eb);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cu-mobile-card.has-debt .cu-mobile-card__avatar {
    background: #fef2f2;
    color: #dc2626;
}

.cu-mobile-card__info {
    flex: 1;
    min-width: 0;
}

.cu-mobile-card__row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 2px;
}

.cu-mobile-card__name {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cu-mobile-card__badge {
    flex-shrink: 0;
    padding: 1px 6px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--billing-primary, #2563eb);
    font-size: 10px;
    font-weight: 600;
}

.cu-mobile-card__debt {
    flex-shrink: 0;
    padding: 1px 6px;
    border-radius: 999px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 10px;
    font-weight: 700;
}

.cu-mobile-card__balance {
    flex-shrink: 0;
    padding: 1px 6px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 10px;
    font-weight: 600;
}

.cu-mobile-card__sub {
    margin: 0 0 2px;
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cu-mobile-card__sub.is-muted {
    color: #94a3b8;
}

.cu-mobile-card__meta {
    margin: 0;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cu-mobile-card__bar {
    display: flex;
    align-items: stretch;
    height: 34px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}

.cu-mobile-card__link {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0 2px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    text-align: center;
    text-decoration: none;
    line-height: 34px;
    -webkit-tap-highlight-color: transparent;
}

.cu-mobile-card__link.is-primary {
    color: var(--billing-primary, #2563eb);
    font-weight: 600;
}

.cu-mobile-card__link.is-accent {
    color: #059669;
    font-weight: 600;
}

.cu-mobile-card__link:active {
    background: #f1f5f9;
}

.cu-mobile-card__sep {
    flex-shrink: 0;
    width: 1px;
    align-self: center;
    height: 14px;
    background: #e2e8f0;
}

.cu-mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: stBackdropIn 0.2s ease;
}

.cu-mobile-menu {
    width: 100%;
    max-width: 480px;
    padding: 4px 12px calc(10px + env(safe-area-inset-bottom, 0));
    border-radius: 14px 14px 0 0;
    background: #fff;
    animation: stSheetIn 0.26s cubic-bezier(0.32, 0.72, 0, 1);
}

.cu-mobile-menu__handle {
    width: 36px;
    height: 4px;
    margin: 6px auto 10px;
    border-radius: 999px;
    background: #e2e8f0;
}

.cu-mobile-menu__title {
    margin: 0 0 8px;
    padding: 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
}

.cu-mobile-menu__item {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 4px;
    background: #f8fafc;
    color: #334155;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}

.cu-mobile-menu__item.is-danger {
    background: #fef2f2;
    color: #dc2626;
}

.cu-mobile-menu__item:active {
    opacity: 0.85;
}

.cu-mobile-menu__cancel {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 12px;
    margin-top: 4px;
    background: transparent;
    color: #64748b;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}

.cu-mobile-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    padding: 8px 0;
}

.cu-mobile-pagination__btn {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 7px 14px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
}

.cu-mobile-pagination__btn:disabled {
    opacity: 0.45;
}

.cu-mobile-pagination__info {
    font-size: 12px;
    color: #94a3b8;
}

@media (min-width: 769px) {
    .billing-main--cu-mobile {
        max-width: 480px;
        margin: 0 auto;
        border-left: 1px solid #e8ebf0;
        border-right: 1px solid #e8ebf0;
    }
}

/* ── 手机端盘点执行页（紧凑） ── */
.billing-main--st-mobile {
    max-width: none;
    margin: 0;
    padding: 0;
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0));
    background: #f5f6f8;
    min-height: calc(100dvh - 44px);
}

.st-mobile-page {
    display: flex;
    flex-direction: column;
}

.st-mobile-top {
    position: sticky;
    top: calc(44px + env(safe-area-inset-top, 0));
    z-index: 40;
    background: #fff;
    border-bottom: 1px solid #eceef2;
}

.st-mobile-nav {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
}

.st-mobile-nav__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #475569;
    text-decoration: none;
}

.st-mobile-nav__back svg {
    width: 20px;
    height: 20px;
}

.st-mobile-nav__center {
    min-width: 0;
    text-align: center;
}

.st-mobile-nav > .st-mobile-nav__title {
    min-width: 0;
    text-align: center;
}

.st-mobile-nav__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.st-mobile-nav__sub {
    margin: 2px 0 0;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.2;
}

.st-mobile-nav__tag {
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 4px;
    background: #fef3c7;
    color: #b45309;
    font-size: 10px;
    font-weight: 600;
}

.st-mobile-nav__action {
    border: 0;
    background: transparent;
    color: var(--billing-primary, #2563eb);
    font-size: 13px;
    padding: 4px 2px;
}

.st-mobile-reject {
    margin: 0;
    padding: 6px 10px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 12px;
}

.st-mobile-start {
    margin: 12px;
    padding: 14px;
    border-radius: 10px;
    background: #fff;
    text-align: center;
}

.st-mobile-start__text {
    margin: 0 0 10px;
    font-size: 13px;
    color: #64748b;
}

.st-mobile-start__btn {
    width: 100%;
    border: 0;
    border-radius: 8px;
    padding: 10px;
    background: var(--billing-primary, #2563eb);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.st-mobile-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.st-mobile-toolbar {
    position: sticky;
    top: calc(44px + 38px + env(safe-area-inset-top, 0));
    z-index: 35;
    padding: 6px 10px;
    background: #f5f6f8;
}

.st-mobile-search {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    height: 36px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.st-mobile-search__icon {
    width: 16px;
    height: 16px;
    color: #94a3b8;
    flex-shrink: 0;
}

.st-mobile-search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    font-size: 14px;
    color: #0f172a;
    outline: none;
}

.st-mobile-search__input::placeholder {
    color: #94a3b8;
}

.st-mobile-search__scan {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.st-mobile-search__scan svg {
    width: 18px;
    height: 18px;
}

.st-mobile-search__scan.is-on {
    background: var(--billing-primary, #2563eb);
    color: #fff;
}

.st-mobile-search__scan:disabled {
    opacity: 0.35;
}

.st-mobile-suggest {
    position: absolute;
    left: 10px;
    right: 10px;
    top: calc(100% + 2px);
    z-index: 45;
    max-height: 180px;
    overflow: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.st-mobile-suggest__loading {
    margin: 0;
    padding: 8px 10px;
    font-size: 12px;
    color: #94a3b8;
}

.st-mobile-suggest__item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    text-align: left;
}

.st-mobile-suggest__item:last-child {
    border-bottom: 0;
}

.st-mobile-suggest__name {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.st-mobile-suggest__meta {
    font-size: 11px;
    color: #94a3b8;
}

.st-mobile-camera {
    position: relative;
    margin: 0 10px 6px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.st-mobile-camera__view {
    width: 100%;
    height: 112px;
    overflow: hidden;
}

.st-mobile-camera__view video,
.st-mobile-camera__view canvas,
.st-mobile-camera__view img {
    width: 100% !important;
    height: 112px !important;
    object-fit: cover;
    display: block;
}

.st-mobile-camera__view > div {
    width: 100% !important;
}

.st-mobile-camera__close {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    border: 0;
    border-radius: 999px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
}

.st-mobile-toast {
    position: fixed;
    top: calc(52px + env(safe-area-inset-top, 0));
    left: 50%;
    transform: translateX(-50%);
    z-index: 120;
    margin: 0;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    max-width: calc(100vw - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    animation: stToastIn 0.2s ease;
}

@keyframes stToastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.st-mobile-toast.is-ok {
    background: #ecfdf5;
    color: #047857;
}

.st-mobile-toast.is-err {
    background: #fef2f2;
    color: #b91c1c;
}

.st-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 10px 8px;
}

.st-mobile-list__empty {
    margin: 16px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

.st-mobile-card {
    display: grid;
    grid-template-columns: 44px 1fr 16px;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #eceef2;
}

.st-mobile-card.is-done {
    background: #fafafa;
}

.st-mobile-card.is-active {
    border-color: #93c5fd;
    background: #f8fbff;
}

.st-mobile-card__thumb {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: #f1f5f9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
}

.st-mobile-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.st-mobile-card__thumb svg {
    width: 20px;
    height: 20px;
}

.st-mobile-card__body {
    min-width: 0;
}

.st-mobile-card__row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.st-mobile-card__name {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.st-mobile-card__badge {
    flex-shrink: 0;
    padding: 1px 6px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.st-mobile-card__badge.is-done {
    background: #ecfdf5;
    color: #047857;
}

.st-mobile-card__meta {
    margin: 0;
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.st-mobile-card__arrow {
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1;
}

.st-mobile-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: stBackdropIn 0.2s ease;
}

@keyframes stBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.st-mobile-sheet {
    width: 100%;
    max-width: 480px;
    padding: 4px 14px calc(10px + env(safe-area-inset-bottom, 0));
    border-radius: 16px 16px 0 0;
    background: #fff;
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.12);
    animation: stSheetIn 0.26s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes stSheetIn {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.st-mobile-sheet__handle {
    width: 36px;
    height: 4px;
    margin: 6px auto 8px;
    border-radius: 999px;
    background: #e2e8f0;
}

.st-mobile-sheet__head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.st-mobile-sheet__product {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.st-mobile-sheet__thumb {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f1f5f9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
}

.st-mobile-sheet__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.st-mobile-sheet__thumb svg {
    width: 22px;
    height: 22px;
}

.st-mobile-sheet__info {
    min-width: 0;
}

.st-mobile-sheet__title {
    margin: 0 0 2px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.st-mobile-sheet__meta {
    margin: 0;
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.st-mobile-sheet__close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.st-mobile-sheet__compare {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.st-mobile-sheet__book-pill {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
}

.st-mobile-sheet__book-label {
    font-size: 11px;
    color: #94a3b8;
}

.st-mobile-sheet__book-pill strong {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.st-mobile-sheet__diff {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.st-mobile-sheet__diff.is-flat {
    background: #ecfdf5;
    color: #047857;
}

.st-mobile-sheet__diff.is-up {
    background: #fef3c7;
    color: #b45309;
}

.st-mobile-sheet__diff.is-down {
    background: #fee2e2;
    color: #b91c1c;
}

.st-mobile-sheet__qty-block {
    margin-bottom: 12px;
}

.st-mobile-sheet__qty-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.st-mobile-sheet__qty-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.st-mobile-sheet__step {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.st-mobile-sheet__step:active {
    background: #f1f5f9;
}

.st-mobile-sheet__input {
    flex: 1;
    min-width: 0;
    height: 52px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0 8px;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    color: #0f172a;
    background: #fff;
    outline: none;
    -moz-appearance: textfield;
}

.st-mobile-sheet__input::-webkit-outer-spin-button,
.st-mobile-sheet__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.st-mobile-sheet__input:focus {
    border-color: var(--billing-primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.st-mobile-sheet__quick {
    display: flex;
    gap: 8px;
}

.st-mobile-sheet__quick button {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 7px 0;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
}

.st-mobile-sheet__quick button:active {
    background: #f8fafc;
}

.st-mobile-sheet__actions {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid #f1f5f9;
}

.st-mobile-sheet__cancel,
.st-mobile-sheet__save {
    border: 0;
    border-radius: 10px;
    padding: 11px 0;
    font-size: 15px;
    font-weight: 600;
}

.st-mobile-sheet__cancel {
    background: #f1f5f9;
    color: #475569;
}

.st-mobile-sheet__save {
    background: var(--billing-primary, #2563eb);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.st-mobile-sheet__save:disabled {
    opacity: 0.55;
    box-shadow: none;
}

/* ── 暂存 / 提交确认弹窗 ── */
.st-mobile-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px calc(72px + env(safe-area-inset-bottom, 0));
    background: rgba(15, 23, 42, 0.45);
    animation: stBackdropIn 0.2s ease;
}

.st-mobile-dialog {
    width: 100%;
    max-width: 320px;
    padding: 18px 16px 14px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
    animation: stDialogIn 0.22s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes stDialogIn {
    from { opacity: 0; transform: scale(0.94) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.st-mobile-dialog.is-warn .st-mobile-dialog__confirm {
    background: #ea580c;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
}

.st-mobile-dialog__icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.st-mobile-dialog__icon svg {
    width: 24px;
    height: 24px;
}

.st-mobile-dialog__icon.is-draft {
    background: #eff6ff;
    color: var(--billing-primary, #2563eb);
}

.st-mobile-dialog__icon.is-submit {
    background: #ecfdf5;
    color: #047857;
}

.st-mobile-dialog.is-warn .st-mobile-dialog__icon.is-submit {
    background: #fff7ed;
    color: #ea580c;
}

.st-mobile-dialog__title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    line-height: 1.35;
}

.st-mobile-dialog__stats {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.st-mobile-dialog__stat {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: 13px;
    color: #64748b;
}

.st-mobile-dialog__stat em {
    font-style: normal;
    font-size: 11px;
    color: #94a3b8;
}

.st-mobile-dialog__stat strong {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.st-mobile-dialog__stat-div {
    color: #cbd5e1;
    font-size: 16px;
    font-weight: 300;
}

.st-mobile-dialog__stat-pending {
    margin-left: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    font-size: 11px;
    font-weight: 600;
}

.st-mobile-dialog__hint {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
    text-align: center;
}

.st-mobile-dialog__actions {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 8px;
}

.st-mobile-dialog__cancel,
.st-mobile-dialog__confirm {
    border: 0;
    border-radius: 10px;
    padding: 11px 0;
    font-size: 15px;
    font-weight: 600;
}

.st-mobile-dialog__cancel {
    background: #f1f5f9;
    color: #475569;
}

.st-mobile-dialog__confirm {
    background: var(--billing-primary, #2563eb);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.st-mobile-dialog__cancel:disabled,
.st-mobile-dialog__confirm:disabled {
    opacity: 0.55;
}

.st-mobile-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(52px + env(safe-area-inset-bottom, 0));
    z-index: 50;
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    background: #fff;
    border-top: 1px solid #eceef2;
}

.st-mobile-footer__draft {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 9px 0;
    background: #fff;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
}

.st-mobile-footer__submit {
    flex: 1.2;
    border: 0;
    border-radius: 8px;
    padding: 9px 0;
    background: var(--billing-primary, #2563eb);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.st-mobile-footer__submit:disabled,
.st-mobile-footer__draft:disabled {
    opacity: 0.55;
}

.st-scan-actions--footer {
    position: sticky;
    bottom: 0;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 12px;
    background: #fff;
}

.st-scan-actions--footer .po-btn--primary {
    min-width: 120px;
}

@media (min-width: 769px) {
    .billing-main--st-mobile {
        max-width: 480px;
        margin: 0 auto;
        border-left: 1px solid #e8ebf0;
        border-right: 1px solid #e8ebf0;
    }

    .st-mobile-footer {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ── 新建盘点计划（手机） ── */
.st-plan-create__intro {
    margin: 0;
    padding: 0 10px 8px;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
}

.st-plan-create__body {
    padding: 0 12px 100px;
}

.st-plan-create__body.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.st-plan-create__section {
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #eef2f7;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.st-plan-create__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.st-plan-create__section-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.st-plan-create__section-head span {
    font-size: 12px;
    color: #64748b;
}

.st-plan-create__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.st-plan-create__field:last-of-type {
    margin-bottom: 0;
}

.st-plan-create__field > span {
    font-size: 13px;
    color: #64748b;
}

.st-plan-create__input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 15px;
    color: #0f172a;
    background: #fff;
    outline: none;
}

.st-plan-create__input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.st-plan-create__check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 14px;
    color: #334155;
}

.st-plan-create__hint {
    margin: 10px 0 0;
    font-size: 13px;
    color: #64748b;
}

.st-plan-create__users {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.st-plan-create__user {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    text-align: left;
    cursor: pointer;
}

.st-plan-create__user.is-selected {
    border-color: #93c5fd;
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.st-plan-create__user-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.st-plan-create__user-role {
    font-size: 12px;
    color: #94a3b8;
}

.st-plan-create__footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(52px + env(safe-area-inset-bottom, 0));
    z-index: 50;
    padding: 10px 12px 12px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e8ebf0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.st-plan-create__submit {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 14px 16px;
    background: var(--billing-primary, #2563eb);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.st-plan-create__submit:disabled {
    opacity: 0.6;
}

.st-plan-create__admin-link {
    text-align: center;
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
}

@media (min-width: 769px) {
    .st-plan-create__footer {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }
}

