:root {
    color-scheme: light;
    --bp-background: #F3F4F6;
    --bp-surface: #FFFFFF;
    --bp-surface-secondary: #F8F9FA;
    --bp-border: #E2E5E9;
    --bp-text: #18202A;
    --bp-text-secondary: #667085;
    --bp-text-muted: #98A2B3;
    --bp-primary: #2563EB;
    --bp-primary-hover: #1D4ED8;
    --bp-primary-soft: #EAF2FF;
    --bp-success: #16A36A;
    --bp-warning: #E9A23B;
    --bp-danger: #E5484D;
    --bp-violet: #6D28D9;
    --bp-amber: #B45309;
    --bp-teal: #0F766E;
    --bp-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    --bp-overlay: rgba(15, 23, 32, 0.45);
    --bp-font: "Inter", system-ui, sans-serif;
    --bp-sidebar: 232px;
    --bp-on-primary: #FFFFFF;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bp-background: #0B1118;
    --bp-surface: #131C26;
    --bp-surface-secondary: #19232E;
    --bp-border: #263442;
    --bp-text: #F1F5F9;
    --bp-text-secondary: #94A3B8;
    --bp-text-muted: #64748B;
    --bp-primary: #3B82F6;
    --bp-primary-hover: #60A5FA;
    --bp-primary-soft: #142A4D;
    --bp-success: #34D399;
    --bp-warning: #FBBF24;
    --bp-danger: #F87171;
    --bp-violet: #C4B5FD;
    --bp-amber: #FBBF24;
    --bp-teal: #5EEAD4;
    --bp-shadow: none;
    --bp-overlay: rgba(0, 0, 0, 0.55);
}

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

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bp-background);
    color: var(--bp-text);
    font-family: var(--bp-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    font-size: 24px;
    font-weight: 600;
    line-height: 32px;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    line-height: 26px;
}

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

a {
    color: var(--bp-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1:focus {
    outline: none;
}

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

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

.bp-muted {
    color: var(--bp-text-secondary);
}

.bp-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bp-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bp-section > h2 {
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bp-text-muted);
}

.bp-section.is-violet > h2,
.bp-section.is-success > h2,
.bp-section.is-amber > h2,
.bp-section.is-teal > h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bp-section.is-violet > h2::before,
.bp-section.is-success > h2::before,
.bp-section.is-amber > h2::before,
.bp-section.is-teal > h2::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex: none;
}

.bp-section.is-violet > h2::before {
    background: var(--bp-violet);
}

.bp-section.is-success > h2::before {
    background: var(--bp-success);
}

.bp-section.is-amber > h2::before {
    background: var(--bp-amber);
}

.bp-section.is-teal > h2::before {
    background: var(--bp-teal);
}

.bp-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.bp-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bp-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 280px));
    gap: 16px;
}

.bp-shell {
    min-height: 100vh;
    display: flex;
    background: var(--bp-background);
}

.bp-sidebar {
    width: var(--bp-sidebar);
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 12;
    display: flex;
    flex-direction: column;
    flex: none;
    min-height: 0;
    overflow: hidden;
    padding: 16px 12px;
    background: var(--bp-surface);
    border-right: 1px solid var(--bp-border);
}

.bp-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-height: 0;
    margin-top: 24px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--bp-text-muted) transparent;
}

.bp-tip-scope {
    display: contents;
}

.bp-nav-group {
    flex: none;
    margin: 16px 12px 4px;
    overflow: hidden;
    max-height: 40px;
    border-top: 0 solid transparent;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--bp-text-muted);
    transition: max-height 200ms ease, margin 200ms ease, color 120ms ease, border-color 200ms ease, border-top-width 200ms ease;
}

.bp-nav-item {
    display: flex;
    align-items: center;
    flex: none;
    gap: 0;
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--bp-text-secondary);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 150ms, color 150ms, width 200ms ease;
}

.bp-nav-item:hover {
    background: var(--bp-surface-secondary);
    color: var(--bp-text);
    text-decoration: none;
}

.bp-nav-item.active {
    background: var(--bp-primary-soft);
    color: var(--bp-primary);
}

.bp-nav-label {
    min-width: 0;
    margin-left: 10px;
    overflow: hidden;
    max-width: 180px;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: max-width 200ms ease, margin-left 200ms ease, opacity 140ms ease;
}

.bp-sidebar-footer {
    flex: none;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--bp-border);
}

.bp-product {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-width: 100%;
    margin-top: 4px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--bp-text-muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    text-decoration: none;
}

.bp-product:hover {
    color: var(--bp-text-secondary);
    text-decoration: none;
}

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

.bp-product-mark {
    display: none;
    width: 18px;
    height: 18px;
    place-items: center;
    flex: none;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
}

.bp-sidebar-toggle .bp-icon {
    transition: transform 200ms ease;
}

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

.bp-header {
    height: 64px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bp-surface);
    border-bottom: 1px solid var(--bp-border);
}

.bp-header-end {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.bp-header-search {
    position: relative;
    flex: 1;
    min-width: 0;
    max-width: 360px;
}

.bp-header-search .bp-search {
    flex: none;
    width: 100%;
    z-index: 22;
}

.bp-screen-search-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: default;
}

.bp-screen-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 21;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    background: var(--bp-surface);
    box-shadow: var(--bp-shadow);
}

.bp-screen-search-empty {
    margin: 0;
    padding: 8px;
    color: var(--bp-text-secondary);
    font-size: 14px;
    line-height: 20px;
}

.bp-screen-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 8px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}

.bp-screen-search-item:hover {
    background: var(--bp-surface-secondary);
    text-decoration: none;
}

.bp-screen-search-item .bp-link-card-icon {
    width: 32px;
    height: 32px;
}

.bp-screen-search-item strong,
.bp-screen-search-item strong + span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-screen-search-item strong {
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.bp-screen-search-item strong + span {
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: var(--bp-text-secondary);
}

.bp-header-note {
    max-width: 180px;
    font-size: 12px;
    line-height: 16px;
    color: var(--bp-danger);
}

.bp-content {
    container: workspace / inline-size;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
}

.bp-menu-button {
    display: none;
}

.bp-backdrop {
    display: none;
}

.bp-brand {
    display: flex;
    align-items: center;
    gap: 0;
    flex: none;
    min-width: 0;
    padding-left: calc(12px - (32px - 18px) / 2);
    overflow: hidden;
}

a.bp-brand,
a.bp-brand:hover {
    color: inherit;
    text-decoration: none;
}

a.bp-brand:hover .bp-brand-name {
    text-decoration: underline;
}

.bp-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    flex: none;
    overflow: hidden;
}

span.bp-mark {
    background: var(--bp-primary);
}

span.bp-mark::after {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid var(--bp-on-primary);
    border-radius: 4px;
}

img.bp-mark {
    object-fit: cover;
    background: var(--bp-surface-secondary);
}

.bp-brand-name {
    min-width: 0;
    margin-left: 10px;
    overflow: hidden;
    max-width: 180px;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
    transition: max-width 200ms ease, margin-left 200ms ease, opacity 140ms ease;
}

.bp-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    flex: none;
    background: var(--bp-primary-soft);
    color: var(--bp-primary);
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
}

.bp-tenant {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.bp-tenant .bp-field {
    width: 220px;
}

.bp-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.bp-page-header p {
    margin-top: 4px;
    color: var(--bp-text-secondary);
}

.bp-card {
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    box-shadow: var(--bp-shadow);
    padding: 16px;
}

.bp-master {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 16px;
    min-width: 0;
    height: calc(100vh - var(--bp-master-offset, 200px));
    min-height: 420px;
}

/* O resumo acima do master ocupa a altura que o master devolve. */
.bp-page-with-summary {
    --bp-master-offset: 324px;
}

.bp-master-list,
.bp-master-detail {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    box-shadow: var(--bp-shadow);
    overflow: hidden;
}

.bp-master-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px;
}

.bp-master-toolbar .bp-button {
    flex: none;
}

.bp-master-toolbar .bp-month-stepper {
    flex-basis: 100%;
}

.bp-month-stepper {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.bp-month-stepper-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
}

.bp-search {
    position: relative;
    flex: 1;
    min-width: 0;
}

.bp-search .bp-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bp-text-muted);
    pointer-events: none;
}

.bp-search .bp-input {
    padding-left: 32px;
}

.bp-master-toolbar:not(:has(*)) {
    display: none;
}

.bp-master-list-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-height: 0;
    padding: 8px;
    overflow: auto;
}

.bp-master-list-footer {
    padding: 8px 12px 12px;
    border-top: 1px solid var(--bp-border);
}

.bp-master-list-footer:not(:has(*)) {
    display: none;
}

.bp-master-list-footer .bp-pager {
    margin-top: 0;
}

.bp-master-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--bp-text);
    text-align: left;
    cursor: pointer;
}

.bp-master-item:hover {
    background: var(--bp-surface-secondary);
}

.bp-master-item.is-selected {
    background: var(--bp-primary-soft);
}

.bp-master-item.is-selected:hover {
    background: var(--bp-primary-soft);
}

.bp-master-item:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.bp-master-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.bp-master-item-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.bp-master-item.is-selected .bp-master-item-title {
    color: var(--bp-primary);
}

.bp-master-item-subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    line-height: 16px;
    color: var(--bp-text-secondary);
}

.bp-master-item-trailing {
    flex: none;
}

.bp-amount-trailing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.bp-amount {
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.bp-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.bp-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 16px;
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    box-shadow: var(--bp-shadow);
}

.bp-stat.is-toggle {
    color: var(--bp-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 150ms, background 150ms;
}

.bp-stat.is-toggle:hover {
    border-color: var(--bp-text-muted);
}

.bp-stat.is-toggle:focus-visible {
    outline: none;
    border-color: var(--bp-primary);
    box-shadow: 0 0 0 3px var(--bp-primary-soft);
}

.bp-stat.is-toggle.is-selected {
    border-color: var(--bp-primary);
    background: var(--bp-primary-soft);
}

.bp-stat.is-toggle:disabled {
    cursor: not-allowed;
}

.bp-stat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    color: var(--bp-text-secondary);
}

.bp-stat-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bp-text-muted);
}

.bp-stat-dot.is-primary {
    background: var(--bp-primary);
}

.bp-stat-dot.is-success {
    background: var(--bp-success);
}

.bp-stat-dot.is-warning {
    background: var(--bp-warning);
}

.bp-stat-dot.is-danger {
    background: var(--bp-danger);
}

.bp-stat-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 22px;
    font-weight: 600;
    line-height: 28px;
    font-variant-numeric: tabular-nums;
}

.bp-stat-detail {
    font-size: 12px;
    line-height: 16px;
    color: var(--bp-text-muted);
}

.bp-lookup {
    position: relative;
}

.bp-lookup .bp-input {
    padding-right: 36px;
}

.bp-lookup.is-clearable .bp-input {
    padding-right: 60px;
}

.bp-lookup-clear {
    position: absolute;
    right: 28px;
    top: 20px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--bp-text-muted);
    cursor: pointer;
}

.bp-lookup-clear:hover {
    background: var(--bp-surface-secondary);
    color: var(--bp-text);
}

.bp-lookup > .bp-icon {
    position: absolute;
    right: 12px;
    top: 20px;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--bp-text-muted);
}

.bp-lookup-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 240px;
    margin: 0;
    padding: 4px;
    overflow: auto;
    list-style: none;
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
}

.bp-lookup-option {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
}

.bp-lookup-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-lookup-detail {
    flex: none;
    font-size: 12px;
    font-weight: 400;
    color: var(--bp-text-secondary);
}

.bp-lookup-option.is-active {
    background: var(--bp-surface-secondary);
}

.bp-lookup-option[aria-selected="true"] {
    color: var(--bp-primary);
    font-weight: 500;
}

.bp-lookup-empty {
    padding: 8px 12px;
    font-size: 13px;
    line-height: 20px;
    color: var(--bp-text-muted);
}

.bp-detail,
.bp-detail-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.bp-detail.is-empty {
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
}

.bp-detail-back {
    display: none;
    padding: 12px 16px 0;
}

.bp-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--bp-border);
}

.bp-detail-header:has(> .bp-detail-subtitle) {
    container-type: inline-size;
    container-name: detail-header;
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 16px;
    row-gap: 4px;
}

.bp-detail-heading {
    min-width: 0;
}

.bp-detail-heading h2,
.bp-detail-heading p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-detail-heading p {
    margin-top: 4px;
    color: var(--bp-text-secondary);
}

.bp-detail-subtitle {
    flex: 1 0 100%;
    min-width: 0;
}

.bp-detail-subtitle a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--bp-text-secondary);
    text-decoration: none;
}

@container detail-header (min-width: 520px) {
    .bp-detail-subtitle {
        flex: 0 1 auto;
        margin-left: auto;
        max-width: min(50%, 28rem);
        text-align: right;
    }

    .bp-detail-subtitle a {
        display: inline-block;
        max-width: 100%;
        vertical-align: middle;
    }
}

.bp-detail-subtitle a:hover {
    color: var(--bp-primary);
}

.bp-detail-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    flex: none;
}

.bp-detail-body {
    flex: 1;
    min-height: 0;
    padding: 16px;
    overflow: auto;
}

.bp-detail-body:has(> .bp-tabs-frame) {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.bp-tabs-frame {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.bp-tabs {
    display: flex;
    gap: 4px;
    flex: none;
    padding: 0 8px;
    border-bottom: 1px solid var(--bp-border);
}

.bp-tab {
    margin-bottom: -1px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    background: transparent;
    color: var(--bp-text-secondary);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    cursor: pointer;
}

.bp-tab:hover {
    color: var(--bp-text);
}

.bp-tab.is-selected {
    color: var(--bp-primary);
    border-bottom-color: var(--bp-primary);
}

.bp-tab-panel {
    flex: 1;
    min-height: 0;
    padding: 16px;
    overflow: auto;
}

.bp-detail-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--bp-border);
}

.bp-detail-footer:not(:has(button)) {
    display: none;
}

.bp-card > h2 {
    margin-bottom: 16px;
}

.bp-record {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100vh - 200px);
    min-height: 420px;
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    box-shadow: var(--bp-shadow);
    overflow: hidden;
}

.bp-image-field {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.bp-image-preview {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    flex: none;
    overflow: hidden;
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    background: var(--bp-surface-secondary);
    color: var(--bp-text-muted);
}

.bp-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bp-file-trigger {
    position: relative;
    overflow: hidden;
}

.bp-file-trigger .bp-file-input,
.bp-file-trigger input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.bp-file-trigger input[type="file"]::file-selector-button {
    cursor: pointer;
}

.bp-file-trigger.is-disabled {
    pointer-events: none;
}

.bp-attachment {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.bp-attachment-name {
    color: var(--bp-text);
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.bp-attachment-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--bp-border);
    border-radius: 8px;
}

.bp-attachment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
}

.bp-attachment-item + .bp-attachment-item {
    border-top: 1px solid var(--bp-border);
}

.bp-attachment-item-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.bp-attachment-item-size {
    color: var(--bp-text-secondary);
    font-size: 12px;
    line-height: 16px;
}

.bp-field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    align-items: start;
}

.bp-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    box-shadow: var(--bp-shadow);
    color: inherit;
    text-decoration: none;
    transition: background-color 150ms, border-color 150ms;
}

.bp-link-card:hover {
    background: var(--bp-surface-secondary);
    border-color: color-mix(in srgb, var(--bp-text-muted) 55%, var(--bp-border));
    text-decoration: none;
}

.bp-link-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    flex: none;
    background: var(--bp-primary-soft);
    color: var(--bp-primary);
}

.bp-link-card-icon.is-violet {
    background: color-mix(in srgb, var(--bp-violet) 14%, transparent);
    color: var(--bp-violet);
}

.bp-link-card-icon.is-success {
    background: color-mix(in srgb, var(--bp-success) 14%, transparent);
    color: var(--bp-success);
}

.bp-link-card-icon.is-amber {
    background: color-mix(in srgb, var(--bp-amber) 14%, transparent);
    color: var(--bp-amber);
}

.bp-link-card-icon.is-teal {
    background: color-mix(in srgb, var(--bp-teal) 14%, transparent);
    color: var(--bp-teal);
}

.bp-link-card-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

.bp-link-card-text {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    line-height: 18px;
    color: var(--bp-text-secondary);
}

.bp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    cursor: pointer;
    transition: background-color 150ms, border-color 150ms, color 150ms;
}

a.bp-button {
    text-decoration: none;
}

.bp-button.is-compact {
    height: 32px;
}

.bp-button.is-icon {
    width: 40px;
    padding: 0;
}

.bp-button.is-compact.is-icon {
    width: 32px;
}

.bp-button.is-block {
    width: 100%;
}

.bp-button:disabled,
.bp-button.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bp-button.is-primary {
    background: var(--bp-primary);
    color: var(--bp-on-primary);
}

.bp-button.is-primary:hover:not(:disabled) {
    background: var(--bp-primary-hover);
}

.bp-button.is-secondary {
    background: var(--bp-surface);
    border-color: var(--bp-border);
    color: var(--bp-text);
}

.bp-button.is-secondary:hover:not(:disabled) {
    background: var(--bp-surface-secondary);
}

.bp-button.is-pressed,
.bp-button.is-pressed:hover:not(:disabled) {
    background: var(--bp-primary-soft);
    border-color: var(--bp-primary);
    color: var(--bp-primary);
}

.bp-button.is-ghost {
    color: var(--bp-text-secondary);
}

.bp-button.is-ghost:hover:not(:disabled) {
    background: var(--bp-surface-secondary);
    color: var(--bp-text);
}

.bp-button.is-danger {
    background: var(--bp-danger);
    color: var(--bp-on-primary);
}

.bp-button.is-danger:hover:not(:disabled) {
    filter: brightness(0.95);
}

.bp-icon-button {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--bp-text-secondary);
    cursor: pointer;
    transition: background-color 150ms, color 150ms;
}

.bp-icon-button:hover {
    background: var(--bp-surface-secondary);
    color: var(--bp-text);
}

.bp-icon {
    display: block;
    flex: none;
}

.bp-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.bp-field > label,
.bp-field-label {
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
}

.bp-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--bp-border);
    border-radius: 8px;
    background: var(--bp-surface-secondary);
    color: var(--bp-text);
    transition: border-color 150ms, box-shadow 150ms;
}

.bp-input.is-compact {
    height: 32px;
}

.bp-password {
    position: relative;
}

.bp-password .bp-input {
    padding-right: 40px;
}

.bp-password .bp-input::-ms-reveal,
.bp-password .bp-input::-ms-clear {
    display: none;
}

.bp-password-toggle {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 32px;
    height: 32px;
}

.bp-password-toggle:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

textarea.bp-input {
    height: auto;
    min-height: 96px;
    padding: 10px 12px;
    resize: vertical;
    line-height: 20px;
}

.bp-input:focus {
    outline: none;
    border-color: var(--bp-primary);
    box-shadow: 0 0 0 3px var(--bp-primary-soft);
}

.bp-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.bp-hint {
    display: block;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: var(--bp-text-muted);
}

.bp-field-error {
    display: block;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: var(--bp-danger);
}

.bp-input.is-invalid {
    border-color: var(--bp-danger);
}

.bp-input.is-invalid:focus {
    border-color: var(--bp-danger);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bp-danger) 24%, transparent);
}

.bp-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bp-overlay);
}

.bp-dialog {
    width: min(100%, 420px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    border: 1px solid var(--bp-border);
    border-radius: 12px;
    background: var(--bp-surface);
    color: var(--bp-text);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.bp-dialog:focus {
    outline: none;
}

.bp-dialog p {
    color: var(--bp-text-secondary);
}

.bp-dialog .bp-actions {
    justify-content: flex-end;
}

.bp-select-control {
    position: relative;
}

.bp-select-control .bp-input {
    appearance: none;
    padding-right: 36px;
}

.bp-select-control .bp-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--bp-text-muted);
}

.bp-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 40px;
    cursor: pointer;
}

.bp-check input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--bp-primary);
}

.bp-check-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.bp-check-label {
    overflow-wrap: break-word;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.bp-toasts {
    position: fixed;
    z-index: 60;
    top: 80px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.bp-toast {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px 14px;
    overflow: hidden;
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    background: var(--bp-surface);
    color: var(--bp-text);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.16);
    font-size: 14px;
    line-height: 20px;
    pointer-events: auto;
    animation: bp-toast-in 200ms ease;
}

.bp-toast.is-leaving {
    animation: bp-toast-out 180ms ease forwards;
}

.bp-toast-time {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    transform-origin: left center;
    background: var(--bp-text-muted);
    animation: bp-toast-shrink var(--bp-toast-duration) linear forwards;
}

.bp-toast.is-paused .bp-toast-time,
.bp-toast.is-leaving .bp-toast-time {
    animation-play-state: paused;
}

@keyframes bp-toast-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

@keyframes bp-toast-out {
    from {
        opacity: 1;
        transform: none;
    }

    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

@keyframes bp-toast-shrink {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bp-toast,
    .bp-toast.is-leaving {
        animation: none;
    }

    .bp-sidebar,
    .bp-nav-item,
    .bp-nav-label,
    .bp-brand-name,
    .bp-nav-group,
    .bp-sidebar-toggle .bp-icon,
    .bp-sidebar.is-collapsed .bp-product::after {
        transition: none;
    }
}

.bp-toast p {
    flex: 1;
    min-width: 0;
}

.bp-toast-close {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bp-text-muted);
    cursor: pointer;
}

.bp-toast.is-info > .bp-icon {
    color: var(--bp-primary);
}

.bp-toast.is-info .bp-toast-time {
    background: var(--bp-primary);
}

.bp-toast.is-success > .bp-icon {
    color: var(--bp-success);
}

.bp-toast.is-success .bp-toast-time {
    background: var(--bp-success);
}

.bp-toast.is-warning > .bp-icon {
    color: var(--bp-warning);
}

.bp-toast.is-warning .bp-toast-time {
    background: var(--bp-warning);
}

.bp-toast.is-danger > .bp-icon {
    color: var(--bp-danger);
}

.bp-toast.is-danger .bp-toast-time {
    background: var(--bp-danger);
}

.bp-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 20px;
}

.bp-alert.is-info {
    color: var(--bp-primary);
    background: var(--bp-primary-soft);
}

.bp-alert.is-success {
    color: var(--bp-success);
    background: color-mix(in srgb, var(--bp-success) 14%, transparent);
}

.bp-alert.is-warning {
    color: var(--bp-warning);
    background: color-mix(in srgb, var(--bp-warning) 16%, transparent);
}

.bp-alert.is-danger {
    color: var(--bp-danger);
    background: color-mix(in srgb, var(--bp-danger) 12%, transparent);
}

.bp-badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    white-space: nowrap;
}

.bp-badge.is-neutral {
    color: var(--bp-text-secondary);
    background: var(--bp-surface-secondary);
}

.bp-badge.is-primary {
    color: var(--bp-primary);
    background: var(--bp-primary-soft);
}

.bp-badge.is-success {
    color: var(--bp-success);
    background: color-mix(in srgb, var(--bp-success) 14%, transparent);
}

.bp-badge.is-warning {
    color: var(--bp-warning);
    background: color-mix(in srgb, var(--bp-warning) 16%, transparent);
}

.bp-badge.is-danger {
    color: var(--bp-danger);
    background: color-mix(in srgb, var(--bp-danger) 12%, transparent);
}

.bp-empty {
    color: var(--bp-text-secondary);
    padding: 8px 0;
}

.bp-table-wrap {
    overflow-x: auto;
}

.bp-table {
    width: 100%;
    border-collapse: collapse;
}

.bp-table th {
    padding: 8px 12px;
    border-bottom: 1px solid var(--bp-border);
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    color: var(--bp-text-secondary);
    white-space: nowrap;
}

.bp-table td {
    padding: 12px;
    border-bottom: 1px solid var(--bp-border);
    vertical-align: middle;
}

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

.bp-table tbody tr:hover td {
    background: var(--bp-surface-secondary);
}

.bp-row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
}

.bp-row-actions .bp-field {
    width: 180px;
}

.bp-pager {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    color: var(--bp-text-secondary);
    font-size: 13px;
    line-height: 18px;
}

.bp-pager-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    flex-wrap: wrap;
}

.bp-pager-size {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.bp-pager-meta .bp-field {
    width: 64px;
    flex: none;
}

.bp-pager-meta .bp-select-control .bp-input {
    padding-left: 8px;
    padding-right: 24px;
    font-size: 13px;
}

.bp-pager-meta .bp-select-control .bp-icon {
    right: 6px;
}

.bp-pager-count {
    margin-left: auto;
    white-space: nowrap;
}

.bp-pager-nav {
    display: grid;
    grid-template-columns: 32px 32px minmax(0, 1fr) 32px 32px;
    gap: 4px;
}

.bp-pager-page {
    text-align: center;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--bp-text);
}

.bp-choice {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bp-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: safe center;
    padding: 72px 24px 24px;
    background: var(--bp-background);
}

.bp-auth-toolbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 16px;
}

.bp-back {
    margin-right: auto;
}

.bp-auth.bp-auth-split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
}

.bp-auth-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: 48px;
}

.bp-auth-hero::before,
.bp-auth-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: var(--bp-primary-soft);
    pointer-events: none;
}

.bp-auth-hero::before {
    width: 420px;
    height: 420px;
    right: -120px;
    bottom: -160px;
}

.bp-auth-hero::after {
    width: 280px;
    height: 280px;
    left: -80px;
    top: -100px;
}

.bp-product-logo,
.bp-auth-lead,
.bp-auth-lead-text,
.bp-auth-points {
    position: relative;
    z-index: 1;
}

.bp-product-logo {
    display: block;
    width: min(100%, 210px);
    height: auto;
}

.bp-auth-hero .bp-product-logo {
    width: min(100%, 248px);
    align-self: flex-start;
}

.bp-product-logo.is-compact {
    width: 90px;
}

.bp-auth-lead {
    max-width: 16em;
    font-size: 32px;
    font-weight: 600;
    line-height: 40px;
}

.bp-auth-lead span {
    color: var(--bp-primary);
}

.bp-auth-lead-text {
    max-width: 36em;
    color: var(--bp-text-secondary);
}

.bp-auth-points {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bp-auth-point {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.bp-auth-point-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: 8px;
    background: var(--bp-primary-soft);
    color: var(--bp-primary);
}

.bp-auth-point.is-success .bp-auth-point-icon {
    background: color-mix(in srgb, var(--bp-success) 16%, transparent);
    color: var(--bp-success);
}

.bp-auth-point.is-warning .bp-auth-point-icon {
    background: color-mix(in srgb, var(--bp-warning) 20%, transparent);
    color: var(--bp-warning);
}

.bp-auth-point strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.bp-auth-point strong + span {
    display: block;
    font-size: 13px;
    line-height: 18px;
    color: var(--bp-text-secondary);
}

.bp-auth-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: var(--bp-surface);
}

.bp-auth-forgot {
    align-self: flex-end;
    margin-top: -8px;
}

.bp-auth-card .bp-product {
    width: 100%;
    margin-top: 0;
    padding-top: 16px;
    border-top: 1px solid var(--bp-border);
}

@media (max-width: 900px) {
    .bp-auth.bp-auth-split {
        grid-template-columns: 1fr;
    }

    .bp-auth-hero {
        gap: 16px;
        padding: 72px 24px 24px;
    }

    .bp-auth-stage {
        align-items: flex-start;
        padding: 24px;
        background: transparent;
    }

    .bp-auth-lead {
        font-size: 24px;
        line-height: 32px;
    }
}

.bp-auth-panel {
    width: min(100%, 420px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.bp-auth .bp-product {
    margin-top: 0;
}

.bp-auth-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: 12px;
    box-shadow: var(--bp-shadow);
}

.bp-grant-module {
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    background: var(--bp-surface);
}

.bp-grant-module + .bp-grant-module {
    margin-top: 12px;
}

.bp-grant-module-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 10px 12px;
    border-radius: 10px;
}

.bp-grant-module.is-open .bp-grant-module-head {
    border-bottom: 1px solid var(--bp-border);
    border-radius: 10px 10px 0 0;
}

.bp-grant-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 160px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.bp-grant-module-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 8px;
    background: var(--bp-primary-soft);
    color: var(--bp-primary);
}

.bp-grant-module h3 {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.bp-grant-chevron {
    display: inline-flex;
    flex: none;
    color: var(--bp-text-muted);
    transition: transform 150ms;
}

.bp-grant-module.is-open .bp-grant-chevron {
    transform: rotate(90deg);
}

.bp-grant-module-body {
    container-type: inline-size;
    padding: 4px 12px 8px;
    border-radius: 0 0 10px 10px;
    background: var(--bp-surface-secondary);
}

.bp-grant-module-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

.bp-tip {
    position: relative;
    display: inline-flex;
}

.bp-tip-bubble {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 20;
    width: max-content;
    max-width: 260px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--bp-text);
    color: var(--bp-surface);
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    text-align: left;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.bp-tip:hover .bp-tip-bubble,
.bp-tip:focus-within .bp-tip-bubble {
    opacity: 1;
    visibility: visible;
}

.bp-grant-module .bp-hint {
    margin-top: 8px;
}

.grant-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 12px;
    align-items: end;
    padding: 8px 0;
    border-bottom: 1px solid var(--bp-border);
}

.grant-row:last-of-type {
    border-bottom: 0;
}

.service-rows {
    padding: 0 12px;
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    background: var(--bp-surface);
}

.service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px solid var(--bp-border);
}

.service-row:last-of-type {
    border-bottom: 0;
}

.service-row .bp-check {
    align-items: center;
}

.service-row .bp-check input {
    margin: 0;
}

.service-rows + .bp-field-error {
    display: block;
}

.service-rows + .bp-field-error,
.service-rows ~ .bp-hint {
    margin-top: 8px;
}

@container (max-width: 440px) {
    .grant-row {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .bp-sidebar {
        transition: width 200ms ease;
    }

    .bp-sidebar.is-collapsed {
        width: 72px;
        overflow: visible;
    }

    .bp-sidebar.is-collapsed .bp-brand-name,
    .bp-sidebar.is-collapsed .bp-nav-label {
        max-width: 0;
        margin-left: 0;
        opacity: 0;
        transition: max-width 200ms ease, margin-left 200ms ease, opacity 80ms ease;
    }

    .bp-sidebar.is-collapsed .bp-nav-group {
        max-height: 0;
        margin: 8px 8px;
        border-top-width: 1px;
        border-top-color: var(--bp-border);
        color: transparent;
    }

    .bp-sidebar.is-collapsed .bp-sidebar-toggle .bp-icon {
        transform: rotate(180deg);
    }

    .bp-sidebar.is-collapsed .bp-nav {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .bp-sidebar.is-collapsed .bp-tip-scope {
        display: contents;
        anchor-scope: --bp-tip;
    }

    .bp-sidebar.is-collapsed .bp-nav-item,
    .bp-sidebar.is-collapsed .bp-product {
        anchor-name: --bp-tip;
    }

    .bp-sidebar.is-collapsed .bp-nav-item::after {
        content: attr(aria-label);
        position: fixed;
        position-anchor: --bp-tip;
        left: calc(anchor(right) + 8px);
        top: anchor(center);
        z-index: 2;
        padding: 6px 8px;
        border-radius: 8px;
        background: var(--bp-text);
        color: var(--bp-surface);
        box-shadow: var(--bp-shadow);
        font-size: 12px;
        font-weight: 500;
        line-height: 16px;
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
        translate: 0 -50%;
        transition: opacity 120ms ease;
    }

    .bp-sidebar.is-collapsed .bp-nav-item {
        position: relative;
        width: 42px;
    }

    .bp-sidebar.is-collapsed .bp-nav-item:hover::after,
    .bp-sidebar.is-collapsed .bp-nav-item:focus-visible::after {
        opacity: 1;
    }

    .bp-sidebar.is-collapsed .bp-product {
        position: relative;
        width: 42px;
        height: 40px;
        margin-right: auto;
        margin-left: auto;
        padding: 0;
    }

    .bp-sidebar.is-collapsed .bp-product-name {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .bp-sidebar.is-collapsed .bp-product-mark {
        display: grid;
    }

    .bp-sidebar.is-collapsed .bp-product::after {
        content: attr(data-label);
        position: fixed;
        position-anchor: --bp-tip;
        left: calc(anchor(right) + 8px);
        top: anchor(center);
        z-index: 2;
        padding: 6px 8px;
        border-radius: 8px;
        background: var(--bp-text);
        color: var(--bp-surface);
        box-shadow: var(--bp-shadow);
        font-size: 12px;
        font-weight: 500;
        line-height: 16px;
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
        translate: 0 -50%;
        transition: opacity 120ms ease;
    }

    .bp-sidebar.is-collapsed .bp-product:hover::after,
    .bp-sidebar.is-collapsed .bp-product:focus-visible::after {
        opacity: 1;
    }
}

@media (max-width: 767px) {
    .bp-sidebar-toggle {
        display: none;
    }

    .bp-sidebar-footer:not(:has(a)) {
        display: none;
    }
}

@media (max-width: 767px) {
    .bp-menu-button {
        display: inline-flex;
    }

    .bp-sidebar {
        position: fixed;
        z-index: 40;
        width: min(232px, 86vw);
        transform: translateX(-105%);
        transition: transform 200ms;
    }

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

    .bp-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 30;
        border: 0;
        padding: 0;
        background: var(--bp-overlay);
        cursor: pointer;
    }

    .bp-header,
    .bp-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .bp-tenant .bp-field {
        width: 132px;
    }

    .bp-master {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }

    .bp-record {
        height: auto;
        min-height: 0;
    }

    .bp-master.is-detail-open .bp-master-list,
    .bp-master:not(.is-detail-open) .bp-master-detail {
        display: none;
    }

    .bp-master.is-detail-open .bp-master-detail,
    .bp-master:not(.is-detail-open) .bp-master-list {
        min-height: calc(100vh - 200px);
    }

    .bp-detail-back {
        display: block;
    }

    .grant-row {
        grid-template-columns: 1fr;
    }
}

@container workspace (max-width: 560px) {
    .bp-stat-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .bp-stat {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        column-gap: 12px;
        padding: 12px 16px;
    }

    .bp-stat-label {
        flex-basis: 100%;
    }

    .bp-stat-value {
        font-size: 18px;
        line-height: 24px;
    }
}

@container workspace (max-width: 880px) {
    .bp-master {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }

    .bp-master.is-detail-open .bp-master-list,
    .bp-master:not(.is-detail-open) .bp-master-detail {
        display: none;
    }

    .bp-master.is-detail-open .bp-master-detail,
    .bp-master:not(.is-detail-open) .bp-master-list {
        min-height: calc(100vh - 200px);
    }

    .bp-detail-back {
        display: block;
    }
}

.loading-logo {
    position: absolute;
    left: 50%;
    top: calc(20vh - 72px);
    width: min(70vw, 210px);
    height: auto;
    transform: translateX(-50%);
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--bp-border);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--bp-primary);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 500;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Carregando");
}

#blazor-error-ui {
    background: var(--bp-surface);
    color: var(--bp-text);
    border-top: 1px solid var(--bp-border);
    bottom: 0;
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: color-mix(in srgb, var(--bp-danger) 12%, var(--bp-surface));
    color: var(--bp-danger);
    border: 1px solid color-mix(in srgb, var(--bp-danger) 35%, transparent);
    border-radius: 10px;
    padding: 16px;
}

.blazor-error-boundary::after {
    content: "Ocorreu um erro ao exibir esta tela.";
}

.bp-avatar {
    overflow: hidden;
}

.bp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.bp-account {
    position: relative;
    flex: none;
}

.bp-account-trigger {
    position: relative;
    z-index: 22;
}

.bp-account-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: default;
}

.bp-account-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 21;
    width: 240px;
    display: flex;
    flex-direction: column;
    padding: 8px;
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    background: var(--bp-surface);
    box-shadow: var(--bp-shadow);
}

.bp-account-menu .bp-product-logo {
    margin: 0 8px 8px;
    align-self: flex-start;
}

.bp-account-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 8px;
}

.bp-account-summary strong,
.bp-account-summary span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-account-summary strong {
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.bp-account-summary span {
    font-size: 12px;
    line-height: 16px;
    color: var(--bp-text-secondary);
}

.bp-account-item {
    display: flex;
    align-items: center;
    width: 100%;
    height: 36px;
    padding: 0 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--bp-text);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-align: left;
    cursor: pointer;
}

.bp-account-item:hover {
    background: var(--bp-surface-secondary);
}

.bp-account-item:disabled {
    cursor: default;
    opacity: 0.6;
}

.bp-account-item.is-current {
    color: var(--bp-primary);
}

.bp-account-item .bp-icon {
    margin-left: auto;
}

.bp-account-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--bp-border);
}

.bp-account-label {
    margin: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bp-text-muted);
}

.bp-dialog.is-form {
    width: min(100%, 480px);
    max-height: calc(100vh - 48px);
    overflow: auto;
}

.bp-readonly {
    font-size: 14px;
    line-height: 20px;
    color: var(--bp-text-secondary);
    overflow-wrap: anywhere;
}

.bp-funnel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    min-width: 0;
    height: calc(100vh - var(--bp-master-offset, 200px));
    min-height: 420px;
}

.bp-funnel-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    min-height: 0;
}

.bp-funnel-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.bp-funnel-toolbar .bp-search {
    flex: 1;
    min-width: 180px;
}

.bp-funnel-toolbar .bp-button {
    flex: none;
}

.bp-funnel-toolbar .bp-field {
    flex: none;
    width: 168px;
}

.bp-funnel-board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(200px, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 12px;
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.bp-funnel-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    box-shadow: var(--bp-shadow);
    overflow: hidden;
}

.bp-funnel-column.is-drop {
    border-color: var(--bp-primary);
    box-shadow: 0 0 0 3px var(--bp-primary-soft);
}

.bp-funnel-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--bp-border);
}

.bp-funnel-column-header h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.bp-funnel-column-header span {
    font-size: 12px;
    line-height: 16px;
    color: var(--bp-text-secondary);
    font-variant-numeric: tabular-nums;
}

.bp-funnel-column-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
    padding: 8px;
    overflow: auto;
}

.bp-funnel-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--bp-surface-secondary);
    color: var(--bp-text);
    text-align: left;
    cursor: pointer;
    user-select: none;
}

.bp-funnel-card[draggable="true"] {
    cursor: grab;
}

.bp-funnel-card.is-selected {
    border-color: var(--bp-primary);
    background: var(--bp-primary-soft);
}

.bp-funnel-card-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.bp-funnel-card-subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    line-height: 16px;
    color: var(--bp-text-secondary);
}

.bp-funnel-card-meta {
    display: flex;
}

.bp-funnel-more {
    margin: 0;
    font-size: 12px;
    line-height: 16px;
    color: var(--bp-text-muted);
}

.bp-follow-ups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bp-follow-ups-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.bp-follow-ups-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.bp-follow-up {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    background: var(--bp-surface-secondary);
}

.bp-secret {
    margin: 0;
    padding: 12px;
    border-radius: 8px;
    background: var(--bp-surface-secondary);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 20px;
    overflow-wrap: anywhere;
    user-select: all;
}

.bp-dialog.is-lead {
    width: min(100%, 720px);
    height: min(760px, calc(100vh - 48px));
    max-height: calc(100vh - 48px);
    padding: 0;
    gap: 0;
    overflow: hidden;
}

.bp-dialog.is-lead .bp-detail-form,
.bp-dialog.is-lead .bp-detail {
    height: 100%;
    min-height: 0;
}

.bp-dialog.is-lead .bp-detail-header {
    padding-right: 12px;
}

.bp-dialog.is-agenda {
    width: min(100%, 560px);
    max-height: calc(100vh - 48px);
    padding: 0;
    gap: 0;
    overflow: hidden;
}

.bp-dialog.is-agenda .bp-detail-header {
    align-items: center;
    padding-right: 12px;
}

.bp-calendar {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    background: var(--bp-surface);
    box-shadow: var(--bp-shadow);
    overflow: hidden;
}

/* Colunas laterais iguais mantêm o mês no centro do calendário. */
.bp-calendar-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bp-border);
}

.bp-calendar-toolbar > .bp-button {
    justify-self: start;
}

.bp-calendar-toolbar .bp-month-stepper-label {
    min-width: 160px;
    font-size: 15px;
    font-weight: 600;
    line-height: 24px;
}

.bp-calendar-weekdays,
.bp-calendar-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.bp-calendar-weekdays {
    border-bottom: 1px solid var(--bp-border);
    background: var(--bp-surface-secondary);
}

.bp-calendar-weekdays span {
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    color: var(--bp-text-secondary);
    text-align: center;
}

.bp-calendar-week + .bp-calendar-week {
    border-top: 1px solid var(--bp-border);
}

.bp-calendar-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-height: 92px;
    margin: 0;
    padding: 8px;
    border: 0;
    border-right: 1px solid var(--bp-border);
    background: transparent;
    color: var(--bp-text);
    text-align: left;
    cursor: pointer;
}

.bp-calendar-week .bp-calendar-day:last-child {
    border-right: 0;
}

.bp-calendar-day:hover {
    background: var(--bp-surface-secondary);
}

.bp-calendar-day.is-outside {
    color: var(--bp-text-muted);
    background: var(--bp-surface-secondary);
}

.bp-calendar-day.is-selected {
    box-shadow: inset 0 0 0 2px var(--bp-primary);
}

.bp-calendar-day:disabled {
    cursor: default;
}

.bp-calendar-day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 16px;
    font-variant-numeric: tabular-nums;
}

.bp-calendar-day.is-today .bp-calendar-day-number {
    background: var(--bp-primary);
    color: var(--bp-on-primary);
}

.bp-calendar-count {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 12px;
    line-height: 16px;
    color: var(--bp-text-secondary);
    font-variant-numeric: tabular-nums;
}

.bp-calendar-chips {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    min-width: 0;
}

.bp-calendar-chips span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    font-size: 12px;
    line-height: 16px;
    color: var(--bp-text-secondary);
}

.bp-calendar-more {
    color: var(--bp-text-muted);
}

.bp-agenda-events {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bp-agenda-event-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bp-agenda-event-row > .bp-agenda-event {
    flex: 1;
    min-width: 0;
    width: auto;
}

.bp-agenda-event-row > .bp-button {
    flex: none;
}

.bp-agenda-event {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--bp-surface-secondary);
    color: var(--bp-text);
    text-align: left;
    cursor: pointer;
}

.bp-agenda-event:hover {
    border-color: var(--bp-primary);
}

.bp-agenda-event:disabled {
    cursor: default;
}

.bp-agenda-event-time {
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
    font-variant-numeric: tabular-nums;
    color: var(--bp-text-secondary);
}

.bp-agenda-event-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bp-agenda-event-title,
.bp-agenda-event-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-agenda-event-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.bp-agenda-event-meta {
    font-size: 12px;
    line-height: 16px;
    color: var(--bp-text-secondary);
}

@media (max-width: 800px) {
    .bp-calendar-day {
        min-height: 56px;
        padding: 6px;
    }

    .bp-calendar-chips {
        display: none;
    }

    .bp-calendar-toolbar .bp-month-stepper-label {
        min-width: 128px;
    }

    .bp-agenda-event-row {
        flex-wrap: wrap;
    }

    .bp-agenda-event-row > .bp-button {
        margin-left: auto;
    }

    .bp-agenda-event {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .bp-agenda-event-time {
        grid-column: 1 / -1;
    }
}

.bp-date-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 40px;
    border: 1px solid var(--bp-border);
    border-radius: 8px;
    background: var(--bp-surface);
    box-shadow: var(--bp-shadow);
    cursor: pointer;
}

.bp-date-chip-face {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    color: var(--bp-text);
    font-size: 14px;
    line-height: 20px;
    white-space: nowrap;
}

.bp-date-chip input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.bp-date-chip input::-webkit-datetime-edit {
    pointer-events: none;
}

.bp-date-chip input::-webkit-calendar-picker-indicator {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    cursor: pointer;
    background: transparent;
}

.bp-date-chip:focus-within {
    outline: 2px solid var(--bp-primary);
    outline-offset: 2px;
}

.bp-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.bp-metric {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    background: var(--bp-surface);
    box-shadow: var(--bp-shadow);
    color: inherit;
    text-decoration: none;
}

.bp-metric:hover {
    border-color: color-mix(in srgb, var(--bp-text-muted) 55%, var(--bp-border));
    text-decoration: none;
}

.bp-metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex: none;
    background: var(--bp-primary-soft);
    color: var(--bp-primary);
}

.bp-metric-icon.is-success {
    background: color-mix(in srgb, var(--bp-success) 14%, transparent);
    color: var(--bp-success);
}

.bp-metric-icon.is-violet {
    background: color-mix(in srgb, var(--bp-violet) 14%, transparent);
    color: var(--bp-violet);
}

.bp-metric-icon.is-danger {
    background: color-mix(in srgb, var(--bp-danger) 14%, transparent);
    color: var(--bp-danger);
}

.bp-metric-icon.is-muted {
    background: var(--bp-surface-secondary);
    color: var(--bp-text-muted);
}

.bp-metric-icon.is-small {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.bp-metric-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.bp-metric-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--bp-text-secondary);
    font-size: 13px;
    line-height: 18px;
}

.bp-metric-head .bp-icon {
    color: var(--bp-text-muted);
}

.bp-metric strong {
    font-size: 28px;
    font-weight: 600;
    line-height: 32px;
    font-variant-numeric: tabular-nums;
}

.bp-metric-detail {
    font-size: 12px;
    line-height: 16px;
    color: var(--bp-text-secondary);
}

.bp-dash-split,
.bp-dash-lists {
    display: grid;
    gap: 16px;
}

.bp-dash-split {
    grid-template-columns: minmax(0, 1fr);
}

.bp-dash-split.is-both {
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
}

.bp-dash-lists {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.bp-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    background: var(--bp-surface);
    box-shadow: var(--bp-shadow);
}

.bp-panel h2 {
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

.bp-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.bp-panel-head p {
    margin-top: 4px;
    font-size: 13px;
    line-height: 18px;
    color: var(--bp-text-secondary);
}

.bp-panel-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: none;
    color: var(--bp-primary);
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
    text-decoration: none;
    white-space: nowrap;
}

.bp-panel-link:hover {
    color: var(--bp-primary-hover);
    text-decoration: none;
}

.bp-panel-empty {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 160px;
    text-align: center;
    color: var(--bp-text-secondary);
}

.bp-panel-empty .bp-metric-icon {
    margin-bottom: 8px;
}

.bp-chart-block {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 8px;
}

.bp-chart-y {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    flex-direction: column;
    justify-content: space-between;
    font-size: 12px;
    line-height: 16px;
    color: var(--bp-text-muted);
    text-align: right;
}

.bp-chart {
    width: 100%;
    height: auto;
    display: block;
    grid-column: 2;
    grid-row: 1;
}

.bp-chart-x {
    position: relative;
    grid-column: 2;
    height: 16px;
}

.bp-chart-x span {
    position: absolute;
    top: 0;
    font-size: 12px;
    line-height: 16px;
    color: var(--bp-text-muted);
    white-space: nowrap;
    transform: translateX(-50%);
}

.bp-chart-grid {
    stroke: var(--bp-border);
    stroke-width: 1;
}

.bp-chart-label {
    fill: var(--bp-text-muted);
    font-size: 12px;
    font-family: var(--bp-font);
}

.bp-chart-area {
    fill: color-mix(in srgb, var(--bp-primary) 16%, transparent);
    stroke: none;
}

.bp-chart-line {
    fill: none;
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.bp-chart-line.is-income {
    stroke: var(--bp-primary);
}

.bp-chart-line.is-expense {
    stroke: var(--bp-success);
}

.bp-chart-dot {
    fill: var(--bp-surface);
    stroke-width: 2;
}

.bp-chart-dot.is-income {
    stroke: var(--bp-primary);
}

.bp-chart-dot.is-expense {
    stroke: var(--bp-success);
}

.bp-chart-key {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    line-height: 18px;
    color: var(--bp-text-secondary);
}

.bp-chart-key span,
.bp-legend li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bp-chart-key i,
.bp-legend i {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    flex: none;
    background: var(--bp-primary);
}

.bp-chart-key i.is-success,
.bp-legend i.is-success {
    background: var(--bp-success);
}

.bp-legend i.is-violet {
    background: var(--bp-violet);
}

.bp-legend i.is-danger {
    background: var(--bp-danger);
}

.bp-donut .is-primary {
    color: var(--bp-primary);
}

.bp-donut .is-violet {
    color: var(--bp-violet);
}

.bp-donut .is-success {
    color: var(--bp-success);
}

.bp-donut .is-danger {
    color: var(--bp-danger);
}

.bp-status {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.bp-donut {
    position: relative;
    width: 168px;
    height: 168px;
    flex: none;
}

.bp-donut svg {
    width: 100%;
    height: 100%;
}

.bp-donut circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 14;
}

.bp-donut .is-track {
    color: var(--bp-border);
}

.bp-donut-total {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.bp-donut-total strong {
    font-size: 28px;
    font-weight: 600;
    line-height: 32px;
    font-variant-numeric: tabular-nums;
}

.bp-donut-total span {
    font-size: 12px;
    line-height: 16px;
    color: var(--bp-text-secondary);
}

.bp-legend {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bp-legend li {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    gap: 8px;
    font-size: 14px;
    line-height: 20px;
}

.bp-legend strong {
    font-variant-numeric: tabular-nums;
}

.bp-dash-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bp-dash-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--bp-border);
}

.bp-dash-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.bp-dash-row:first-child {
    padding-top: 0;
}

.bp-dash-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.bp-dash-title {
    overflow: hidden;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-dash-meta {
    overflow: hidden;
    font-size: 12px;
    line-height: 16px;
    color: var(--bp-text-secondary);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-dash-time {
    min-width: 3.25rem;
    flex: none;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.bp-dash-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex: none;
}

.bp-dash-amount {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 960px) {
    .bp-dash-split.is-both {
        grid-template-columns: minmax(0, 1fr);
    }

    .bp-status {
        flex-direction: column;
        align-items: flex-start;
    }
}

.bp-metric.is-static:hover {
    border-color: var(--bp-border);
}

.bp-metric.is-static strong {
    font-size: 22px;
    line-height: 28px;
}

.bp-plan-name p {
    font-size: 13px;
    line-height: 18px;
    color: var(--bp-text-secondary);
}

.bp-plan-name h2 {
    margin-top: 4px;
    font-size: 22px;
    line-height: 28px;
}

.bp-plan-meter {
    height: 6px;
    margin-top: 4px;
    border-radius: 999px;
    background: var(--bp-surface-secondary);
    overflow: hidden;
}

.bp-plan-meter > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--bp-primary);
}

.bp-plan-meter > span.is-full {
    background: var(--bp-danger);
}

.bp-plan-groups {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bp-plan-group {
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    background: var(--bp-surface);
}

.bp-plan-group-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.bp-plan-group-toggle .bp-link-card-icon {
    width: 32px;
    height: 32px;
}

.bp-plan-group-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.bp-plan-group-count {
    margin-left: auto;
    color: var(--bp-text-secondary);
    font-size: 13px;
    line-height: 18px;
}

.bp-plan-group.is-open .bp-plan-group-toggle {
    border-bottom: 1px solid var(--bp-border);
    border-radius: 10px 10px 0 0;
}

.bp-plan-group.is-open .bp-grant-chevron {
    transform: rotate(90deg);
}

.bp-plan-screens {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    margin: 0;
    padding: 12px;
    list-style: none;
}

.bp-plan-screen {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--bp-surface-secondary);
    font-size: 14px;
    line-height: 20px;
}

.bp-plan-screen .bp-link-card-icon {
    width: 32px;
    height: 32px;
}

.bp-support-email {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bp-support-email span {
    font-size: 13px;
    line-height: 18px;
    color: var(--bp-text-secondary);
}

.bp-support-email a {
    font-weight: 600;
    word-break: break-all;
}
