:root {
    --bc-bg: #f4f7fb;
    --bc-panel: #ffffff;
    --bc-panel-soft: #f8fbff;
    --bc-primary: #003B8E;
    --bc-primary-deep: #001f4f;
    --bc-accent: #007bff;
    --bc-green: #0f8f61;
    --bc-amber: #b7791f;
    --bc-red: #c53030;
    --bc-ink: #09101f;
    --bc-muted: #667085;
    --bc-border: #d8dee9;
    --bc-shadow: 0 16px 38px rgba(15, 23, 42, 0.09);
    --bc-radius: 14px;
    --bc-radius-sm: 10px;
    --bc-sidebar: 252px;
}

.bc-readonly-record { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px 12px; font-size: 13px; }
.bc-readonly-record dt { color: var(--bc-muted); }
.bc-readonly-record dd { margin: 0; overflow-wrap: anywhere; }

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

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--bc-ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    background: radial-gradient(circle at top left, #e8f1ff 0, #f8fbff 34%, #eef3fb 100%);
    line-height: 1.5;
}

.bc-admin-body {
    overflow-x: hidden;
}

.bc-admin-body.is-sidebar-locked {
    overflow: hidden;
}

a {
    color: inherit;
}

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

.bc-login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.bc-login-shell {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.8fr);
    gap: 22px;
    align-items: stretch;
}

.bc-login-brand,
.bc-login-card,
.bc-panel,
.bc-stat-card,
.bc-quick-grid a {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(216, 222, 233, 0.95);
    border-radius: var(--bc-radius);
    box-shadow: var(--bc-shadow);
}

.bc-login-brand {
    padding: clamp(24px, 5vw, 48px);
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(0, 59, 142, 0.92), rgba(0, 31, 79, 0.94)),
        url("../../../img/corporativo/soluciones.webp") center / cover;
    color: #fff;
}

.bc-login-brand img {
    width: 86px;
    height: auto;
    margin-bottom: 26px;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.16));
}

.bc-login-brand h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.02;
}

.bc-login-brand p {
    max-width: 520px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
}

.bc-login-kicker,
.bc-kicker,
.bc-topbar-kicker {
    margin: 0 0 6px;
    color: var(--bc-accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bc-login-brand .bc-login-kicker {
    color: #b8dcff;
}

.bc-login-card {
    padding: clamp(22px, 4vw, 34px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bc-login-card h2 {
    margin: 0 0 18px;
    font-size: 1.7rem;
    color: var(--bc-primary);
}

.bc-alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: var(--bc-radius-sm);
    border: 1px solid var(--bc-border);
    background: #fff;
    color: var(--bc-ink);
    font-size: 0.92rem;
}

.bc-alert.is-success {
    border-color: rgba(15, 143, 97, 0.22);
    background: #edfdf6;
    color: #05603a;
}

.bc-alert.is-danger {
    border-color: rgba(197, 48, 48, 0.22);
    background: #fff5f5;
    color: #9b2c2c;
}

.bc-alert.is-info {
    border-color: rgba(0, 123, 255, 0.22);
    background: #eff7ff;
    color: #003b8e;
}

.bc-admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--bc-sidebar) minmax(0, 1fr);
}

.bc-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px 14px;
    background: linear-gradient(180deg, var(--bc-primary), var(--bc-primary-deep));
    color: #fff;
    overflow-y: auto;
    z-index: 20;
}

.bc-verification-page {
    max-width: 680px;
    margin: 40px auto;
    padding: 16px;
}

.bc-access-key {
    overflow-wrap: anywhere;
}

.bc-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 18px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.bc-sidebar-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
    padding: 4px;
}

.bc-sidebar-brand strong,
.bc-sidebar-brand small {
    display: block;
}

.bc-sidebar-brand small {
    color: rgba(255, 255, 255, 0.72);
}

.bc-sidebar-nav {
    display: grid;
    gap: 6px;
    margin-top: 16px;
}

.bc-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-weight: 700;
}

.bc-sidebar-nav a:hover,
.bc-sidebar-nav a.is-active {
    background: rgba(255, 255, 255, 0.13);
    color: #fff;
}

.bc-nav-mark {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 30px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.13);
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.bc-main {
    min-width: 0;
}

.bc-topbar {
    position: sticky;
    top: 0;
    z-index: 12;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
    padding: 12px clamp(16px, 3vw, 30px);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(216, 222, 233, 0.9);
    backdrop-filter: blur(12px);
}

.bc-topbar h1 {
    margin: 0;
    color: var(--bc-primary);
    font-size: clamp(1.25rem, 2vw, 1.6rem);
}

.bc-topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--bc-muted);
}

.bc-topbar-user span {
    color: var(--bc-ink);
    font-weight: 800;
}

.bc-topbar-user small {
    display: block;
    font-size: 0.75rem;
}

.bc-logout-btn,
.bc-admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--bc-border);
    border-radius: 999px;
    background: #fff;
    color: var(--bc-primary);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.18s ease, background 0.18s ease;
}

.bc-admin-btn:hover,
.bc-logout-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 59, 142, 0.42);
}

.bc-admin-btn.is-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--bc-primary), var(--bc-primary-deep));
    color: #fff;
}

.bc-admin-btn.is-danger {
    color: var(--bc-red);
}

.bc-admin-btn.is-small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 0.82rem;
}

.bc-admin-btn.is-wide {
    width: 100%;
}

.bc-logout-btn {
    min-height: 34px;
    padding-inline: 12px;
    color: var(--bc-red);
}

.bc-icon-btn {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--bc-border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

.bc-icon-btn span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: var(--bc-primary);
}

.bc-content {
    width: min(1480px, 100%);
    margin: 0 auto;
    padding: clamp(16px, 3vw, 30px);
}

.bc-page-head,
.bc-panel-head,
.bc-form-actions,
.bc-row-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.bc-page-head {
    margin-bottom: 20px;
}

.bc-page-head h2,
.bc-panel h3 {
    margin: 0;
    color: var(--bc-primary);
}

.bc-muted {
    color: var(--bc-muted);
}

.bc-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.bc-stat-grid-tight {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bc-stat-card {
    padding: 16px;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top: 4px solid var(--bc-primary);
}

.bc-stat-card.is-warning {
    border-top-color: var(--bc-amber);
}

.bc-stat-card.is-accent {
    border-top-color: var(--bc-accent);
}

.bc-stat-card span,
.bc-stat-card small {
    color: var(--bc-muted);
}

.bc-stat-card strong {
    display: block;
    color: var(--bc-ink);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    line-height: 1.1;
}

.bc-stat-grid-tight .bc-stat-card strong {
    font-size: 1.16rem;
    overflow-wrap: anywhere;
}

.bc-dashboard-grid,
.bc-workspace-grid {
    display: grid;
    gap: 18px;
}

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

.bc-workspace-grid {
    grid-template-columns: minmax(320px, 0.74fr) minmax(0, 1.26fr);
    align-items: start;
}

.bc-panel {
    padding: 18px;
}

.bc-panel-head {
    margin-bottom: 16px;
}

.bc-panel-head a {
    color: var(--bc-primary);
    font-weight: 800;
    text-decoration: none;
}

.bc-list-stack {
    display: grid;
    gap: 10px;
}

.bc-list-row,
.bc-quick-grid a {
    text-decoration: none;
}

.bc-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--bc-border);
    border-radius: 12px;
    background: var(--bc-panel-soft);
}

.bc-list-row strong,
.bc-list-row small {
    display: block;
}

.bc-list-row small {
    color: var(--bc-muted);
}

.bc-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.bc-flow-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.bc-quick-grid a {
    padding: 16px;
}

.bc-quick-grid strong,
.bc-quick-grid span {
    display: block;
}

.bc-quick-grid strong {
    color: var(--bc-primary);
    margin-bottom: 4px;
}

.bc-quick-grid span {
    color: var(--bc-muted);
    font-size: 0.9rem;
}

.bc-field {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.bc-field span {
    color: var(--bc-ink);
    font-size: 0.86rem;
    font-weight: 800;
}

.bc-field input,
.bc-field select,
.bc-field textarea,
.bc-search input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--bc-border);
    border-radius: 10px;
    background: #fff;
    color: var(--bc-ink);
    padding: 9px 11px;
    outline: none;
}

.bc-field textarea {
    resize: vertical;
}

.bc-field-help,
.bc-file-current small {
    color: var(--bc-muted);
    font-size: 0.78rem;
}

.bc-file-current {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border: 1px dashed rgba(0, 59, 142, 0.26);
    border-radius: 10px;
    background: #f7fbff;
}

.bc-file-current a {
    color: var(--bc-primary);
    font-weight: 800;
    text-decoration: none;
}

.bc-field input:focus,
.bc-field select:focus,
.bc-field textarea:focus,
.bc-search input:focus {
    border-color: var(--bc-primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.12);
}

.bc-sidebar {
    overflow-y: auto;
}

.bc-finance-import,
.bc-bank-match {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    margin-bottom: 20px;
}

.bc-finance input,
.bc-finance select {
    max-width: 100%;
    min-height: 40px;
    border: 1px solid #ccd7e5;
    border-radius: 4px;
    padding: 8px;
    font: inherit;
    background: #fff;
}

.bc-finance .bc-table {
    min-width: 680px;
}

@media (max-width: 760px) {
    .bc-finance table.bc-table { display: table; }
    .bc-finance .bc-table thead { display: table-header-group; }
    .bc-finance .bc-table tbody { display: table-row-group; }
    .bc-finance .bc-table tr { display: table-row; }
    .bc-finance .bc-table td,
    .bc-finance .bc-table th { display: table-cell; padding: 10px; border: 1px solid #e4eaf2; }
    .bc-finance .bc-table td::before { display: none; }
}

.bc-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
}

.bc-field.is-wide {
    grid-column: 1 / -1;
}

.bc-form-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 6px;
}

.bc-invoice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: -4px 0 18px;
    padding: 12px;
    border: 1px solid var(--bc-border);
    border-radius: 10px;
    background: var(--bc-panel-soft);
}

.bc-invoice-actions form {
    margin: 0;
}

.bc-table-panel {
    min-width: 0;
}

.bc-diagnostic-panel {
    display: grid;
    gap: 16px;
}

.bc-diagnostic-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 18px;
    border: 1px solid var(--bc-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--bc-shadow);
}

.bc-diagnostic-head h2 {
    margin: 0;
    color: var(--bc-primary);
}

.bc-diagnostic-head p:last-child {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--bc-muted);
}

.bc-diagnostic-path,
.bc-log-viewer {
    border: 1px solid var(--bc-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--bc-shadow);
}

.bc-diagnostic-path {
    padding: 14px 16px;
}

.bc-diagnostic-path span,
.bc-diagnostic-path strong {
    display: block;
}

.bc-diagnostic-path span {
    margin-bottom: 5px;
    color: var(--bc-muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.bc-diagnostic-path strong {
    color: var(--bc-ink);
    overflow-wrap: anywhere;
}

.bc-log-viewer {
    max-height: 68vh;
    overflow: auto;
    padding: 12px;
    background: #08111f;
}

.bc-log-viewer code {
    display: block;
    padding: 9px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #d8e4f8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.bc-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bc-search input {
    min-width: 190px;
}

.bc-search button {
    min-height: 42px;
    padding: 8px 12px;
    border: 0;
    border-radius: 10px;
    background: var(--bc-primary);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

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

.bc-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.bc-table th,
.bc-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--bc-border);
    text-align: left;
    vertical-align: middle;
}

.bc-table th {
    color: var(--bc-muted);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bc-row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.bc-row-actions form {
    margin: 0;
}

.bc-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #edf2f7;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 800;
}

.bc-badge.is-success {
    background: #e7f8ef;
    color: #05603a;
}

.bc-badge.is-warning {
    background: #fff7df;
    color: #8a5a00;
}

.bc-badge.is-danger {
    background: #fff0f0;
    color: #a12626;
}

.bc-empty-cell {
    color: var(--bc-muted);
    text-align: center;
}

.bc-bars {
    display: grid;
    gap: 12px;
}

.bc-bar-row {
    display: grid;
    grid-template-columns: 110px minmax(140px, 1fr) 110px;
    gap: 10px;
    align-items: center;
}

.bc-bar-row span {
    color: var(--bc-muted);
    font-size: 0.9rem;
}

.bc-bar-row div {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5edf7;
}

.bc-bar-row i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--bc-primary), var(--bc-accent));
    transition: width 0.35s ease;
}

.bc-bar-row i.is-w-0 { width: 0; }
.bc-bar-row i.is-w-5 { width: 5%; }
.bc-bar-row i.is-w-10 { width: 10%; }
.bc-bar-row i.is-w-15 { width: 15%; }
.bc-bar-row i.is-w-20 { width: 20%; }
.bc-bar-row i.is-w-25 { width: 25%; }
.bc-bar-row i.is-w-30 { width: 30%; }
.bc-bar-row i.is-w-35 { width: 35%; }
.bc-bar-row i.is-w-40 { width: 40%; }
.bc-bar-row i.is-w-45 { width: 45%; }
.bc-bar-row i.is-w-50 { width: 50%; }
.bc-bar-row i.is-w-55 { width: 55%; }
.bc-bar-row i.is-w-60 { width: 60%; }
.bc-bar-row i.is-w-65 { width: 65%; }
.bc-bar-row i.is-w-70 { width: 70%; }
.bc-bar-row i.is-w-75 { width: 75%; }
.bc-bar-row i.is-w-80 { width: 80%; }
.bc-bar-row i.is-w-85 { width: 85%; }
.bc-bar-row i.is-w-90 { width: 90%; }
.bc-bar-row i.is-w-95 { width: 95%; }
.bc-bar-row i.is-w-100 { width: 100%; }

.bc-bar-row strong {
    text-align: right;
    font-size: 0.9rem;
}

.bc-admin-empty {
    max-width: 680px;
    padding: 24px;
    border-radius: var(--bc-radius);
    background: #fff;
    box-shadow: var(--bc-shadow);
}

.bc-mobile-scrim {
    display: none;
}

.bc-receipt-body {
    background: #e9eef5;
}

.receipt-shell {
    width: min(920px, calc(100% - 32px));
    margin: 26px auto;
}

.receipt-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 14px;
}

.receipt-actions a,
.receipt-actions button {
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--bc-border);
    border-radius: 999px;
    background: #fff;
    color: var(--bc-primary);
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.receipt-actions button {
    border-color: transparent;
    background: var(--bc-primary);
    color: #fff;
}

.receipt-card {
    border: 1px solid #cfd8e5;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(9, 16, 31, 0.12);
}

.receipt-document {
    position: relative;
    overflow: hidden;
}

.receipt-document::before {
    content: "";
    display: block;
    height: 8px;
    background: linear-gradient(90deg, var(--bc-primary), #0f8f61 58%, #b7791f);
}

.receipt-copy-label {
    padding: 7px 34px;
    border-bottom: 1px solid #d9e2ef;
    color: var(--bc-ink);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-align: center;
}

.receipt-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 28px;
    padding: 30px 34px 22px;
    border-bottom: 1px solid #d9e2ef;
}

.receipt-brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.receipt-brand-block img {
    width: 76px;
    height: 76px;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 5px;
}

.receipt-brand-block strong,
.receipt-brand-block span,
.receipt-brand-block small,
.receipt-doc-title strong,
.receipt-doc-title small,
.receipt-doc-title em,
.receipt-amount-band span,
.receipt-amount-band strong,
.receipt-amount-band small,
.receipt-parties span,
.receipt-parties strong,
.receipt-parties small,
.receipt-summary span,
.receipt-summary strong {
    display: block;
}

.receipt-brand-block strong {
    color: var(--bc-primary);
    font-size: 1.45rem;
    letter-spacing: 0;
}

.receipt-brand-block span,
.receipt-brand-block small,
.receipt-doc-title small,
.receipt-amount-band span,
.receipt-amount-band small,
.receipt-parties span,
.receipt-parties small,
.receipt-summary span,
.receipt-muted {
    color: var(--bc-muted);
}

.receipt-brand-block small {
    margin-top: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.receipt-doc-title {
    padding-left: 24px;
    border-left: 1px solid #d9e2ef;
    text-align: right;
}

.receipt-type {
    color: var(--bc-primary);
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.receipt-doc-title strong {
    margin-top: 8px;
    font-size: 1.05rem;
}

.receipt-doc-title em {
    width: fit-content;
    margin: 14px 0 0 auto;
    padding: 6px 12px;
    border: 1px solid rgba(15, 143, 97, 0.3);
    border-radius: 999px;
    background: #edfdf6;
    color: #05603a;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 900;
    text-transform: uppercase;
}

.receipt-amount-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 18px;
    align-items: center;
    margin: 24px 34px 0;
    padding: 18px 20px;
    border: 1px solid rgba(0, 59, 142, 0.18);
    border-left: 6px solid var(--bc-primary);
    border-radius: 4px;
    background: #f7fbff;
}

.receipt-amount-band span {
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.receipt-amount-band strong {
    color: var(--bc-primary);
    font-size: 2rem;
    line-height: 1;
    text-align: right;
}

.receipt-amount-band small {
    grid-column: 1 / -1;
    font-size: 0.88rem;
}

.receipt-parties {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 22px 34px 0;
}

.receipt-parties article {
    min-height: 128px;
    padding: 16px;
    border: 1px solid #d9e2ef;
    border-radius: 4px;
    background: #fff;
}

.receipt-parties span,
.receipt-summary span {
    margin-bottom: 7px;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.receipt-parties strong {
    margin-bottom: 8px;
    overflow-wrap: anywhere;
    font-size: 1.08rem;
}

.receipt-table-wrap {
    margin: 22px 34px 0;
    overflow-x: auto;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.receipt-table th,
.receipt-table td {
    padding: 12px 10px;
    border: 1px solid #d9e2ef;
    text-align: left;
}

.receipt-table th {
    background: #f1f5f9;
    color: #475467;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.receipt-table td {
    color: var(--bc-ink);
    font-size: 0.92rem;
}

.receipt-table .is-money {
    text-align: right;
    white-space: nowrap;
}

.receipt-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 34px;
    border: 1px solid #d9e2ef;
    border-top: 0;
}

.receipt-summary div {
    padding: 14px 16px;
    border-right: 1px solid #d9e2ef;
    background: #fbfdff;
}

.receipt-summary div:last-child {
    border-right: 0;
}

.receipt-summary strong {
    color: var(--bc-ink);
    font-size: 1.08rem;
}

.receipt-summary .is-balance {
    background: #fffaf0;
}

.receipt-summary .is-balance strong {
    color: #9a5b13;
}

.receipt-observations {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
    gap: 16px;
    margin: 24px 34px 0;
}

.receipt-observations div,
.receipt-evidence-preview {
    padding: 16px;
    border: 1px solid #d9e2ef;
    border-radius: 4px;
    background: #fff;
}

.receipt-observations strong,
.receipt-evidence-preview strong {
    display: block;
    margin-bottom: 8px;
    color: var(--bc-primary);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.receipt-observations p {
    margin: 0;
    color: var(--bc-muted);
    font-size: 0.92rem;
}

.receipt-observations a {
    color: var(--bc-primary);
    font-weight: 800;
    text-decoration: none;
}

.receipt-observations span {
    display: block;
    margin-top: 5px;
    color: var(--bc-muted);
    font-size: 0.8rem;
}

.receipt-verification {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin: 22px 34px 0;
    padding: 16px;
    border: 1px solid #d9e2ef;
    border-radius: 4px;
    background: #f8fafc;
}

.receipt-qr-box {
    width: 128px;
    height: 128px;
    display: grid;
    place-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
}

.receipt-qr-box img {
    display: block;
    width: 116px;
    height: 116px;
    object-fit: contain;
}

.receipt-qr-box span {
    color: var(--bc-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.receipt-verification-copy strong,
.receipt-verification-copy span,
.receipt-verification-copy small {
    display: block;
}

.receipt-verification-copy strong {
    color: var(--bc-primary);
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.receipt-verification-copy p {
    max-width: 560px;
    margin: 6px 0 9px;
    color: var(--bc-muted);
    font-size: 0.9rem;
}

.receipt-verification-copy span {
    color: var(--bc-ink);
    font-weight: 900;
}

.receipt-verification-copy small {
    margin-top: 4px;
    color: var(--bc-muted);
    font-size: 0.72rem;
    overflow-wrap: anywhere;
}

.receipt-signatures {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 42px;
    margin: 58px 34px 0;
}

.receipt-signatures div {
    padding-top: 12px;
    border-top: 1px solid #667085;
}

.receipt-signatures span,
.receipt-signatures strong {
    display: block;
    text-align: center;
}

.receipt-signatures span {
    color: var(--bc-muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.receipt-signatures strong {
    margin-top: 5px;
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.receipt-footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 30px;
    padding: 14px 34px;
    border-top: 1px solid #d9e2ef;
    background: #f8fafc;
    color: var(--bc-muted);
    font-size: 0.76rem;
}

@page {
    size: auto;
    margin: 6mm;
}

@media print {
    *,
    *::before,
    *::after {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    html,
    body {
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        margin: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }

    .bc-receipt-body {
        background: #fff;
    }

    .receipt-shell {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        min-height: auto !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    .receipt-actions {
        display: none;
    }

    .receipt-card {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        border: 1px solid #cfd8e5;
        border-radius: 0;
        box-shadow: none;
        overflow: visible !important;
    }

    .receipt-document {
        position: static !important;
        display: block !important;
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        break-inside: auto !important;
        page-break-inside: auto !important;
    }

    .receipt-document::before {
        height: 4px;
    }

    .receipt-copy-label {
        padding: 4px 18px;
        font-size: 0.6rem;
    }

    .receipt-head,
    .receipt-amount-band,
    .receipt-parties,
    .receipt-table-wrap,
    .receipt-summary,
    .receipt-observations,
    .receipt-verification,
    .receipt-signatures {
        margin-left: 0;
        margin-right: 0;
    }

    .receipt-head {
        grid-template-columns: minmax(0, 1fr) 210px;
        gap: 16px;
        padding: 10px 14px 9px;
    }

    .receipt-brand-block {
        gap: 10px;
    }

    .receipt-brand-block img {
        width: 48px;
        height: 48px;
        border-radius: 6px;
        padding: 3px;
    }

    .receipt-brand-block strong {
        font-size: 1rem;
    }

    .receipt-brand-block span {
        font-size: 0.72rem;
    }

    .receipt-brand-block small {
        margin-top: 3px;
        font-size: 0.58rem;
    }

    .receipt-doc-title {
        padding-left: 14px;
    }

    .receipt-type {
        font-size: 0.95rem;
    }

    .receipt-doc-title strong {
        margin-top: 4px;
        font-size: 0.72rem;
    }

    .receipt-doc-title small {
        font-size: 0.62rem;
    }

    .receipt-doc-title em {
        margin-top: 6px;
        padding: 3px 8px;
        font-size: 0.56rem;
    }

    .receipt-amount-band {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 3px 10px;
        margin-top: 8px;
        padding: 8px 10px;
        border-left-width: 4px;
    }

    .receipt-amount-band span,
    .receipt-parties span,
    .receipt-summary span {
        margin-bottom: 4px;
        font-size: 0.56rem;
    }

    .receipt-amount-band strong {
        font-size: 1.25rem;
    }

    .receipt-amount-band small {
        font-size: 0.62rem;
    }

    .receipt-parties {
        gap: 9px;
        padding-top: 8px;
    }

    .receipt-parties article {
        min-height: 76px;
        padding: 8px 10px;
    }

    .receipt-parties strong {
        margin-bottom: 4px;
        font-size: 0.76rem;
    }

    .receipt-parties small {
        font-size: 0.6rem;
    }

    .receipt-table-wrap {
        margin-top: 8px;
        overflow: visible;
    }

    .receipt-table {
        min-width: 0;
        table-layout: fixed;
    }

    .receipt-table th,
    .receipt-table td {
        padding: 5px 6px;
        font-size: 0.56rem;
        line-height: 1.25;
    }

    .receipt-summary div {
        padding: 7px 9px;
    }

    .receipt-summary strong {
        font-size: 0.72rem;
    }

    .receipt-observations {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 9px;
        margin-top: 8px;
    }

    .receipt-observations div,
    .receipt-evidence-preview {
        padding: 8px 10px;
    }

    .receipt-observations strong,
    .receipt-evidence-preview strong,
    .receipt-verification-copy strong {
        margin-bottom: 4px;
        font-size: 0.56rem;
    }

    .receipt-observations p {
        font-size: 0.62rem;
        line-height: 1.3;
    }

    .receipt-verification {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 9px;
        align-items: center;
        margin-top: 8px;
        padding: 8px;
    }

    .receipt-qr-box {
        width: 78px;
        height: 78px;
    }

    .receipt-qr-box img {
        width: 72px;
        height: 72px;
    }

    .receipt-verification-copy p {
        margin: 3px 0 4px;
        font-size: 0.58rem;
        line-height: 1.25;
    }

    .receipt-verification-copy span {
        font-size: 0.62rem;
    }

    .receipt-verification-copy small {
        display: none;
    }

    .receipt-signatures {
        gap: 24px;
        margin-top: 22px;
    }

    .receipt-signatures div {
        padding-top: 7px;
    }

    .receipt-signatures span {
        font-size: 0.56rem;
    }

    .receipt-signatures strong {
        margin-top: 3px;
        font-size: 0.66rem;
    }

    .receipt-footer {
        margin-top: 8px;
        padding: 7px 10px;
        font-size: 0.54rem;
        line-height: 1.25;
    }

    .receipt-observations,
    .receipt-verification,
    .receipt-signatures {
        break-inside: avoid;
    }
}

@media (max-width: 720px) {
    .receipt-card {
        border-radius: 4px;
    }

    .receipt-head,
    .receipt-parties,
    .receipt-summary,
    .receipt-observations,
    .receipt-verification,
    .receipt-signatures {
        grid-template-columns: 1fr;
    }

    .receipt-head {
        padding: 22px 18px;
    }

    .receipt-doc-title {
        padding-left: 0;
        border-left: 0;
        text-align: left;
    }

    .receipt-doc-title em {
        margin-left: 0;
    }

    .receipt-amount-band,
    .receipt-parties,
    .receipt-table-wrap,
    .receipt-summary,
    .receipt-observations,
    .receipt-verification,
    .receipt-signatures {
        margin-left: 18px;
        margin-right: 18px;
    }

    .receipt-amount-band {
        grid-template-columns: 1fr;
    }

    .receipt-amount-band strong {
        text-align: left;
    }

    .receipt-summary div {
        border-right: 0;
        border-bottom: 1px solid #d9e2ef;
    }

    .receipt-summary div:last-child {
        border-bottom: 0;
    }

    .receipt-footer {
        display: grid;
        padding: 14px 18px;
    }
}

.bc-verify-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 22px;
    background: #eef3fb;
}

.verify-shell {
    width: min(720px, 100%);
}

.verify-card {
    padding: clamp(22px, 5vw, 38px);
    border: 1px solid #d9e2ef;
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--bc-shadow);
}

.verify-card.is-valid {
    border-top: 7px solid var(--bc-green);
}

.verify-card.is-invalid {
    border-top: 7px solid var(--bc-red);
}

.verify-head {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.verify-head img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.verify-head span {
    color: var(--bc-muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.verify-head h1 {
    margin: 2px 0 0;
    color: var(--bc-primary);
    font-size: clamp(1.45rem, 5vw, 2.1rem);
}

.verify-lead,
.verify-note {
    color: var(--bc-muted);
}

.verify-code {
    margin: 18px 0;
    padding: 14px 16px;
    border: 1px solid rgba(15, 143, 97, 0.22);
    border-radius: 8px;
    background: #edfdf6;
}

.verify-code span,
.verify-code strong {
    display: block;
}

.verify-code span {
    color: #05603a;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.verify-code strong {
    margin-top: 3px;
    color: #043c27;
    font-size: 1.25rem;
    letter-spacing: 0.08em;
}

.verify-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.verify-grid div {
    padding: 12px;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    background: #fbfdff;
}

.verify-grid dt {
    margin: 0 0 4px;
    color: var(--bc-muted);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.verify-grid dd {
    margin: 0;
    color: var(--bc-ink);
    font-weight: 800;
    overflow-wrap: anywhere;
}

@media (max-width: 620px) {
    .verify-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .verify-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1280px) {
    .bc-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bc-workspace-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px) {
    .bc-login-shell,
    .bc-dashboard-grid,
    .bc-quick-grid {
        grid-template-columns: 1fr;
    }

    .bc-login-brand {
        min-height: 280px;
    }

    .bc-admin-shell {
        grid-template-columns: 1fr;
    }

    .bc-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(84vw, 310px);
        height: 100dvh;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
    }

    .bc-admin-shell.is-sidebar-open .bc-sidebar {
        transform: translateX(0);
    }

    .bc-mobile-scrim {
        position: fixed;
        inset: 0;
        z-index: 18;
        display: none;
        background: rgba(9, 16, 31, 0.42);
    }

    .bc-admin-shell.is-sidebar-open .bc-mobile-scrim {
        display: block;
    }

    .bc-icon-btn {
        display: block;
        flex: 0 0 auto;
    }

    .bc-topbar {
        align-items: flex-start;
    }

    .bc-topbar-user {
        align-items: flex-end;
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 980px) {
    .bc-content {
        padding: 16px;
    }
}

@media (max-width: 720px) {
    .bc-login-body {
        padding: 14px;
    }

    .bc-topbar {
        flex-wrap: wrap;
    }

    .bc-stat-grid {
        grid-template-columns: 1fr;
    }

    .bc-page-head,
    .bc-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .bc-search {
        width: 100%;
    }

    .bc-search input {
        min-width: 0;
    }

    .bc-form-grid {
        grid-template-columns: 1fr;
    }

    .bc-table {
        min-width: 0;
    }

    .bc-table thead {
        display: none;
    }

    .bc-table,
    .bc-table tbody,
    .bc-table tr,
    .bc-table td {
        display: block;
        width: 100%;
    }

    .bc-table tr {
        margin-bottom: 12px;
        border: 1px solid var(--bc-border);
        border-radius: 12px;
        background: #fff;
        overflow: hidden;
    }

    .bc-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        border-bottom: 1px solid #edf1f7;
    }

    .bc-table td::before {
        content: attr(data-label);
        color: var(--bc-muted);
        font-size: 0.78rem;
        font-weight: 800;
        text-transform: uppercase;
    }

    .bc-row-actions {
        justify-content: flex-end;
    }

    .bc-bar-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .bc-bar-row strong {
        text-align: left;
    }

}
