/* ============================================================================
   ButcherPOS design system
   Oxblood × butcher-paper. Light and dark, responsive, print-ready.
   ========================================================================== */

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

:root {
    --bt-brand: #8a1c2b;
    --bt-brand-2: #c2703d;
    --bt-brand-lift: #8a1c2b;
    --bt-bg: #f7f3ed;
    --bt-bg-2: #efe7dc;
    --bt-panel: #fffdf9;
    --bt-panel-2: #fbf7f1;
    --bt-side: #1b1012;
    --bt-side-2: #241417;
    --bt-ink: #241a17;
    --bt-ink-2: #5d4b45;
    --bt-ink-3: #8d7b73;
    --bt-line: #e7ddd1;
    --bt-line-2: #f0e8dd;
    --bt-ok: #2c7a5a;
    --bt-ok-bg: #e4f2ea;
    --bt-warn: #a86412;
    --bt-warn-bg: #fbf0dc;
    --bt-danger: #a1262b;
    --bt-danger-bg: #fbe7e6;
    --bt-info: #3a6ca6;
    --bt-info-bg: #e7eefa;
    --bt-shadow: 0 1px 2px rgba(38, 22, 18, .05), 0 12px 30px -18px rgba(38, 22, 18, .28);
    --bt-shadow-lg: 0 30px 70px -30px rgba(24, 11, 13, .45);
    --bt-r: 16px;
    --bt-r-sm: 10px;
    --bt-side-w: 248px;
    --bt-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --bt-display: 'Bricolage Grotesque', 'Inter', sans-serif;
    --bt-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
    --bt-bg: #120c0d;
    --bt-bg-2: #190f11;
    --bt-panel: #1c1315;
    --bt-panel-2: #211619;
    --bt-side: #0e0708;
    --bt-side-2: #1a0f11;
    --bt-ink: #f6efe8;
    --bt-ink-2: #c9b7b0;
    --bt-ink-3: #99847d;
    --bt-line: #352629;
    --bt-line-2: #2a1d20;
    --bt-ok: #62c196;
    --bt-ok-bg: #14301f;
    --bt-warn: #e0a349;
    --bt-warn-bg: #33220c;
    --bt-danger: #ee7d80;
    --bt-danger-bg: #3a1518;
    --bt-info: #85b1e6;
    --bt-info-bg: #122539;
    --bt-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -24px rgba(0, 0, 0, .7);
    --bt-shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, .8);
    --bt-brand-lift: color-mix(in srgb, var(--bt-brand) 68%, #ffd9d2);
}

html,
body {
    height: 100%;
}

body.bt-body {
    margin: 0;
    font-family: var(--bt-font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--bt-ink);
    background: var(--bt-bg);
    background-image:
        radial-gradient(1100px 520px at 82% -10%, color-mix(in srgb, var(--bt-brand) 7%, transparent), transparent 70%),
        radial-gradient(800px 420px at -5% 110%, color-mix(in srgb, var(--bt-brand-2) 8%, transparent), transparent 70%);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5 {
    margin: 0;
    font-family: var(--bt-display);
    letter-spacing: -.015em;
    font-weight: 700;
}

p {
    margin: 0;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

a {
    color: var(--bt-brand);
}

img {
    max-width: 100%;
    display: block;
}

.bt-muted {
    color: var(--bt-ink-3);
    font-size: .78rem;
}

.bt-mono {
    font-family: var(--bt-mono);
    font-size: .8rem;
    letter-spacing: -.02em;
}

.bt-right {
    text-align: right;
}

.bt-nowrap {
    white-space: nowrap;
}

.bt-spacer {
    flex: 1 1 auto;
}

.bt-h4 {
    font-family: var(--bt-display);
    font-size: .86rem;
    margin: 16px 0 8px;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--bt-ink-3);
}

.bt-divider {
    height: 1px;
    background: var(--bt-line);
    margin: 14px 0;
}

.is-danger {
    color: var(--bt-danger) !important;
}

.is-warn {
    color: var(--bt-warn) !important;
}

.is-ok {
    color: var(--bt-ok) !important;
}

.bt-spin {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: -2px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    animation: bt-spin .7s linear infinite;
}

@keyframes bt-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================== BOOT / NOSCRIPT ============================== */

.bt-boot {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 24px;
}

.bt-boot__mark {
    width: 78px;
    height: 78px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, var(--bt-brand), color-mix(in srgb, var(--bt-brand) 55%, #2a1013));
    box-shadow: var(--bt-shadow-lg);
    margin-bottom: 12px;
}

.bt-boot h1 {
    font-size: 1.5rem;
}

.bt-boot p {
    color: var(--bt-ink-3);
    font-size: .85rem;
}

.bt-boot__spin {
    margin-top: 16px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--bt-brand) 30%, transparent);
    border-top-color: var(--bt-brand);
    animation: bt-spin .8s linear infinite;
}

.bt-noscript {
    max-width: 420px;
    margin: 18vh auto;
    padding: 26px;
    border: 1px solid var(--bt-line);
    border-radius: var(--bt-r);
    background: var(--bt-panel);
    text-align: center;
}

.bt-noscript h2 {
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.bt-noscript p {
    color: var(--bt-ink-2);
}

/* ============================== SHELL ============================== */

.bt-shell {
    display: grid;
    grid-template-columns: var(--bt-side-w) minmax(0, 1fr);
    min-height: 100vh;
}

.bt-side {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(500px 260px at 20% -10%, color-mix(in srgb, var(--bt-brand) 55%, transparent), transparent 75%),
        linear-gradient(180deg, var(--bt-side), var(--bt-side-2));
    color: #f3e9e2;
    padding: 18px 14px 14px;
    z-index: 40;
    border-right: 1px solid rgba(255, 255, 255, .04);
}

.bt-side__brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px 8px 18px;
}

.bt-side__logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex: none;
    background: rgba(255, 255, 255, .09);
    color: #ffd9d2;
    border: 1px solid rgba(255, 255, 255, .1);
}

.bt-side__brand strong {
    display: block;
    font-family: var(--bt-display);
    font-size: 1.05rem;
    letter-spacing: -.02em;
}

.bt-side__brand small {
    display: block;
    color: rgba(243, 233, 226, .55);
    font-size: .68rem;
    letter-spacing: .02em;
}

.bt-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 2px 0 8px;
    scrollbar-width: thin;
}

.bt-nav__group {
    padding: 8px 0 4px;
}

.bt-nav__label {
    display: block;
    padding: 0 10px 6px;
    font-size: .62rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(243, 233, 226, .38);
    font-weight: 600;
}

.bt-nav__link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    margin: 1px 0;
    background: none;
    border: 0;
    border-radius: 10px;
    color: rgba(243, 233, 226, .72);
    font-size: .82rem;
    font-weight: 500;
    text-align: left;
    transition: background .16s, color .16s, transform .16s;
}

.bt-nav__link svg {
    flex: none;
    opacity: .8;
}

.bt-nav__link:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.bt-nav__link.is-active {
    background: linear-gradient(90deg, color-mix(in srgb, var(--bt-brand) 85%, black), color-mix(in srgb, var(--bt-brand) 55%, transparent));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.bt-nav__link.is-active svg {
    opacity: 1;
}

.bt-nav__dot {
    margin-left: auto;
    font-style: normal;
    font-size: .62rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #e8b04b;
    color: #2a1a05;
    padding: 0 5px;
}

.bt-side__foot {
    border-top: 1px solid rgba(255, 255, 255, .07);
    padding-top: 10px;
}

.bt-shopswitch {
    padding: 0 4px 8px;
}

.bt-shopswitch label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .64rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(243, 233, 226, .45);
    margin-bottom: 4px;
}

.bt-shopswitch .bt-select {
    width: 100%;
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .12);
    color: #fff;
}

.bt-shopswitch .bt-select option {
    color: #241a17;
}

.bt-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
}

.bt-user>div {
    min-width: 0;
}

.bt-user strong {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bt-user small {
    display: block;
    font-size: .66rem;
    color: rgba(243, 233, 226, .5);
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bt-user .bt-iconbtn {
    margin-left: auto;
    color: rgba(243, 233, 226, .65);
}

.bt-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex: none;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #c2703d, #8a1c2b);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
}

.bt-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.bt-top {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 26px;
    border-bottom: 1px solid var(--bt-line);
    background: color-mix(in srgb, var(--bt-bg) 82%, transparent);
    backdrop-filter: blur(14px);
}

.bt-top__menu {
    display: none;
}

.bt-top__title {
    min-width: 0;
}

.bt-top__title h1 {
    font-size: 1.22rem;
    line-height: 1.2;
}

.bt-top__title span {
    display: block;
    font-size: .72rem;
    color: var(--bt-ink-3);
    margin-top: 2px;
}

.bt-top__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.bt-content {
    padding: 22px 26px 40px;
    max-width: 1560px;
    width: 100%;
    margin: 0 auto;
}

.bt-scrim {
    display: none;
}

/* ============================== BUTTONS / INPUTS ============================== */

.bt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: var(--bt-r-sm);
    border: 1px solid var(--bt-line);
    background: var(--bt-panel);
    color: var(--bt-ink);
    font-size: .81rem;
    font-weight: 600;
    line-height: 1.2;
    transition: transform .12s, background .16s, border-color .16s, box-shadow .16s;
    white-space: nowrap;
}

.bt-btn:hover {
    border-color: color-mix(in srgb, var(--bt-brand) 35%, var(--bt-line));
}

.bt-btn:active {
    transform: translateY(1px);
}

.bt-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.bt-btn--primary {
    background: linear-gradient(160deg, var(--bt-brand), color-mix(in srgb, var(--bt-brand) 78%, #20080c));
    border-color: color-mix(in srgb, var(--bt-brand) 80%, black);
    color: #fff;
    box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--bt-brand) 80%, transparent);
}

.bt-btn--primary:hover {
    filter: brightness(1.06);
}

.bt-btn--ghost {
    background: transparent;
    border-color: var(--bt-line);
}

.bt-btn--ghost:hover {
    background: var(--bt-panel);
}

.bt-btn--danger {
    background: var(--bt-danger-bg);
    border-color: color-mix(in srgb, var(--bt-danger) 35%, var(--bt-line));
    color: var(--bt-danger);
}

.bt-btn--sm {
    padding: 6px 11px;
    font-size: .75rem;
    border-radius: 9px;
}

.bt-btn--block {
    width: 100%;
}

.bt-btn--charge {
    padding: 14px 18px;
    font-size: .95rem;
    border-radius: 12px;
}

.bt-iconbtn {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 9px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--bt-ink-2);
    transition: background .15s, color .15s, border-color .15s;
}

.bt-iconbtn:hover {
    background: var(--bt-panel-2);
    border-color: var(--bt-line);
    color: var(--bt-ink);
}

.bt-iconbtn--sq {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    border-color: var(--bt-line);
    background: var(--bt-panel);
}

.bt-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

.bt-field--tight {
    margin-bottom: 8px;
}

.bt-field>label {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--bt-ink-3);
}

.bt-input,
.bt-select,
.bt-textarea {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    border-radius: var(--bt-r-sm);
    border: 1px solid var(--bt-line);
    background: var(--bt-panel);
    color: var(--bt-ink);
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.bt-textarea {
    min-height: 70px;
    resize: vertical;
}

.bt-input:focus,
.bt-select:focus,
.bt-textarea:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--bt-brand) 65%, var(--bt-line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bt-brand) 14%, transparent);
}

.bt-input:disabled,
.bt-select:disabled {
    background: var(--bt-bg-2);
    color: var(--bt-ink-3);
}

.bt-input--sm,
.bt-select--sm {
    min-height: 34px;
    padding: 6px 9px;
    font-size: .78rem;
    border-radius: 8px;
}

.bt-input--date {
    width: auto;
    min-width: 140px;
}

.bt-input--qty {
    width: 82px;
    min-height: 34px;
    text-align: center;
    padding: 4px 6px;
    font-family: var(--bt-mono);
}

.bt-input--color {
    width: 54px;
    height: 40px;
    padding: 3px;
    cursor: pointer;
}

.bt-hint {
    font-size: .7rem;
    color: var(--bt-ink-3);
}

.bt-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .76rem;
    color: var(--bt-ink-2);
    white-space: nowrap;
}

.bt-check input {
    width: 15px;
    height: 15px;
    accent-color: var(--bt-brand);
}

.bt-row {
    display: grid;
    gap: 12px;
}

.bt-row--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bt-row--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bt-flags {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.bt-flag {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 11px;
    border: 1px solid var(--bt-line);
    border-radius: var(--bt-r-sm);
    background: var(--bt-panel-2);
    cursor: pointer;
}

.bt-flag input {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: var(--bt-brand);
    flex: none;
}

.bt-flag b {
    display: block;
    font-size: .78rem;
    font-weight: 600;
}

.bt-flag small {
    display: block;
    font-size: .68rem;
    color: var(--bt-ink-3);
    line-height: 1.35;
}

.bt-formgrid {
    display: block;
}

.bt-formsection {
    border-top: 1px dashed var(--bt-line);
    padding-top: 14px;
    margin-top: 4px;
}

.bt-formsection:first-child {
    border-top: 0;
    padding-top: 0;
}

.bt-formsection h4 {
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--bt-ink-3);
    margin-bottom: 10px;
}

.bt-formfoot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* ============================== CARDS / GRIDS / KPI ============================== */

.bt-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bt-grid {
    display: grid;
    gap: 16px;
}

.bt-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bt-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bt-grid--2-1 {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
}

.bt-card {
    background: var(--bt-panel);
    border: 1px solid var(--bt-line);
    border-radius: var(--bt-r);
    box-shadow: var(--bt-shadow);
    overflow: hidden;
    min-width: 0;
}

.bt-card__head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px 17px 0;
}

.bt-card__head h3 {
    font-size: .96rem;
}

.bt-card__head p {
    font-size: .72rem;
    color: var(--bt-ink-3);
    margin-top: 2px;
}

.bt-card__body {
    padding: 14px 17px 17px;
}

.bt-kpis {
    display: grid;
    gap: 14px;
}

.bt-kpis--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.bt-kpi {
    position: relative;
    background: var(--bt-panel);
    border: 1px solid var(--bt-line);
    border-radius: var(--bt-r);
    padding: 15px 16px 14px;
    box-shadow: var(--bt-shadow);
    min-width: 0;
    overflow: hidden;
}

.bt-kpi::after {
    content: '';
    position: absolute;
    inset: 0 0 auto auto;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at top right, color-mix(in srgb, var(--bt-brand) 9%, transparent), transparent 70%);
    pointer-events: none;
}

.bt-kpi__icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    margin-bottom: 9px;
    background: color-mix(in srgb, var(--bt-brand) 10%, var(--bt-panel));
    color: var(--bt-brand);
}

.bt-kpi__label {
    font-size: .68rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--bt-ink-3);
    font-weight: 600;
}

.bt-kpi__value {
    font-family: var(--bt-display);
    font-size: 1.5rem;
    line-height: 1.15;
    margin-top: 3px;
    letter-spacing: -.03em;
}

.bt-kpi__meta {
    font-size: .72rem;
    color: var(--bt-ink-3);
    margin-top: 3px;
}

.bt-kpi--brand {
    background: linear-gradient(150deg, color-mix(in srgb, var(--bt-brand) 14%, var(--bt-panel)), var(--bt-panel) 70%);
    border-color: color-mix(in srgb, var(--bt-brand) 26%, var(--bt-line));
}

.bt-kpi--brand .bt-kpi__value {
    color: var(--bt-brand);
}

[data-theme="dark"] .bt-kpi--brand .bt-kpi__value {
    color: var(--bt-brand-lift);
}

.bt-kpi--warn .bt-kpi__icon {
    background: var(--bt-warn-bg);
    color: var(--bt-warn);
}

.bt-kpi--danger .bt-kpi__icon {
    background: var(--bt-danger-bg);
    color: var(--bt-danger);
}

.bt-statlist {
    display: flex;
    flex-direction: column;
}

.bt-statlist>div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--bt-line);
    font-size: .8rem;
}

.bt-statlist>div:last-child {
    border-bottom: 0;
}

.bt-statlist span {
    color: var(--bt-ink-3);
    font-size: .74rem;
}

.bt-statlist b {
    font-weight: 600;
    text-align: right;
}

.bt-toolbar {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.bt-toolbar--sticky {
    position: sticky;
    top: 0;
    z-index: 5;
    padding-bottom: 10px;
    background: color-mix(in srgb, var(--bt-bg) 92%, transparent);
    backdrop-filter: blur(8px);
}

.bt-search {
    position: relative;
    flex: 1 1 240px;
    min-width: 190px;
    display: flex;
    align-items: center;
}

.bt-search svg {
    position: absolute;
    left: 11px;
    color: var(--bt-ink-3);
    pointer-events: none;
}

.bt-search .bt-input {
    padding-left: 35px;
}

.bt-species {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.bt-species::-webkit-scrollbar {
    display: none;
}

.bt-chip {
    border: 1px solid var(--bt-line);
    background: var(--bt-panel);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: .74rem;
    font-weight: 600;
    color: var(--bt-ink-2);
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}

.bt-chip:hover {
    border-color: color-mix(in srgb, var(--bt-brand) 35%, var(--bt-line));
}

.bt-chip.is-active {
    background: var(--bt-brand);
    border-color: var(--bt-brand);
    color: #fff;
}

.bt-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--bt-line);
    border-radius: 12px;
    background: var(--bt-panel-2);
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
}

.bt-tabs__tab {
    border: 0;
    background: transparent;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--bt-ink-3);
    white-space: nowrap;
}

.bt-tabs__tab.is-active {
    background: var(--bt-panel);
    color: var(--bt-ink);
    box-shadow: 0 1px 3px rgba(30, 16, 12, .12);
}

.bt-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .01em;
    background: var(--bt-bg-2);
    color: var(--bt-ink-2);
    white-space: nowrap;
    border: 1px solid transparent;
}

.bt-badge--ok {
    background: var(--bt-ok-bg);
    color: var(--bt-ok);
    border-color: color-mix(in srgb, var(--bt-ok) 20%, transparent);
}

.bt-badge--warn {
    background: var(--bt-warn-bg);
    color: var(--bt-warn);
    border-color: color-mix(in srgb, var(--bt-warn) 22%, transparent);
}

.bt-badge--danger {
    background: var(--bt-danger-bg);
    color: var(--bt-danger);
    border-color: color-mix(in srgb, var(--bt-danger) 22%, transparent);
}

.bt-badge--info {
    background: var(--bt-info-bg);
    color: var(--bt-info);
    border-color: color-mix(in srgb, var(--bt-info) 22%, transparent);
}

.bt-note {
    padding: 10px 12px;
    border-radius: var(--bt-r-sm);
    border: 1px solid var(--bt-line);
    background: var(--bt-panel-2);
    color: var(--bt-ink-2);
    font-size: .78rem;
    line-height: 1.45;
}

.bt-note.is-danger {
    border-color: color-mix(in srgb, var(--bt-danger) 30%, var(--bt-line));
    background: var(--bt-danger-bg);
    color: var(--bt-danger);
}

.bt-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 30px 16px;
    text-align: center;
    color: var(--bt-ink-3);
    font-size: .8rem;
}

.bt-empty svg {
    opacity: .55;
}

/* ============================== TABLES ============================== */

.bt-tablewrap {
    overflow-x: auto;
    margin: -4px -4px 0;
}

.bt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .79rem;
}

.bt-table thead th {
    text-align: left;
    font-size: .64rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--bt-ink-3);
    font-weight: 600;
    padding: 8px 10px;
    border-bottom: 1px solid var(--bt-line);
    white-space: nowrap;
    background: var(--bt-panel);
}

.bt-table tbody td {
    padding: 10px;
    border-bottom: 1px solid var(--bt-line-2);
    vertical-align: top;
}

.bt-table tbody tr:last-child td {
    border-bottom: 0;
}

.bt-table tbody tr:hover td {
    background: color-mix(in srgb, var(--bt-brand) 3.5%, transparent);
}

.bt-table b {
    font-weight: 600;
}

.bt-table .bt-iconbtn {
    width: 28px;
    height: 28px;
}

.bt-tablewrap .bt-table {
    min-width: 640px;
}

.bt-productcell {
    display: flex;
    align-items: center;
    gap: 9px;
}

.bt-productcell__art {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    flex: none;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, color-mix(in srgb, var(--bt-brand) 16%, var(--bt-panel)), var(--bt-panel-2));
    color: var(--bt-brand);
    font-size: .66rem;
    font-weight: 700;
    overflow: hidden;
}

.bt-productcell__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bt-productcell span {
    display: block;
}

/* ============================== CHARTS ============================== */

.bt-chart {
    width: 100%;
    height: auto;
    display: block;
}

.bt-chart .grid {
    stroke: var(--bt-line-2);
    stroke-width: 1;
}

.bt-chart .line {
    fill: none;
    stroke: var(--bt-brand-lift);
    stroke-width: 2.2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.bt-chart .area {
    fill: url(#btArea);
}

.bt-chart .tick {
    fill: var(--bt-ink-3);
    font-size: 9px;
    font-family: var(--bt-font);
}

.bt-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bt-bar__row {
    display: grid;
    grid-template-columns: minmax(80px, 1fr) 2fr auto;
    align-items: center;
    gap: 10px;
    font-size: .76rem;
}

.bt-bar__row>span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.bt-bar__track {
    height: 8px;
    border-radius: 999px;
    background: var(--bt-bg-2);
    overflow: hidden;
}

.bt-bar__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--bt-brand), var(--bt-brand-2));
}

.bt-bar__value {
    font-variant-numeric: tabular-nums;
    color: var(--bt-ink-2);
    font-weight: 600;
}

.bt-split {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bt-donut {
    width: 116px;
    height: 116px;
    border-radius: 50%;
    flex: none;
    position: relative;
    display: grid;
    place-items: center;
    mask: radial-gradient(circle, transparent 52%, #000 53%);
    -webkit-mask: radial-gradient(circle, transparent 52%, #000 53%);
}

.bt-donut__center {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    mask: none;
}

.bt-donut__center b {
    font-family: var(--bt-display);
    font-size: .95rem;
    display: block;
}

.bt-donut__center span {
    font-size: .6rem;
    color: var(--bt-ink-3);
}

.bt-legend {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.bt-legend>div {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .73rem;
}

.bt-legend i {
    width: 8px;
    height: 8px;
    border-radius: 3px;
    flex: none;
}

.bt-legend span {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--bt-ink-2);
}

.bt-legend b {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ============================== DASHBOARD EXTRAS ============================== */

.bt-attn {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bt-attn__row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 8px 9px;
    border: 1px solid var(--bt-line-2);
    border-radius: var(--bt-r-sm);
    background: var(--bt-panel-2);
    transition: border-color .15s, background .15s;
}

.bt-attn__row:hover {
    border-color: color-mix(in srgb, var(--bt-brand) 30%, var(--bt-line));
    background: var(--bt-panel);
}

.bt-attn__row>span:nth-child(2) {
    flex: 1 1 auto;
    min-width: 0;
}

.bt-attn__row b {
    display: block;
    font-size: .78rem;
}

.bt-attn__row small {
    display: block;
    font-size: .68rem;
    color: var(--bt-ink-3);
}

.bt-attn__icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    flex: none;
}

.bt-attn__icon.is-warn {
    background: var(--bt-warn-bg);
    color: var(--bt-warn);
}

.bt-attn__icon.is-danger {
    background: var(--bt-danger-bg);
    color: var(--bt-danger);
}

.bt-quick {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.bt-quick__btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid var(--bt-line);
    background: var(--bt-panel);
    color: var(--bt-ink-2);
    font-size: .78rem;
    font-weight: 600;
    transition: transform .14s, border-color .15s, color .15s;
}

.bt-quick__btn:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--bt-brand) 40%, var(--bt-line));
    color: var(--bt-ink);
}

.bt-quick__btn svg {
    color: var(--bt-brand);
}

/* ============================== TILL ============================== */

.bt-till {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 388px;
    gap: 16px;
    align-items: start;
}

.bt-till__catalog {
    min-width: 0;
}

.bt-productgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
    gap: 10px;
    padding-top: 4px;
}

.bt-product {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    text-align: left;
    padding: 11px;
    border: 1px solid var(--bt-line);
    border-radius: 13px;
    background: var(--bt-panel);
    box-shadow: var(--bt-shadow);
    transition: transform .14s, border-color .15s, box-shadow .15s;
}

.bt-product:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--bt-brand) 38%, var(--bt-line));
}

.bt-product:active {
    transform: translateY(0);
}

.bt-product__art {
    height: 62px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(80px 50px at 20% 10%, color-mix(in srgb, var(--bt-brand) 24%, transparent), transparent 70%),
        linear-gradient(145deg, var(--bt-bg-2), var(--bt-panel-2));
    color: var(--bt-brand);
    font-family: var(--bt-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.bt-product__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bt-product__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.bt-product__name {
    font-weight: 600;
    font-size: .82rem;
    line-height: 1.25;
}

.bt-product__spec {
    font-size: .67rem;
    color: var(--bt-ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bt-product__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 4px;
}

.bt-product__price {
    font-weight: 700;
    font-size: .82rem;
    font-variant-numeric: tabular-nums;
}

.bt-product__price em {
    font-style: normal;
    font-weight: 500;
    color: var(--bt-ink-3);
    font-size: .68rem;
}

.bt-product__lots {
    font-size: .64rem;
    color: var(--bt-ink-3);
    display: flex;
    align-items: center;
    gap: 4px;
}

.bt-till__cart {
    position: sticky;
    top: 76px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bt-panel);
    border: 1px solid var(--bt-line);
    border-radius: var(--bt-r);
    box-shadow: var(--bt-shadow);
    padding: 14px;
    max-height: calc(100vh - 96px);
}

.bt-carthead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.bt-carthead h2 {
    font-size: 1.02rem;
}

.bt-carthead span {
    display: block;
    font-size: .7rem;
}

.bt-customerchip {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    text-align: left;
    padding: 9px 10px;
    border: 1px dashed var(--bt-line);
    border-radius: var(--bt-r-sm);
    background: var(--bt-panel-2);
    color: var(--bt-ink-2);
}

.bt-customerchip.is-set {
    border-style: solid;
    border-color: color-mix(in srgb, var(--bt-brand) 28%, var(--bt-line));
    background: color-mix(in srgb, var(--bt-brand) 5%, var(--bt-panel));
}

.bt-customerchip>span {
    flex: 1 1 auto;
    min-width: 0;
}

.bt-customerchip b {
    display: block;
    font-size: .78rem;
    color: var(--bt-ink);
}

.bt-customerchip small {
    display: block;
    font-size: .66rem;
    color: var(--bt-ink-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bt-cartlines {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 80px;
    max-height: 34vh;
    margin: 0 -4px;
    padding: 0 4px;
}

.bt-cartline {
    padding: 9px 0;
    border-bottom: 1px dashed var(--bt-line);
}

.bt-cartline:last-child {
    border-bottom: 0;
}

.bt-cartline__top {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.bt-cartline__name {
    flex: 1 1 auto;
    font-size: .79rem;
    font-weight: 600;
    min-width: 0;
}

.bt-cartline__name span {
    display: block;
    font-size: .66rem;
    color: var(--bt-ink-3);
    font-weight: 500;
}

.bt-cartline__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
}

.bt-cartline__qty {
    display: flex;
    align-items: center;
    gap: 5px;
}

.bt-cartline__unit {
    font-size: .66rem;
    color: var(--bt-ink-3);
    min-width: 18px;
}

.bt-cartline__money {
    font-weight: 700;
    font-size: .82rem;
    font-variant-numeric: tabular-nums;
}

.bt-cartline__variance {
    margin-top: 3px;
    font-size: .64rem;
    color: var(--bt-ink-3);
}

.bt-cartline__variance em {
    font-style: normal;
    color: var(--bt-warn);
    font-weight: 600;
}

.bt-cartempty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 26px 10px;
    text-align: center;
    color: var(--bt-ink-3);
}

.bt-cartempty p {
    font-size: .8rem;
}

.bt-cartopts {
    border-top: 1px dashed var(--bt-line);
    padding-top: 9px;
}

.bt-totals {
    border-top: 1px solid var(--bt-line);
    padding-top: 9px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: .78rem;
}

.bt-totals>div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    color: var(--bt-ink-2);
}

.bt-totals b {
    font-variant-numeric: tabular-nums;
    color: var(--bt-ink);
}

.bt-totals__grand {
    border-top: 1px solid var(--bt-line);
    margin-top: 4px;
    padding-top: 6px;
    font-size: .95rem;
}

.bt-totals__grand span {
    font-weight: 600;
    color: var(--bt-ink);
}

.bt-totals__grand b {
    font-family: var(--bt-display);
    font-size: 1.22rem;
    color: var(--bt-brand);
}

[data-theme="dark"] .bt-totals__grand b {
    color: var(--bt-brand-lift);
}

.bt-registerstrip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: .7rem;
}

/* weigh + payment modals */
.bt-weigh__product {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px;
    border: 1px solid var(--bt-line);
    border-radius: var(--bt-r-sm);
    background: var(--bt-panel-2);
    margin-bottom: 12px;
}

.bt-weigh__art {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    flex: none;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(145deg, var(--bt-bg-2), var(--bt-panel));
    color: var(--bt-brand);
    font-weight: 700;
    font-size: .8rem;
}

.bt-weigh__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bt-weigh__product b {
    display: block;
    font-size: .86rem;
}

.bt-weigh__product span {
    display: block;
    font-size: .7rem;
    color: var(--bt-ink-3);
}

.bt-weigh__product em {
    display: block;
    font-style: normal;
    font-weight: 600;
    font-size: .8rem;
    margin-top: 2px;
    color: var(--bt-brand);
}

.bt-weigh__label {
    display: block;
    font-size: .68rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--bt-ink-3);
    font-weight: 600;
    margin: 10px 0 4px;
}

.bt-weigh__input {
    font-family: var(--bt-mono);
    font-size: 1.7rem;
    text-align: center;
    letter-spacing: .04em;
    padding: 10px;
    min-height: 58px;
}

.bt-weigh__pad {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 9px 0 4px;
}

.bt-weigh__calc {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--bt-line);
}

.bt-weigh__calc span {
    font-size: .78rem;
    color: var(--bt-ink-3);
}

.bt-weigh__calc b {
    font-family: var(--bt-display);
    font-size: 1.3rem;
}

.bt-pay__total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: var(--bt-r-sm);
    background: linear-gradient(140deg, color-mix(in srgb, var(--bt-brand) 12%, var(--bt-panel)), var(--bt-panel));
    border: 1px solid color-mix(in srgb, var(--bt-brand) 24%, var(--bt-line));
    margin-bottom: 12px;
}

.bt-pay__total span {
    font-size: .78rem;
    color: var(--bt-ink-2);
}

.bt-pay__total b {
    font-family: var(--bt-display);
    font-size: 1.7rem;
    color: var(--bt-brand);
}

[data-theme="dark"] .bt-pay__total b {
    color: var(--bt-brand-lift);
}

.bt-pay__methods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 12px;
}

.bt-pay__method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 6px;
    border-radius: var(--bt-r-sm);
    border: 1px solid var(--bt-line);
    background: var(--bt-panel);
    font-size: .7rem;
    font-weight: 600;
    color: var(--bt-ink-2);
}

.bt-pay__method.is-active {
    border-color: var(--bt-brand);
    background: color-mix(in srgb, var(--bt-brand) 8%, var(--bt-panel));
    color: var(--bt-brand);
}

/* ============================== FORMS IN MODALS / YIELDS ============================== */

.bt-yieldrows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.bt-yieldrow {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bt-yieldrow .bt-select {
    flex: 1 1 auto;
}

.bt-yieldrow .bt-input {
    width: 110px;
    min-height: 38px;
}

.bt-yieldcalc {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--bt-line);
    border-radius: var(--bt-r-sm);
    background: var(--bt-panel-2);
}

.bt-yieldcalc .bt-statlist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}

.bt-colorrow {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bt-swatchgrid {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.bt-swatch {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 2px solid transparent;
    background: var(--sw);
    cursor: pointer;
}

.bt-swatch.is-active {
    border-color: var(--bt-ink);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--sw) 25%, transparent);
}

.bt-plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.bt-plan {
    border: 1px solid var(--bt-line);
    border-radius: var(--bt-r-sm);
    padding: 14px;
    background: var(--bt-panel-2);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bt-plan.is-current {
    border-color: color-mix(in srgb, var(--bt-brand) 45%, var(--bt-line));
    background: color-mix(in srgb, var(--bt-brand) 6%, var(--bt-panel));
}

.bt-plan__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: .84rem;
}

.bt-plan__price {
    font-family: var(--bt-display);
    font-size: 1.5rem;
    letter-spacing: -.03em;
}

.bt-plan__price span {
    font-size: .72rem;
    color: var(--bt-ink-3);
    font-family: var(--bt-font);
    margin-left: 3px;
}

.bt-plan__price small {
    display: block;
    font-family: var(--bt-font);
    font-size: .66rem;
    color: var(--bt-ink-3);
    font-weight: 500;
    letter-spacing: 0;
}

.bt-plan ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 auto;
}

.bt-plan li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: .72rem;
    color: var(--bt-ink-2);
    line-height: 1.35;
}

.bt-plan li svg {
    color: var(--bt-ok);
    flex: none;
    margin-top: 1px;
}

.bt-usage {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.bt-usage>div {
    padding: 10px 12px;
    border: 1px solid var(--bt-line);
    border-radius: var(--bt-r-sm);
    background: var(--bt-panel-2);
}

.bt-usage span {
    display: block;
    font-size: .64rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--bt-ink-3);
}

.bt-usage b {
    font-family: var(--bt-display);
    font-size: 1.1rem;
}

.bt-audit {
    display: flex;
    flex-direction: column;
}

.bt-audit__row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--bt-line);
    font-size: .74rem;
}

.bt-audit__row:last-child {
    border-bottom: 0;
}

.bt-audit__row>div {
    flex: 1 1 auto;
    min-width: 0;
}

.bt-audit__row b {
    display: block;
    font-weight: 600;
}

.bt-audit__row small {
    display: block;
    color: var(--bt-ink-3);
    font-size: .66rem;
}

.bt-audit__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--bt-brand);
    margin-top: 6px;
    flex: none;
}

/* ============================== PICKERS / TAGS / TRACE ============================== */

.bt-picklist {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 46vh;
    overflow-y: auto;
}

.bt-pickrow {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 9px 10px;
    border: 1px solid var(--bt-line-2);
    border-radius: var(--bt-r-sm);
    background: var(--bt-panel-2);
}

.bt-pickrow:hover {
    border-color: color-mix(in srgb, var(--bt-brand) 35%, var(--bt-line));
    background: var(--bt-panel);
}

.bt-pickrow>span:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.bt-pickrow b {
    display: block;
    font-size: .8rem;
}

.bt-pickrow small {
    display: block;
    font-size: .68rem;
    color: var(--bt-ink-3);
}

.bt-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bt-tag {
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid var(--bt-line);
    background: var(--bt-panel-2);
    font-size: .7rem;
}

.bt-trace {
    margin-top: 6px;
}

/* ============================== MODALS / TOASTS ============================== */

.bt-modal-root {
    position: relative;
    z-index: 90;
}

.bt-modal-root:empty {
    display: none;
}

.bt-modal-root {
    position: fixed;
    inset: 0;
    background: rgba(20, 9, 11, .55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 5vh 16px;
    overflow-y: auto;
}

.bt-modal {
    width: 100%;
    max-width: 620px;
    background: var(--bt-panel);
    border: 1px solid var(--bt-line);
    border-radius: 18px;
    box-shadow: var(--bt-shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    animation: bt-pop .18s ease-out;
}

@keyframes bt-pop {
    from {
        transform: translateY(8px) scale(.99);
        opacity: 0;
    }

    to {
        transform: none;
        opacity: 1;
    }
}

.bt-modal--wide {
    max-width: 940px;
}

.bt-modal--slim {
    max-width: 470px;
}

.bt-modal__head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--bt-line);
}

.bt-modal__head h3 {
    font-size: 1.05rem;
}

.bt-modal__head p {
    font-size: .74rem;
    color: var(--bt-ink-3);
    margin-top: 2px;
}

.bt-modal__body {
    padding: 16px 18px;
    overflow-y: auto;
}

.bt-modal__foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid var(--bt-line);
    background: var(--bt-panel-2);
    flex-wrap: wrap;
}

.bt-toasts {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 340px;
}

.bt-toast {
    padding: 11px 13px;
    border-radius: 12px;
    background: var(--bt-panel);
    border: 1px solid var(--bt-line);
    border-left: 3px solid var(--bt-ok);
    box-shadow: var(--bt-shadow-lg);
    font-size: .78rem;
    animation: bt-slide .2s ease-out;
}

.bt-toast b {
    display: block;
    font-size: .74rem;
    margin-bottom: 2px;
}

.bt-toast span {
    color: var(--bt-ink-2);
}

.bt-toast--error {
    border-left-color: var(--bt-danger);
}

.bt-toast--warn {
    border-left-color: var(--bt-warn);
}

@keyframes bt-slide {
    from {
        transform: translateY(10px);
        opacity: 0;
    }

    to {
        transform: none;
        opacity: 1;
    }
}

/* ============================== RECEIPT / PRINT ============================== */

.bt-receiptwrap {
    display: flex;
    justify-content: center;
    background: var(--bt-bg-2);
    border-radius: var(--bt-r-sm);
    padding: 14px;
}

.bt-receipt {
    width: 320px;
    background: #fffdf8;
    color: #241a17;
    padding: 18px 16px;
    border-radius: 4px;
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .5);
    font-family: var(--bt-font);
    font-size: .72rem;
}

.bt-receipt__head {
    text-align: center;
    margin-bottom: 10px;
}

.bt-receipt__head h3 {
    font-family: var(--bt-display);
    font-size: 1.02rem;
    letter-spacing: -.01em;
}

.bt-receipt__meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: .68rem;
    color: #6b5a53;
    border-top: 1px dashed #ddcfc2;
    padding-top: 5px;
    margin-top: 5px;
}

.bt-receipt table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 9px;
}

.bt-receipt th {
    font-size: .58rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8b7a72;
    text-align: left;
    padding: 4px 0;
    border-bottom: 1px solid #ddcfc2;
    font-weight: 600;
}

.bt-receipt th.bt-right,
.bt-receipt td.bt-right {
    text-align: right;
}

.bt-receipt td {
    padding: 5px 0;
    border-bottom: 1px dotted #eadfd3;
    vertical-align: top;
}

.bt-receipt__totals {
    border-top: 1px solid #ddcfc2;
    margin-top: 8px;
    padding-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bt-receipt__totals>div {
    display: flex;
    justify-content: space-between;
    font-size: .7rem;
}

.bt-receipt__totals .grand {
    font-size: .86rem;
    font-weight: 700;
    border-top: 1px solid #ddcfc2;
    margin-top: 4px;
    padding-top: 4px;
}

.bt-receipt__terms {
    font-size: .58rem;
    color: #7c6a62;
    margin-top: 10px;
    line-height: 1.45;
    border-top: 1px dashed #ddcfc2;
    padding-top: 6px;
}

.bt-receipt__barcode {
    margin-top: 9px;
    text-align: center;
    font-family: var(--bt-mono);
    font-size: .62rem;
    letter-spacing: .3em;
    color: #4a3b35;
}

.bt-print {
    display: none;
}

@media print {
    @page {
        margin: 8mm;
    }

    body.bt-body {
        background: #fff !important;
    }

    body.bt-body>* {
        display: none !important;
    }

    body.bt-body>#btPrint {
        display: block !important;
    }

    .bt-print {
        display: block !important;
    }

    .bt-print .bt-receipt {
        width: 72mm;
        box-shadow: none;
        padding: 0;
        background: #fff;
    }

    .bt-print .bt-receipt__terms {
        font-size: 6.5pt;
    }
}

/* ============================== AUTH / PLATFORM ============================== */

.bt-auth {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    min-height: 100vh;
}

.bt-auth__story {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 34px clamp(26px, 5vw, 66px);
    color: #f6ece5;
    overflow: hidden;
    background:
        radial-gradient(700px 500px at 85% 8%, color-mix(in srgb, var(--bt-brand) 70%, transparent), transparent 70%),
        radial-gradient(600px 520px at 8% 100%, color-mix(in srgb, var(--bt-brand-2) 30%, transparent), transparent 70%),
        linear-gradient(160deg, #1d1012, #0f0708 70%);
}

.bt-auth__story::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .35;
    background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 9px);
}

.bt-auth__brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-family: var(--bt-display);
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: -.02em;
    position: relative;
    z-index: 1;
}

.bt-auth__logo {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #ffd9d2;
}

.bt-auth__pitch {
    position: relative;
    z-index: 1;
    margin-top: clamp(30px, 7vh, 84px);
    max-width: 560px;
}

.bt-auth__pitch h1 {
    font-size: clamp(2rem, 4.2vw, 3.35rem);
    line-height: 1.02;
    letter-spacing: -.035em;
}

.bt-auth__pitch h1 em {
    font-style: italic;
    color: #e8b06a;
}

.bt-auth__lead {
    margin-top: 16px;
    font-size: .94rem;
    line-height: 1.6;
    color: rgba(246, 236, 229, .74);
    max-width: 44ch;
}

.bt-auth__points {
    list-style: none;
    margin: clamp(24px, 5vh, 44px) 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bt-auth__points li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.bt-auth__points b {
    display: block;
    font-size: .86rem;
    font-weight: 600;
}

.bt-auth__points li>span:last-child {
    font-size: .8rem;
    color: rgba(246, 236, 229, .62);
    line-height: 1.5;
}

.bt-auth__points b {
    color: #fff;
}

.bt-auth__tick {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    flex: none;
    background: rgba(255, 255, 255, .08);
    color: #e8b06a;
    border: 1px solid rgba(255, 255, 255, .1);
    margin-top: 1px;
}

.bt-auth__foot {
    position: relative;
    z-index: 1;
    font-size: .7rem;
    color: rgba(246, 236, 229, .42);
    letter-spacing: .02em;
}

.bt-auth__panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px clamp(18px, 4vw, 44px);
}

.bt-auth__panel--wide {
    align-items: flex-start;
    padding-top: 6vh;
}

.bt-auth__card {
    width: 100%;
    max-width: 430px;
    background: var(--bt-panel);
    border: 1px solid var(--bt-line);
    border-radius: 20px;
    box-shadow: var(--bt-shadow-lg);
    padding: 24px;
}

.bt-auth__panel--wide .bt-auth__card {
    max-width: 1040px;
}

.bt-auth__tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 11px;
    background: var(--bt-panel-2);
    border: 1px solid var(--bt-line);
    margin-bottom: 18px;
}

.bt-auth__tabs button {
    flex: 1 1 0;
    padding: 8px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--bt-ink-3);
}

.bt-auth__tabs button.is-active {
    background: var(--bt-panel);
    color: var(--bt-ink);
    box-shadow: 0 1px 3px rgba(30, 16, 12, .1);
}

.bt-auth__card h2 {
    font-size: 1.32rem;
}

.bt-auth__card>p {
    color: var(--bt-ink-3);
    font-size: .82rem;
    margin: 4px 0 16px;
}

.bt-auth__demo {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border-radius: var(--bt-r-sm);
    border: 1px solid var(--bt-line);
    background: var(--bt-panel-2);
    font-size: .8rem;
    font-weight: 600;
    color: var(--bt-ink-2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.bt-auth__demo:hover {
    border-color: color-mix(in srgb, var(--bt-brand) 35%, var(--bt-line));
    color: var(--bt-ink);
}

.bt-auth__divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--bt-ink-3);
}

.bt-auth__divider::before,
.bt-auth__divider::after {
    content: '';
    height: 1px;
    background: var(--bt-line);
    flex: 1 1 auto;
}

.bt-auth__global {
    background: var(--bt-panel-2);
}

.bt-auth__fine {
    font-size: .68rem !important;
    color: var(--bt-ink-3);
    margin: 14px 0 0 !important;
    line-height: 1.5;
}

.bt-auth__platform {
    display: block;
    margin: 12px auto 0;
    background: none;
    border: 0;
    font-size: .68rem;
    color: var(--bt-ink-3);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ============================== SKELETON ============================== */

.bt-skeleton {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bt-skeleton__row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.bt-skeleton__row span,
.bt-skeleton__block {
    display: block;
    border-radius: var(--bt-r);
    min-height: 96px;
    background: linear-gradient(100deg, var(--bt-panel) 20%, var(--bt-panel-2) 40%, var(--bt-panel) 60%);
    background-size: 220% 100%;
    animation: bt-shimmer 1.2s linear infinite;
    border: 1px solid var(--bt-line);
}

.bt-skeleton__row:nth-child(3) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bt-skeleton__block {
    min-height: 320px;
}

@keyframes bt-shimmer {
    to {
        background-position: -220% 0;
    }
}

/* ============================== RESPONSIVE ============================== */

@media (max-width: 1240px) {
    .bt-grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bt-kpis--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bt-quick {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bt-plans {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .bt-till {
        grid-template-columns: minmax(0, 1fr) 350px;
    }

    .bt-grid--2-1 {
        grid-template-columns: minmax(0, 1fr);
    }

    .bt-auth {
        grid-template-columns: 1fr;
    }

    .bt-auth__story {
        min-height: 46vh;
    }
}

@media (max-width: 980px) {
    .bt-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .bt-side {
        position: fixed;
        inset: 0 auto 0 0;
        width: 268px;
        transform: translateX(-102%);
        transition: transform .22s ease;
        height: 100vh;
        box-shadow: var(--bt-shadow-lg);
    }

    .bt-shell.is-nav-open .bt-side {
        transform: none;
    }

    .bt-shell.is-nav-open .bt-scrim {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 7, 8, .5);
        z-index: 35;
    }

    .bt-top__menu {
        display: inline-grid;
    }

    .bt-content {
        padding: 18px 16px 34px;
    }

    .bt-top {
        padding: 12px 16px;
    }

    .bt-till {
        grid-template-columns: minmax(0, 1fr);
    }

    .bt-till__cart {
        position: static;
        max-height: none;
    }

    .bt-cartlines {
        max-height: none;
    }

    .bt-grid--2,
    .bt-grid--3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .bt-row--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bt-quick {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bt-plans {
        grid-template-columns: minmax(0, 1fr);
    }

    .bt-auth__panel {
        padding: 24px 16px 40px;
    }
}

@media (max-width: 640px) {

    .bt-kpis--4,
    .bt-kpis--3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .bt-row--2,
    .bt-row--3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .bt-productgrid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .bt-top__actions .bt-badge {
        display: none;
    }

    .bt-top__title h1 {
        font-size: 1.05rem;
    }

    .bt-auth__pitch h1 {
        font-size: 2rem;
    }

    .bt-modal-root {
        padding: 2vh 10px;
    }

    .bt-modal {
        max-height: 94vh;
    }

    .bt-skeleton__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bt-split {
        flex-direction: column;
        align-items: flex-start;
    }

    .bt-species {
        flex-wrap: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

/* ============================== SHARED ROY4D LAUNCHER ============================== */
/* Brand the platform launcher instead of forking Header1, and keep our own
   toasts clear of it so sale confirmations are never hidden. */

#app-window-menu #king {
    background: linear-gradient(145deg, var(--bt-brand), color-mix(in srgb, var(--bt-brand) 45%, #c2703d)) !important;
    color: #fff5f2 !important;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--bt-brand) 45%, transparent), inset 0 1px 0 rgba(255, 255, 255, .28) !important;
}

#app-window-menu #king #notif-counter {
    background: #e8b04b !important;
    color: #2a1a05 !important;
}

.bt-toasts {
    bottom: 92px;
}