:root {
    --bt-primary: #635bff;
    --bt-primary-deep: #4f46e5;
    --bt-teal: #0f9f8f;
    --bt-ink: #17223b;
    --bt-muted: #6b7280;
    --bt-canvas: #f5f7fb;
    --bt-surface: rgba(255, 255, 255, 0.92);
    --bt-border: rgba(23, 34, 59, 0.09);
    --bt-shadow: 0 12px 32px rgba(31, 42, 68, 0.07);
    --bt-sidebar-width: 252px;
}

[data-bs-theme="dark"] {
    --bt-ink: #edf2ff;
    --bt-muted: #9ca8bd;
    --bt-canvas: #0d1321;
    --bt-surface: rgba(22, 31, 50, 0.94);
    --bt-border: rgba(255, 255, 255, 0.08);
    --bt-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

html {
    scroll-behavior: smooth;
}

.bt-auth-shell {
    background:
        radial-gradient(circle at 18% 12%, rgba(99, 91, 255, 0.13), transparent 26rem),
        radial-gradient(circle at 82% 88%, rgba(15, 159, 143, 0.09), transparent 24rem),
        var(--bt-canvas);
    color: var(--bt-ink);
    min-height: 100vh;
}

.bt-auth-page {
    background: transparent;
    min-height: 100vh;
}

.bt-auth-card {
    background: var(--bt-surface);
    border-color: var(--bt-border);
    box-shadow: var(--bt-shadow) !important;
}

.bt-auth-toolbar {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    position: fixed;
    right: 1rem;
    top: 1rem;
    z-index: 1030;
}

[data-bs-theme="dark"] .bt-auth-shell .text-muted,
[data-bs-theme="dark"] .bt-auth-shell .hr-text {
    color: #aeb9cc !important;
}

[data-bs-theme="dark"] .bt-auth-shell .border-start-lg {
    border-color: rgba(255, 255, 255, 0.11) !important;
}

@media (max-width: 575.98px) {
    .bt-auth-toolbar {
        left: 0.75rem;
        position: absolute;
        right: 0.75rem;
        top: 0.75rem;
    }

    .bt-auth-toolbar .btn-group {
        margin-left: auto;
    }

    .bt-auth-page .container {
        padding-top: 5.5rem !important;
    }
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(99, 91, 255, 0.34);
    outline-offset: 2px;
}

body.bt-app-shell {
    background:
        radial-gradient(circle at 88% -10%, rgba(99, 91, 255, 0.11), transparent 28rem),
        var(--bt-canvas);
    color: var(--bt-ink);
    min-height: 100vh;
}

.bt-sidebar {
    background:
        radial-gradient(circle at 30% 0%, rgba(99, 91, 255, 0.2), transparent 18rem),
        linear-gradient(180deg, #11182a 0%, #0b1020 100%);
    border-right: 0;
    width: var(--bt-sidebar-width);
}

.bt-sidebar .container-fluid {
    align-items: stretch;
    padding: 1.15rem 1rem;
}

.bt-brand {
    align-items: center;
    color: #fff;
    display: flex;
    gap: 0.75rem;
    letter-spacing: -0.02em;
    min-width: 0;
}

.bt-brand:hover {
    color: #fff;
}

.bt-brand-mark {
    align-items: center;
    background: linear-gradient(145deg, #776fff, #20c7ae);
    border-radius: 0.8rem;
    box-shadow: 0 10px 24px rgba(99, 91, 255, 0.3);
    display: inline-flex;
    flex: 0 0 2.35rem;
    height: 2.35rem;
    justify-content: center;
    position: relative;
}

.bt-brand-mark::after {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    bottom: 0.55rem;
    box-shadow: 0 -0.38rem 0 rgba(255, 255, 255, 0.72);
    content: "";
    height: 0.2rem;
    position: absolute;
    width: 0.9rem;
}

.bt-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.bt-brand-name {
    font-size: 1.05rem;
    font-weight: 750;
}

.bt-brand-tagline {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    margin-top: 0.3rem;
    text-transform: uppercase;
}

.bt-nav-section {
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    margin: 1.25rem 0 0.45rem;
    padding: 0 0.75rem;
    text-transform: uppercase;
}

.bt-sidebar .nav-link {
    align-items: center;
    border-radius: 0.7rem;
    color: rgba(255, 255, 255, 0.68);
    display: flex;
    font-size: 0.88rem;
    font-weight: 560;
    gap: 0.7rem;
    margin: 0.12rem 0;
    min-height: 2.55rem;
    padding: 0.62rem 0.72rem;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.bt-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    transform: translateX(2px);
}

.bt-sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(99, 91, 255, 0.28), rgba(32, 199, 174, 0.12));
    box-shadow: inset 3px 0 0 #8c85ff;
    color: #fff;
}

.bt-sidebar .nav-link-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 1.35rem;
    font-size: 1.12rem;
    justify-content: center;
    margin: 0;
}

.bt-sidebar .nav-link-title {
    min-width: 0;
}

.bt-sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.72rem;
    margin-top: 1.25rem;
    padding: 1rem 0.75rem 0;
}

.bt-topbar {
    backdrop-filter: blur(18px);
    background: color-mix(in srgb, var(--bt-canvas) 78%, transparent);
    border-bottom: 1px solid var(--bt-border);
    min-height: 4.6rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.bt-topbar .container-fluid {
    gap: 1rem;
    padding: 0.75rem 1.5rem;
}

.bt-topbar-eyebrow {
    color: var(--bt-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bt-topbar-title {
    color: var(--bt-ink);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-top: 0.1rem;
}

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

.bt-theme-toggle,
.bt-icon-button {
    align-items: center;
    border: 1px solid var(--bt-border);
    border-radius: 0.7rem;
    display: inline-flex;
    height: 2.5rem;
    justify-content: center;
    width: 2.5rem;
}

.bt-user-trigger {
    align-items: center;
    border-left: 1px solid var(--bt-border);
    display: flex;
    margin-left: 0.25rem;
    padding-left: 0.85rem;
}

.bt-user-avatar {
    background: linear-gradient(145deg, rgba(99, 91, 255, 0.18), rgba(15, 159, 143, 0.18));
    color: var(--bt-primary-deep);
    font-weight: 750;
}

.page-body {
    margin-top: 0;
    padding: 1.5rem 0 2.5rem;
}

.page-body > .container-fluid {
    max-width: 1600px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.card {
    background: var(--bt-surface);
    border: 1px solid var(--bt-border);
    border-radius: 1rem;
    box-shadow: var(--bt-shadow);
    overflow: hidden;
}

.card-header,
.card-footer {
    border-color: var(--bt-border);
}

.card-title {
    color: var(--bt-ink);
    font-weight: 700;
    letter-spacing: -0.015em;
}

.btn {
    border-radius: 0.68rem;
    font-weight: 620;
}

.btn-primary {
    background: linear-gradient(135deg, var(--bt-primary), var(--bt-primary-deep));
    border-color: var(--bt-primary-deep);
    box-shadow: 0 8px 18px rgba(99, 91, 255, 0.18);
}

.form-control,
.form-select,
.input-group-text {
    border-color: var(--bt-border);
    border-radius: 0.65rem;
}

.table > :not(caption) > * > * {
    border-bottom-color: var(--bt-border);
}

.table thead th {
    color: var(--bt-muted);
    font-size: 0.69rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.table tbody tr {
    transition: background-color 140ms ease;
}

.table tbody tr:hover {
    background: rgba(99, 91, 255, 0.035);
}

.metric-value,
.number-cell,
.number-input,
.inline-number,
input[type="number"] {
    font-variant-numeric: tabular-nums;
}

.metric-value,
.number-cell,
.number-input,
input[type="number"] {
    text-align: right;
}

.number-cell,
.inline-number {
    white-space: nowrap;
}

.inline-number {
    display: inline-block;
    min-width: 4ch;
    text-align: right;
}

.bt-dashboard-hero {
    background:
        radial-gradient(circle at 88% 10%, rgba(32, 199, 174, 0.25), transparent 17rem),
        radial-gradient(circle at 5% 120%, rgba(138, 131, 255, 0.3), transparent 24rem),
        linear-gradient(135deg, #171f37 0%, #252c50 55%, #1c4650 100%);
    border: 0;
    border-radius: 1.25rem;
    box-shadow: 0 18px 48px rgba(23, 31, 55, 0.22);
    color: #fff;
    overflow: hidden;
    padding: clamp(1.4rem, 3vw, 2.35rem);
    position: relative;
}

.bt-dashboard-hero::after {
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
    content: "";
    height: 18rem;
    position: absolute;
    right: -7rem;
    top: -10rem;
    width: 18rem;
}

.bt-hero-kicker {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.7rem;
    font-weight: 720;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.bt-hero-title {
    font-size: clamp(1.35rem, 2.5vw, 2.05rem);
    font-weight: 720;
    letter-spacing: -0.035em;
    margin: 0.45rem 0 0;
}

.bt-hero-amount {
    font-size: clamp(2.25rem, 5vw, 4.15rem);
    font-variant-numeric: tabular-nums;
    font-weight: 760;
    letter-spacing: -0.055em;
    line-height: 1;
    margin: 1.2rem 0 0.6rem;
}

.bt-hero-meta {
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.88rem;
}

.bt-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.4rem;
}

.bt-hero-actions .btn {
    backdrop-filter: blur(8px);
}

.bt-hero-actions .btn-light {
    color: #1b2440;
}

.bt-hero-actions .btn-outline-light {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.28);
}

.bt-budget-panel {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 1rem;
    padding: 1.25rem;
    position: relative;
    z-index: 1;
}

.bt-budget-panel-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bt-budget-panel-value {
    font-size: 1.55rem;
    font-variant-numeric: tabular-nums;
    font-weight: 740;
    letter-spacing: -0.025em;
    margin-top: 0.45rem;
}

.bt-budget-track {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    height: 0.55rem;
    margin: 1rem 0 0.65rem;
    overflow: hidden;
}

.bt-budget-fill {
    background: linear-gradient(90deg, #8f88ff, #32d3b9);
    border-radius: inherit;
    height: 100%;
}

.bt-budget-fill.is-warning {
    background: linear-gradient(90deg, #f59f00, #ffcf66);
}

.bt-budget-fill.is-danger {
    background: linear-gradient(90deg, #f03e3e, #ff8787);
}

.bt-section-heading {
    align-items: end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 1.7rem 0 0.85rem;
}

.bt-section-heading h2 {
    font-size: 1.05rem;
    font-weight: 730;
    letter-spacing: -0.02em;
    margin: 0;
}

.bt-section-heading p {
    color: var(--bt-muted);
    font-size: 0.8rem;
    margin: 0.18rem 0 0;
}

.bt-metric-card {
    box-shadow: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

a.bt-metric-card {
    color: inherit;
    display: block;
    text-decoration: none;
}

.bt-metric-card:hover {
    border-color: rgba(99, 91, 255, 0.28);
    box-shadow: var(--bt-shadow);
    color: inherit;
    transform: translateY(-2px);
}

.bt-metric-icon {
    align-items: center;
    background: rgba(99, 91, 255, 0.1);
    border-radius: 0.75rem;
    color: var(--bt-primary-deep);
    display: inline-flex;
    flex: 0 0 2.5rem;
    font-size: 1.25rem;
    height: 2.5rem;
    justify-content: center;
}

.bt-metric-icon.is-teal {
    background: rgba(15, 159, 143, 0.11);
    color: var(--bt-teal);
}

.bt-metric-icon.is-orange {
    background: rgba(245, 159, 0, 0.12);
    color: #d98200;
}

.bt-metric-icon.is-azure {
    background: rgba(34, 139, 230, 0.11);
    color: #1c7ed6;
}

.bt-metric-card .metric-value {
    color: var(--bt-ink);
    font-size: 1.6rem;
    font-weight: 740;
    letter-spacing: -0.035em;
    text-align: left;
}

.bt-dashboard-trend-grid {
    align-items: end;
    display: grid;
    gap: clamp(0.45rem, 2vw, 1rem);
    grid-template-columns: repeat(6, minmax(0, 1fr));
    min-height: 15rem;
}

.bt-trend-column {
    min-width: 0;
    text-align: center;
}

.bt-trend-value {
    color: var(--bt-muted);
    font-size: 0.68rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bt-trend-track {
    align-items: end;
    background: color-mix(in srgb, var(--bt-primary) 5%, transparent);
    border-radius: 0.65rem;
    display: flex;
    height: 10rem;
    overflow: hidden;
    padding: 0.35rem;
}

.bt-trend-bar {
    background: linear-gradient(180deg, #837cff 0%, #625aff 100%);
    border-radius: 0.42rem;
    min-height: 0.35rem;
    opacity: 0.55;
    width: 100%;
}

.bt-trend-bar.is-current {
    background: linear-gradient(180deg, #29c8b0 0%, #0f9f8f 100%);
    box-shadow: 0 8px 18px rgba(15, 159, 143, 0.22);
    opacity: 1;
}

.bt-spend-row + .bt-spend-row {
    margin-top: 1rem;
}

.bt-spend-track {
    background: color-mix(in srgb, var(--bt-primary) 7%, transparent);
    border-radius: 999px;
    height: 0.5rem;
    overflow: hidden;
}

.bt-spend-fill {
    background: linear-gradient(90deg, var(--bt-primary), var(--bt-teal));
    border-radius: inherit;
    height: 100%;
    min-width: 0.35rem;
}

.bt-store-rank {
    align-items: center;
    background: rgba(99, 91, 255, 0.08);
    border-radius: 999px;
    color: var(--bt-primary-deep);
    display: inline-flex;
    flex: 0 0 2rem;
    font-size: 0.75rem;
    font-weight: 750;
    height: 2rem;
    justify-content: center;
}

.bt-action-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bt-action-tile {
    align-items: center;
    background: color-mix(in srgb, var(--bt-primary) 4%, transparent);
    border: 1px solid var(--bt-border);
    border-radius: 0.8rem;
    color: inherit;
    display: flex;
    gap: 0.65rem;
    min-height: 3.45rem;
    padding: 0.75rem;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.bt-action-tile:hover {
    background: color-mix(in srgb, var(--bt-primary) 9%, transparent);
    border-color: rgba(99, 91, 255, 0.24);
    color: inherit;
}

.bt-action-tile i {
    color: var(--bt-primary-deep);
    font-size: 1.15rem;
}

.bt-ledger-header .page-title {
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    font-weight: 750;
    letter-spacing: -0.035em;
}

.bt-month-switcher {
    align-items: center;
    background: var(--bt-surface);
    border: 1px solid var(--bt-border);
    border-radius: 0.75rem;
    display: flex;
    padding: 0.2rem;
}

.bt-month-switcher .form-control {
    background: transparent;
    border: 0;
    box-shadow: none;
    min-width: 9.5rem;
    width: auto;
}

.bt-month-switcher .bt-icon-button {
    border: 0;
    height: 2.15rem;
    width: 2.15rem;
}

.bt-ledger-summary {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.bt-ledger-stat {
    box-shadow: none;
    min-width: 0;
}

.bt-ledger-stat .card-body {
    align-items: flex-start;
    display: flex;
    gap: 0.8rem;
    padding: 1rem;
}

.bt-ledger-stat .bt-metric-icon {
    flex-basis: 2.25rem;
    font-size: 1.05rem;
    height: 2.25rem;
}

.bt-ledger-stat .metric-value {
    color: var(--bt-ink);
    font-size: clamp(1.05rem, 1.8vw, 1.45rem);
    font-weight: 740;
    letter-spacing: -0.035em;
    line-height: 1.2;
    margin: 0.18rem 0;
    text-align: left;
}

.bt-ledger-workspace,
.bt-ledger-tools {
    overflow: visible;
}

.bt-ledger-workspace .table-responsive,
.bt-ledger-tools .table-responsive {
    border-radius: 0 0 1rem 1rem;
}

.bt-ledger-filter-bar {
    background: color-mix(in srgb, var(--bt-primary) 2.5%, transparent);
}

.bt-ledger-table {
    min-width: 1120px;
}

.bt-ledger-table tbody td {
    padding-bottom: 0.9rem;
    padding-top: 0.9rem;
}

.bt-ledger-tools .nav-pills {
    background: color-mix(in srgb, var(--bt-primary) 5%, transparent);
    border-radius: 0.7rem;
    padding: 0.2rem;
}

.bt-ledger-tools .nav-pills .nav-link {
    border-radius: 0.52rem;
    color: var(--bt-muted);
    font-size: 0.78rem;
    font-weight: 650;
    padding: 0.45rem 0.75rem;
}

.bt-ledger-tools .nav-pills .nav-link.active {
    background: var(--bt-surface);
    box-shadow: 0 4px 12px rgba(31, 42, 68, 0.08);
    color: var(--bt-primary-deep);
}

.bt-entry-panel {
    --tblr-offcanvas-width: min(34rem, 100vw);
    background: var(--bt-canvas);
    width: min(34rem, 100vw) !important;
}

.bt-entry-panel .offcanvas-header {
    background: var(--bt-surface);
    padding: 1.2rem 1.35rem;
}

.bt-entry-panel .offcanvas-body {
    padding: 1.35rem;
}

.bt-entry-panel-footer {
    background: var(--bt-surface);
    padding: 1rem 1.35rem;
}

.bt-entry-panel textarea {
    resize: vertical;
}

.bt-receipt-workspace,
.bt-review-workspace {
    overflow: visible;
}

.bt-receipt-workspace .table-responsive,
.bt-review-workspace .table-responsive {
    border-radius: 0 0 1rem 1rem;
}

.bt-receipt-filter-bar {
    background: color-mix(in srgb, var(--bt-primary) 2.5%, transparent);
}

.bt-receipt-table {
    min-width: 1020px;
}

.bt-receipt-table tbody td,
.bt-review-table tbody td {
    padding-bottom: 0.9rem;
    padding-top: 0.9rem;
}

.receipt-empty-state {
    padding: 3.5rem 1rem !important;
    text-align: center;
}

.bt-upload-panel {
    --tblr-offcanvas-width: min(36rem, 100vw);
    background: var(--bt-canvas);
    width: min(36rem, 100vw) !important;
}

.bt-upload-panel .offcanvas-header {
    background: var(--bt-surface);
    padding: 1.2rem 1.35rem;
}

.bt-upload-panel .offcanvas-body {
    padding: 1.35rem;
}

.bt-upload-guidance,
.bt-upload-empty,
.bt-review-guidance {
    align-items: flex-start;
    border: 1px solid color-mix(in srgb, var(--bt-primary) 18%, var(--bt-border));
    border-radius: 0.85rem;
    display: flex;
    gap: 0.8rem;
    padding: 1rem;
}

.bt-upload-guidance {
    background: color-mix(in srgb, var(--bt-primary) 6%, var(--bt-surface));
}

.bt-upload-guidance > i,
.bt-review-guidance > i {
    color: var(--bt-primary-deep);
    flex: 0 0 auto;
    font-size: 1.4rem;
    margin-top: 0.05rem;
}

.bt-upload-empty {
    align-items: center;
    background: color-mix(in srgb, var(--bt-primary) 3%, transparent);
    border-style: dashed;
    color: var(--bt-muted);
}

.bt-upload-empty > i {
    color: var(--bt-primary-deep);
    font-size: 1.55rem;
}

.bt-upload-metrics {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.bt-upload-metrics > div {
    background: color-mix(in srgb, var(--bt-primary) 3%, var(--bt-surface));
    border: 1px solid var(--bt-border);
    border-radius: 0.7rem;
    min-width: 0;
    padding: 0.75rem 0.8rem;
}

.bt-upload-metrics dt {
    color: var(--bt-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.bt-upload-metrics dd {
    color: var(--bt-ink);
    font-size: 0.88rem;
    font-weight: 650;
    margin: 0;
    overflow-wrap: anywhere;
}

.bt-review-summary {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(19rem, 1.4fr);
}

.bt-review-stat {
    box-shadow: none;
    min-width: 0;
}

.bt-review-stat .card-body {
    align-items: flex-start;
    display: flex;
    gap: 0.8rem;
    padding: 1rem;
}

.bt-review-stat .bt-metric-icon {
    flex-basis: 2.25rem;
    font-size: 1.05rem;
    height: 2.25rem;
}

.bt-review-stat .metric-value {
    color: var(--bt-ink);
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 740;
    letter-spacing: -0.035em;
    line-height: 1.2;
    margin: 0.18rem 0;
    text-align: left;
}

.bt-review-guidance {
    align-items: center;
    background: color-mix(in srgb, var(--bt-teal) 7%, var(--bt-surface));
    border-color: color-mix(in srgb, var(--bt-teal) 20%, var(--bt-border));
}

.bt-review-guidance > i {
    color: var(--bt-teal);
    font-size: 1.65rem;
}

.bt-review-workspace .nav-pills {
    background: color-mix(in srgb, var(--bt-primary) 5%, transparent);
    border-radius: 0.7rem;
    padding: 0.2rem;
}

.bt-review-workspace .nav-pills .nav-link {
    align-items: center;
    border-radius: 0.52rem;
    color: var(--bt-muted);
    display: flex;
    font-size: 0.78rem;
    font-weight: 650;
    padding: 0.45rem 0.75rem;
}

.bt-review-workspace .nav-pills .nav-link.active {
    background: var(--bt-surface);
    box-shadow: 0 4px 12px rgba(31, 42, 68, 0.08);
    color: var(--bt-primary-deep);
}

.bt-review-table {
    min-width: 960px;
}

.bt-budget-summary {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bt-budget-stat {
    box-shadow: none;
    min-width: 0;
}

.bt-budget-stat .card-body {
    align-items: flex-start;
    display: flex;
    gap: 0.8rem;
    padding: 1rem;
}

.bt-budget-stat .bt-metric-icon {
    flex-basis: 2.25rem;
    font-size: 1.05rem;
    height: 2.25rem;
}

.bt-budget-stat .metric-value {
    color: var(--bt-ink);
    font-size: clamp(1.05rem, 1.8vw, 1.45rem);
    font-weight: 740;
    letter-spacing: -0.035em;
    line-height: 1.2;
    margin: 0.18rem 0;
    text-align: left;
}

.bt-budget-health {
    border-left: 0.25rem solid var(--bt-primary);
    box-shadow: none;
    overflow: hidden;
}

.bt-budget-health[data-tone="healthy"] {
    border-left-color: var(--bt-teal);
}

.bt-budget-health[data-tone="warning"] {
    border-left-color: var(--tblr-orange);
}

.bt-budget-health[data-tone="danger"] {
    border-left-color: var(--tblr-danger);
}

.bt-health-icon,
.bt-alert-icon {
    align-items: center;
    background: color-mix(in srgb, var(--bt-primary) 10%, transparent);
    border-radius: 0.7rem;
    color: var(--bt-primary-deep);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.25rem;
    height: 2.65rem;
    justify-content: center;
    width: 2.65rem;
}

.bt-health-eyebrow {
    color: var(--bt-primary-deep);
    letter-spacing: 0.045em;
}

.bt-budget-health[data-tone="healthy"] .bt-health-icon {
    background: color-mix(in srgb, var(--bt-teal) 12%, transparent);
    color: var(--bt-teal);
}

.bt-budget-health[data-tone="warning"] .bt-health-icon,
.bt-budget-forecast[data-tone="warning"] .bt-health-icon {
    background: color-mix(in srgb, var(--tblr-orange) 13%, transparent);
    color: var(--tblr-orange);
}

.bt-budget-health[data-tone="danger"] .bt-health-icon,
.bt-budget-forecast[data-tone="danger"] .bt-health-icon {
    background: color-mix(in srgb, var(--tblr-danger) 12%, transparent);
    color: var(--tblr-danger);
}

.bt-budget-health-facts,
.bt-allocation-summary {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bt-budget-health-facts > div,
.bt-allocation-summary > div {
    background: color-mix(in srgb, var(--bt-primary) 3%, var(--bt-surface));
    border: 1px solid var(--bt-border);
    border-radius: 0.7rem;
    min-width: 0;
    padding: 0.75rem;
}

.bt-budget-health-facts span,
.bt-allocation-summary span {
    color: var(--bt-muted);
    display: block;
    font-size: 0.7rem;
    font-weight: 650;
    margin-bottom: 0.25rem;
}

.bt-budget-health-facts strong,
.bt-allocation-summary strong {
    color: var(--bt-ink);
    display: block;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.bt-budget-workspace {
    overflow: visible;
}

.bt-budget-workspace .table-responsive {
    border-radius: 0 0 1rem 1rem;
}

.bt-budget-workspace .nav-pills {
    background: color-mix(in srgb, var(--bt-primary) 5%, transparent);
    border-radius: 0.7rem;
    padding: 0.2rem;
}

.bt-budget-workspace .nav-pills .nav-link {
    align-items: center;
    border-radius: 0.52rem;
    color: var(--bt-muted);
    display: flex;
    font-size: 0.78rem;
    font-weight: 650;
    padding: 0.45rem 0.75rem;
}

.bt-budget-workspace .nav-pills .nav-link.active {
    background: var(--bt-surface);
    box-shadow: 0 4px 12px rgba(31, 42, 68, 0.08);
    color: var(--bt-primary-deep);
}

.bt-budget-limit-editor {
    background: color-mix(in srgb, var(--bt-primary) 2.5%, transparent);
}

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

.bt-budget-table {
    min-width: 900px;
}

.bt-budget-table tbody td {
    padding-bottom: 0.9rem;
    padding-top: 0.9rem;
}

.bt-budget-table .category-limit {
    min-width: 8rem;
}

.bt-budget-forecast {
    align-items: center;
    background: color-mix(in srgb, var(--bt-primary) 4%, transparent);
    display: flex;
    gap: 0.9rem;
    padding: 1.1rem 1.25rem;
}

.bt-budget-forecast[data-tone="healthy"] {
    background: color-mix(in srgb, var(--bt-teal) 7%, transparent);
}

.bt-budget-forecast[data-tone="warning"] {
    background: color-mix(in srgb, var(--tblr-orange) 7%, transparent);
}

.bt-budget-forecast[data-tone="danger"] {
    background: color-mix(in srgb, var(--tblr-danger) 6%, transparent);
}

.bt-budget-alert-item {
    align-items: flex-start;
    border: 1px solid var(--bt-border);
    border-left: 0.25rem solid var(--bt-primary);
    border-radius: 0.8rem;
    display: flex;
    gap: 0.9rem;
    padding: 1rem;
}

.bt-budget-alert-item[data-tone="warning"] {
    border-left-color: var(--tblr-orange);
}

.bt-budget-alert-item[data-tone="danger"] {
    border-left-color: var(--tblr-danger);
}

.bt-budget-alert-item[data-tone="warning"] .bt-alert-icon {
    background: color-mix(in srgb, var(--tblr-orange) 12%, transparent);
    color: var(--tblr-orange);
}

.bt-budget-alert-item[data-tone="danger"] .bt-alert-icon {
    background: color-mix(in srgb, var(--tblr-danger) 11%, transparent);
    color: var(--tblr-danger);
}

.bt-finance-summary,
.bt-report-summary {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bt-finance-stat,
.bt-report-stat {
    box-shadow: none;
    min-width: 0;
}

.bt-finance-stat .card-body,
.bt-report-stat .card-body {
    align-items: flex-start;
    display: flex;
    gap: 0.8rem;
    padding: 1rem;
}

.bt-finance-stat .bt-metric-icon,
.bt-report-stat .bt-metric-icon {
    flex-basis: 2.25rem;
    font-size: 1.05rem;
    height: 2.25rem;
}

.bt-finance-stat .metric-value,
.bt-report-stat .metric-value {
    color: var(--bt-ink);
    font-size: clamp(1.05rem, 1.8vw, 1.45rem);
    font-weight: 740;
    letter-spacing: -0.035em;
    line-height: 1.2;
    margin: 0.18rem 0;
    text-align: left;
}

.bt-finance-guidance,
.bt-account-guidance {
    align-items: flex-start;
    background: color-mix(in srgb, var(--bt-teal) 7%, var(--bt-surface));
    border: 1px solid color-mix(in srgb, var(--bt-teal) 20%, var(--bt-border));
    border-radius: 0.85rem;
    display: flex;
    gap: 0.8rem;
    padding: 1rem;
}

.bt-finance-guidance > i,
.bt-account-guidance > i {
    color: var(--bt-teal);
    flex: 0 0 auto;
    font-size: 1.4rem;
    margin-top: 0.05rem;
}

.bt-finance-workspace {
    overflow: visible;
}

.bt-finance-workspace .table-responsive {
    border-radius: 0 0 1rem 1rem;
}

.bt-finance-workspace .nav-pills {
    background: color-mix(in srgb, var(--bt-primary) 5%, transparent);
    border-radius: 0.7rem;
    padding: 0.2rem;
}

.bt-finance-workspace .nav-pills .nav-link {
    align-items: center;
    border-radius: 0.52rem;
    color: var(--bt-muted);
    display: flex;
    font-size: 0.78rem;
    font-weight: 650;
    padding: 0.45rem 0.75rem;
}

.bt-finance-workspace .nav-pills .nav-link.active {
    background: var(--bt-surface);
    box-shadow: 0 4px 12px rgba(31, 42, 68, 0.08);
    color: var(--bt-primary-deep);
}

.bt-finance-table {
    min-width: 1100px;
}

.bt-tag-table {
    min-width: 650px;
}

.bt-finance-table tbody td,
.bt-tag-table tbody td,
.bt-report-table tbody td {
    padding-bottom: 0.9rem;
    padding-top: 0.9rem;
}

.bt-tag-editor,
.bt-report-filter-bar {
    background: color-mix(in srgb, var(--bt-primary) 2.5%, transparent);
}

.bt-account-type-icon,
.bt-source-icon {
    align-items: center;
    background: color-mix(in srgb, var(--bt-primary) 9%, transparent);
    border-radius: 0.65rem;
    color: var(--bt-primary-deep);
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.35rem;
    justify-content: center;
    width: 2.35rem;
}

.bt-account-panel {
    --tblr-offcanvas-width: min(34rem, 100vw);
    background: var(--bt-canvas);
    width: min(34rem, 100vw) !important;
}

.bt-account-panel .offcanvas-header {
    background: var(--bt-surface);
    padding: 1.2rem 1.35rem;
}

.bt-account-panel .offcanvas-body {
    padding: 1.35rem;
}

.bt-account-panel-footer {
    background: var(--bt-surface);
    padding: 1rem 1.35rem;
}

.bt-report-filters {
    overflow: visible;
}

.bt-report-sources,
.bt-report-categories,
.bt-report-statement {
    overflow: hidden;
}

.bt-report-sources .card-body {
    display: grid;
    gap: 0.8rem;
}

.bt-source-row {
    align-items: center;
    background: color-mix(in srgb, var(--bt-primary) 3%, transparent);
    border: 1px solid var(--bt-border);
    border-radius: 0.75rem;
    display: flex;
    gap: 0.8rem;
    padding: 0.85rem;
}

.bt-source-icon.is-purple {
    background: color-mix(in srgb, var(--bt-primary) 10%, transparent);
}

.bt-source-icon.is-teal {
    background: color-mix(in srgb, var(--bt-teal) 11%, transparent);
    color: var(--bt-teal);
}

.bt-category-row + .bt-category-row {
    border-top: 1px solid var(--bt-border);
    margin-top: 1rem;
    padding-top: 1rem;
}

.report-progress {
    background: color-mix(in srgb, var(--bt-primary) 7%, transparent);
    border-radius: 999px;
    height: 0.55rem;
    overflow: hidden;
}

.report-progress > span {
    background: linear-gradient(90deg, var(--bt-primary), var(--bt-teal));
    border-radius: inherit;
    display: block;
    height: 100%;
}

.bt-report-table {
    min-width: 820px;
}

.bt-feedback-toasts {
    max-width: calc(100vw - 2rem);
    position: fixed;
    right: 1rem;
    top: 5rem;
    width: min(23rem, calc(100vw - 2rem));
    z-index: 1095;
}

.bt-feedback-toast {
    background: var(--bt-surface);
    border: 1px solid var(--bt-border);
    border-left: 0.25rem solid var(--bt-primary);
    box-shadow: 0 18px 45px rgba(31, 42, 68, 0.17);
    color: var(--bt-ink);
    width: 100%;
}

.bt-feedback-toast.is-success {
    border-left-color: var(--bt-teal);
}

.bt-feedback-toast.is-warning {
    border-left-color: var(--tblr-orange);
}

.bt-feedback-toast.is-danger {
    border-left-color: var(--tblr-danger);
}

.bt-feedback-toast .toast-body {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
}

.bt-toast-icon {
    align-items: center;
    background: color-mix(in srgb, var(--bt-primary) 9%, transparent);
    border-radius: 50%;
    color: var(--bt-primary-deep);
    display: inline-flex;
    flex: 0 0 auto;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.bt-feedback-toast.is-success .bt-toast-icon {
    background: color-mix(in srgb, var(--bt-teal) 11%, transparent);
    color: var(--bt-teal);
}

.bt-feedback-toast.is-warning .bt-toast-icon {
    background: color-mix(in srgb, var(--tblr-orange) 11%, transparent);
    color: var(--tblr-orange);
}

.bt-feedback-toast.is-danger .bt-toast-icon {
    background: color-mix(in srgb, var(--tblr-danger) 10%, transparent);
    color: var(--tblr-danger);
}

.bt-state-cell {
    padding: 0 !important;
}

.bt-state {
    align-items: center;
    color: var(--bt-muted);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    justify-content: center;
    min-height: 10rem;
    padding: 2rem 1rem;
    text-align: center;
}

.bt-state.is-compact {
    flex-direction: row;
    min-height: 5.5rem;
    padding: 1.25rem;
    text-align: left;
}

.bt-state-icon {
    align-items: center;
    background: color-mix(in srgb, var(--bt-primary) 7%, transparent);
    border-radius: 50%;
    color: var(--bt-primary-deep);
    display: inline-flex;
    font-size: 1.45rem;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.bt-state.is-compact .bt-state-icon {
    font-size: 1rem;
    height: 2.15rem;
    width: 2.15rem;
}

.bt-state-loading .bt-state-icon {
    background: transparent;
}

.bt-state-error .bt-state-icon {
    background: color-mix(in srgb, var(--tblr-danger) 10%, transparent);
    color: var(--tblr-danger);
}

.bt-state-success .bt-state-icon {
    background: color-mix(in srgb, var(--bt-teal) 11%, transparent);
    color: var(--bt-teal);
}

.bt-state-title {
    color: var(--bt-ink);
    font-weight: 650;
}

.bt-state-message {
    font-size: 0.78rem;
    margin-top: 0.25rem;
}

.bt-inline-feedback {
    align-items: flex-start;
    background: color-mix(in srgb, var(--bt-primary) 5%, transparent);
    border: 1px solid color-mix(in srgb, var(--bt-primary) 16%, var(--bt-border));
    border-radius: 0.75rem;
    color: var(--bt-ink);
    display: flex;
    gap: 0.7rem;
    padding: 0.8rem 0.9rem;
}

.bt-inline-feedback > i {
    color: var(--bt-primary-deep);
    flex: 0 0 auto;
    font-size: 1.15rem;
    margin-top: 0.05rem;
}

.bt-inline-feedback.is-success {
    background: color-mix(in srgb, var(--bt-teal) 7%, transparent);
    border-color: color-mix(in srgb, var(--bt-teal) 18%, var(--bt-border));
}

.bt-inline-feedback.is-success > i {
    color: var(--bt-teal);
}

.bt-inline-feedback.is-warning {
    background: color-mix(in srgb, var(--tblr-orange) 7%, transparent);
    border-color: color-mix(in srgb, var(--tblr-orange) 20%, var(--bt-border));
}

.bt-inline-feedback.is-warning > i {
    color: var(--tblr-orange);
}

.bt-inline-feedback.is-danger,
.bt-inline-feedback.is-error {
    background: color-mix(in srgb, var(--tblr-danger) 6%, transparent);
    border-color: color-mix(in srgb, var(--tblr-danger) 18%, var(--bt-border));
}

.bt-inline-feedback.is-danger > i,
.bt-inline-feedback.is-error > i {
    color: var(--tblr-danger);
}

.bt-status-pulse {
    animation: bt-status-pulse 1.5s ease-in-out infinite;
}

@keyframes bt-status-pulse {
    0%, 100% { opacity: 0.42; }
    50% { opacity: 1; }
}

.bt-receipt-detail-workspace {
    min-width: 0;
}

.bt-receipt-source-sticky {
    position: sticky;
    top: 1rem;
}

.bt-receipt-source-card {
    overflow: hidden;
}

.bt-receipt-source-card .nav-pills {
    background: color-mix(in srgb, var(--bt-primary) 5%, transparent);
    border-radius: 0.7rem;
    padding: 0.2rem;
}

.bt-receipt-source-card .nav-link {
    border-radius: 0.52rem;
    color: var(--bt-muted);
    font-size: 0.75rem;
    font-weight: 650;
    padding: 0.4rem 0.65rem;
}

.bt-receipt-source-card .nav-link.active {
    background: var(--bt-surface);
    box-shadow: 0 4px 12px rgba(31, 42, 68, 0.08);
    color: var(--bt-primary-deep);
}

.bt-receipt-source-content {
    background:
        radial-gradient(circle at 50% 5%, rgba(125, 104, 229, 0.14), transparent 35%),
        color-mix(in srgb, var(--bt-ink) 93%, #000);
}

.bt-receipt-source-preview,
.bt-receipt-ocr-panel {
    height: clamp(28rem, 57vh, 48rem);
    min-height: 28rem;
    overflow: auto;
}

.bt-source-placeholder {
    align-items: center;
    color: rgba(255, 255, 255, 0.68);
    display: flex;
    gap: 0.65rem;
    height: 100%;
    justify-content: center;
    min-height: 20rem;
    padding: 2rem;
}

.bt-source-image-frame {
    display: flex;
    justify-content: center;
    min-height: calc(100% - 3.5rem);
    padding: 1.25rem;
}

.bt-source-image-frame img {
    align-self: flex-start;
    background: #fff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
    display: block;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.bt-source-caption {
    align-items: center;
    backdrop-filter: blur(12px);
    background: color-mix(in srgb, var(--bt-surface) 92%, transparent);
    border-top: 1px solid color-mix(in srgb, var(--bt-border) 80%, transparent);
    bottom: 0;
    display: flex;
    font-size: 0.75rem;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.65rem 0.8rem;
    position: sticky;
}

.bt-source-caption > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bt-receipt-source-preview .bt-state,
.bt-receipt-ocr-panel .bt-state {
    color: rgba(255, 255, 255, 0.68);
    height: 100%;
}

.bt-receipt-source-preview .bt-state-title,
.bt-receipt-ocr-panel .bt-state-title {
    color: #fff;
}

.bt-receipt-ocr-panel {
    background: var(--bt-surface);
}

.bt-ocr-heading {
    align-items: center;
    border-bottom: 1px solid var(--bt-border);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.85rem 1rem;
}

.bt-receipt-ocr-text,
.snapshot-block {
    background: var(--tblr-bg-surface-secondary);
    border-radius: var(--tblr-border-radius);
    font-family: var(--tblr-font-monospace);
    font-size: 0.75rem;
    line-height: 1.65;
    margin: 0;
    overflow: auto;
    padding: 1rem;
    white-space: pre-wrap;
}

.bt-receipt-ocr-text {
    background: transparent;
    min-height: calc(100% - 3.5rem);
}

.snapshot-block {
    max-height: 18rem;
}

.bt-page-selector-list {
    display: grid;
    gap: 0.45rem;
}

.bt-page-selector {
    align-items: center;
    background: color-mix(in srgb, var(--bt-primary) 2%, var(--bt-surface));
    border: 1px solid var(--bt-border);
    border-radius: 0.72rem;
    color: var(--bt-ink);
    display: grid;
    gap: 0.65rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0.55rem 0.65rem;
    text-align: left;
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
    width: 100%;
}

.bt-page-selector:hover,
.bt-page-selector:focus-visible {
    border-color: color-mix(in srgb, var(--bt-primary) 55%, var(--bt-border));
    outline: 0;
}

.bt-page-selector.is-active {
    background: color-mix(in srgb, var(--bt-primary) 8%, var(--bt-surface));
    border-color: color-mix(in srgb, var(--bt-primary) 45%, var(--bt-border));
}

.bt-page-number {
    align-items: center;
    background: color-mix(in srgb, var(--bt-primary) 11%, transparent);
    border-radius: 0.55rem;
    color: var(--bt-primary-deep);
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 750;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.bt-page-copy {
    min-width: 0;
}

.bt-page-copy strong,
.bt-page-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bt-page-copy small,
.bt-page-confidence {
    color: var(--bt-muted);
    font-size: 0.68rem;
}

.bt-page-add-details {
    border-top: 1px solid var(--bt-border);
    padding-top: 0.8rem;
}

.bt-page-add-details > summary,
.bt-receipt-activity > summary {
    color: var(--bt-primary-deep);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 650;
    list-style: none;
}

.bt-page-add-details > summary::-webkit-details-marker,
.bt-receipt-activity > summary::-webkit-details-marker {
    display: none;
}

.bt-review-step-card > .card-header {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.bt-step-number {
    align-items: center;
    background: color-mix(in srgb, var(--bt-primary) 11%, transparent);
    border-radius: 50%;
    color: var(--bt-primary-deep);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 750;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.bt-receipt-summary-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bt-receipt-summary-metric {
    background: color-mix(in srgb, var(--bt-primary) 3%, var(--bt-surface));
    border: 1px solid var(--bt-border);
    border-radius: 0.72rem;
    min-width: 0;
    padding: 0.7rem;
}

.bt-receipt-summary-metric .metric-value {
    color: var(--bt-ink);
    font-size: 0.9rem;
    font-weight: 680;
    margin-top: 0.18rem;
}

.bt-receipt-reconcile {
    align-items: flex-start;
    background: color-mix(in srgb, var(--bt-primary) 4%, transparent);
    border-radius: 0.72rem;
    display: flex;
    gap: 0.65rem;
    margin-top: 0.7rem;
    padding: 0.72rem 0.8rem;
}

.bt-receipt-reconcile > i {
    color: var(--bt-primary-deep);
    flex: 0 0 auto;
    font-size: 1.15rem;
    margin-top: 0.05rem;
}

.bt-receipt-reconcile strong,
.bt-receipt-reconcile span {
    display: block;
}

.bt-receipt-reconcile strong {
    color: var(--bt-ink);
    font-size: 0.78rem;
}

.bt-receipt-reconcile span {
    color: var(--bt-muted);
    font-size: 0.72rem;
    margin-top: 0.1rem;
}

.bt-receipt-reconcile.is-matched {
    background: color-mix(in srgb, var(--bt-teal) 8%, transparent);
}

.bt-receipt-reconcile.is-matched > i {
    color: var(--bt-teal);
}

.bt-receipt-reconcile.is-warning {
    background: color-mix(in srgb, var(--tblr-orange) 9%, transparent);
}

.bt-receipt-reconcile.is-warning > i {
    color: var(--tblr-orange);
}

.bt-receipt-linked-meta {
    color: var(--bt-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.72rem;
    gap: 0.55rem 1.2rem;
    margin-top: 0.75rem;
}

.bt-receipt-linked-meta span {
    align-items: center;
    display: inline-flex;
    gap: 0.3rem;
}

.bt-receipt-linked-meta strong {
    color: var(--bt-ink);
}

.bt-receipt-check-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bt-receipt-check {
    align-items: flex-start;
    border: 1px solid var(--bt-border);
    border-radius: 0.75rem;
    display: flex;
    gap: 0.7rem;
    min-width: 0;
    padding: 0.8rem;
}

.bt-check-icon {
    align-items: center;
    background: color-mix(in srgb, var(--bt-primary) 8%, transparent);
    border-radius: 0.6rem;
    color: var(--bt-primary-deep);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.05rem;
    height: 2.2rem;
    justify-content: center;
    width: 2.2rem;
}

.bt-receipt-activity {
    border-top: 1px solid var(--bt-border);
    padding-top: 0.75rem;
}

.bt-receipt-activity li {
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.25rem 0;
}

.bt-receipt-activity time {
    flex: 0 0 auto;
}

.item-table {
    min-width: 40rem;
    table-layout: fixed;
}

.item-table input,
.item-table select {
    min-width: 0;
}

.item-table th,
.item-table td {
    vertical-align: middle;
    white-space: nowrap;
}

.item-table .col-line {
    max-width: 2.25rem;
    min-width: 2.25rem;
    text-align: center;
    width: 2.25rem;
}

.item-table .col-item {
    width: 13rem;
}

.item-table .col-qty {
    width: 4rem;
}

.item-table .col-unit,
.item-table .col-total {
    width: 5rem;
}

.item-table .col-actions {
    text-align: center;
    width: 5.75rem;
}

.item-table th.col-item,
.item-table th.col-qty,
.item-table th.col-unit,
.item-table th.col-total,
.item-table th.col-actions {
    text-align: center;
}

.item-table .col-item input {
    min-width: 8rem;
}

#receipt-items-panel .table-responsive {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
}

#manual-item-form .number-input,
#receipt-review-form .number-input,
.item-table .number-input {
    text-align: right;
}

.bt-manual-item-toggle {
    padding: 0.7rem 1rem;
}

.bt-manual-item-toggle > .btn {
    border: 1px dashed color-mix(in srgb, var(--bt-primary) 30%, var(--bt-border));
}

.bt-receipt-confirm-card {
    border-bottom: 0.2rem solid var(--bt-primary);
}

.bt-receipt-confirm-footer {
    align-items: center;
    background: color-mix(in srgb, var(--bt-primary) 3%, var(--bt-surface));
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.bt-processing-history-card {
    box-shadow: none;
}

.bt-inventory-summary {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(18rem, 1.65fr) repeat(2, minmax(13rem, 1fr));
}

.bt-inventory-progress-card,
.bt-inventory-stat {
    box-shadow: none;
    min-width: 0;
}

.bt-inventory-progress-card .card-body,
.bt-inventory-stat .card-body {
    padding: 1rem;
}

.bt-inventory-progress-card .metric-value,
.bt-inventory-stat .metric-value {
    color: var(--bt-ink);
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    font-weight: 750;
    letter-spacing: -0.04em;
    line-height: 1.2;
    margin: 0.15rem 0;
}

.bt-inventory-progress-card .progress-bar {
    background: linear-gradient(90deg, var(--bt-primary), var(--bt-teal));
}

.bt-inventory-stat .card-body {
    align-items: flex-start;
    display: flex;
    gap: 0.8rem;
}

.bt-inventory-stat .bt-metric-icon {
    flex: 0 0 2.35rem;
    font-size: 1.05rem;
    height: 2.35rem;
}

.bt-item-organizer-workspace {
    overflow: visible;
}

.bt-item-filter-bar {
    background: color-mix(in srgb, var(--bt-primary) 2.5%, transparent);
}

.bt-organizer-views {
    background: color-mix(in srgb, var(--bt-primary) 5%, transparent);
    border-radius: 0.7rem;
    padding: 0.2rem;
}

.bt-organizer-views .nav-link {
    align-items: center;
    border-radius: 0.52rem;
    color: var(--bt-muted);
    display: flex;
    font-size: 0.78rem;
    font-weight: 650;
    padding: 0.42rem 0.7rem;
}

.bt-organizer-views .nav-link.active {
    background: var(--bt-surface);
    box-shadow: 0 4px 12px rgba(31, 42, 68, 0.08);
    color: var(--bt-primary-deep);
}

.bt-bulk-category-bar {
    background: var(--bt-surface);
    border-bottom: 1px solid var(--bt-border);
    padding: 0.8rem 1rem;
    position: sticky;
    top: 0.75rem;
    transition: background-color 160ms ease, box-shadow 160ms ease;
    z-index: 12;
}

.bt-bulk-category-bar.is-active {
    background: color-mix(in srgb, var(--bt-primary) 7%, var(--bt-surface));
    box-shadow: 0 10px 30px rgba(31, 42, 68, 0.12);
}

.bt-bulk-category-main {
    align-items: center;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(14rem, 1fr) auto minmax(22rem, 1.15fr);
}

.bt-bulk-selection-copy,
.bt-bulk-category-action,
.bt-bulk-selection-tools {
    align-items: center;
    display: flex;
    gap: 0.6rem;
}

.bt-bulk-selection-copy {
    min-width: 0;
}

.bt-bulk-selection-icon {
    align-items: center;
    background: color-mix(in srgb, var(--bt-primary) 10%, transparent);
    border-radius: 0.65rem;
    color: var(--bt-primary-deep);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.1rem;
    height: 2.4rem;
    justify-content: center;
    width: 2.4rem;
}

.bt-bulk-category-action .form-select {
    min-width: 12rem;
}

.bt-bulk-category-action .btn {
    flex: 0 0 auto;
}

.bt-bulk-learning-options {
    border-top: 1px solid color-mix(in srgb, var(--bt-border) 75%, transparent);
    margin-top: 0.65rem;
    padding-top: 0.55rem;
}

.bt-bulk-learning-options > summary {
    color: var(--bt-primary-deep);
    cursor: pointer;
    font-size: 0.74rem;
    font-weight: 650;
    list-style: none;
}

.bt-bulk-learning-options > summary::-webkit-details-marker {
    display: none;
}

.bt-inventory-table {
    min-width: 940px;
}

.bt-inventory-table tbody tr[data-inventory-row] {
    cursor: pointer;
    transition: background-color 140ms ease;
}

.bt-inventory-table tbody tr[data-inventory-row]:hover {
    background: color-mix(in srgb, var(--bt-primary) 3%, transparent);
}

.bt-inventory-table tbody tr[data-inventory-row].is-selected {
    background: color-mix(in srgb, var(--bt-primary) 8%, transparent);
    box-shadow: inset 0.2rem 0 0 var(--bt-primary);
}

.bt-inventory-table tbody td {
    padding-bottom: 0.85rem;
    padding-top: 0.85rem;
}

@media (min-width: 992px) {
    .page-wrapper {
        margin-left: var(--bt-sidebar-width);
    }
}

@media (max-width: 1199.98px) {
    .bt-receipt-source-sticky {
        position: static;
    }

    .bt-receipt-source-preview,
    .bt-receipt-ocr-panel {
        height: 34rem;
        min-height: 24rem;
    }

    .bt-bulk-category-main {
        grid-template-columns: minmax(14rem, 1fr) minmax(22rem, 1fr);
    }

    .bt-bulk-selection-tools {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (max-width: 991.98px) {
    .bt-sidebar {
        width: 100%;
    }

    .bt-sidebar .container-fluid {
        padding: 0.75rem 1rem;
    }

    .bt-topbar {
        position: static;
    }

    .bt-dashboard-trend-grid {
        min-height: 12rem;
    }

    .bt-trend-track {
        height: 8rem;
    }

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

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

    .bt-review-guidance {
        grid-column: 1 / -1;
    }

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

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

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

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

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

    .bt-inventory-progress-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .bt-feedback-toasts {
        left: 1rem;
        right: 1rem;
        top: 1rem;
        width: auto;
    }

    .bt-topbar .container-fluid,
    .page-body > .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .bt-topbar-copy,
    .bt-user-copy {
        display: none;
    }

    .bt-user-trigger {
        border-left: 0;
        margin-left: 0;
        padding-left: 0;
    }

    .bt-dashboard-hero {
        border-radius: 1rem;
    }

    .bt-dashboard-trend-grid {
        gap: 0.35rem;
    }

    .bt-trend-value {
        display: none;
    }

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

    .bt-ledger-header .col-lg-auto,
    .bt-ledger-header .d-flex {
        width: 100%;
    }

    .bt-month-switcher {
        flex: 1 1 auto;
    }

    .bt-month-switcher .form-control {
        flex: 1 1 auto;
        min-width: 0;
        text-align: center;
    }

    .bt-ledger-tools .card-header .nav {
        margin-left: 0 !important;
        width: 100%;
    }

    .bt-ledger-tools .nav-item {
        flex: 1 1 0;
    }

    .bt-ledger-tools .nav-link {
        justify-content: center;
        width: 100%;
    }

    .bt-receipt-header .col-lg-auto,
    .bt-receipt-header .d-flex,
    .bt-review-header .col-lg-auto,
    .bt-review-header .d-flex {
        width: 100%;
    }

    .bt-receipt-detail-header .col-auto,
    .bt-receipt-detail-header .col-auto > .btn,
    .bt-receipt-detail-header .col-auto > a {
        flex: 1 1 auto;
    }

    .bt-receipt-detail-header .col-auto {
        width: 100%;
    }

    .bt-inventory-header .col-auto,
    .bt-inventory-header .col-auto > .btn,
    .bt-inventory-header .col-auto > a {
        flex: 1 1 auto;
    }

    .bt-inventory-header .col-auto {
        width: 100%;
    }

    .bt-receipt-source-preview,
    .bt-receipt-ocr-panel {
        height: 28rem;
        min-height: 20rem;
    }

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

    .bt-receipt-confirm-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .bt-receipt-confirm-footer .btn {
        width: 100%;
    }

    .bt-bulk-category-bar {
        position: static;
    }

    .bt-bulk-category-main {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .bt-bulk-selection-tools {
        grid-column: auto;
        grid-row: auto;
    }

    .bt-bulk-category-action {
        align-items: stretch;
    }

    .bt-review-workspace .card-header .nav {
        margin-left: 0 !important;
        width: 100%;
    }

    .bt-review-workspace .nav-item {
        flex: 1 1 0;
    }

    .bt-review-workspace .nav-link {
        justify-content: center;
        width: 100%;
    }

    .bt-budget-header .col-lg-auto {
        width: 100%;
    }

    .bt-budget-header .bt-month-switcher {
        width: 100%;
    }

    .bt-budget-header .bt-month-switcher .form-control {
        flex: 1 1 auto;
        min-width: 0;
        text-align: center;
    }

    .bt-budget-workspace .card-header .nav {
        margin-left: 0 !important;
        width: 100%;
    }

    .bt-budget-workspace .nav-item {
        flex: 1 1 0;
    }

    .bt-budget-workspace .nav-link {
        justify-content: center;
        width: 100%;
    }

    .bt-finance-header .col-lg-auto,
    .bt-finance-header .d-flex,
    .bt-report-header .col-xl-auto,
    .bt-report-header .col-xl-auto > .d-flex {
        width: 100%;
    }

    .bt-finance-workspace .card-header .nav {
        margin-left: 0 !important;
        width: 100%;
    }

    .bt-finance-workspace .nav-item {
        flex: 1 1 0;
    }

    .bt-finance-workspace .nav-link {
        justify-content: center;
        width: 100%;
    }

    .bt-report-header .bt-month-switcher {
        flex: 1 1 auto;
    }

    .bt-report-header .bt-month-switcher .form-control {
        flex: 1 1 auto;
        min-width: 0;
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    .bt-topbar-actions .bt-new-label {
        display: none;
    }

    .bt-hero-actions .btn {
        flex: 1 1 auto;
    }

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

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

    .bt-ledger-stat .card-body {
        align-items: center;
    }

    .bt-ledger-stat .metric-value {
        font-size: 1.35rem;
    }

    .bt-review-summary,
    .bt-upload-metrics {
        grid-template-columns: 1fr;
    }

    .bt-review-guidance {
        grid-column: auto;
    }

    .bt-review-workspace .nav-pills {
        gap: 0.2rem;
    }

    .bt-review-workspace .nav-item {
        flex-basis: 100%;
    }

    .bt-budget-summary,
    .bt-budget-health-facts,
    .bt-allocation-summary {
        grid-template-columns: 1fr;
    }

    .bt-budget-stat .metric-value {
        font-size: 1.35rem;
    }

    .bt-budget-alert-item {
        flex-wrap: wrap;
    }

    .bt-budget-alert-item .btn {
        margin-left: 3.55rem;
    }

    .bt-finance-summary,
    .bt-report-summary {
        grid-template-columns: 1fr;
    }

    .bt-finance-stat .metric-value,
    .bt-report-stat .metric-value {
        font-size: 1.35rem;
    }

    .bt-receipt-source-card .card-header .nav {
        margin-left: 0 !important;
        width: 100%;
    }

    .bt-receipt-source-card .nav-item {
        flex: 1 1 0;
    }

    .bt-receipt-source-card .nav-link {
        justify-content: center;
        width: 100%;
    }

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

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

    .bt-inventory-progress-card {
        grid-column: auto;
    }

    .bt-organizer-views {
        display: flex;
        width: 100%;
    }

    .bt-organizer-views .nav-item {
        flex: 1 1 0;
    }

    .bt-organizer-views .nav-link {
        justify-content: center;
        width: 100%;
    }

    .bt-bulk-category-action {
        flex-direction: column;
    }

    .bt-bulk-category-action .form-select,
    .bt-bulk-category-action .btn {
        width: 100%;
    }

    .bt-source-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .bt-source-row strong {
        margin-left: 3.15rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .bt-status-pulse {
        animation: none;
    }
}
