:root {
    --bs-body-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bs-body-font-size: .9rem;
    --bs-body-color: #303740;
    --bs-body-bg: #f2f4f6;
    --bs-border-color: #dce1e6;
    --bs-border-radius: 6px;
    --lte-sidebar-width: 250px;
    --bc-primary: #06458f;
    --bc-muted: #6b747e;
    --bc-border: #dce1e6;
}
body { letter-spacing: 0; }
.bc-crm-body { background: #f2f4f6; }
.bc-crm-body.bc-menu-open { overflow: hidden; }
.app-main { min-width: 0; }
.app-content { padding-bottom: 20px; }
.app-content-header { padding: 22px 0 14px; }
.app-content-header h1 { font-size: 1.4rem; font-weight: 650; overflow-wrap: anywhere; }
.app-header { border-bottom: 1px solid var(--bc-border); box-shadow: none; }
.bc-header-label { font-weight: 750; color: #06458f; font-size: .9rem; white-space: nowrap; }
.bc-header-label span { font-weight: 450; color: #737d89; }
.bc-toolbar-icon { width: 36px; height: 36px; padding: 5px; font-size: 1.3rem; color: #555f6b; }
.bc-brand-logo { width: 220px; height: auto; }
.sidebar-brand { height: 80px; padding: 4px 8px; border-bottom: 1px solid var(--bc-border); }
.sidebar-brand .bc-brand-logo { width: 220px; height: 72px; object-fit: contain; }
.sidebar-wrapper { padding: 12px 10px; overflow-y: auto; }
.bc-crm-body .app-sidebar { --lte-sidebar-menu-active-color: #06458f; --lte-sidebar-menu-active-bg: #e6effa; }
.sidebar-menu .nav-header { font-size: .68rem; font-weight: 700; color: #7a838d; text-transform: uppercase; padding: 16px 12px 7px; }
.sidebar-menu .nav-link { color: #4c5663; padding: 9px 12px; border-radius: 5px; font-size: .85rem; display: flex; gap: 11px; align-items: center; }
.sidebar-menu .nav-link > .bi { width: 21px; flex: 0 0 21px; font-size: 1.1rem; }
.sidebar-menu .nav-link p { white-space: normal; line-height: 1.35; }
.sidebar-menu .nav-item > .nav-link.active { background: #e6effa; color: #06458f; box-shadow: none; font-weight: 650; }
.sidebar-menu .nav-link:hover { background: #f0f3f7; color: #06458f; }
.bc-user-menu { display: flex; align-items: center; gap: 8px; padding: 4px; color: #424c57; font-size: .8rem; }
.bc-user-avatar { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: #e6effa; color: #06458f; font-weight: 700; }
.bc-user-name { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-account-menu { min-width: 230px; max-width: calc(100vw - 24px); font-size: .85rem; }
.bc-environment { font-size: .68rem; font-weight: 550; }
.bc-today { color: #717b88; font-size: .8rem; white-space: nowrap; }
.bc-app-footer { display: flex; justify-content: space-between; gap: 12px; font-size: .76rem; color: #737d89; padding: 11px 20px; }
.bc-skip-link { position: absolute; top: 0; left: 260px; z-index: 1100; background: white; padding: 10px; }
.btn-primary { --bs-btn-bg: #06458f; --bs-btn-border-color: #06458f; --bs-btn-hover-bg: #043770; --bs-btn-hover-border-color: #043770; }
.btn-outline-primary { --bs-btn-color: #06458f; --bs-btn-border-color: #06458f; --bs-btn-hover-bg: #06458f; --bs-btn-hover-border-color: #06458f; }
.btn { font-size: .84rem; }
.btn .bi { margin-right: 4px; }
.btn.bc-toolbar-icon .bi, .bc-icon-action .bi { margin-right: 0; }
.bc-page-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card { --bs-card-bg: #fff; background: #fff; border: 1px solid var(--bc-border); border-radius: 6px; box-shadow: none; margin-bottom: 20px; min-width: 0; }
.card-header { padding: 13px 16px; border-bottom: 1px solid var(--bc-border); background: white; border-radius: 6px 6px 0 0; }
.card-title { float: none; font-size: .9rem; font-weight: 650; margin: 0; }
.card-body { padding: 16px; }
.bc-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.bc-metric { background: #fff; margin: 0; box-shadow: none; border: 1px solid var(--bc-border); border-radius: 6px; padding: 13px; position: relative; min-width: 0; }
.bc-metric .info-box-icon { width: 50px; min-height: 58px; font-size: 1.4rem; border-radius: 5px; }
.bc-metric .info-box-content { min-width: 0; padding: 2px 12px; }
.bc-metric .info-box-text { font-size: .78rem; color: #687380; white-space: normal; }
.bc-metric .info-box-number { font-size: 1.45rem; line-height: 1.3; margin-top: 6px; overflow-wrap: anywhere; }
.bc-chart-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: 20px; }
.bc-dashboard-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.bc-chart-frame { position: relative; height: 260px; min-width: 0; }
.bc-chart-frame canvas { max-width: 100%; }
.bc-chart-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #8a949e; font-size: .83rem; }
.bc-chart-empty .bi { font-size: 2.4rem; color: #bac2ca; }
.bc-chart-data { margin-top: 12px; font-size: .76rem; color: #687380; }
.bc-chart-data summary { cursor: pointer; padding: 6px 0; }
.bc-chart-data table { margin-top: 8px; color: #4e5964; }
.bc-chart-data th { font-weight: 450; }
.bc-recent-row { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; font-size: .83rem; }
.bc-dashboard-grid .list-group { --bs-list-group-bg: #fff; }
.bc-recent-row strong { display: block; font-weight: 600; }
.bc-recent-main { min-width: 0; overflow-wrap: anywhere; }
.bc-recent-main small { color: #77818d; display: block; margin-top: 4px; font-size: .72rem; }
.bc-recent-row > .text-end { flex: 0 0 auto; }
.bc-recent-row .bc-badge { margin-top: 5px; font-size: .65rem; }
.bc-empty-state { min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #818b95; font-size: .85rem; padding: 24px; text-align: center; }
.bc-empty-state .bi { font-size: 1.9rem; color: #aeb7c0; }
.bc-badge { display: inline-block; border-radius: 4px; padding: 4px 8px; background: #eef1f4; color: #5b6673; font-size: .71rem; font-weight: 550; white-space: nowrap; }
.bc-badge.is-success { background: #e2f4e9; color: #216b44; }
.bc-badge.is-warning { background: #fff3d7; color: #886416; }
.bc-badge.is-danger { background: #fbe8e9; color: #a4363e; }
.bc-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bc-search { display: flex; align-items: center; gap: 6px; width: min(330px,100%); margin: 0; }
.bc-search input { min-width: 0; }
.bc-search button { width: 34px; height: 32px; flex: 0 0 34px; }
.bc-table-wrap { min-width: 0; }
.bc-table { font-size: .79rem; min-width: 720px; }
.bc-table th { background: #f6f8fa; color: #596573; font-size: .71rem; font-weight: 650; padding: 12px 14px; white-space: nowrap; }
.bc-table td { padding: 12px 14px; max-width: 320px; overflow-wrap: anywhere; }
.bc-table td:last-child { min-width: 130px; }
.bc-row-actions { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 110px; }
.bc-row-actions form, .bc-invoice-actions form { margin: 0; }
.bc-admin-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 7px 11px; font-size: .8rem; font-weight: 500; border: 1px solid #c9d1da; border-radius: 4px; background: white; color: #435264; text-decoration: none; cursor: pointer; line-height: 1.4; }
.bc-admin-btn:hover { background: #edf2f7; color: #06458f; }
.bc-admin-btn.is-primary { background: #06458f; border-color: #06458f; color: white; }
.bc-admin-btn.is-primary:hover { background: #043770; }
.bc-admin-btn.is-danger { color: #b83f47; border-color: #e3bdc0; }
.bc-admin-btn.is-small { font-size: .73rem; padding: 5px 8px; }
.bc-admin-btn.bc-icon-action { width: 30px; height: 30px; padding: 5px; font-size: .9rem; flex: 0 0 30px; }
.bc-empty-cell { text-align: center; color: #818b95; padding: 42px 20px !important; }
.bc-editor { --bs-offcanvas-width: 640px; --bs-offcanvas-bg: #fff; max-width: 100vw; }
.bc-commerce-editor { --bs-offcanvas-width: 1100px; }
.bc-commerce-line { padding: 16px 0; border-bottom: 1px solid #e7ebef; }
.bc-line-fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.bc-line-fields label { font-size: .82rem; }
.bc-line-description { grid-column: span 3; }
.bc-line-vat { grid-column: span 2; align-self: center; margin: 0; }
.bc-line-amount { grid-column: span 2; text-align: right; align-self: center; }
.bc-line-amount output { font-weight: 700; margin-left: 12px; }
.bc-commerce-totals { display: flex; justify-content: flex-end; gap: 28px; margin: 20px 0; text-align: right; }
.bc-commerce-totals dt { font-size: .8rem; color: #68717d; font-weight: 500; }
.bc-commerce-totals dd { margin: 4px 0 0; font-size: 1rem; font-weight: 700; }
@media (max-width: 575px) {
    .bc-line-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .bc-line-description { grid-column: span 2; }
    .bc-commerce-totals { gap: 18px; }
}
.offcanvas-header { border-bottom: 1px solid var(--bc-border); padding: 18px 20px; }
.offcanvas-title { font-size: 1.05rem; font-weight: 650; }
.offcanvas-body { padding: 20px; }
.bc-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.bc-field { min-width: 0; }
.bc-field.is-wide { grid-column: 1 / -1; }
.bc-field .form-label { display: block; margin-bottom: 6px; font-size: .78rem; color: #535e6c; font-weight: 550; }
.form-control, .form-select { font-size: .84rem; min-width: 0; }
.bc-field .form-control, .bc-field .form-select { min-height: 38px; }
.bc-field textarea { resize: vertical; }
.bc-fieldset { border: 0; padding: 0; margin-bottom: 26px; min-width: 0; }
.bc-fieldset legend { float: none; font-size: .85rem; font-weight: 650; margin-bottom: 16px; padding-bottom: 9px; border-bottom: 1px solid #e7ebef; }
.bc-field-help, .bc-file-current small { display: block; font-size: .7rem; color: #7a8491; margin-top: 6px; overflow-wrap: anywhere; }
.bc-file-current { padding: 8px 0; font-size: .78rem; overflow-wrap: anywhere; }
.bc-binary-field { display: flex; min-height: 38px; }
.bc-binary-field .btn { white-space: normal; padding: 8px 6px; font-size: .72rem; }
.bc-form-actions { display: flex; gap: 8px; margin-top: 16px; padding: 16px 0 0; border-top: 1px solid var(--bc-border); }
.bc-settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 30px; }
.bc-settings-grid .bc-fieldset:last-child { grid-column: 1 / -1; }
.bc-readonly-record { display: grid; grid-template-columns: minmax(110px,.7fr) minmax(0,1fr); gap: 10px 16px; font-size: .83rem; }
.bc-readonly-record dt { color: #6c7784; font-weight: 500; }
.bc-readonly-record dd { margin: 0; overflow-wrap: anywhere; }
.bc-invoice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.bc-stat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.bc-stat-card { min-width: 0; padding: 14px 16px; background: white; border: 1px solid var(--bc-border); border-radius: 6px; }
.bc-stat-card span, .bc-stat-card small { display: block; font-size: .74rem; color: #6f7985; overflow-wrap: anywhere; }
.bc-stat-card strong { display: block; font-size: 1.15rem; margin: 6px 0; overflow-wrap: anywhere; }
.bc-stat-card.is-warning { border-left: 3px solid #d5a227; }
.bc-stat-card.is-accent { border-left: 3px solid #2d9965; }
.bc-alert { margin-bottom: 16px; border: 1px solid #bcd9eb; background: #e8f4fc; border-radius: 4px; padding: 12px 16px; color: #285f86; font-size: .83rem; }
.bc-alert.is-danger { border-color: #e8c5c8; background: #faecee; color: #a53540; }
.bc-alert.is-success { border-color: #bde0ce; background: #e9f6ef; color: #257048; }
.bc-muted { color: #79838e; font-size: .83rem; }
.bc-login-box { width: min(390px,calc(100% - 32px)); margin: 40px auto; }
.bc-login-box .login-logo { margin: 0 auto 28px; }
.bc-login-box .login-logo img { width: 285px; max-width: 90%; height: auto; }
.bc-login-box .card { border-radius: 6px; }
.bc-log-path, .bc-access-key { overflow-wrap: anywhere; }
.bc-log-viewer { padding: 14px; background: #f5f7f9; border: 1px solid var(--bc-border); border-radius: 4px; max-height: 580px; overflow: auto; }
.bc-log-viewer code { display: block; padding: 7px 0; border-bottom: 1px solid #e2e7ed; font-size: .74rem; color: #4b5c6c; overflow-wrap: anywhere; white-space: pre-wrap; }
.bc-finance-import { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.bc-finance-import .bc-field { flex: 1 1 280px; }
.bc-bank-match { display: flex; align-items: center; gap: 6px; min-width: 260px; }
.bc-bank-match select { min-width: 0; max-width: 280px; }
.bc-finance .bc-table td:last-child { min-width: 0; }
.bc-period-filter { display: flex; gap: 8px; max-width: 310px; }
.bc-period-filter input { min-width: 0; }
.bc-verification-page { max-width: 720px; margin: 40px auto; padding: 16px; }
.bc-verification-page .bc-brand-logo { display: block; width: 250px; max-width: 100%; margin-bottom: 24px; }
.bc-verification-page h1 { font-size: 1.2rem; font-weight: 650; }
.bc-verify-details { display: grid; grid-template-columns: minmax(120px,.65fr) minmax(0,1fr); gap: 12px 20px; font-size: .84rem; margin: 0; }
.bc-verify-details dt { font-weight: 500; color: #72808c; }
.bc-verify-details dd { margin: 0; overflow-wrap: anywhere; }
.bc-admin-empty { padding: 36px 0; }
@media (max-width: 1199.98px) {
    .bc-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .bc-chart-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
    .bc-settings-grid { grid-template-columns: 1fr; }
    .bc-settings-grid .bc-fieldset:last-child { grid-column: auto; }
}
@media (max-width: 767.98px) {
    .bc-chart-grid, .bc-dashboard-grid { grid-template-columns: 1fr; gap: 0; }
    .bc-user-name { display: none; }
    .bc-panel-head { flex-wrap: wrap; }
    .bc-search { width: 100%; }
    .bc-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .bc-header-label { font-size: .74rem; }
    .app-content-header h1 { font-size: 1.2rem; }
    .bc-environment { font-size: .62rem; }
    .bc-chart-frame { height: 240px; }
}
@media (max-width: 575.98px) {
    .bc-metric-grid { grid-template-columns: 1fr; gap: 10px; }
    .bc-form-grid { grid-template-columns: 1fr; }
    .bc-stat-grid { grid-template-columns: 1fr; }
    .bc-page-tools { align-items: flex-start; }
    .bc-today { display: none; }
    .bc-header-label span { display: none; }
    .offcanvas-header, .offcanvas-body { padding: 16px; }
    .bc-verify-details { grid-template-columns: 1fr; gap: 4px; }
    .bc-verify-details dd { margin-bottom: 12px; }
}
@media print {
    .bc-page-tools, .bc-search, .bc-form-actions, .bc-row-actions { display: none !important; }
    .bc-chart-frame { height: 220px; }
    .card, .bc-metric { box-shadow: none; break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
