      :root {
        --bg: #f5f7fa;
        --card: #ffffff;
        --text: #0f172a;
        --muted: #64748b;
        --border: #e5edf6;
        --primary: #2563eb;
        --success: #16a34a;
        --warning: #d97706;
        --danger: #dc2626;
        --sidebar: 248px;
      }
      * { box-sizing: border-box; }
      html { overflow-x: hidden; }
      body {
        margin: 0;
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", Inter, sans-serif;
        color: var(--text);
        background: #f5f7fa;
        overflow-x: hidden;
      }
      .money-input {
        text-align: right;
        font-variant-numeric: tabular-nums;
      }
      .shell {
        display: grid;
        grid-template-columns: var(--sidebar) minmax(0, 1fr);
        min-height: 100vh;
        width: 100%;
        min-width: 0;
      }
      .shell.collapsed { --sidebar: 76px; }
      .sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        background: var(--card);
        padding: 22px 14px;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
      }
      .sidebar:hover { scrollbar-color: #cbd5e1 transparent; }
      .sidebar::-webkit-scrollbar { width: 6px; }
      .sidebar::-webkit-scrollbar-track { background: transparent; }
      .sidebar::-webkit-scrollbar-thumb {
        background: transparent;
        border-radius: 999px;
      }
      .sidebar:hover::-webkit-scrollbar-thumb { background: #cbd5e1; }
      #nav { padding-bottom: 28px; }
      .brand {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 42px;
        margin-bottom: 20px;
      }
      .brand img { width: 170px; max-width: 100%; display: block; }
      .collapse {
        margin-left: auto;
        width: 34px;
        height: 34px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: #fff;
        color: var(--muted);
        cursor: pointer;
      }
      .nav-group { margin: 24px 0; }
      .nav-title {
        color: #94a3b8;
        font-size: 12px;
        font-weight: 700;
        padding: 0 12px 10px;
      }
      .nav-item {
        position: relative;
        display: flex;
        align-items: center;
        gap: 10px;
        height: 38px;
        padding: 0 12px 0 15px;
        border-radius: 0 10px 10px 0;
        color: #334155;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
      }
      .nav-item.active {
        color: var(--primary);
        background: transparent;
        font-weight: 700;
      }
      .nav-item.active::before {
        content: "";
        position: absolute;
        left: 0;
        top: 9px;
        width: 3px;
        height: 20px;
        border-radius: 999px;
        background: var(--primary);
      }
      .nav-icon {
        display: inline-grid;
        place-items: center;
        width: 22px;
        height: 22px;
        color: currentColor;
        flex: 0 0 auto;
      }
      .nav-icon svg {
        width: 18px;
        height: 18px;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round;
      }
      .collapsed .brand img,
      .collapsed .nav-title,
      .collapsed .nav-label { display: none; }
      .collapsed .sidebar { padding-inline: 10px; }
      .main {
        min-width: 0;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
      }
      .header {
        height: 56px;
        min-height: 56px;
        border-bottom: 1px solid #edf2f7;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(10px);
        display: grid;
        grid-template-columns: 1fr minmax(280px, 480px) auto;
        align-items: center;
        gap: 18px;
        padding: 0 24px;
        position: sticky;
        top: 0;
        z-index: 20;
        flex: 0 0 56px;
      }
      .crumb { color: var(--muted); font-weight: 650; }
      .search {
        height: 38px;
        border: 1px solid #e7eef7;
        border-radius: 12px;
        padding: 0 14px;
        color: var(--text);
        background: #f8fafc;
        width: 100%;
      }
      .user {
        display: flex;
        align-items: center;
        gap: 10px;
        color: #334155;
        font-weight: 700;
      }
      .user .button { flex: 0 0 auto; }
      .avatar {
        display: inline-grid;
        place-items: center;
        width: 30px;
        height: 30px;
        border-radius: 999px;
        background: #eff6ff;
        color: var(--primary);
      }
      .page {
        padding: 24px;
        width: 100%;
        min-width: 0;
        max-width: 1560px;
        margin: 0 auto;
      }
      .page.hidden { display: none; }
      .hidden { display: none !important; }
      .page-title {
        display: flex;
        justify-content: space-between;
        gap: 18px;
        align-items: end;
        margin-bottom: 18px;
        min-width: 0;
      }
      h1 {
        margin: 0 0 6px;
        font-size: 24px;
        line-height: 1.2;
        font-weight: 750;
        letter-spacing: -0.01em;
      }
      .subtle { margin: 0; color: var(--muted); font-size: 14px; }
      .button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 38px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 0 14px;
        background: #fff;
        color: #334155;
        font-weight: 700;
        cursor: pointer;
        text-decoration: none;
        transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
      }
      .button.primary {
        border-color: var(--primary);
        background: var(--primary);
        color: #fff;
      }
      .button.danger {
        border-color: #fecaca;
        background: #fef2f2;
        color: #b91c1c;
      }
      .button.ghost {
        height: 30px;
        padding: 0 8px;
        border-color: transparent;
        background: transparent;
        color: var(--primary);
      }
      .button:not(.primary):hover {
        color: #0f172a;
        background: #f8fafc;
        border-color: #dbe5f0;
      }
      .kpis {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        margin-bottom: 16px;
      }
      .card {
        min-width: 0;
        background: var(--card);
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
      }
      .kpi {
        position: relative;
        min-height: 112px;
        padding: 22px 24px;
        overflow: hidden;
      }
      .kpi::after {
        content: "";
        position: absolute;
        right: 22px;
        top: 22px;
        width: 42px;
        height: 42px;
        border-radius: 14px;
        background: #eff6ff;
        opacity: 0.7;
      }
      .compact-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        margin: 0 0 12px;
      }
      .mini-kpi {
        padding: 10px 12px;
        background: #f8fafc;
        box-shadow: none;
      }
      .mini-kpi .kpi-label { margin-bottom: 4px; }
      .mini-kpi .kpi-value { font-size: 18px; }
      .kpi-label {
        color: var(--muted);
        font-size: 13px;
        font-weight: 650;
        margin-bottom: 8px;
      }
      .kpi-value { font-size: 26px; font-weight: 650; letter-spacing: 0; color: #1f2937; }
      .diesel-company-stock-kpi {
        container-type: inline-size;
        display: grid;
        grid-template-columns: minmax(122px, auto) minmax(0, 1fr);
        column-gap: 18px;
        align-items: start;
        min-height: 156px;
      }
      .diesel-company-stock-main {
        min-width: 0;
      }
      .diesel-company-source-list {
        display: grid;
        gap: 6px;
        min-width: 0;
        margin-top: 2px;
        padding-left: 16px;
        border-left: 1px solid #e8eef6;
      }
      .diesel-company-source-row {
        display: grid;
        grid-template-columns: minmax(58px, 1fr) minmax(72px, auto) minmax(72px, auto);
        gap: 8px;
        align-items: baseline;
        color: #64748b;
        font-size: 12px;
        line-height: 1.3;
        min-width: 0;
      }
      .diesel-company-source-row span {
        min-width: 0;
        max-width: 10em;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .diesel-company-source-row strong {
        justify-self: end;
        color: #1e3a8a;
        font-size: 13px;
        font-weight: 750;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
      }
      .diesel-company-source-row small {
        justify-self: end;
        color: #94a3b8;
        font-size: 11px;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
      }
      .diesel-company-source-row.empty-source {
        grid-template-columns: 1fr;
      }
      @container (max-width: 250px) {
        .diesel-company-stock-kpi {
          grid-template-columns: 1fr;
        }
        .diesel-company-source-list {
          margin-top: 12px;
          padding-top: 10px;
          padding-left: 0;
          border-top: 1px solid #e8eef6;
          border-left: 0;
        }
        .diesel-company-source-row {
          grid-template-columns: minmax(58px, 1fr) minmax(72px, auto);
        }
        .diesel-company-source-row small {
          display: none;
        }
      }
      #page-dashboard {
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
      }
      #page-dashboard .dashboard-title {
        align-items: flex-end;
      }
      #page-dashboard .dashboard-refresh {
        display: flex;
        align-items: center;
        gap: 12px;
        color: #94a3b8;
        font-size: 13px;
        white-space: nowrap;
      }
      #page-dashboard #dashboardRefreshButton {
        height: 38px;
        border-color: #d8e1ec;
        background: #ffffff;
        color: #475569;
        font-weight: 500;
      }
      #page-dashboard #dashboardRefreshButton:hover {
        background: #f8fafc;
      }
      #page-dashboard .dashboard-kpis {
        gap: 14px;
      }
      #page-dashboard .dashboard-kpi {
        min-height: 118px;
        border: 1px solid transparent;
      }
      #page-dashboard .dashboard-kpi.is-focus {
        border-color: #d8e1ec;
      }
      #page-dashboard .dashboard-kpi.is-focus::after {
        background: #dbeafe;
        opacity: 0.78;
      }
      #page-dashboard .dashboard-kpi.is-risk .kpi-hint {
        color: #d97706;
      }
      #page-dashboard .kpi-hint {
        margin-top: 8px;
        color: #94a3b8;
        font-size: 13px;
        font-weight: 500;
      }
      #page-dashboard .dashboard-metric-grid {
        grid-template-columns: minmax(250px, 0.9fr) minmax(300px, 1fr) minmax(420px, 1.55fr);
        align-items: start;
      }
      #page-dashboard .dashboard-tasks-card,
      #page-dashboard .dashboard-category-card,
      #page-dashboard .dashboard-recent-card {
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        background: #ffffff;
      }
      #page-dashboard .dashboard-task-list {
        display: grid;
        gap: 2px;
        padding: 8px 10px 12px;
      }
      #page-dashboard .dashboard-task-item {
        display: grid;
        grid-template-columns: 10px minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        min-width: 0;
        padding: 10px 8px;
        border-radius: 10px;
        color: inherit;
        text-decoration: none;
      }
      #page-dashboard .dashboard-task-item:hover {
        background: #f8fafc;
      }
      #page-dashboard .dashboard-task-dot {
        width: 7px;
        height: 7px;
        margin-top: 6px;
        border-radius: 999px;
        background: #cbd5e1;
      }
      #page-dashboard .dashboard-task-item.warning .dashboard-task-dot {
        background: #f59e0b;
      }
      #page-dashboard .dashboard-task-item.info .dashboard-task-dot {
        background: #2563eb;
      }
      #page-dashboard .dashboard-task-main {
        display: grid;
        gap: 3px;
        min-width: 0;
      }
      #page-dashboard .dashboard-task-main strong {
        overflow: hidden;
        color: #1e293b;
        font-size: 14px;
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-dashboard .dashboard-task-main em {
        overflow: hidden;
        color: #94a3b8;
        font-size: 12px;
        font-style: normal;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-dashboard .dashboard-category-card th,
      #page-dashboard .dashboard-category-card td,
      #page-dashboard .dashboard-recent-card th,
      #page-dashboard .dashboard-recent-card td {
        height: 56px;
      }
      #page-dashboard .dashboard-category-name {
        overflow: hidden;
        color: #1e293b;
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-dashboard .dashboard-count {
        text-align: right;
        color: #334155;
        font-variant-numeric: tabular-nums;
      }
      #page-dashboard .dashboard-rank-bar {
        height: 4px;
        margin-top: 7px;
        overflow: hidden;
        border-radius: 999px;
        background: #eef2f7;
      }
      #page-dashboard .dashboard-rank-bar span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: #bfdbfe;
      }
      #page-dashboard .dashboard-category-card .money,
      #page-dashboard .dashboard-recent-card .money {
        text-align: right;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
      }
      #page-dashboard .dashboard-invoice-link {
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        color: #2563eb;
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-dashboard .dashboard-invoice-link:hover {
        color: #1d4ed8;
      }
      #page-dashboard .dashboard-seller {
        overflow: hidden;
        color: #1e293b;
        font-weight: 500;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      @media (max-width: 1280px) {
        #page-dashboard .dashboard-metric-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        #page-dashboard .dashboard-recent-card {
          grid-column: 1 / -1;
        }
      }
      .bc-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
      }
      .bc-kpis .kpi:nth-child(1)::after {
        background:
          linear-gradient(#bfdbfe, #bfdbfe) 12px 14px / 18px 3px no-repeat,
          linear-gradient(#dbeafe, #dbeafe) center / 30px 22px no-repeat;
      }
      .bc-kpis .kpi:nth-child(2)::after {
        background:
          linear-gradient(135deg, transparent 45%, #bfdbfe 46% 54%, transparent 55%) center / 30px 30px no-repeat,
          #f1f5f9;
      }
      .bc-kpis .kpi:nth-child(3)::after {
        background:
          radial-gradient(circle at 50% 50%, #bfdbfe 0 4px, transparent 5px),
          conic-gradient(from 0.25turn, #dbeafe 0 75%, transparent 0);
      }
      .filters {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        align-items: end;
        gap: 12px;
        padding: 16px;
        margin-bottom: 16px;
      }
      .audit-filters {
        grid-template-columns: minmax(220px, 1.4fr) minmax(120px, 0.7fr) minmax(130px, 0.8fr) minmax(150px, 0.9fr) minmax(140px, 0.8fr) minmax(136px, 0.7fr) minmax(136px, 0.7fr) auto auto;
      }
      .bc-filters {
        grid-template-columns: 150px 150px minmax(260px, 1fr) 150px auto auto;
        align-items: center;
        padding: 16px;
      }
      .bc-filters .button:not(.primary) {
        border-color: transparent;
        background: transparent;
        color: #64748b;
      }
      .bc-filters .button:not(.primary):hover {
        color: #0f172a;
        background: transparent;
      }
      #page-bc .page-title {
        margin-bottom: 22px;
      }
      #page-bc .page-title h1 {
        font-size: 28px;
        font-weight: 750;
        letter-spacing: -0.01em;
      }
      #page-bc .page-title .subtle {
        color: #64748b;
        font-size: 14px;
      }
      #page-bc .card {
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
      }
      #page-bc .bc-kpis .kpi {
        min-height: 118px;
      }
      #page-bc .kpi-label {
        color: #64748b;
        font-size: 13px;
        font-weight: 650;
      }
      #page-bc .kpi-value {
        color: #1f2937;
        font-size: 26px;
        font-weight: 650;
      }
      #page-bc .bc-filters {
        margin-bottom: 18px;
        gap: 12px;
      }
      #page-bc .bc-filters .field {
        border-color: transparent;
        background: #f9fafb;
      }
      #page-bc .bc-filters .field:hover {
        background: #f8fafc;
      }
      #page-bc .bc-filters .field:focus {
        border-color: #2563eb;
        background: #fff;
      }
      #page-bc .bc-filters .button:not(.primary) {
        border-color: transparent;
        background: transparent;
        color: #94a3b8;
        box-shadow: none;
      }
      #page-bc .bc-filters .button:not(.primary):hover {
        background: #f3f4f6;
        color: #374151;
      }
      #page-bc .table-card {
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.045);
      }
      #page-bc .table-header {
        height: 52px;
        padding: 0 18px;
        border-bottom: 1px solid rgba(226, 232, 240, 0.72);
      }
      #page-bc .table-title {
        font-size: 16px;
        font-weight: 750;
        color: #0f172a;
      }
      #page-bc th {
        height: 46px;
        background: #fbfdff;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 500;
      }
      #page-bc td {
        height: 54px;
        border-bottom: 1px solid #f3f4f6;
        color: #1e293b;
      }
      #page-bc #settlementRows tr {
        cursor: pointer;
      }
      #page-bc #settlementRows tr:hover {
        background: rgba(248, 250, 252, 0.8);
      }
      #page-bc tbody tr:last-child td {
        border-bottom: 0;
      }
      #page-bc .bc-list-section .primary-text {
        color: #1f2937;
        font-size: 14px;
        font-weight: 650;
        line-height: 1.45;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
      }
      #page-bc .bc-list-section .secondary-text {
        color: #94a3b8;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.55;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
      }
      #page-bc .money {
        color: #111827;
        font-weight: 650;
      }
      #page-bc th.money {
        color: #94a3b8;
        font-weight: 500;
      }
      #page-bc .money.is-negative {
        color: #dc2626;
        font-weight: 650;
      }
      #page-bc .link {
        color: #2563eb;
        font-weight: 750;
      }
      #page-bc .link:hover {
        text-decoration: underline;
      }
      #page-bc .bc-pagination {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 52px;
        padding: 0 18px;
        border-top: 1px solid rgba(226, 232, 240, 0.72);
        color: #64748b;
        font-size: 13px;
        font-weight: 600;
      }
      #page-bc .bc-page-controls {
        display: inline-flex;
        align-items: center;
        gap: 6px;
      }
      #page-bc .bc-page-button {
        min-width: 30px;
        height: 30px;
        border: 0;
        border-radius: 999px;
        background: transparent;
        color: #64748b;
        cursor: pointer;
        font-weight: 750;
      }
      #page-bc .bc-page-button:hover:not(:disabled) {
        background: #f1f5f9;
        color: #0f172a;
      }
      #page-bc .bc-page-button.active {
        background: #eff6ff;
        color: #2563eb;
      }
      #page-bc .bc-page-button:disabled {
        cursor: not-allowed;
        opacity: 0.4;
      }
      .list-pagination {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 52px;
        padding: 0 18px;
        border-top: 1px solid rgba(226, 232, 240, 0.72);
        color: #64748b;
        font-size: 13px;
        font-weight: 600;
      }
      .list-page-controls {
        display: inline-flex;
        align-items: center;
        gap: 6px;
      }
      .list-page-button {
        min-width: 30px;
        height: 30px;
        border: 0;
        border-radius: 999px;
        background: transparent;
        color: #64748b;
        cursor: pointer;
        font-weight: 750;
      }
      .list-page-button:hover:not(:disabled) {
        background: #f1f5f9;
        color: #0f172a;
      }
      .list-page-button.active {
        background: #eff6ff;
        color: #2563eb;
      }
      .list-page-button:disabled {
        cursor: not-allowed;
        opacity: 0.4;
      }
      .list-pagination:empty {
        display: none;
      }
      .field {
        height: 38px;
        border: 1px solid transparent;
        border-radius: 10px;
        padding: 0 12px;
        background: #f9fafb;
        color: var(--text);
        font-weight: 650;
        transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
      }
      textarea.field {
        height: auto;
        line-height: 1.5;
      }
      .field:hover {
        background: #f8fafc;
      }
      .filters .button {
        min-width: 84px;
      }
      .filters .button:not(.primary) {
        border-color: transparent;
        background: transparent;
        color: #64748b;
      }
      .filters .button:not(.primary):hover {
        border-color: transparent;
        background: transparent;
        color: #0f172a;
      }
      .field:focus,
      .search:focus {
        outline: none;
        border-color: var(--primary);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
      }
      .table-card {
        min-width: 0;
        overflow: hidden;
      }
      .table-header {
        height: 52px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 18px;
        border-bottom: 1px solid rgba(226, 232, 240, 0.72);
      }
      .table-title { font-size: 16px; font-weight: 750; color: #0f172a; }
      table {
        width: 100%;
        border-collapse: collapse;
        table-layout: fixed;
      }
      th, td {
        height: 52px;
        border-bottom: 1px solid rgba(226, 232, 240, 0.62);
        padding: 8px 14px;
        text-align: left;
        vertical-align: middle;
        font-size: 14px;
      }
      th {
        height: 48px;
        color: #64748b;
        background: #fbfdff;
        font-size: 13px;
        font-weight: 650;
      }
      tbody tr:hover { background: #f8fafc; }
      .link {
        color: var(--primary);
        font-weight: 800;
        text-decoration: none;
      }
      button.link {
        border: 0;
        padding: 0;
        background: transparent;
        cursor: pointer;
        font: inherit;
      }
      .primary-text { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .secondary-text { color: #94a3b8; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .money { text-align: right; font-weight: 750; color: #111827; }
      .money.is-negative { color: var(--danger); }
      .row-actions {
        display: flex;
        align-items: center;
        gap: 8px;
      }
      .audit-summary-lines {
        display: grid;
        gap: 4px;
        color: #475569;
        font-size: 13px;
        line-height: 1.4;
        min-width: 0;
      }
      .audit-summary-lines div {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .audit-summary-lines strong {
        color: #0f172a;
        font-weight: 750;
      }
      .audit-summary-lines span,
      .audit-more-text {
        color: #94a3b8;
      }
      .audit-detail-link {
        justify-self: start;
        font-size: 12px;
      }
      .row-actions.compact { gap: 6px; flex-wrap: wrap; }
      .danger-text { color: var(--danger); }
      .modal-backdrop {
        position: fixed;
        inset: 0;
        display: grid;
        place-items: center;
        padding: 24px;
        background: rgba(15, 23, 42, 0.42);
        z-index: 60;
      }
      #accountModal {
        z-index: 90;
      }
      #apTempPayeeModal {
        z-index: 95;
      }
      .modal {
        width: min(980px, 96vw);
        max-height: 92vh;
        overflow: auto;
        background: #fff;
        border: 0;
        border-radius: 16px;
        box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
      }
      .modal-header {
        position: sticky;
        top: 0;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 16px 18px;
        border-bottom: 1px solid rgba(226, 232, 240, 0.72);
        background: rgba(255, 255, 255, 0.96);
      }
      .modal-body { padding: 18px; }
      .driver-detail-modal { width: min(860px, 94vw); }
      .vehicle-detail-modal { width: min(980px, 96vw); }
      .reimbursement-detail-modal { width: min(1120px, 96vw); }
      .audit-detail-modal { width: min(980px, 96vw); }
      .audit-detail-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 18px;
      }
      .audit-detail-grid div {
        min-width: 0;
        padding: 12px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        background: #f8fafc;
      }
      .audit-detail-grid span {
        display: block;
        margin-bottom: 5px;
        color: #64748b;
        font-size: 12px;
        font-weight: 650;
      }
      .audit-detail-grid strong {
        display: block;
        overflow-wrap: anywhere;
        color: #0f172a;
        font-size: 14px;
      }
      .audit-detail-section {
        border-top: 1px solid #e2e8f0;
        padding-top: 16px;
      }
      .audit-detail-section-title {
        margin-bottom: 10px;
        color: #0f172a;
        font-weight: 800;
      }
      .audit-change-list {
        display: grid;
        gap: 8px;
      }
      .audit-change-row {
        display: grid;
        grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 10px 12px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        background: #fff;
      }
      .audit-change-label {
        color: #0f172a;
        font-weight: 800;
      }
      .audit-change-values {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 10px;
        color: #475569;
      }
      .audit-change-values.single {
        display: block;
      }
      .audit-change-values span {
        min-width: 0;
        overflow-wrap: anywhere;
      }
      .audit-change-values strong {
        color: #94a3b8;
      }
      .audit-raw-json {
        margin-top: 16px;
        border-top: 1px solid #e2e8f0;
        padding-top: 14px;
      }
      .audit-raw-json summary {
        cursor: pointer;
        color: #475569;
        font-weight: 750;
      }
      .audit-raw-json pre {
        max-height: 280px;
        overflow: auto;
        margin: 10px 0 0;
        padding: 12px;
        border-radius: 8px;
        background: #0f172a;
        color: #e2e8f0;
        font-size: 12px;
        line-height: 1.5;
      }
      .vehicle-detail-error {
        margin-bottom: 12px;
        padding: 10px 12px;
        border-radius: 12px;
        background: #fef2f2;
        color: var(--danger);
        font-weight: 750;
      }
      .driver-detail-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
      }
      .driver-detail-field {
        min-height: 72px;
        padding: 12px;
        border-radius: 12px;
        background: #f8fafc;
      }
      .driver-detail-label {
        margin-bottom: 6px;
        color: #64748b;
        font-size: 12px;
        font-weight: 750;
      }
      .driver-detail-value {
        color: #0f172a;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.5;
        overflow-wrap: anywhere;
      }
      .driver-detail-section {
        margin-top: 16px;
        padding-top: 14px;
        border-top: 1px solid rgba(226, 232, 240, 0.72);
      }
      .driver-detail-section h3 {
        margin: 0 0 10px;
        color: #0f172a;
        font-size: 15px;
      }
      .driver-detail-table {
        overflow-x: auto;
        border-radius: 12px;
        background: #fff;
      }
      .driver-detail-table table th,
      .driver-detail-table table td {
        height: 42px;
        padding: 9px 10px;
        font-size: 13px;
      }
      .driver-document-list {
        display: grid;
        gap: 8px;
      }
      .driver-document-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 12px;
        border-radius: 12px;
        background: #f8fafc;
      }
      .form-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 16px;
      }
      .form-field label {
        display: block;
        margin-bottom: 6px;
        color: #64748b;
        font-size: 13px;
        font-weight: 650;
      }
      .form-field.full { grid-column: 1 / -1; }
      .form-field textarea {
        min-height: 82px;
        padding-top: 10px;
        resize: vertical;
      }
      .vehicle-edit-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 16px;
      }
      .vehicle-edit-grid .form-field.full { grid-column: 1 / -1; }
      .vehicle-edit-grid textarea.field {
        min-height: 96px;
        padding-top: 10px;
        resize: vertical;
      }
      #page-vehicles .table-card th {
        height: 44px;
        padding-top: 6px;
        padding-bottom: 6px;
      }
      #page-vehicles .table-card td {
        height: 50px;
        padding-top: 6px;
        padding-bottom: 6px;
      }
      #page-vehicles .vehicle-detail-link {
        color: #2563eb;
        font-weight: 650;
        text-decoration: none;
      }
      #page-vehicles .vehicle-detail-link:hover {
        text-decoration: underline;
      }
      #page-vehicles .vehicle-muted {
        color: #94a3b8;
        font-size: 13px;
        font-weight: 400;
      }
      #page-vehicles .vehicle-date,
      #page-vehicles .vehicle-etc {
        color: #334155;
        font-variant-numeric: tabular-nums;
        font-weight: 500;
        white-space: nowrap;
      }
      .check-row {
        display: flex;
        align-items: center;
        gap: 8px;
        height: 38px;
        color: #334155;
        font-weight: 700;
      }
      .permission-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        padding: 10px;
        border: 1px solid rgba(226, 232, 240, 0.72);
        border-radius: 12px;
        background: #fbfdff;
      }
      .permission-option {
        display: flex;
        align-items: center;
        gap: 8px;
        min-height: 32px;
        color: #334155;
        font-size: 13px;
        font-weight: 650;
      }
      .permission-option input { margin: 0; }
      .badge {
        display: inline-flex;
        align-items: center;
        height: 24px;
        padding: 0 10px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 750;
        background: #f1f5f9;
        color: #475569;
      }
      .badge.success { background: #ecfdf5; color: #047857; }
      .badge.warning { background: #fffbeb; color: #b45309; }
      .badge.info { background: #eff6ff; color: #2563eb; }
      .badge.danger { background: #fef2f2; color: #b91c1c; }
      .badge.neutral { background: #f1f5f9; color: #64748b; }
      .reimbursement-file-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
      }
      .reimbursement-summary-grid,
      .reimbursement-kpi-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 16px;
      }
      .reimbursement-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .reimbursement-kpi,
      .reimbursement-summary-field {
        padding: 12px 14px;
        border-radius: 14px;
        background: #f8fafc;
      }
      .reimbursement-kpi-label,
      .reimbursement-summary-label {
        margin-bottom: 6px;
        color: #64748b;
        font-size: 12px;
        font-weight: 750;
      }
      .reimbursement-kpi-value {
        color: #0f172a;
        font-size: 20px;
        font-weight: 850;
      }
      .reimbursement-summary-value {
        color: #0f172a;
        font-size: 14px;
        font-weight: 700;
      }
      .reimbursement-invoice-table {
        overflow-x: auto;
        border: 1px solid rgba(226, 232, 240, 0.82);
        border-radius: 14px;
      }
      .reimbursement-invoice-table table {
        min-width: 980px;
      }
      .empty {
        padding: 36px;
        text-align: center;
        color: var(--muted);
      }
      .empty-state {
        max-width: 720px;
        margin: 96px auto 0;
        padding: 32px;
        text-align: center;
      }
      .empty-state h2 {
        margin: 0 0 10px;
        font-size: 22px;
      }
      .metric-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
      }
      .metric-card {
        padding: 20px;
      }
      .metric-card strong {
        display: block;
        margin-top: 8px;
        font-size: 24px;
      }
      .tabs {
        grid-column: 1 / -1;
        display: inline-flex;
        width: fit-content;
        max-width: 100%;
        gap: 4px;
        padding: 4px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: #f8fafc;
      }
      .tab-button {
        height: 32px;
        border: 0;
        border-radius: 9px;
        padding: 0 14px;
        background: transparent;
        color: #475569;
        font-weight: 800;
        cursor: pointer;
      }
      .tab-button.active {
        background: #fff;
        color: var(--primary);
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
      }
      .tab-button span {
        margin-left: 4px;
        color: inherit;
      }
      .tab-panel {
        grid-column: 1 / -1;
        display: none;
      }
      .tab-panel.active { display: block; }
      .health-bar {
        height: 10px;
        border-radius: 999px;
        background: #e2e8f0;
        overflow: hidden;
        margin-top: 14px;
      }
      .health-fill {
        height: 100%;
        width: 0;
        background: var(--success);
      }
      .health-fill.notice { background: #f59e0b; }
      .health-fill.warning { background: var(--warning); }
      .health-fill.danger,
      .health-fill.critical { background: var(--danger); }
      .health-status-pill {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        min-height: 24px;
        color: #475569;
        font-size: 13px;
        font-weight: 750;
        vertical-align: middle;
      }
      strong .health-status-pill {
        font-size: 22px;
        line-height: 1.2;
      }
      .health-status-dot {
        width: 9px;
        height: 9px;
        border-radius: 999px;
        background: #94a3b8;
        box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15);
      }
      .health-status-pill.success { color: #047857; }
      .health-status-pill.success .health-status-dot {
        background: var(--success);
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14);
      }
      .health-status-pill.notice,
      .health-status-pill.warning { color: #b45309; }
      .health-status-pill.notice .health-status-dot,
      .health-status-pill.warning .health-status-dot {
        background: #f59e0b;
        box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
      }
      .health-status-pill.orange { color: #c2410c; }
      .health-status-pill.orange .health-status-dot {
        background: #f97316;
        box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
      }
      .health-status-pill.danger { color: #b91c1c; }
      .health-status-pill.danger .health-status-dot {
        background: var(--danger);
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
      }
      .health-debug-details {
        margin-top: 6px;
        color: var(--muted);
        font-size: 12px;
      }
      .health-debug-details summary {
        cursor: pointer;
        font-weight: 700;
      }
      .health-debug-details code {
        display: block;
        margin-top: 6px;
        padding: 8px 10px;
        border-radius: 6px;
        background: #f8fafc;
        color: #334155;
        white-space: normal;
        word-break: break-all;
      }
      .login-backdrop {
        position: fixed;
        inset: 0;
        z-index: 50;
        display: grid;
        place-items: center;
        padding: 24px;
        background:
          radial-gradient(circle at 30% 20%, rgba(37, 99, 235, 0.08), transparent 28%),
          linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
      }
      .login-card {
        width: min(440px, 100%);
        border: 1px solid #d8e1ec;
        border-radius: 16px;
        background: #ffffff;
        padding: 32px;
        box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
      }
      .login-card img {
        width: 166px;
        display: block;
        margin-bottom: 20px;
      }
      .login-card h1 {
        margin-bottom: 8px;
        color: #0f172a;
        font-size: 24px;
        font-weight: 700;
        letter-spacing: 0;
      }
      .login-card .subtle {
        color: #64748b;
        line-height: 1.55;
      }
      .login-form {
        display: grid;
        gap: 14px;
        margin-top: 24px;
      }
      .login-field {
        display: grid;
        gap: 7px;
        color: #334155;
        font-size: 13px;
        font-weight: 500;
      }
      .login-input-wrap {
        position: relative;
        display: block;
      }
      .login-input-wrap .field {
        width: 100%;
        height: 42px;
        border-color: #d8e1ec;
        background: #ffffff;
        padding-left: 38px;
        font-weight: 500;
      }
      .login-input-wrap .field:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
      }
      .login-input-wrap .field::placeholder {
        color: #94a3b8;
        font-weight: 400;
      }
      .login-input-icon {
        position: absolute;
        left: 13px;
        top: 50%;
        width: 16px;
        height: 16px;
        color: #94a3b8;
        transform: translateY(-50%);
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
        pointer-events: none;
      }
      .login-password-toggle {
        position: absolute;
        right: 8px;
        top: 50%;
        height: 28px;
        border: 1px solid transparent;
        border-radius: 8px;
        padding: 0 8px;
        background: rgba(248, 250, 252, 0.72);
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
        transform: translateY(-50%);
        cursor: pointer;
      }
      .login-password-toggle:hover,
      .login-password-toggle:focus-visible {
        border-color: #dbe5f0;
        background: #f1f5f9;
        color: #2563eb;
        outline: none;
      }
      .login-input-wrap:has(.login-password-toggle) .field {
        padding-right: 58px;
      }
      .login-message {
        margin: 0;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 8px 10px;
        background: #eff6ff;
        color: #64748b;
        font-size: 13px;
        line-height: 1.45;
      }
      .login-message.error {
        border-color: #fecaca;
        background: #fef2f2;
        color: #b91c1c;
      }
      .login-card .button.primary {
        height: 42px;
        border-radius: 10px;
        border-color: #2563eb;
        background: #2563eb;
        color: #ffffff;
        font-weight: 500;
        box-shadow: 0 1px 2px rgba(37, 99, 235, 0.18);
      }
      .login-card .button.primary:hover {
        border-color: #1d4ed8;
        background: #1d4ed8;
      }
      .login-footnote {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        margin-top: 18px;
        color: #a8b3c3;
        font-size: 12px;
        font-weight: 400;
        text-align: center;
      }
      .login-footnote a {
        color: inherit;
        text-decoration: none;
      }
      .login-footnote a:hover {
        color: #64748b;
        text-decoration: underline;
      }
      .danger-text { color: var(--danger); font-weight: 700; }
      #page-cost-invoices .cost-invoice-filters {
        display: flex;
        flex-direction: column;
        gap: 12px;
        min-width: 0;
        overflow: visible;
      }
      #page-cost-invoices .cost-filter-row {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 12px;
        align-items: center;
        min-width: 0;
        width: 100%;
      }
      #page-cost-invoices .cost-filter-row.more {
        gap: 10px 12px;
      }
      #page-cost-invoices .cost-filter-row.hidden {
        display: none;
      }
      #page-cost-invoices .cost-invoice-filters .button {
        width: 108px;
        min-width: 100px;
        max-width: 120px;
        flex: 0 0 108px;
        height: 40px;
      }
      #page-cost-invoices .cost-invoice-filters .button.primary {
        border-color: #2563eb;
        background: #2563eb;
        color: #ffffff;
      }
      #page-cost-invoices .cost-invoice-filters .button.primary:hover {
        border-color: #1d4ed8;
        background: #1d4ed8;
      }
      #page-cost-invoices .cost-invoice-filters .button:not(.primary) {
        border-color: #d8e1ec;
        background: #ffffff;
        color: #334155;
      }
      #page-cost-invoices .cost-invoice-filters .button:not(.primary):hover {
        border-color: #cbd5e1;
        background: #f8fafc;
        color: #0f172a;
      }
      #page-cost-invoices .cost-invoice-filters .more-action {
        width: 112px;
        min-width: 112px;
        padding: 0 8px;
        border-color: transparent;
        background: transparent;
        color: #64748b;
        font-weight: 500;
      }
      #page-cost-invoices .cost-invoice-filters .more-action:hover {
        border-color: transparent;
        background: transparent;
        color: #2563eb;
      }
      #page-cost-invoices .cost-invoice-filters .field {
        height: 40px;
        min-width: 0;
        border-color: #d8e1ec;
        background: #ffffff;
        font-weight: 500;
      }
      #page-cost-invoices .cost-invoice-filters .field:focus {
        outline: none;
        border-color: #93c5fd;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
      }
      #page-cost-invoices .cost-invoice-filters .keyword {
        flex: 1 1 280px;
        min-width: 260px;
        max-width: 320px;
      }
      #page-cost-invoices #invoiceBuyer {
        flex: 0 0 180px;
        width: 180px;
      }
      #page-cost-invoices #invoiceCategory {
        flex: 0 0 140px;
        width: 140px;
      }
      #page-cost-invoices #invoiceStatus {
        flex: 0 0 120px;
        width: 120px;
      }
      #page-cost-invoices .cost-filter-row.more .date-field {
        flex: 0 0 150px;
        width: 150px;
      }
      #page-cost-invoices #invoiceTaxStatus,
      #page-cost-invoices #invoiceType,
      #page-cost-invoices #invoiceCurrency {
        flex: 0 0 120px;
        width: 120px;
      }
      #page-cost-invoices .table-card {
        min-width: 0;
        overflow: visible;
      }
      #page-cost-invoices .cost-invoice-table-meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        gap: 8px 14px;
        min-width: 0;
        text-align: right;
      }
      #page-cost-invoices .cost-invoice-selection-summary {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        gap: 6px 10px;
        color: #334155;
        font-size: 13px;
        font-weight: 650;
        line-height: 1.5;
      }
      #page-cost-invoices .cost-invoice-selection-summary.hidden {
        display: none;
      }
      #page-cost-invoices .cost-invoice-selection-summary span {
        white-space: nowrap;
      }
      #page-cost-invoices .cost-invoice-selection-summary strong {
        color: #0f172a;
        font-variant-numeric: tabular-nums;
      }
      #page-cost-invoices .cost-invoice-table-wrap {
        width: 100%;
        min-width: 0;
        overflow-x: auto;
        overflow-y: visible;
      }
      #page-cost-invoices .cost-invoice-table-wrap table {
        min-width: 1362px;
        table-layout: auto;
      }
      #page-cost-invoices table th,
      #page-cost-invoices table td {
        height: 50px;
        padding-top: 8px;
        padding-bottom: 8px;
        color: #334155;
        font-size: 14px;
      }
      #page-cost-invoices table th {
        color: #64748b;
        font-size: 13px;
      }
      #page-cost-invoices .cost-invoice-number,
      #page-cost-invoices .cost-invoice-file-link {
        color: #2563eb;
        font-size: inherit;
        font-weight: 500;
        text-decoration: none;
      }
      #page-cost-invoices .cost-invoice-file-link {
        font-weight: 500;
      }
      #page-cost-invoices .cost-invoice-number:hover,
      #page-cost-invoices .cost-invoice-file-link:hover {
        color: #1d4ed8;
        text-decoration: underline;
      }
      #page-cost-invoices th:nth-child(2),
      #page-cost-invoices td:nth-child(2) {
        white-space: nowrap;
      }
      #page-cost-invoices th:nth-child(5),
      #page-cost-invoices td:nth-child(5) {
        min-width: 260px;
      }
      #page-cost-invoices .cost-party {
        max-width: 100%;
        overflow: hidden;
        color: #334155;
        font-weight: 500;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-cost-invoices .cost-buyer {
        color: #1e293b;
        font-weight: 500;
      }
      #page-cost-invoices .cost-seller {
        color: #334155;
      }
      #page-cost-invoices .money {
        text-align: right;
        font-variant-numeric: tabular-nums;
      }
      #page-cost-invoices .badge.warning {
        border-color: #fde68a;
        border-radius: 999px;
        background: #fef3c7;
        color: #d97706;
        font-size: 12px;
        white-space: nowrap;
      }
      #page-cost-invoices .cost-invoice-more {
        position: relative;
        display: inline-flex;
      }
      #page-cost-invoices .cost-invoice-more-button {
        height: 28px;
        border: 0;
        border-radius: 6px;
        padding: 0 2px;
        background: transparent;
        color: #64748b;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
      }
      #page-cost-invoices .cost-invoice-more-button:hover {
        color: #2563eb;
      }
      #page-cost-invoices .cost-invoice-menu {
        position: absolute;
        right: 0;
        top: calc(100% + 6px);
        z-index: 8;
        display: none;
        min-width: 112px;
        padding: 6px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
      }
      #page-cost-invoices .cost-invoice-more:hover .cost-invoice-menu,
      #page-cost-invoices .cost-invoice-more:focus-within .cost-invoice-menu {
        display: grid;
      }
      #page-cost-invoices .cost-invoice-menu-item {
        height: 30px;
        border: 0;
        border-radius: 7px;
        padding: 0 9px;
        background: transparent;
        color: #334155;
        font-size: 13px;
        font-weight: 500;
        text-align: left;
        cursor: pointer;
      }
      #page-cost-invoices .cost-invoice-menu-item:hover {
        background: #f8fafc;
      }
      #page-cost-invoices .cost-invoice-menu-item.danger {
        color: #dc2626;
      }
      #page-cost-invoices .cost-invoice-menu-item:disabled {
        color: #cbd5e1;
        cursor: not-allowed;
      }
      @media (max-width: 1180px) {
        #page-cost-invoices .cost-filter-row,
        #page-cost-invoices .cost-filter-row.more {
          flex-wrap: wrap;
        }
      }
      @media (max-width: 720px) {
        #page-cost-invoices .cost-invoice-filters .keyword,
        #page-cost-invoices #invoiceBuyer,
        #page-cost-invoices #invoiceCategory,
        #page-cost-invoices #invoiceStatus,
        #page-cost-invoices .cost-filter-row.more .date-field,
        #page-cost-invoices #invoiceTaxStatus,
        #page-cost-invoices #invoiceType,
        #page-cost-invoices #invoiceCurrency {
          flex: 1 1 160px;
          width: auto;
          max-width: none;
        }
        #page-cost-invoices .cost-invoice-filters .button,
        #page-cost-invoices .cost-invoice-filters .more-action {
          flex: 0 0 100px;
          width: 100px;
          min-width: 100px;
        }
      }
      .app-footer {
        margin-top: auto;
        padding: 28px 0 8px;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 500;
        text-align: center;
      }
      #page-bc .bc-detail-page {
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
      }
      #page-bc .bc-detail-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 24px;
        margin-bottom: 20px;
      }
      #page-bc .bc-detail-message {
        margin: -4px 0 16px;
        padding: 12px 14px;
        border: 1px solid #bbf7d0;
        border-radius: 12px;
        background: #f0fdf4;
        color: #15803d;
        font-size: 14px;
        font-weight: 650;
      }
      #page-bc .bc-detail-message .bc-payable-message-meta {
        display: inline-flex;
        flex-wrap: wrap;
        gap: 8px 14px;
        margin-left: 14px;
        color: #166534;
        font-weight: 600;
      }
      #page-bc .bc-detail-message .bc-payable-message-meta-item {
        white-space: nowrap;
      }
      #page-bc .bc-detail-message.info {
        border-color: #bfdbfe;
        background: #eff6ff;
        color: #2563eb;
      }
      #page-bc .bc-create-success-message {
        margin: 10px 0 0;
        padding: 10px 12px;
        border: 1px solid #bbf7d0;
        border-radius: 12px;
        background: #f0fdf4;
        color: #15803d;
        font-weight: 650;
      }
      #page-bc .bc-back-link {
        display: inline-flex;
        align-items: center;
        height: 24px;
        margin: 0 0 8px;
        border: 0;
        background: transparent;
        color: #64748b;
        cursor: pointer;
        font-size: 13px;
        font-weight: 650;
        padding: 0;
      }
      #page-bc .bc-back-link:hover { color: #2563eb; }
      #page-bc .bc-detail-title {
        color: #0f172a;
        font-size: 24px;
        font-weight: 800;
        letter-spacing: -0.01em;
        line-height: 1.25;
      }
      #page-bc .bc-detail-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
      }
      #page-bc .bc-workflow-actions {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        padding: 4px;
        border-radius: 14px;
        background: #f9fafb;
      }
      #page-bc .bc-workflow-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        height: 36px;
        padding: 0 12px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        color: #4b5563;
        box-shadow: none;
        text-decoration: none;
        font-size: 14px;
        font-weight: 700;
        line-height: 1;
        cursor: pointer;
        transition: all 0.2s ease;
      }
      #page-bc .bc-workflow-action svg {
        width: 16px;
        height: 16px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round;
        flex: 0 0 auto;
      }
      #page-bc .bc-workflow-action:active {
        transform: scale(0.95);
      }
      #page-bc .bc-pdf-action:hover {
        background: #eff6ff;
        color: #2563eb;
      }
      #page-bc .bc-print-action:hover {
        background: rgba(229, 231, 235, 0.6);
        color: #111827;
      }
      #page-bc .bc-workflow-divider {
        width: 1px;
        height: 16px;
        background: #e5e7eb;
      }
      #page-bc .visually-hidden-control {
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
        pointer-events: none;
      }
      #page-bc .bc-detail-kpis {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        margin: 0 0 18px;
        padding: 0;
      }
      #page-bc .bc-detail-kpis .kpi {
        min-height: 112px;
        padding: 22px 24px;
        border: 0;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
      }
      #page-bc .bc-detail-kpis .kpi::after { display: none; }
      #page-bc .bc-detail-kpis .kpi-label {
        margin-bottom: 12px;
        color: #64748b;
        font-size: 14px;
        font-weight: 650;
      }
      #page-bc .bc-detail-kpis .kpi-value {
        color: #111827;
        font-size: 28px;
        font-weight: 750;
        letter-spacing: -0.01em;
      }
      #page-bc .bc-detail-content {
        display: grid;
        gap: 18px;
      }
      #page-bc .bc-info-card {
        padding: 20px;
        border: 0;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
      }
      #page-bc .bc-section-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 18px;
      }
      #page-bc .bc-basic-edit-button {
        margin-left: auto;
        min-height: 32px;
        padding: 0 10px;
        color: #2563eb;
        background: #eff6ff;
        border: 0;
      }
      #page-bc .bc-basic-edit-button:hover {
        color: #1d4ed8;
        background: #dbeafe;
      }
      #page-bc .bc-info-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px 24px;
      }
      #page-bc .bc-info-field span {
        display: block;
        margin-bottom: 6px;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 650;
      }
      #page-bc .bc-info-field strong {
        display: block;
        color: #1f2937;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.55;
      }
      #page-bc .bc-info-span-2 { grid-column: span 2; }
      #page-bc .bc-info-wide {
        grid-column: 1 / -1;
        margin-top: 2px;
        padding-top: 14px;
        border-top: 1px solid rgba(226, 232, 240, 0.72);
      }
      #page-bc .bc-detail-workspace {
        display: grid;
        gap: 14px;
      }
      #page-bc .bc-underline-tabs {
        display: flex;
        width: auto;
        gap: 24px;
        padding: 0;
        border: 0;
        border-bottom: 1px solid rgba(226, 232, 240, 0.88);
        border-radius: 0;
        background: transparent;
      }
      #page-bc .bc-underline-tabs .tab-button {
        height: 40px;
        padding: 0 2px;
        border: 0;
        border-bottom: 2px solid transparent;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: #64748b;
        font-size: 14px;
        font-weight: 750;
      }
      #page-bc .bc-underline-tabs .tab-button.active {
        border-bottom-color: #2563eb;
        background: transparent;
        box-shadow: none;
        color: #2563eb;
      }
      #page-bc .bc-line-table {
        border: 0;
        border-radius: 14px;
        background: #fff;
        overflow: visible;
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
      }
      #page-bc .bc-line-table th {
        background: #fbfdff;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 700;
      }
      #page-bc .bc-line-table th.money,
      #page-bc .bc-line-table td.money {
        text-align: right;
      }
      #page-bc .bc-table-actions {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
      }
      #page-bc .bc-view-action {
        display: inline-flex;
        align-items: center;
        height: 28px;
        padding: 0 10px;
        border-radius: 8px;
        background: #eef2ff;
        color: #2563eb;
        font-size: 13px;
        font-weight: 750;
      }
      #page-bc .mini-badge {
        display: inline-flex;
        align-items: center;
        height: 22px;
        padding: 0 8px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 750;
        white-space: nowrap;
      }
      #page-bc .mini-badge.success {
        background: #ecfdf5;
        color: #047857;
      }
      #page-bc .mini-badge.muted {
        background: #f1f5f9;
        color: #64748b;
      }
      #page-bc .bc-more {
        position: relative;
        display: inline-flex;
      }
      #page-bc .bc-more-button {
        width: 28px;
        height: 28px;
        border: 0;
        border-radius: 8px;
        background: #f8fafc;
        color: #64748b;
        cursor: pointer;
        font-size: 17px;
        font-weight: 800;
        line-height: 1;
      }
      #page-bc .bc-more-button:hover,
      #page-bc .bc-more:focus-within .bc-more-button {
        background: #eef2ff;
        color: #2563eb;
      }
      #page-bc .bc-more-menu {
        position: absolute;
        right: 0;
        top: calc(100% + 6px);
        z-index: 5;
        display: none;
        min-width: 118px;
        padding: 6px;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
      }
      #page-bc .bc-more:hover .bc-more-menu,
      #page-bc .bc-more:focus-within .bc-more-menu {
        display: grid;
      }
      #page-bc .bc-menu-item {
        height: 30px;
        border: 0;
        border-radius: 7px;
        background: transparent;
        color: #334155;
        cursor: pointer;
        font-size: 13px;
        font-weight: 650;
        text-align: left;
        padding: 0 9px;
      }
      #page-bc .bc-menu-item:hover {
        background: #f8fafc;
        color: #0f172a;
      }
      #page-bc .bc-menu-item.danger {
        color: #dc2626;
      }

      /* Lighter BC settlement reading experience. */
      body {
        font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
        font-weight: 400;
        color: #334155;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
      }
      .nav-title {
        font-size: 12px;
        font-weight: 500;
        color: #94a3b8;
      }
      .nav-item {
        font-weight: 400;
        color: #475569;
      }
      .nav-item.active {
        font-weight: 500;
        color: #2563eb;
        background: #eff6ff;
      }
      .nav-icon {
        color: #64748b;
      }
      .nav-item.active .nav-icon {
        color: #2563eb;
      }
      .crumb {
        font-size: 14px;
        font-weight: 400;
        color: #64748b;
      }
      .crumb strong {
        font-weight: 500;
        color: #1e293b;
      }
      .search {
        font-size: 14px;
        font-weight: 400;
      }
      .search::placeholder,
      .field::placeholder {
        color: #94a3b8;
        font-weight: 400;
      }
      .user {
        font-weight: 500;
      }
      .button {
        font-weight: 500;
      }
      #page-bc .page-title h1 {
        font-size: 22px;
        font-weight: 600;
        color: #0f172a;
        letter-spacing: 0;
      }
      #page-bc .page-title .subtle {
        font-weight: 400;
        color: #64748b;
      }
      #page-bc .card {
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.035);
      }
      #page-bc .bc-kpis .kpi {
        min-height: 108px;
        padding: 20px 22px;
      }
      #page-bc .kpi-label {
        font-size: 13px;
        font-weight: 500;
        color: #64748b;
      }
      #page-bc .kpi-value {
        font-size: 22px;
        font-weight: 600;
        color: #0f172a;
        font-variant-numeric: tabular-nums;
      }
      #page-bc .kpi-value.is-negative {
        color: #ef4444;
      }
      #page-bc .bc-filters {
        gap: 12px;
        padding: 16px;
      }
      #page-bc .bc-filters .field {
        height: 40px;
        border-color: #e2e8f0;
        border-radius: 10px;
        background: #ffffff;
        font-size: 14px;
        font-weight: 400;
      }
      #page-bc .bc-filters .button.primary {
        font-weight: 500;
      }
      #page-bc .bc-filters .button:not(.primary) {
        border-color: #e2e8f0;
        background: #ffffff;
        color: #64748b;
        font-weight: 500;
      }
      #page-bc .table-card {
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.035);
      }
      #page-bc .table-header {
        min-height: 52px;
        border-bottom-color: #e2e8f0;
      }
      #page-bc .table-title {
        font-size: 16px;
        font-weight: 600;
        color: #0f172a;
      }
      #page-bc th {
        height: 42px;
        background: #f8fafc;
        color: #64748b;
        font-size: 13px;
        font-weight: 500;
      }
      #page-bc td {
        height: 54px;
        border-bottom-color: #e2e8f0;
        color: #334155;
        font-size: 14px;
        font-weight: 400;
      }
      #page-bc .bc-list-section .primary-text {
        color: #1e293b;
        font-weight: 500;
      }
      #page-bc .bc-list-section .secondary-text {
        color: #94a3b8;
        font-size: 13px;
        font-weight: 400;
      }
      #page-bc .link {
        color: #2563eb;
        font-weight: 500;
      }
      #page-bc .money {
        color: #1e293b;
        font-weight: 400;
        font-variant-numeric: tabular-nums;
      }
      #page-bc .money.is-negative {
        color: #ef4444;
        font-weight: 500;
      }
      #page-bc .badge {
        height: 22px;
        padding: 0 8px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 500;
      }
      #page-bc .badge.success {
        background: #eafbf1;
        color: #059669;
      }
      #page-bc .badge.warning {
        background: #fff7e6;
        color: #d97706;
      }
      #page-bc .bc-pagination {
        font-weight: 400;
      }
      #page-bc .bc-page-button {
        font-weight: 500;
      }

      /* Compact BC list refinements. */
      #page-bc.page {
        padding-top: 18px;
      }
      #page-bc .page-title {
        margin-bottom: 14px;
      }
      #page-bc .page-title .button.primary {
        height: 40px;
        border-radius: 10px;
        font-weight: 500;
      }
      #page-bc .bc-kpis {
        gap: 16px;
        margin-bottom: 14px;
      }
      #page-bc .bc-kpis .kpi {
        min-height: 88px;
        height: 88px;
        padding: 14px 20px;
      }
      #page-bc .bc-kpis .kpi::after {
        transform: scale(0.78);
        opacity: 0.22;
        right: 16px;
        top: 14px;
      }
      #page-bc .bc-kpis .kpi-label {
        margin-bottom: 5px;
      }
      #page-bc .bc-kpis .kpi-value {
        line-height: 1.15;
      }
      #page-bc .kpi-helper {
        margin-top: 5px;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 400;
      }
      #page-bc .bc-filters {
        min-height: 64px;
        padding: 12px 16px;
        margin-bottom: 14px;
      }
      #page-bc .table-card {
        margin-top: 0;
      }
      #page-bc .table-header {
        height: 50px;
        min-height: 50px;
      }
      #page-bc .bc-table-tabs {
        display: inline-flex;
        align-items: center;
        gap: 22px;
        height: 100%;
      }
      #page-bc .bc-table-tab {
        position: relative;
        height: 100%;
        border: 0;
        background: transparent;
        color: #64748b;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        padding: 0;
      }
      #page-bc .bc-table-tab.active {
        color: #2563eb;
      }
      #page-bc .bc-table-tab.active::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 2px;
        border-radius: 999px;
        background: #2563eb;
      }
      #page-bc .bc-table-tab.review span {
        color: #d97706;
      }
      #page-bc .bc-table-tab.abnormal span {
        color: #ef4444;
      }
      #page-bc td {
        height: 52px;
        padding-top: 8px;
        padding-bottom: 8px;
      }
      #page-bc .bc-list-section .primary-text {
        line-height: 1.28;
      }
      #page-bc .bc-list-section .secondary-text {
        font-size: 12px;
        line-height: 1.32;
      }
      #page-bc .bc-list-section td.money:nth-child(6) {
        font-weight: 500;
      }
      #page-bc .bc-row-actions {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        justify-content: flex-end;
        white-space: nowrap;
      }
      #page-bc .bc-row-action {
        border: 0;
        background: transparent;
        color: #64748b;
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
        padding: 0;
        text-decoration: none;
        white-space: nowrap;
      }
      #page-bc .bc-row-action:hover {
        color: #2563eb;
      }
      #page-bc .bc-row-more {
        font-family: inherit;
      }

      /* BC list contrast pass: light base with stronger key data. */
      .search {
        border-color: #d8e1ec;
        background: #ffffff;
      }
      .search:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
      }
      .user {
        color: #1e293b;
        font-weight: 500;
      }
      .nav-title {
        color: #94a3b8;
        font-weight: 500;
      }
      .nav-item {
        color: #475569;
        font-weight: 400;
      }
      .nav-item.active {
        background: #eff6ff;
        color: #2563eb;
        font-weight: 600;
      }
      .nav-item.active .nav-icon {
        color: #2563eb;
      }
      .nav-item.active::before {
        background: #2563eb;
      }
      #page-bc .page-title h1 {
        margin-bottom: 6px;
        color: #0f172a;
        font-size: 22px;
        font-weight: 700;
        line-height: 1.25;
      }
      #page-bc .page-title .subtle {
        color: #64748b;
        font-size: 14px;
        font-weight: 400;
      }
      #page-bc .page-title .button.primary,
      #page-bc .bc-filters .button.primary {
        border-color: #2563eb;
        background: #2563eb;
        color: #ffffff;
        box-shadow: 0 1px 2px rgba(37, 99, 235, 0.18);
      }
      #page-bc .page-title .button.primary:hover,
      #page-bc .bc-filters .button.primary:hover {
        border-color: #1d4ed8;
        background: #1d4ed8;
      }
      #page-bc .page-title .button.primary {
        padding: 0 18px;
      }
      #page-bc .bc-kpis .kpi,
      #page-bc .bc-filters,
      #page-bc .table-card {
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        background: #ffffff;
      }
      #page-bc .bc-kpis .kpi,
      #page-bc .table-card {
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
      }
      #page-bc .bc-kpis .kpi:hover {
        box-shadow: 0 3px 8px rgba(15, 23, 42, 0.06);
      }
      #page-bc .bc-kpis .kpi::after {
        opacity: 0.34;
      }
      #page-bc .bc-kpis .kpi-label {
        color: #64748b;
        font-size: 13px;
        font-weight: 500;
      }
      #page-bc .bc-kpis .kpi-value {
        color: #0f172a;
        font-size: 24px;
        font-weight: 700;
        font-variant-numeric: tabular-nums;
      }
      #page-bc .kpi-helper {
        color: #64748b;
        font-size: 12px;
        font-weight: 400;
      }
      #page-bc .bc-filters .field {
        height: 40px;
        border: 1px solid #d8e1ec;
        border-radius: 10px;
        background: #ffffff;
        color: #334155;
        font-size: 14px;
        font-weight: 400;
      }
      #page-bc .bc-filters .field::placeholder {
        color: #94a3b8;
        font-weight: 400;
      }
      #page-bc .bc-filters .button:not(.primary) {
        border: 1px solid #d8e1ec;
        background: #ffffff;
        color: #64748b;
        font-weight: 500;
      }
      #page-bc .bc-filters .button:not(.primary):hover {
        background: #f8fafc;
      }
      #page-bc .table-card {
        overflow: hidden;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
      }
      #page-bc .table-header {
        border-bottom: 1px solid #d8e1ec;
      }
      #page-bc .table-title {
        color: #0f172a;
        font-size: 17px;
        font-weight: 700;
      }
      #page-bc .bc-table-tab {
        color: #64748b;
        font-weight: 500;
      }
      #page-bc .bc-table-tab.active {
        color: #2563eb;
        font-weight: 600;
      }
      #page-bc .bc-table-tab.active::after {
        height: 2px;
        background: #2563eb;
      }
      #page-bc .bc-table-tab.review span {
        color: #d97706;
      }
      #page-bc .bc-table-tab.settled span {
        color: #059669;
      }
      #page-bc .bc-table-tab.abnormal span {
        color: #ef4444;
      }
      #page-bc th {
        height: 42px;
        border-bottom: 1px solid #d8e1ec;
        background: #f8fafc;
        color: #64748b;
        font-size: 13px;
        font-weight: 600;
      }
      #page-bc td {
        border-bottom: 1px solid #e2e8f0;
        color: #334155;
        font-size: 14px;
        font-weight: 400;
      }
      #page-bc #settlementRows tr:hover {
        background: #f8fafc;
      }
      #page-bc .link {
        color: #2563eb;
        font-weight: 600;
      }
      #page-bc .link:hover {
        color: #1d4ed8;
        text-decoration: underline;
      }
      #page-bc .bc-list-section .primary-text {
        color: #0f172a;
        font-weight: 600;
      }
      #page-bc .bc-list-section .secondary-text {
        color: #94a3b8;
        font-size: 13px;
        font-weight: 400;
      }
      #page-bc .money {
        color: #334155;
        font-weight: 400;
        font-variant-numeric: tabular-nums;
      }
      #page-bc .bc-list-section td.money:nth-child(6) {
        color: #1e293b;
        font-weight: 600;
      }
      #page-bc .money.is-negative,
      #page-bc .bc-list-section td.money.is-negative:nth-child(6),
      #page-bc .kpi-value.is-negative {
        color: #ef4444;
        font-weight: 600;
      }
      #page-bc .badge {
        min-height: 24px;
        padding: 4px 9px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 600;
        line-height: 1;
      }
      #page-bc .badge.success {
        border: 1px solid #bbf7d0;
        background: #dcfce7;
        color: #059669;
      }
      #page-bc .badge.warning {
        border: 1px solid #fde68a;
        background: #fef3c7;
        color: #d97706;
      }
      #page-bc .badge.danger {
        border: 1px solid #fecaca;
        background: #fee2e2;
        color: #ef4444;
      }
      #page-bc .bc-row-actions {
        gap: 12px;
      }
      #page-bc .bc-row-action {
        color: #475569;
        font-size: 14px;
        font-weight: 500;
      }
      #page-bc .bc-row-action:hover {
        color: #2563eb;
      }

      /* Final BC list polish. */
      #page-bc .page-title {
        margin-bottom: 10px;
      }
      #page-bc .bc-kpis {
        margin-bottom: 10px;
      }
      #page-bc .bc-filters {
        margin-bottom: 10px;
      }
      #page-bc .bc-kpis .kpi::after {
        display: none;
      }
      #page-bc .bc-kpis .kpi-value {
        font-weight: 600;
      }
      #page-bc .bc-kpis .kpi:nth-child(3) .kpi-value {
        font-weight: 700;
      }
      #page-bc .bc-kpis .kpi:nth-child(3) .kpi-value.is-negative {
        color: #ef4444;
      }
      #page-bc .bc-list-section .primary-text {
        color: #1e293b;
        font-weight: 600;
      }
      #page-bc .bc-row-actions {
        gap: 8px;
      }
      #page-bc .bc-row-action {
        color: #475569;
        font-weight: 500;
      }
      #page-bc .bc-row-action + .bc-row-action::before {
        content: "";
        display: inline-block;
        width: 1px;
        height: 12px;
        margin-right: 8px;
        background: #e2e8f0;
        vertical-align: -1px;
      }
      #page-bc .bc-row-action:hover {
        color: #2563eb;
      }

      /* Starlink system UI: shared lightweight SaaS visual language. */
      :root {
        --bg: #f8fafc;
        --card: #ffffff;
        --text: #0f172a;
        --text-strong: #1e293b;
        --text-body: #334155;
        --text-action: #475569;
        --muted: #64748b;
        --muted-soft: #94a3b8;
        --border: #e2e8f0;
        --border-strong: #d8e1ec;
        --primary: #2563eb;
        --primary-hover: #1d4ed8;
        --primary-soft: #eff6ff;
        --success: #059669;
        --warning: #d97706;
        --danger: #ef4444;
        --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04);
        --shadow-table: 0 1px 2px rgba(15, 23, 42, 0.03);
        --radius-card: 14px;
        --radius-control: 10px;
      }
      body {
        font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
        color: var(--text-body);
        background: var(--bg);
        font-weight: 400;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
      }
      .main {
        background: var(--bg);
      }
      .sidebar {
        border-right: 1px solid #edf2f7;
        background: #ffffff;
      }
      .nav-title {
        color: var(--muted-soft);
        font-size: 12px;
        font-weight: 500;
      }
      .nav-item {
        color: var(--text-action);
        font-size: 14px;
        font-weight: 400;
      }
      .nav-icon {
        color: #64748b;
      }
      .nav-item.active {
        background: var(--primary-soft);
        color: var(--primary);
        font-weight: 600;
      }
      .nav-item.active .nav-icon {
        color: var(--primary);
      }
      .nav-item.active::before {
        background: var(--primary);
      }
      .collapse {
        border-color: var(--border-strong);
        color: var(--muted);
      }
      .header {
        border-bottom-color: var(--border);
        background: rgba(255, 255, 255, 0.96);
      }
      .crumb {
        color: var(--muted);
        font-size: 14px;
        font-weight: 400;
      }
      .crumb strong {
        color: var(--text-strong);
        font-weight: 500;
      }
      .search {
        height: 38px;
        border: 1px solid var(--border-strong);
        border-radius: 12px;
        background: #ffffff;
        color: var(--text-body);
        font-size: 14px;
        font-weight: 400;
      }
      .search::placeholder,
      .field::placeholder {
        color: var(--muted-soft);
        font-weight: 400;
      }
      .search:focus,
      .field:focus {
        border-color: var(--primary);
        background: #ffffff;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
      }
      .user {
        color: var(--text-strong);
        font-weight: 500;
      }
      .page {
        color: var(--text-body);
      }
      .page-title {
        align-items: end;
        margin-bottom: 16px;
      }
      h1,
      .page-title h1 {
        margin-bottom: 6px;
        color: var(--text);
        font-size: 22px;
        font-weight: 700;
        line-height: 1.25;
        letter-spacing: 0;
      }
      .subtle {
        color: var(--muted);
        font-size: 14px;
        font-weight: 400;
      }
      .button {
        height: 40px;
        border: 1px solid var(--border-strong);
        border-radius: var(--radius-control);
        background: #ffffff;
        color: var(--text-action);
        font-size: 14px;
        font-weight: 500;
        box-shadow: none;
      }
      .button.primary {
        border-color: var(--primary);
        background: var(--primary);
        color: #ffffff;
        font-weight: 500;
        box-shadow: 0 1px 2px rgba(37, 99, 235, 0.18);
      }
      .button.primary:hover {
        border-color: var(--primary-hover);
        background: var(--primary-hover);
      }
      .button:not(.primary):hover {
        border-color: var(--border-strong);
        background: #f8fafc;
        color: var(--text-strong);
      }
      .button.ghost {
        height: 32px;
        border-color: transparent;
        background: transparent;
        color: var(--primary);
        box-shadow: none;
      }
      .button.danger,
      .button.danger:not(.primary) {
        border-color: #fecaca;
        background: #fee2e2;
        color: var(--danger);
      }
      .card,
      .table-card,
      .filters,
      .modal,
      .login-panel,
      .driver-detail-card,
      .driver-detail-table,
      .health-card,
      .bc-info-card,
      #page-bc .bc-line-table {
        border: 1px solid var(--border-strong);
        border-radius: var(--radius-card);
        background: #ffffff;
        box-shadow: var(--shadow-card);
      }
      .table-card {
        overflow: hidden;
        box-shadow: var(--shadow-table);
      }
      .kpis {
        gap: 16px;
        margin-bottom: 16px;
      }
      .kpi {
        min-height: 92px;
        padding: 16px 20px;
      }
      .kpi::after {
        display: none;
      }
      .mini-kpi {
        min-height: auto;
        padding: 10px 12px;
        background: #f8fafc;
      }
      .kpi-label {
        color: var(--muted);
        font-size: 13px;
        font-weight: 500;
        margin-bottom: 5px;
      }
      .kpi-value {
        color: var(--text);
        font-size: 24px;
        font-weight: 600;
        letter-spacing: 0;
        font-variant-numeric: tabular-nums;
      }
      .kpi-value.is-negative {
        color: var(--danger);
      }
      .filters {
        gap: 12px;
        padding: 12px 16px;
        margin-bottom: 16px;
      }
      .field {
        height: 40px;
        border: 1px solid var(--border-strong);
        border-radius: var(--radius-control);
        background: #ffffff;
        color: var(--text-body);
        font-size: 14px;
        font-weight: 400;
      }
      textarea.field {
        min-height: 88px;
        padding-top: 10px;
      }
      .field:hover {
        background: #ffffff;
        border-color: var(--border-strong);
      }
      .filters .button:not(.primary),
      .bc-filters .button:not(.primary) {
        border-color: var(--border-strong);
        background: #ffffff;
        color: var(--muted);
        font-weight: 500;
      }
      .filters .button:not(.primary):hover,
      .bc-filters .button:not(.primary):hover {
        border-color: var(--border-strong);
        background: #f8fafc;
        color: var(--text-strong);
      }
      .table-header {
        min-height: 52px;
        border-bottom: 1px solid var(--border-strong);
      }
      .table-title {
        color: var(--text);
        font-size: 17px;
        font-weight: 700;
      }
      th,
      td {
        height: 54px;
        border-bottom: 1px solid var(--border);
        color: var(--text-body);
        font-size: 14px;
        font-weight: 400;
      }
      th {
        height: 44px;
        border-bottom-color: var(--border-strong);
        background: #f8fafc;
        color: var(--muted);
        font-size: 13px;
        font-weight: 600;
      }
      tbody tr:hover {
        background: #f8fafc;
      }
      #page-sales-invoices .page-title .row-actions {
        gap: 8px;
      }
      #page-sales-invoices .page-title .button {
        width: auto;
        height: 38px;
        padding: 0 15px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 500;
        box-shadow: none;
      }
      #page-sales-invoices #salesRefreshButton {
        border: 1px solid #d8e1ec;
        background: #ffffff;
        color: #475569;
      }
      #page-sales-invoices #salesRefreshButton:hover {
        border-color: #d8e1ec;
        background: #f8fafc;
        color: #475569;
      }
      #page-sales-invoices #openInvoiceRequestModalButton {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        border-color: #2563eb;
        background: #2563eb;
        color: #ffffff;
        box-shadow: 0 1px 2px rgba(37, 99, 235, 0.16);
      }
      #page-sales-invoices #openInvoiceRequestModalButton:hover {
        border-color: #1d4ed8;
        background: #1d4ed8;
        color: #ffffff;
      }
      #page-sales-invoices #openInvoiceRequestModalButton:active {
        transform: translateY(1px);
        background: #1e40af;
      }
      #page-sales-invoices .sales-tabs {
        display: inline-flex;
        gap: 6px;
        margin: 0 0 12px;
        padding: 4px;
        border: 1px solid #d8e1ec;
        border-radius: 12px;
        background: #ffffff;
      }
      #page-sales-invoices .sales-tab {
        height: 32px;
        border: 0;
        border-radius: 8px;
        padding: 0 14px;
        background: transparent;
        color: #64748b;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
      }
      #page-sales-invoices .sales-tab:hover {
        color: #2563eb;
        background: #f8fafc;
      }
      #page-sales-invoices .sales-tab.active {
        background: #eff6ff;
        color: #2563eb;
      }
      #page-ar .ar-kpis {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        margin: 14px 0 14px;
      }
      #page-ar {
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
      }
      #page-ar .page-title,
      #page-ar .ar-kpis,
      #page-ar .ar-filters,
      #page-ar .ar-table-card {
        min-width: 0;
        max-width: 100%;
      }
      #page-ar .page-title > div {
        min-width: 0;
      }
      #page-ar .ar-page-actions {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        gap: 10px;
      }
      #page-ar .page-title .button.secondary {
        flex: 0 0 auto;
        height: 40px;
        padding: 0 16px;
        border-color: #d8e1ec;
        border-radius: 10px;
        background: #ffffff;
        color: #334155;
        font-weight: 500;
        white-space: nowrap;
      }
      #page-ar .page-title .button.secondary:hover {
        border-color: #bfdbfe;
        color: #2563eb;
        background: #f8fafc;
      }
      #page-ar .page-title .button.secondary:disabled {
        border-color: #e2e8f0;
        background: #f8fafc;
        color: #94a3b8;
        cursor: not-allowed;
      }
      #page-ar .page-title .button.primary {
        flex: 0 0 auto;
        height: 40px;
        padding: 0 16px;
        border-radius: 10px;
        background: #2563eb;
        font-weight: 500;
        white-space: nowrap;
      }
      #page-ar .page-title .button.primary:hover {
        background: #1d4ed8;
      }
      #page-ar .page-title .button.primary:disabled {
        border-color: #e2e8f0;
        background: #e2e8f0;
        color: #94a3b8;
        cursor: not-allowed;
        box-shadow: none;
      }
      #page-ar .ar-kpi {
        min-width: 0;
        min-height: 88px;
        padding: 14px 16px;
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
      }
      #page-ar .ar-kpi-label {
        margin-bottom: 8px;
        color: #64748b;
        font-size: 13px;
        font-weight: 500;
      }
      #page-ar .ar-kpi-value {
        color: #0f172a;
        font-size: 23px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
      }
      #page-ar .ar-kpi-value.is-negative {
        color: #ef4444;
      }
      #page-ar .ar-filters {
        grid-template-columns: minmax(0, 1fr) 220px 120px 120px;
        align-items: center;
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        padding: 12px 16px;
      }
      #page-ar .ar-filters .field,
      #page-ar .ar-filters .button {
        height: 40px;
      }
      #page-ar .ar-filters .button {
        width: 120px;
        justify-content: center;
      }
      #page-ar .ar-table-card {
        width: 100%;
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
      }
      #page-ar .ar-table-card table {
        width: 1174px;
        min-width: 1174px;
      }
      #page-ar .ar-table-card th {
        background: #f8fafc;
        color: #64748b;
        font-weight: 500;
      }
      #page-ar .ar-table-card th,
      #page-ar .ar-table-card td {
        height: 56px;
        padding: 9px 12px;
        vertical-align: middle;
      }
      #page-ar .ar-select-col {
        width: 48px;
        text-align: center;
      }
      #page-ar .ar-table-card th:nth-child(5),
      #page-ar .ar-table-card td:nth-child(5),
      #page-ar .ar-table-card th:nth-child(9),
      #page-ar .ar-table-card td:nth-child(9) {
        white-space: nowrap;
      }
      #page-ar .ar-table-card th:nth-child(9),
      #page-ar .ar-table-card td:nth-child(9) {
        padding-right: 16px;
      }
      #page-ar .ar-checkbox {
        appearance: none;
        width: 16px;
        height: 16px;
        margin: 0;
        border: 1px solid #cbd5e1;
        border-radius: 4px;
        background: #ffffff;
        cursor: pointer;
        vertical-align: middle;
      }
      #page-ar .ar-checkbox:hover {
        border-color: #2563eb;
      }
      #page-ar .ar-checkbox:checked {
        border-color: #2563eb;
        background:
          linear-gradient(135deg, transparent 0 35%, #ffffff 36% 45%, transparent 46%) 4px 4px / 8px 8px no-repeat,
          #2563eb;
      }
      #page-ar .ar-checkbox:indeterminate {
        border-color: #2563eb;
        background:
          linear-gradient(#ffffff, #ffffff) center / 8px 2px no-repeat,
          #2563eb;
      }
      #page-ar .ar-table-card .primary-text {
        color: #1e293b;
        font-weight: 600;
      }
      #page-ar .ar-table-card .secondary-text {
        color: #94a3b8;
        font-size: 13px;
        font-weight: 400;
      }
      #page-ar .ar-doc-link {
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-ar .ar-table-card .money {
        text-align: right;
        font-weight: 400;
        font-variant-numeric: tabular-nums;
      }
      #page-ar .ar-table-card td:nth-child(8).money {
        font-weight: 600;
      }
      #page-ar .badge.warning {
        border-color: #fde68a;
        background: #fef3c7;
        color: #d97706;
        font-size: 12px;
        font-weight: 600;
        border-radius: 999px;
        white-space: nowrap;
      }
      #page-ar .badge.success {
        border-color: #bbf7d0;
        background: #dcfce7;
        color: #059669;
        font-size: 12px;
        font-weight: 600;
        border-radius: 999px;
        white-space: nowrap;
      }
      #page-ar #arMeta {
        color: #64748b;
        font-size: 14px;
        font-weight: 400;
      }
      #page-ar .ar-table-meta {
        display: flex;
        align-items: center;
        gap: 14px;
        white-space: nowrap;
      }
      #page-ar .ar-selection-summary {
        color: #64748b;
        font-size: 13px;
        font-weight: 400;
        font-variant-numeric: tabular-nums;
      }
      #page-ar .ar-selection-summary strong {
        color: #0f172a;
        font-weight: 600;
      }
      #page-ar .ar-selection-summary button {
        margin-left: 10px;
        border: 0;
        background: transparent;
        color: #2563eb;
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
      }
      #page-ar .ar-source-link {
        color: #2563eb;
        font-weight: 500;
        text-decoration: none;
      }
      #page-ar .ar-source-link:hover {
        color: #1d4ed8;
      }
      #page-ap {
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
      }
      #page-ap .page-title,
      #page-ap .ap-filters,
      #page-ap .ap-table-card {
        min-width: 0;
        max-width: 100%;
      }
      #page-ap .page-title > div,
      #page-ap .page-title .row-actions {
        min-width: 0;
      }
      #page-ap .page-title .row-actions {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 0 0 auto;
      }
      #page-ap .page-title .button {
        height: 40px;
        border-radius: 10px;
        font-weight: 500;
        white-space: nowrap;
      }
      #page-ap .ap-tabs {
        display: inline-flex;
        gap: 6px;
        margin: 0 0 10px;
        padding: 4px;
        border: 1px solid #d8e1ec;
        border-radius: 12px;
        background: #ffffff;
      }
      #page-ap .ap-tab {
        height: 32px;
        border: 0;
        border-radius: 8px;
        padding: 0 14px;
        background: transparent;
        color: #64748b;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
      }
      #page-ap .ap-tab:hover {
        color: #2563eb;
        background: #f8fafc;
      }
      #page-ap .ap-tab.active {
        background: #eff6ff;
        color: #2563eb;
      }
      #page-ap .ap-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        padding: 10px 16px 10px 14px;
        margin-bottom: 10px;
      }
      #page-ap .ap-filters .field:first-child {
        flex: 1 1 360px;
      }
      #page-ap .ap-filters .field,
      #page-ap .ap-filters .button {
        height: 38px;
        min-width: 0;
      }
      #page-ap .ap-filters select.field {
        flex: 0 1 150px;
      }
      #page-ap .ap-filters .button {
        flex: 0 0 108px;
        justify-content: center;
      }
      #page-ap .ap-workbench {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 10px;
      }
      #page-ap .ap-workbench.hidden {
        display: none !important;
      }
      #page-ap .ap-workbench-card {
        display: grid;
        min-width: 0;
        gap: 2px;
        min-height: 72px;
        padding: 9px 12px;
        border: 1px solid #d8e1ec;
        border-radius: 12px;
        background: #ffffff;
        color: #475569;
        cursor: pointer;
        text-align: left;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
      }
      #page-ap .ap-workbench-card:hover {
        border-color: #bfdbfe;
        background: #f8fbff;
      }
      #page-ap .ap-workbench-card.active {
        border-color: #2563eb;
        background: #eff6ff;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
      }
      #page-ap .ap-workbench-card.danger.active,
      #page-ap .ap-workbench-card.danger:hover {
        border-color: #fecaca;
        background: #fef2f2;
      }
      #page-ap .ap-workbench-card.warning.active,
      #page-ap .ap-workbench-card.warning:hover {
        border-color: #fde68a;
        background: #fffbeb;
      }
      #page-ap .ap-workbench-card span {
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
      }
      #page-ap .ap-workbench-card strong {
        color: #0f172a;
        font-size: 16px;
        font-weight: 750;
      }
      #page-ap .ap-workbench-card em {
        color: #334155;
        font-size: 12px;
        font-style: normal;
        font-weight: 650;
        font-variant-numeric: tabular-nums;
      }
      #page-ap .ap-table-card {
        width: 100%;
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
      }
      #page-ap .ap-table-card table {
        width: 100%;
        min-width: 1080px;
      }
      #page-ap .ap-table-card th {
        background: #f8fafc;
        color: #64748b;
        font-weight: 500;
        white-space: nowrap;
      }
      #page-ap .ap-table-card th,
      #page-ap .ap-table-card td {
        height: 54px;
        padding: 8px 10px;
        color: #334155;
        font-size: 14px;
        vertical-align: middle;
      }
      #page-ap .ap-table-card th:nth-child(1),
      #page-ap .ap-table-card td:nth-child(1) {
        width: 40px;
      }
      #page-ap .ap-table-card th:nth-child(2),
      #page-ap .ap-table-card td:nth-child(2) {
        width: 160px;
      }
      #page-ap .ap-table-card th:nth-child(3),
      #page-ap .ap-table-card td:nth-child(3) {
        width: auto;
        min-width: 220px;
      }
      #page-ap .ap-table-card th:nth-child(4),
      #page-ap .ap-table-card td:nth-child(4),
      #page-ap .ap-table-card th:nth-child(5),
      #page-ap .ap-table-card td:nth-child(5) {
        width: 120px;
      }
      #page-ap .ap-table-card th:nth-child(5),
      #page-ap .ap-table-card td:nth-child(5) {
        width: 132px;
      }
      #page-ap .ap-table-card th:nth-child(6),
      #page-ap .ap-table-card td:nth-child(6),
      #page-ap .ap-table-card th:nth-child(7),
      #page-ap .ap-table-card td:nth-child(7),
      #page-ap .ap-table-card th:nth-child(8),
      #page-ap .ap-table-card td:nth-child(8) {
        width: 120px;
      }
      #page-ap .ap-table-card th:nth-child(9),
      #page-ap .ap-table-card td:nth-child(9) {
        width: 90px;
      }
      #page-ap .ap-table-card tbody tr:hover {
        background: #f8fafc;
      }
      #page-ap .ap-select-col {
        width: 72px;
        text-align: center;
      }
      #page-ap .ap-select-label {
        display: block;
        margin-bottom: 4px;
        color: #475569;
        font-size: 12px;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
      }
      #page-ap .ap-checkbox {
        appearance: none;
        width: 16px;
        height: 16px;
        margin: 0;
        border: 1px solid #cbd5e1;
        border-radius: 4px;
        background: #ffffff;
        cursor: pointer;
        vertical-align: middle;
      }
      #page-ap .ap-checkbox:hover {
        border-color: #2563eb;
      }
      #page-ap .ap-checkbox:checked {
        border-color: #2563eb;
        background:
          linear-gradient(135deg, transparent 0 35%, #ffffff 36% 45%, transparent 46%) 4px 4px / 8px 8px no-repeat,
          #2563eb;
      }
      #page-ap .ap-checkbox:indeterminate {
        border-color: #2563eb;
        background:
          linear-gradient(#ffffff, #ffffff) center / 8px 2px no-repeat,
          #2563eb;
      }
      #page-ap .ap-doc-link {
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        color: #2563eb;
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-decoration: none;
      }
      #page-ap .ap-doc-link:hover {
        color: #1d4ed8;
        text-decoration: underline;
      }
      #page-ap .ap-doc-empty {
        display: block;
        color: #475569;
        font-weight: 600;
      }
      #page-ap .ap-generate-link {
        margin-top: 4px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #2563eb;
        cursor: pointer;
        font-size: 13px;
        font-weight: 600;
      }
      #page-ap .ap-generate-link:hover {
        color: #1d4ed8;
        text-decoration: underline;
      }
      #page-ap .ap-invoice-line {
        display: flex;
        gap: 8px;
        align-items: center;
        min-width: 0;
      }
      #page-ap .ap-invoice-action {
        padding: 0;
        border: 0;
        background: transparent;
        color: #2563eb;
        cursor: pointer;
        font-size: 13px;
        font-weight: 600;
      }
      #page-ap .ap-invoice-action:hover {
        color: #1d4ed8;
        text-decoration: underline;
      }
      #page-ap .ap-table-card .primary-text,
      #page-ap .ap-table-card .secondary-text {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-ap .ap-table-card .primary-text {
        color: #1e293b;
        font-weight: 600;
      }
      #page-ap .ap-table-card .ap-supplier-name {
        font-weight: 700;
      }
      #page-ap .ap-table-card .secondary-text {
        margin-top: 3px;
        color: #94a3b8;
        font-size: 13px;
        font-weight: 400;
      }
      #page-ap .ap-ledger-source-summary {
        display: block;
        max-height: 40px;
        white-space: normal;
      }
      #page-ap .ap-ledger-source-line {
        display: block;
        max-width: 100%;
        overflow: hidden;
        line-height: 20px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-ap .legacy-source-row td {
        height: 70px;
        vertical-align: top;
      }
      #page-ap .legacy-business-group-row td {
        height: 38px;
        padding-top: 6px;
        padding-bottom: 6px;
        border-top: 1px solid #cbd5e1;
        border-bottom: 1px solid #e2e8f0;
        background: #f8fafc;
        vertical-align: middle;
      }
      #page-ap .legacy-business-group-main {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px 10px;
        align-items: center;
        min-width: 0;
        overflow: hidden;
        color: #64748b;
        font-size: 12px;
        font-weight: 650;
      }
      #page-ap .legacy-business-group-main > span {
        flex: 0 0 auto;
        white-space: nowrap;
      }
      #page-ap .legacy-business-anchor {
        display: inline-flex;
        align-items: center;
        max-width: 240px;
        height: 24px;
        border: 1px solid #bfdbfe;
        border-radius: 6px;
        background: #eff6ff;
        color: #1d4ed8;
        padding: 0 8px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
        font-weight: 750;
      }
      #page-ap .legacy-business-anchor.muted {
        border-color: #e2e8f0;
        background: #f8fafc;
        color: #94a3b8;
      }
      #page-ap .legacy-business-anchor.muted em {
        color: #94a3b8;
      }
      #page-ap .legacy-business-anchor em {
        margin-right: 6px;
        color: #2563eb;
        font-style: normal;
        font-size: 12px;
        font-weight: 700;
      }
      #page-ap .legacy-business-anchor.muted em {
        color: #94a3b8;
      }
      #page-ap .legacy-business-amount {
        color: #0f172a;
        font-size: 13px;
        font-weight: 800;
        font-variant-numeric: tabular-nums;
      }
      #page-ap .legacy-business-warning {
        display: inline-flex;
        align-items: center;
        height: 22px;
        border-radius: 999px;
        background: #fff7ed;
        color: #c2410c;
        padding: 0 8px;
        font-size: 12px;
        font-weight: 750;
        white-space: nowrap;
      }
      #page-ap .legacy-group-select {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        width: 48px;
        height: 28px;
        color: #334155;
        cursor: pointer;
        font-size: 12px;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
      }
      #page-ap .legacy-group-select input {
        flex: 0 0 auto;
      }
      #page-ap .legacy-group-select:has(input:disabled) {
        cursor: not-allowed;
        color: #94a3b8;
      }
	      #page-ap .ap-table-card table:has(.legacy-source-row) {
	        min-width: 1370px;
	      }
      #page-ap .ap-table-card table:has(.legacy-source-row) th:nth-child(1),
      #page-ap .ap-table-card table:has(.legacy-source-row) td:nth-child(1) {
        width: 58px;
        min-width: 58px;
        max-width: 58px;
      }
	      #page-ap .ap-table-card table:has(.legacy-source-row) th:nth-child(2),
	      #page-ap .ap-table-card table:has(.legacy-source-row) td:nth-child(2) {
	        width: 106px;
	        min-width: 106px;
	        max-width: 112px;
	      }
	      #page-ap .ap-table-card table:has(.legacy-source-row) th:nth-child(3),
	      #page-ap .ap-table-card table:has(.legacy-source-row) td:nth-child(3) {
	        width: 150px;
	        min-width: 150px;
	        max-width: 150px;
	        white-space: nowrap;
	      }
	      #page-ap .ap-table-card table:has(.legacy-source-row) th:nth-child(4),
	      #page-ap .ap-table-card table:has(.legacy-source-row) td:nth-child(4) {
	        width: 220px;
	      }
	      #page-ap .ap-table-card table:has(.legacy-source-row) th:nth-child(5),
	      #page-ap .ap-table-card table:has(.legacy-source-row) td:nth-child(5) {
	        width: 220px;
	      }
	      #page-ap .ap-table-card table:has(.legacy-source-row) th:nth-child(6),
	      #page-ap .ap-table-card table:has(.legacy-source-row) td:nth-child(6) {
	        width: 160px;
	      }
	      #page-ap .ap-table-card table:has(.legacy-source-row) th:nth-child(7),
	      #page-ap .ap-table-card table:has(.legacy-source-row) td:nth-child(7) {
	        width: 220px;
	      }
	      #page-ap .ap-table-card table:has(.legacy-source-row) th:nth-child(8),
	      #page-ap .ap-table-card table:has(.legacy-source-row) td:nth-child(8),
	      #page-ap .ap-table-card table:has(.legacy-source-row) th:nth-child(9),
	      #page-ap .ap-table-card table:has(.legacy-source-row) td:nth-child(9),
	      #page-ap .ap-table-card table:has(.legacy-source-row) th:nth-child(10),
	      #page-ap .ap-table-card table:has(.legacy-source-row) td:nth-child(10) {
	        width: 104px;
	      }
	      #page-ap .legacy-generation-cell {
	        white-space: nowrap;
	      }
	      #page-ap .legacy-generation-cell .ap-generate-link {
	        display: block;
	        width: max-content;
	        max-width: 100%;
	        margin-top: 5px;
	      }
	      #page-ap .legacy-fk-cell {
	        overflow: hidden;
	        text-overflow: ellipsis;
	        white-space: nowrap;
	      }
	      #page-ap .legacy-fk-link {
	        display: inline-block;
	        max-width: 100%;
	        overflow: hidden;
	        color: #2563eb;
	        font-weight: 750;
	        text-overflow: ellipsis;
	        vertical-align: middle;
	        white-space: nowrap;
	      }
      #page-ap .legacy-supplier-name,
      #page-ap .legacy-fee-title {
        max-width: 100%;
        overflow: hidden;
        color: #1e293b;
        font-size: 14px;
        font-weight: 800;
        line-height: 20px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-ap .legacy-supplier-name {
        color: #0f172a;
        font-size: 15px;
      }
      #page-ap .legacy-reimbursement-person {
        max-width: 100%;
        overflow: hidden;
        margin-top: 4px;
        color: #64748b;
        font-size: 12px;
        font-weight: 650;
        line-height: 18px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-ap .legacy-ref-chips,
      #page-ap .legacy-fee-meta,
      #page-ap .legacy-status-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 6px;
        min-width: 0;
        margin-top: 6px;
      }
      #page-ap .legacy-ref-chip,
      #page-ap .legacy-status-chip,
      #page-ap .legacy-fee-meta span {
        display: inline-flex;
        align-items: center;
        min-width: 0;
        max-width: 100%;
        height: 22px;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        background: #ffffff;
        color: #475569;
        padding: 0 7px;
        font-size: 12px;
        font-weight: 650;
        line-height: 1;
        white-space: nowrap;
      }
      #page-ap .legacy-ref-chip {
        max-width: 180px;
        overflow: hidden;
        cursor: pointer;
        text-overflow: ellipsis;
      }
      #page-ap button.legacy-ref-chip {
        font-family: inherit;
      }
      #page-ap .legacy-ref-chip:hover,
      #page-ap .legacy-ref-chip.copied {
        border-color: #93c5fd;
        background: #eff6ff;
        color: #1d4ed8;
      }
      #page-ap .legacy-ref-chip em {
        margin-right: 5px;
        color: #94a3b8;
        font-style: normal;
        font-weight: 700;
      }
      #page-ap .legacy-ref-chip.primary {
        border-color: #bfdbfe;
        background: #eff6ff;
        color: #1d4ed8;
      }
      #page-ap .legacy-ref-chip.primary em {
        color: #2563eb;
      }
      #page-ap .legacy-ref-empty {
        color: #94a3b8;
        font-size: 13px;
      }
      #page-ap .legacy-fee-meta span {
        max-width: 170px;
        overflow: hidden;
        background: #f8fafc;
        color: #64748b;
        text-overflow: ellipsis;
      }
      #page-ap .legacy-status-chip.success {
        border-color: #bbf7d0;
        background: #ecfdf5;
        color: #047857;
      }
      #page-ap .legacy-status-chip.warning {
        border-color: #fde68a;
        background: #fffbeb;
        color: #b45309;
      }
      #page-ap .legacy-status-chip.info {
        border-color: #bfdbfe;
        background: #eff6ff;
        color: #2563eb;
      }
      #page-ap .legacy-status-chip.danger {
        border-color: #fecaca;
        background: #fef2f2;
        color: #b91c1c;
      }
      #page-ap .legacy-status-chip.muted {
        border-color: #e2e8f0;
        background: #f1f5f9;
        color: #64748b;
      }
      #page-ap .legacy-status-sub {
        max-width: 100%;
        overflow: hidden;
        color: #64748b;
        font-size: 12px;
        line-height: 18px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-ap .legacy-status-inline {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
        margin-top: 5px;
        white-space: nowrap;
      }
      #page-ap .legacy-status-inline .badge {
        flex: 0 0 auto;
        white-space: nowrap;
      }
	      #page-ap .legacy-status-inline .legacy-status-sub {
	        min-width: 0;
	      }
	      #page-ap .legacy-business-generated,
	      #page-ap .legacy-business-generated-list {
	        display: inline-flex;
	        align-items: center;
	        gap: 5px;
	        min-width: 0;
	        color: #1d4ed8;
	        font-size: 12px;
	        font-weight: 750;
	        white-space: nowrap;
	      }
	      #page-ap .legacy-business-generated-list summary {
	        cursor: pointer;
	      }
	      #page-ap .legacy-business-generated-list div {
	        display: inline-flex;
	        gap: 6px;
	        margin-left: 6px;
	      }
	      #page-ap .legacy-compact-view .legacy-source-row td {
	        height: 48px;
        padding-top: 5px;
        padding-bottom: 5px;
        vertical-align: middle;
      }
      #page-ap .legacy-compact-view .legacy-business-group-row td {
        height: 32px;
        padding-top: 4px;
        padding-bottom: 4px;
      }
      #page-ap .legacy-compact-view .legacy-business-group-main {
        flex-wrap: nowrap;
        overflow: hidden;
      }
      #page-ap .legacy-compact-view .legacy-ref-chips,
      #page-ap .legacy-compact-view .legacy-fee-meta {
        flex-wrap: nowrap;
        overflow: hidden;
      }
	      #page-ap .legacy-compact-view th:nth-child(9),
	      #page-ap .legacy-compact-view td:nth-child(9),
	      #page-ap .legacy-compact-view th:nth-child(10),
	      #page-ap .legacy-compact-view td:nth-child(10) {
	        display: none;
	      }
      #page-ap .legacy-compact-view .legacy-ref-chip,
      #page-ap .legacy-compact-view .legacy-fee-meta span {
        max-width: 128px;
      }
      #page-ap .legacy-compact-view .secondary-text,
      #page-ap .legacy-compact-view .legacy-reimbursement-person,
      #page-ap .legacy-compact-view .legacy-status-sub {
        display: none;
      }
      #page-ap .ap-empty-date {
        color: #94a3b8;
      }
      #page-ap .ap-date-main,
      #page-ap .ap-date-schedule {
        max-width: none;
        overflow: visible;
        white-space: nowrap;
      }
      #page-ap .ap-date-main {
        color: #1e293b;
        font-size: 13px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
      }
      #page-ap .ap-date-main span {
        font-feature-settings: "tnum";
      }
      #page-ap .ap-date-schedule {
        margin-top: 4px;
        line-height: 1;
      }
      #page-ap .ap-table-card .money {
        text-align: right;
        font-variant-numeric: tabular-nums;
      }
      #page-ap .ap-table-card td:nth-child(8).money {
        font-weight: 600;
      }
      #page-ap .ap-table-card .money.is-negative {
        color: #ef4444;
      }
      #page-ap .badge {
        border-radius: 999px;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
      }
      #page-ap .badge.warning {
        border-color: #fde68a;
        background: #fef3c7;
        color: #d97706;
      }
      #page-ap .badge.success {
        border-color: #bbf7d0;
        background: #dcfce7;
        color: #059669;
      }
      #page-ap .badge.info {
        border-color: #bfdbfe;
        background: #eff6ff;
        color: #2563eb;
      }
      #page-ap .badge.danger {
        border-color: #fecaca;
        background: #fef2f2;
        color: #dc2626;
      }
      #page-ap #apMeta {
        color: #64748b;
        font-size: 14px;
        font-weight: 400;
      }
      #page-ap .ap-table-meta {
        display: flex;
        align-items: center;
        gap: 12px;
        white-space: nowrap;
      }
      #page-ap .ap-selection-summary {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        min-height: 36px;
        padding: 0 10px;
        border: 1px solid #d8e1ec;
        border-radius: 10px;
        background: #f8fafc;
        color: #64748b;
        font-size: 13px;
        font-weight: 400;
        font-variant-numeric: tabular-nums;
      }
      #page-ap .ap-selection-summary.hidden {
        display: none !important;
      }
      #page-ap .ap-selection-summary strong {
        color: #0f172a;
        font-weight: 600;
      }
      #page-ap .ap-selection-summary button {
        border: 0;
        background: transparent;
        color: #2563eb;
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
      }
      #page-ap .ap-selection-summary .ap-selection-generate {
        padding: 6px 10px;
        border-radius: 8px;
        background: #eff6ff;
        font-weight: 600;
      }
      #page-ap .ap-selection-summary .ap-selection-generate:disabled {
        color: #94a3b8;
        cursor: not-allowed;
        background: #f1f5f9;
      }
      #page-ap .ap-selection-summary .ap-selection-warning {
        color: #b45309;
        font-weight: 650;
      }
      #page-ap .ap-selection-summary .ap-select-all-matched {
        color: #475569;
      }
      #page-ap .ap-selection-summary .ap-select-all-matched button {
        font-weight: 700;
      }
      #page-ap .ap-legacy-view-toggle {
        display: inline-flex;
        gap: 2px;
        padding: 3px;
        border: 1px solid #d8e1ec;
        border-radius: 9px;
        background: #ffffff;
      }
      #page-ap .ap-legacy-view-toggle.hidden {
        display: none !important;
      }
      #page-ap .ap-legacy-view-toggle button {
        height: 28px;
        border: 0;
        border-radius: 7px;
        padding: 0 9px;
        background: transparent;
        color: #64748b;
        cursor: pointer;
        font-size: 12px;
        font-weight: 650;
        white-space: nowrap;
      }
      #page-ap .ap-legacy-view-toggle button.active {
        background: #eff6ff;
        color: #2563eb;
      }
      #page-ap #apRegisterButton {
        height: 36px;
        padding: 0 14px;
        border-radius: 10px;
        background: #2563eb;
        color: #ffffff;
        font-size: 13px;
        font-weight: 600;
      }
      #page-ap #apRegisterButton:hover {
        background: #1d4ed8;
      }
      #page-ap #apRegisterButton:disabled {
        border-color: #e2e8f0;
        background: #e2e8f0;
        color: #94a3b8;
        cursor: not-allowed;
        box-shadow: none;
      }
      .ap-detail-modal {
        width: min(900px, calc(100vw - 32px));
        max-height: min(860px, calc(100vh - 40px));
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }
      .ap-detail-modal .modal-header {
        position: relative;
        top: auto;
        flex: 0 0 auto;
        align-items: flex-start;
        padding: 18px 22px 14px;
      }
      .ap-detail-modal .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        padding: 12px 22px 48px;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 transparent;
      }
      .ap-detail-modal .modal-body::-webkit-scrollbar {
        width: 8px;
      }
      .ap-detail-modal .modal-body::-webkit-scrollbar-track {
        background: transparent;
      }
      .ap-detail-modal .modal-body::-webkit-scrollbar-thumb {
        border: 2px solid #ffffff;
        border-radius: 999px;
        background: #cbd5e1;
      }
      .ap-detail-modal .modal-footer {
        position: relative;
        bottom: auto;
        flex: 0 0 auto;
        padding: 14px 22px;
      }
      .ap-detail-header-title {
        min-width: 0;
      }
      .ap-detail-header-title .table-title {
        color: #0f172a;
        font-size: 20px;
        font-weight: 750;
        letter-spacing: 0;
      }
      .ap-detail-header-title .subtle {
        margin-top: 4px;
        max-width: 520px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .ap-detail-header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        margin-left: auto;
      }
      .ap-detail-badges {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
      }
      .ap-detail-badges:empty {
        display: none;
      }
      .ap-detail-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
      }
      .ap-detail-field {
        min-width: 0;
        padding: 10px 12px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        background: #f8fafc;
      }
      .ap-detail-field.full {
        grid-column: 1 / -1;
      }
      .ap-detail-field span {
        display: block;
        margin-bottom: 5px;
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
      }
      .ap-detail-field strong {
        display: block;
        overflow-wrap: anywhere;
        color: #1e293b;
        font-size: 14px;
        font-weight: 650;
        line-height: 1.45;
        white-space: pre-wrap;
      }
      .ap-detail-field .ap-invoice-value {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
      }
      .ap-detail-field .ap-inline-link,
      .ap-detail-payment-row .ap-inline-link {
        display: inline-flex;
        align-items: center;
        min-height: 24px;
        padding: 0 8px;
        border: 1px solid #bfdbfe;
        border-radius: 6px;
        background: #eff6ff;
        color: #2563eb;
        font-size: 12px;
        font-weight: 700;
        line-height: 1;
        text-decoration: none;
      }
      .ap-detail-field .ap-inline-link:hover,
      .ap-detail-payment-row .ap-inline-link:hover {
        border-color: #93c5fd;
        background: #dbeafe;
      }
      .ap-detail-amount-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
      }
      .ap-detail-amount-card {
        min-width: 0;
        padding: 14px 16px;
        border: 1px solid #d8e1ec;
        border-radius: 8px;
        background: #ffffff;
        text-align: right;
      }
      .ap-detail-amount-card span {
        display: block;
        margin-bottom: 6px;
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
        text-align: left;
      }
      .ap-detail-amount-card strong {
        color: #0f172a;
        font-size: 18px;
        font-weight: 750;
        font-variant-numeric: tabular-nums;
      }
      .ap-detail-amount-card.emphasized {
        border-color: #bfdbfe;
        background: #eff6ff;
      }
      .ap-detail-amount-card.emphasized strong {
        color: #1d4ed8;
        font-weight: 800;
      }
      .ap-detail-currency-grid {
        margin-top: 12px;
      }
      .ap-detail-notes {
        display: grid;
        gap: 12px;
      }
      .ap-detail-note-block {
        min-width: 0;
        padding: 12px 14px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        background: #f8fafc;
      }
      .ap-detail-note-block span {
        display: block;
        margin-bottom: 6px;
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
      }
      .ap-detail-note-block strong {
        display: block;
        color: #1e293b;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.55;
        white-space: pre-wrap;
      }
      .ap-detail-payment-list {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        overflow: hidden;
      }
      .ap-detail-source-list,
      .ap-generate-source-list {
        grid-column: 1 / -1;
        overflow-x: auto;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        background: #ffffff;
      }
      .ap-detail-source-list table,
      .ap-generate-source-list table {
        width: 100%;
        min-width: 760px;
        border-collapse: collapse;
        table-layout: fixed;
        font-size: 13px;
      }
      .ap-detail-source-list table {
        min-width: 910px;
      }
      .ap-detail-source-col-jobno {
        width: 140px;
      }
      .ap-detail-source-col-ref {
        width: 240px;
      }
      .ap-detail-source-col-fee {
        width: 180px;
      }
      .ap-detail-source-col-money {
        width: 100px;
      }
      .ap-detail-source-col-invoice {
        width: 120px;
      }
      .ap-detail-source-col-status {
        width: 130px;
      }
      .ap-detail-source-list th,
      .ap-detail-source-list td,
      .ap-generate-source-list th,
      .ap-generate-source-list td {
        padding: 8px 10px;
        border-bottom: 1px solid #e2e8f0;
        color: #334155;
        text-align: left;
        vertical-align: top;
        overflow-wrap: anywhere;
      }
      .ap-detail-source-list th,
      .ap-generate-source-list th {
        background: #f8fafc;
        color: #475569;
        font-size: 12px;
        font-weight: 700;
      }
      .ap-detail-source-list tr:last-child td,
      .ap-generate-source-list tr:last-child td {
        border-bottom: 0;
      }
      .ap-detail-source-list .money,
      .ap-generate-source-list .money {
        text-align: right;
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
      }
      .ap-detail-ref-lines {
        display: grid;
        gap: 3px;
        line-height: 1.45;
      }
      .ap-detail-ref-lines div {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: baseline;
        gap: 2px;
        min-width: 0;
      }
      .ap-detail-ref-lines span {
        color: #64748b;
        font-weight: 500;
        white-space: nowrap;
      }
      .ap-detail-ref-value {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #1e293b;
        font-weight: 600;
      }
      .ap-detail-source-list .is-negative,
      .ap-generate-source-list .is-negative {
        color: #b45309;
      }
      .ap-detail-payment-row {
        display: grid;
        grid-template-columns: 110px 140px minmax(120px, 0.8fr) minmax(180px, 1.2fr) minmax(120px, 0.8fr);
        gap: 12px;
        align-items: center;
        min-height: 44px;
        padding: 8px 12px;
        border-bottom: 1px solid #e2e8f0;
        color: #475569;
        font-size: 13px;
      }
      .ap-detail-payment-row:last-child {
        border-bottom: 0;
      }
      .ap-detail-payment-row strong {
        color: #0f172a;
        text-align: right;
        font-variant-numeric: tabular-nums;
      }
      .ap-detail-payment-row strong small {
        display: block;
        margin-top: 2px;
        color: #64748b;
        font-size: 11px;
        font-weight: 500;
      }
      #apDetailRegisterButton:disabled {
        border-color: #e2e8f0;
        background: #e2e8f0;
        color: #94a3b8;
        cursor: not-allowed;
        box-shadow: none;
      }
      .ap-schedule-modal {
        width: min(460px, calc(100vw - 32px));
        max-height: none;
        overflow: visible;
      }
      .diesel-action-modal {
        width: min(720px, calc(100vw - 32px));
        max-height: calc(100vh - 48px);
        overflow: auto;
      }
      .diesel-allocation-summary {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 14px;
      }
      .diesel-summary-item {
        display: grid;
        gap: 4px;
        min-width: 0;
        padding: 12px 14px;
        border: 1px solid #dbeafe;
        border-radius: 10px;
        background: #f8fbff;
      }
      .diesel-summary-item span {
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
      }
      .diesel-summary-item strong {
        color: #0f172a;
        font-size: 20px;
        font-weight: 760;
        font-variant-numeric: tabular-nums;
        line-height: 1.25;
      }
      .diesel-summary-item small {
        color: #475569;
        font-size: 12px;
        font-weight: 650;
        font-variant-numeric: tabular-nums;
      }
      .diesel-action-grid {
        align-items: start;
      }
      .diesel-action-grid .field {
        box-sizing: border-box;
        width: 100%;
      }
      .diesel-action-grid .field-hint {
        margin: 6px 0 0;
        color: #64748b;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.45;
      }
      .diesel-action-grid .readonly-field {
        background: #f8fafc;
        color: #64748b;
      }
      .field-with-unit {
        position: relative;
      }
      .field-with-unit .field {
        padding-right: 34px;
      }
      .field-with-unit span {
        position: absolute;
        top: 50%;
        right: 12px;
        transform: translateY(-50%);
        color: #64748b;
        font-size: 13px;
        font-weight: 700;
        pointer-events: none;
      }
      .diesel-liters-input {
        text-align: right;
        font-variant-numeric: tabular-nums;
      }
      .diesel-action-grid textarea.account-notes {
        min-height: 112px;
        line-height: 1.5;
      }
      .diesel-transaction-reference {
        display: grid;
        min-width: 0;
        max-width: 360px;
        gap: 3px;
      }
      .diesel-transaction-reference .primary-text,
      .diesel-transaction-reference .secondary-text {
        min-width: 0;
      }
      .diesel-transaction-reference .link-button {
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: bottom;
        white-space: nowrap;
      }
      #dieselTransactionRows tr.diesel-allocation-pair {
        background: #f8fbff;
      }
      #dieselTransactionRows tr.diesel-allocation-pair.in td {
        border-top-color: #cfe0f5;
      }
      #dieselTransactionRows tr.diesel-allocation-pair.out td {
        border-bottom-color: #cfe0f5;
      }
      .diesel-allocation-reference .primary-text {
        color: #1e3a8a;
      }
      .diesel-cost-card {
        margin-bottom: 16px;
      }
      .diesel-cost-layout {
        display: grid;
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 16px;
        padding: 0 18px 18px;
      }
      .diesel-cost-metrics {
        display: grid;
        gap: 10px;
      }
      .diesel-cost-metric {
        display: grid;
        gap: 4px;
        min-width: 0;
        padding: 12px 14px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        background: #f8fafc;
      }
      .diesel-cost-metric span {
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
      }
      .diesel-cost-metric strong {
        color: #0f172a;
        font-size: 20px;
        font-weight: 760;
        font-variant-numeric: tabular-nums;
        line-height: 1.25;
      }
      .diesel-cost-chart {
        position: relative;
        min-width: 0;
        height: 190px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        background: #ffffff;
        overflow: hidden;
      }
      .diesel-cost-chart .empty {
        display: grid;
        height: 100%;
        place-items: center;
        color: #94a3b8;
        font-size: 13px;
      }
      .diesel-cost-svg {
        display: block;
        width: 100%;
        height: 100%;
      }
      .diesel-cost-axis {
        stroke: #e2e8f0;
        stroke-width: 1;
      }
      .diesel-cost-grid-line {
        stroke: #eef2f7;
        stroke-width: 1;
      }
      .diesel-cost-line {
        fill: none;
        stroke: #2563eb;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 3;
      }
      .diesel-cost-point {
        fill: #ffffff;
        stroke: #2563eb;
        stroke-width: 2;
      }
      .diesel-cost-label {
        fill: #64748b;
        font-size: 11px;
        font-weight: 650;
      }
      .diesel-cost-label.value {
        fill: #334155;
        font-variant-numeric: tabular-nums;
      }
      .diesel-cost-hint {
        position: absolute;
        right: 12px;
        bottom: 10px;
        left: 12px;
        padding: 7px 10px;
        border: 1px solid #dbeafe;
        border-radius: 8px;
        background: rgba(239, 246, 255, 0.94);
        color: #1d4ed8;
        font-size: 12px;
        font-weight: 650;
        line-height: 1.35;
        text-align: center;
      }
      .diesel-monthly-header {
        align-items: flex-start;
        gap: 14px;
      }
      .diesel-monthly-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
      }
      .diesel-monthly-actions input[type="month"] {
        min-height: 34px;
        border: 1px solid #d0d7de;
        border-radius: 6px;
        padding: 0 10px;
        color: #334155;
        font: inherit;
      }
      .diesel-monthly-message {
        padding: 0 18px 12px;
      }
      .diesel-monthly-summary-row {
        cursor: pointer;
      }
      .diesel-monthly-summary-row:hover {
        background: #f8fafc;
      }
      .diesel-monthly-summary-row.is-expanded {
        background: #f1f5f9;
        box-shadow: inset 3px 0 0 #2563eb;
      }
      .diesel-monthly-detail > td {
        padding: 0;
        background: #f8fafc;
      }
      .diesel-monthly-detail-panel {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
        padding: 14px 18px 16px;
        border-top: 1px solid #e2e8f0;
        border-bottom: 1px solid #dbe4ef;
      }
      .diesel-monthly-detail-panel > div {
        min-width: 0;
      }
      .diesel-monthly-detail-title {
        margin-bottom: 8px;
        color: #334155;
        font-size: 12px;
        font-weight: 760;
      }
      .diesel-monthly-mini-row {
        display: grid;
        grid-template-columns: 82px 76px minmax(0, 1fr) 76px;
        gap: 8px;
        align-items: center;
        min-height: 28px;
        color: #64748b;
        font-size: 12px;
      }
      .diesel-monthly-mini-row strong {
        color: #334155;
        font-weight: 720;
      }
      .diesel-monthly-mini-row span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .diesel-monthly-empty,
      .diesel-monthly-note,
      .diesel-monthly-warning {
        color: #64748b;
        font-size: 12px;
        line-height: 1.55;
      }
      .diesel-monthly-warning {
        color: #b45309;
        font-weight: 700;
      }
      .diesel-monthly-oil-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }
      .diesel-monthly-oil-grid span {
        display: grid;
        gap: 2px;
        min-width: 0;
        color: #64748b;
        font-size: 12px;
      }
      .diesel-monthly-oil-grid strong {
        color: #0f172a;
        font-size: 13px;
        font-variant-numeric: tabular-nums;
      }
      .diesel-monthly-diff {
        font-weight: 750;
      }
      .diesel-monthly-diff.zero {
        color: #64748b;
      }
      .diesel-monthly-diff.positive {
        color: #d97706;
      }
      .diesel-monthly-diff.negative {
        color: #b91c1c;
      }
      #page-diesel .ap-document-link {
        border: 0;
        padding: 0;
        background: transparent;
        color: #2563eb;
        cursor: pointer;
        font: inherit;
        font-weight: 700;
        text-decoration: none;
      }
      #page-diesel .ap-document-link:hover {
        color: #1d4ed8;
        text-decoration: underline;
      }
      @media (max-width: 640px) {
        .diesel-allocation-summary,
        .diesel-action-grid,
        .diesel-cost-layout {
          grid-template-columns: 1fr;
        }
        .diesel-monthly-actions {
          justify-content: flex-start;
        }
        .diesel-cost-layout {
          padding: 0 14px 14px;
        }
        .diesel-monthly-detail-panel {
          grid-template-columns: 1fr;
        }
      }
      .ap-generate-modal {
        width: min(560px, calc(100vw - 32px));
        max-height: calc(100vh - 56px);
        overflow: hidden;
      }
      .ap-invoice-modal {
        --ap-invoice-footer-height: 72px;
        display: flex;
        flex-direction: column;
        width: min(920px, calc(100vw - 32px));
        height: min(900px, calc(100vh - 48px));
        max-height: calc(100vh - 48px);
        overflow: hidden;
      }
      .ap-invoice-modal .modal-header,
      .ap-invoice-modal .modal-footer {
        position: relative;
        top: auto;
        bottom: auto;
        flex: 0 0 auto;
      }
      .ap-generate-modal .modal-body {
        overflow-y: auto;
        padding: 16px 18px 24px;
      }
      .ap-invoice-modal .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        padding: 14px 22px calc(var(--ap-invoice-footer-height) + 24px);
        scroll-padding-bottom: calc(var(--ap-invoice-footer-height) + 24px);
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 transparent;
      }
      .ap-invoice-modal .modal-footer {
        min-height: var(--ap-invoice-footer-height);
        padding: 14px 22px;
        box-sizing: border-box;
      }
      .ap-invoice-modal .modal-body::-webkit-scrollbar {
        width: 8px;
      }
      .ap-invoice-modal .modal-body::-webkit-scrollbar-track {
        background: transparent;
      }
      .ap-invoice-modal .modal-body::-webkit-scrollbar-thumb {
        border: 2px solid #ffffff;
        border-radius: 999px;
        background: #cbd5e1;
      }
      .ap-generate-context,
      .ap-invoice-context {
        display: grid;
        gap: 8px;
        margin-bottom: 16px;
        padding: 12px 14px;
        border: 1px solid #dbeafe;
        border-radius: 10px;
        background: #f8fbff;
      }
      .ap-generate-context div,
      .ap-invoice-context div {
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 12px;
        align-items: center;
      }
      .ap-generate-context .ap-generate-warning strong {
        color: #b45309;
      }
      .ap-generate-context .ap-generate-source-list {
        display: block;
        margin-top: 4px;
      }
      .ap-generate-context .ap-generate-methods {
        grid-column: 1 / -1;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
        border: 1px solid #d8e1ec;
        border-radius: 8px;
        background: #ffffff;
      }
      .ap-generate-context .ap-generate-methods label {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        min-height: 30px;
        padding: 0 9px;
        border: 1px solid #e2e8f0;
        border-radius: 7px;
        background: #f8fafc;
        color: #334155;
        font-size: 13px;
        font-weight: 650;
      }
      .ap-generate-context .ap-generate-methods input {
        margin: 0;
      }
      .ap-generate-context .ap-generate-skip {
        grid-column: 1 / -1;
        padding: 8px 10px;
        border-radius: 8px;
        background: #fffbeb;
        color: #92400e;
        font-size: 13px;
        line-height: 1.5;
      }
      .ap-generate-context span,
      .ap-invoice-context span {
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
      }
      .ap-generate-context strong,
      .ap-invoice-context strong {
        min-width: 0;
        overflow: hidden;
        color: #1e293b;
        font-size: 14px;
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .ap-invoice-upload {
        display: grid;
        width: 100%;
        min-height: 96px;
        gap: 8px;
        place-items: center;
        margin-bottom: 14px;
        padding: 16px 18px;
        border: 1px dashed #bfdbfe;
        border-radius: 12px;
        background: #f8fbff;
        color: #1e3a8a;
        text-align: center;
        cursor: pointer;
        transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
      }
      .ap-invoice-upload:hover,
      .ap-invoice-upload.is-dragover {
        border-color: #2563eb;
        background: #eff6ff;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
      }
      .ap-invoice-upload.is-uploading {
        cursor: progress;
        opacity: 0.9;
      }
      .ap-invoice-upload-main {
        color: #1d4ed8;
        font-size: 14px;
        font-weight: 800;
        line-height: 1.35;
      }
      .ap-invoice-upload-sub {
        max-width: 560px;
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.5;
      }
      .ap-create-invoice-upload {
        min-height: 88px;
        margin-bottom: 8px;
      }
      .ap-create-ocr-status {
        width: 100%;
        box-sizing: border-box;
      }
      .ap-invoice-section {
        display: grid;
        gap: 12px;
        margin-bottom: 20px;
      }
      .ap-invoice-section:last-of-type {
        margin-bottom: 0;
      }
      .ap-invoice-detail-row {
        padding: 12px;
        border: 1px solid #dbeafe;
        border-radius: 12px;
        background: #f8fbff;
      }
      .ap-generate-form,
      .ap-invoice-form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 32px;
        row-gap: 16px;
      }
      .ap-invoice-form .field {
        width: 100%;
      }
      .ap-invoice-form .money-input {
        text-align: right;
        font-variant-numeric: tabular-nums;
      }
      .ap-invoice-warning {
        margin: 6px 0 0;
        color: #b45309;
        font-size: 12px;
        font-weight: 600;
      }
      .ap-invoice-ocr-status {
        color: #2563eb;
        font-weight: 700;
      }
      .ap-invoice-ocr-status.is-uploading {
        border-color: #bfdbfe;
        background: #eff6ff;
        color: #2563eb;
      }
      .ap-invoice-ocr-status.is-success {
        border-color: #bbf7d0;
        background: #f0fdf4;
        color: #059669;
      }
      .ap-invoice-ocr-status.is-failed {
        border-color: #fecaca;
        background: #fef2f2;
        color: #dc2626;
      }
      .ap-generate-form .form-field.full,
      .ap-invoice-form .form-field.full {
        grid-column: 1 / -1;
      }
      @media (max-width: 640px) {
        .ap-generate-form,
        .ap-invoice-form {
          grid-template-columns: 1fr;
        }
        .ap-invoice-upload {
          grid-template-columns: 1fr;
        }
      }
      .ap-schedule-modal .modal-header {
        position: relative;
        top: auto;
        z-index: 2;
        flex: 0 0 auto;
      }
      .ap-schedule-modal .modal-body {
        flex: 0 0 auto;
        overflow: visible;
        padding: 16px 18px 18px;
      }
      .ap-schedule-modal .modal-footer {
        position: relative;
        bottom: auto;
        z-index: 1;
        flex: 0 0 auto;
      }
      .ap-edit-modal {
        width: min(760px, calc(100vw - 40px));
        max-height: min(820px, calc(100vh - 44px));
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }
      .ap-edit-modal .modal-header,
      .ap-edit-modal .modal-footer {
        position: relative;
        top: auto;
        bottom: auto;
        flex: 0 0 auto;
      }
      .ap-edit-modal .modal-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        padding: 16px 18px 92px;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 transparent;
      }
      .ap-edit-form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 32px;
      }
      .ap-edit-form .form-field {
        display: grid;
        gap: 7px;
        min-width: 0;
      }
      .ap-edit-form .form-field.full {
        grid-column: 1 / -1;
      }
      .ap-edit-form label {
        color: #475569;
        font-size: 13px;
        font-weight: 650;
      }
      .ap-edit-form .field {
        box-sizing: border-box;
        width: 100%;
        height: 40px;
        border-color: #d8e1ec;
        border-radius: 10px;
      }
      .ap-edit-form textarea.field {
        min-height: 86px;
        padding-top: 10px;
        resize: vertical;
      }
      .ap-edit-form .amount-input {
        text-align: right;
        font-variant-numeric: tabular-nums;
      }
      .ap-schedule-context {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 16px;
        padding: 12px 14px;
        border: 1px solid #dbeafe;
        border-radius: 10px;
        background: #f8fbff;
      }
      .ap-schedule-context:empty {
        display: none;
      }
      .ap-schedule-context div {
        display: grid;
        grid-template-columns: 74px minmax(0, 1fr);
        gap: 12px;
        align-items: center;
        min-width: 0;
      }
      .ap-schedule-context span {
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
      }
      .ap-schedule-context strong {
        min-width: 0;
        overflow: hidden;
        color: #1e293b;
        font-size: 14px;
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .ap-schedule-form {
        display: grid;
        gap: 14px;
      }
      .ap-schedule-form .form-field {
        display: grid;
        gap: 7px;
      }
      .ap-schedule-form label {
        color: #475569;
        font-size: 13px;
        font-weight: 650;
      }
      .ap-schedule-form .field {
        box-sizing: border-box;
        width: 100%;
        height: 40px;
        border-color: #d8e1ec;
        border-radius: 10px;
      }
      .ap-schedule-select {
        position: relative;
        min-width: 0;
      }
      .ap-schedule-select-trigger {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: 40px;
        padding: 0 12px;
        border: 1px solid #d8e1ec;
        border-radius: 10px;
        background: #ffffff;
        color: #1e293b;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        text-align: left;
        transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
      }
      .ap-schedule-select-trigger:hover {
        background: #f8fafc;
      }
      .ap-schedule-select-trigger.open,
      .ap-schedule-select-trigger:focus-visible {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
      }
      .ap-schedule-select-icon {
        color: #64748b;
        font-size: 16px;
        line-height: 1;
      }
      .ap-schedule-select-menu {
        position: absolute;
        z-index: 20;
        top: calc(100% + 6px);
        right: 0;
        left: 0;
        display: grid;
        padding: 6px;
        border: 1px solid #d8e1ec;
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
      }
      .ap-schedule-select-menu button {
        height: 34px;
        padding: 0 10px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: #334155;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        text-align: left;
      }
      .ap-schedule-select-menu button:hover,
      .ap-schedule-select-menu button.active {
        background: #eff6ff;
        color: #2563eb;
      }
      #apDetailScheduleButton:disabled,
      #apDetailEditButton:disabled,
      #apScheduleSaveButton:disabled {
        border-color: #e2e8f0;
        background: #f1f5f9;
        color: #94a3b8;
        cursor: not-allowed;
        box-shadow: none;
      }
      @media (max-width: 760px) {
        .ap-detail-badges {
          justify-content: flex-start;
        }
        .ap-detail-header-title .subtle {
          white-space: normal;
        }
        .ap-detail-grid,
        .ap-detail-amount-grid,
        .ap-edit-form {
          grid-template-columns: 1fr;
        }
        .ap-detail-payment-row {
          grid-template-columns: 1fr;
        }
        .ap-detail-payment-row strong {
          text-align: left;
        }
      }
      @media (max-width: 1180px) {
        #page-ap .ap-workbench {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        #page-ap .ap-filters {
          align-items: stretch;
        }
        #page-ap .ap-filters .field:first-child {
          flex-basis: 100%;
        }
        #page-ap .ap-filters select.field,
        #page-ap .ap-filters .button {
          flex: 1 1 150px;
        }
      }
      @media (max-width: 640px) {
        #page-ap .ap-workbench {
          grid-template-columns: 1fr;
        }
      }
      #page-ar .ar-detail-page {
        display: grid;
        gap: 16px;
        min-width: 0;
      }
      #page-ar .ar-detail-page.hidden {
        display: none !important;
      }
      #page-ar .ar-detail-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 20px;
        min-width: 0;
      }
      #page-ar .bc-back-link {
        display: inline-flex;
        align-items: center;
        height: 24px;
        margin: 0 0 8px;
        border: 0;
        background: transparent;
        color: #64748b;
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
        padding: 0;
      }
      #page-ar .bc-back-link:hover {
        color: #2563eb;
      }
      #page-ar .bc-detail-title-row {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
      }
      #page-ar .bc-detail-title {
        color: #0f172a;
        font-size: 22px;
        font-weight: 650;
        letter-spacing: 0;
        line-height: 1.28;
      }
      #page-ar .bc-detail-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
      }
      #page-ar .bc-detail-actions .button {
        height: 38px;
        padding: 0 14px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 500;
        box-shadow: none;
      }
      #page-ar .bc-detail-actions .button.primary {
        background: #2563eb;
        color: #ffffff;
        border-color: #2563eb;
        box-shadow: 0 1px 2px rgba(37, 99, 235, 0.16);
      }
      #page-ar .bc-detail-actions .button.primary:hover {
        background: #1d4ed8;
        border-color: #1d4ed8;
      }
      #page-ar .bc-detail-actions .button.secondary {
        background: #ffffff;
        color: #475569;
        border-color: #d8e1ec;
      }
      #page-ar .bc-detail-actions .button.secondary:hover {
        background: #f8fafc;
        color: #2563eb;
        border-color: #cbd5e1;
      }
      #page-ar .ar-detail-kpis {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        margin: 0;
      }
      #page-ar .ar-detail-kpis .kpi {
        min-height: 88px;
        padding: 14px 16px;
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
      }
      #page-ar .ar-detail-kpis .kpi::after {
        display: none;
      }
      #page-ar .ar-detail-kpis .kpi-label {
        margin-bottom: 8px;
        color: #64748b;
        font-size: 13px;
        font-weight: 500;
      }
      #page-ar .ar-detail-kpis .kpi-value {
        color: #0f172a;
        font-size: 22px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        letter-spacing: 0;
      }
      #page-ar .ar-detail-kpis .kpi-value.is-negative {
        color: #ef4444;
      }
      #page-ar .ar-detail-kpis .ar-date-value {
        font-size: 18px;
      }
      #page-ar .ar-detail-grid {
        display: grid;
        gap: 14px;
      }
      #page-ar .bc-info-card,
      #page-ar .ar-detail-records {
        padding: 18px;
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
      }
      #page-ar .bc-section-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 14px;
      }
      #page-ar .bc-info-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px 20px;
      }
      #page-ar .bc-info-field span {
        display: block;
        margin-bottom: 5px;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 500;
      }
      #page-ar .bc-info-field strong {
        display: block;
        color: #1e293b;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.55;
        min-width: 0;
        word-break: break-word;
      }
      #page-ar .bc-info-wide {
        grid-column: 1 / -1;
        padding-top: 12px;
        border-top: 1px solid rgba(226, 232, 240, 0.8);
      }
      #page-ar .ar-detail-records {
        overflow-x: auto;
      }
      #page-ar .ar-detail-records table {
        min-width: 880px;
      }
      #page-ar .ar-detail-records th {
        background: #f8fafc;
        color: #64748b;
        font-size: 13px;
        font-weight: 500;
      }
      #page-ar .ar-detail-records th,
      #page-ar .ar-detail-records td {
        height: 52px;
        padding: 9px 12px;
      }
      #page-ar .ar-detail-records .money {
        text-align: right;
        font-variant-numeric: tabular-nums;
      }
      #page-ar .ar-receipt-empty {
        height: 148px;
        padding: 28px 16px !important;
        text-align: center;
      }
      #page-ar .ar-receipt-empty .empty-title {
        color: #334155;
        font-size: 14px;
        font-weight: 500;
      }
      #page-ar .ar-receipt-empty .empty-subtitle {
        margin-top: 6px;
        color: #94a3b8;
        font-size: 13px;
        font-weight: 400;
      }
      #page-ar .ar-receipt-empty .button {
        height: 34px;
        margin-top: 14px;
        padding: 0 14px;
        border-radius: 10px;
        color: #475569;
        background: #ffffff;
        border: 1px solid #d8e1ec;
        font-size: 13px;
        font-weight: 500;
      }
      #page-ar .ar-receipt-empty .button:hover {
        color: #2563eb;
        background: #f8fafc;
      }
      #page-ar .ar-file-list {
        display: grid;
        gap: 10px;
      }
      #page-ar .ar-file-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 16px;
        min-height: 48px;
        padding: 10px 12px;
        border: 1px solid rgba(216, 225, 236, 0.86);
        border-radius: 12px;
        background: #ffffff;
      }
      #page-ar .ar-file-main {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
      }
      #page-ar .ar-file-title {
        min-width: 92px;
        color: #1e293b;
        font-size: 14px;
        font-weight: 500;
      }
      #page-ar .ar-file-status {
        color: #64748b;
        font-size: 13px;
        font-weight: 400;
        min-width: 0;
      }
      #page-ar .ar-file-status.success {
        color: #059669;
      }
      #page-ar .ar-file-status.info {
        color: #2563eb;
      }
      #page-ar .ar-file-status.muted {
        color: #94a3b8;
      }
      #page-ar .ar-file-name {
        display: inline-block;
        max-width: min(520px, 46vw);
        overflow: hidden;
        color: #2563eb;
        text-overflow: ellipsis;
        vertical-align: bottom;
        white-space: nowrap;
        text-decoration: none;
      }
      #page-ar .ar-file-name:hover {
        color: #1d4ed8;
        text-decoration: underline;
      }
      #page-ar .ar-file-link {
        border: 0;
        background: transparent;
        color: #2563eb;
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
        text-decoration: none;
        white-space: nowrap;
      }
      #page-ar .ar-file-link:hover {
        color: #1d4ed8;
      }
      .account-registration-modal {
        width: min(660px, 94vw) !important;
        max-height: 80vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border: 1px solid #d8e1ec;
        box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
      }
      .ap-create-modal {
        width: min(880px, calc(100vw - 48px)) !important;
        max-height: 84vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border: 1px solid #d8e1ec;
        box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
      }
      .account-registration-modal .modal-header {
        flex: 0 0 auto;
        padding: 16px 18px 14px;
      }
      .ap-create-modal .modal-header {
        flex: 0 0 auto;
        padding: 18px 28px 14px;
      }
      .account-registration-modal .modal-body {
        flex: 1 1 auto;
        overflow: auto;
        padding: 16px 18px 104px;
        scroll-padding-bottom: 104px;
      }
      .ap-create-modal .modal-body {
        flex: 1 1 auto;
        overflow: auto;
        padding: 18px 28px 20px;
      }
      .modal-close-button {
        width: 40px;
        height: 40px;
        border: 1px solid #d8e1ec;
        border-radius: 10px;
        background: #ffffff;
        color: #64748b;
        cursor: pointer;
        font-size: 20px;
        font-weight: 400;
        line-height: 1;
      }
      .modal-close-button:hover {
        background: #f8fafc;
        color: #2563eb;
      }
      .modal-footer {
        position: sticky;
        bottom: 0;
        z-index: 1;
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        flex: 0 0 auto;
        padding: 14px 18px;
        border-top: 1px solid #d8e1ec;
        background: rgba(255, 255, 255, 0.96);
      }
      .modal-footer .button {
        height: 40px;
        padding: 0 16px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 500;
      }
      .modal-footer .button.secondary {
        background: #ffffff;
        border-color: #d8e1ec;
        color: #475569;
      }
      .modal-footer .button.secondary:hover {
        background: #f8fafc;
        color: #2563eb;
      }
      .modal-footer .button.primary {
        background: #2563eb;
        border-color: #2563eb;
        color: #ffffff;
        box-shadow: 0 1px 2px rgba(37, 99, 235, 0.16);
      }
      .modal-footer .button.primary:hover {
        background: #1d4ed8;
        border-color: #1d4ed8;
      }
      .bc-item-modal {
        width: min(880px, 96vw);
        max-height: 92vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }
      .bc-item-modal .modal-header,
      .bc-item-modal .modal-footer {
        flex: 0 0 auto;
      }
      .bc-item-modal .modal-body {
        flex: 1 1 auto;
        overflow: auto;
        padding: 18px 24px 96px;
        scroll-padding-bottom: 96px;
      }
      .bc-item-modal-footer #bcItemDeleteButton {
        margin-right: auto;
      }
      .bc-item-modal .form-grid {
        display: block;
      }
      .bc-expense-section {
        padding: 0 0 14px;
      }
      .bc-expense-section + .bc-expense-section {
        border-top: 1px solid #e2e8f0;
        padding-top: 14px;
      }
      .bc-expense-section-title {
        margin-bottom: 12px;
        color: #334155;
        font-size: 14px;
        font-weight: 700;
      }
      .bc-expense-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 32px;
        row-gap: 16px;
      }
      .bc-expense-grid .form-field.full,
      .bc-expense-section.full {
        grid-column: 1 / -1;
      }
      #bcItemForm .bc-expense-grid > .form-field.full {
        grid-column: 1 / span 2;
        width: 100%;
        min-width: 0;
      }
      .bc-expense-mode-tabs {
        display: inline-flex;
        gap: 4px;
        padding: 4px;
        border: 1px solid #d8e1ec;
        border-radius: 10px;
        background: #f8fafc;
      }
      .bc-expense-mode-tab {
        height: 34px;
        border: 0;
        border-radius: 8px;
        padding: 0 14px;
        background: transparent;
        color: #475569;
        cursor: pointer;
        font-weight: 700;
      }
      .bc-expense-mode-tab.active {
        background: #ffffff;
        color: #2563eb;
        box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
      }
      .bc-item-modal .money-input {
        text-align: right;
        font-variant-numeric: tabular-nums;
      }
      .bc-item-modal .readonly-field {
        min-height: 42px;
        padding: 10px 12px;
        border: 1px solid #d8e1ec;
        border-radius: 10px;
        background: #f8fafc;
        color: #334155;
        line-height: 1.45;
      }
      .bc-item-modal .field[readonly] {
        background: #f8fafc;
        color: #475569;
      }
      .bc-item-modal .inline-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
      }
      .bc-payable-results {
        margin-top: 10px;
      }
      .bc-vendor-picker {
        align-items: stretch;
      }
      .bc-vendor-field {
        position: relative;
      }
      .bc-vendor-results {
        margin-top: 8px;
        border: 1px solid #d8e1ec;
        border-radius: 10px;
        background: #fff;
        overflow: hidden;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
        position: relative;
        z-index: 4;
      }
      .bc-vendor-result {
        width: 100%;
        padding: 10px 12px;
        border: 0;
        border-bottom: 1px solid #eef2f7;
        background: #fff;
        color: #334155;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        gap: 3px;
        text-align: left;
      }
      .bc-vendor-result:last-child {
        border-bottom: 0;
      }
      .bc-vendor-result:hover {
        background: #f8fafc;
      }
      .bc-vendor-result-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
      }
      .bc-vendor-result strong {
        color: #0f172a;
        font-size: 14px;
      }
      .bc-vendor-result em {
        color: #2563eb;
        font-size: 12px;
        font-style: normal;
        white-space: nowrap;
      }
      .bc-vendor-result span,
      .bc-vendor-empty {
        color: #64748b;
        font-size: 12px;
      }
      .bc-vendor-empty {
        padding: 10px 12px;
      }
      .bc-vendor-create {
        width: 100%;
        height: 38px;
        border: 0;
        border-top: 1px solid #eef2f7;
        background: #ffffff;
        color: #2563eb;
        cursor: pointer;
        font-weight: 700;
        text-align: left;
        padding: 0 12px;
      }
      .bc-vendor-create:hover {
        background: #eff6ff;
      }
      .bc-vendor-selected-info {
        margin-top: 8px;
        color: #64748b;
        font-size: 12px;
        line-height: 1.45;
      }
      .bc-expense-file-picker {
        min-height: 104px;
        padding: 14px;
        border: 1px dashed #cbd5e1;
        border-radius: 12px;
        background: #f8fafc;
        display: flex;
        align-items: center;
        gap: 12px;
        cursor: pointer;
        transition: border-color 0.16s ease, background 0.16s ease;
      }
      .bc-expense-file-picker:hover,
      .bc-expense-file-picker.is-dragover {
        border-color: #2563eb;
        background: #eff6ff;
      }
      .bc-expense-file-upload-icon {
        width: 38px;
        height: 38px;
        border: 1px solid #bfdbfe;
        border-radius: 10px;
        display: grid;
        place-items: center;
        color: #2563eb;
        background: #fff;
        font-size: 20px;
        flex: 0 0 auto;
      }
      .bc-expense-file-text {
        flex: 1;
        min-width: 0;
        display: grid;
        gap: 3px;
      }
      .bc-expense-file-text strong {
        color: #334155;
        font-size: 14px;
      }
      .bc-expense-file-text span {
        color: #64748b;
        font-size: 12px;
      }
      .bc-expense-file-meta {
        min-width: 0;
        color: #64748b;
        font-size: 13px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .bc-expense-file-list {
        margin-top: 10px;
        display: grid;
        gap: 8px;
      }
      .bc-expense-file-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 130px auto;
        align-items: center;
        gap: 12px;
        min-height: 40px;
        padding: 8px 10px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #ffffff;
      }
      .bc-expense-file-name {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #334155;
        font-weight: 700;
      }
      .bc-expense-file-time,
      .bc-expense-file-pending {
        color: #64748b;
        font-size: 12px;
        white-space: nowrap;
      }
      .bc-expense-file-actions {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        white-space: nowrap;
      }
      .bc-expense-notes {
        width: 100%;
        min-height: 108px;
        max-height: 220px;
        resize: vertical;
        overflow-y: auto;
      }
      .bc-expense-manual-amount {
        margin-top: -6px;
      }
      .bc-item-modal .field-hint {
        margin-top: 6px;
        color: #64748b;
        font-size: 12px;
        line-height: 1.45;
      }
      .bc-item-modal .field.is-soft-readonly {
        background: #f8fafc;
      }
      .account-context {
        margin-bottom: 16px;
        padding: 12px 14px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #f8fafc;
      }
      .account-context-title {
        margin-bottom: 10px;
        color: #1e293b;
        font-size: 14px;
        font-weight: 600;
      }
      .account-context-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 14px;
        color: #64748b;
        font-size: 13px;
        font-variant-numeric: tabular-nums;
      }
      .account-context-grid span {
        display: block;
        margin-bottom: 3px;
        color: #94a3b8;
        font-size: 12px;
      }
      .account-context-grid strong {
        display: block;
        color: #1e293b;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.35;
        word-break: break-word;
      }
      .account-context-balance strong {
        font-weight: 600;
      }
      .account-context-list {
        display: grid;
        gap: 4px;
        margin-top: 8px;
        color: #64748b;
        font-size: 12px;
      }
      .account-section {
        display: grid;
        gap: 10px;
        margin-top: 16px;
      }
      .account-section-title {
        color: #1e293b;
        font-size: 14px;
        font-weight: 600;
      }
      .ap-create-modal .account-section {
        margin-top: 18px;
        padding-top: 0;
      }
      .ap-create-modal .account-section:first-child {
        margin-top: 0;
      }
      .ap-create-modal .account-section + .account-section {
        padding-top: 18px;
        border-top: 1px solid #eef2f7;
      }
      .ap-create-modal .account-section-title {
        margin-bottom: 4px;
      }
      .account-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 14px;
      }
      .account-form-grid .full {
        grid-column: 1 / -1;
      }
      .ap-create-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 36px;
        row-gap: 14px;
      }
      .ap-create-form-grid .field {
        box-sizing: border-box;
        width: 100%;
      }
      .account-form-grid .field {
        height: 40px;
        border-color: #d8e1ec;
        border-radius: 10px;
      }
      .account-form-grid textarea.field {
        height: auto;
      }
      .account-fx-purchase-card {
        display: grid;
        gap: 10px;
        padding: 12px;
        border: 1px solid #bfdbfe;
        border-radius: 12px;
        background: #eff6ff;
      }
      .account-fx-purchase-header {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
      }
      .account-fx-purchase-header strong {
        color: #1e3a8a;
        font-size: 14px;
      }
      .account-fx-purchase-header span,
      .account-fx-purchase-hint {
        color: #64748b;
        font-size: 12px;
        line-height: 1.45;
      }
      .account-fx-purchase-grid {
        gap: 10px 14px;
      }
      .account-bank-fee-notes-field {
        grid-column: 1 / -1 !important;
      }
      .account-bank-fee-notes-field .field {
        box-sizing: border-box;
        width: 100%;
      }
      .account-bank-fee-notes {
        min-height: 64px;
        max-height: 120px;
        padding-top: 10px;
        line-height: 1.5;
        resize: vertical;
      }
      .ap-create-form-grid .full {
        grid-column: 1 / -1;
      }
      .ap-create-form-grid textarea.field {
        min-height: 78px;
        padding-top: 10px;
        resize: vertical;
      }
      .ap-create-form-grid textarea.ap-create-notes-textarea {
        min-height: 120px;
        max-height: 240px;
        line-height: 1.5;
      }
      .ap-create-form-grid .readonly-field {
        background: #f8fafc;
        color: #64748b;
        cursor: default;
      }
      .ap-create-form-grid input.field[readonly] {
        background: #f8fafc;
        color: #64748b;
        box-shadow: none;
      }
      .ap-create-form-grid input.field[readonly]:focus {
        border-color: #d8e1ec;
        box-shadow: none;
      }
      .ap-payee-field {
        position: relative;
      }
      .ap-payee-dropdown {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        z-index: 22;
        overflow: hidden;
        border: 1px solid #d8e1ec;
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
      }
      .ap-payee-option,
      .ap-payee-create {
        width: 100%;
        border: 0;
        background: transparent;
        padding: 10px 12px;
        text-align: left;
        cursor: pointer;
      }
      .ap-payee-option:hover,
      .ap-payee-create:hover {
        background: #eff6ff;
      }
      .ap-payee-option-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        color: #1e293b;
        font-size: 14px;
        font-weight: 700;
      }
      .ap-payee-option-tag {
        flex: 0 0 auto;
        color: #2563eb;
        font-size: 12px;
        font-weight: 700;
      }
      .ap-payee-option-sub {
        margin-top: 3px;
        color: #64748b;
        font-size: 12px;
        line-height: 1.4;
        word-break: break-word;
      }
      .ap-payee-create {
        border-top: 1px solid #eef2f7;
        color: #2563eb;
        font-size: 14px;
        font-weight: 700;
      }
      .ap-payee-empty {
        padding: 10px 12px;
        color: #94a3b8;
        font-size: 13px;
      }
      .ap-payee-selected,
      .ap-payee-history {
        grid-column: 1 / -1;
        margin-top: 6px;
        padding: 8px 10px;
        border: 1px solid #dbeafe;
        border-radius: 10px;
        background: #eff6ff;
        color: #334155;
        font-size: 12px;
        line-height: 1.45;
        word-break: break-word;
      }
      .ap-payee-history {
        margin-top: 5px;
        border-color: #e2e8f0;
        background: #f8fafc;
        color: #64748b;
      }
      .ap-temp-payee-modal {
        width: min(760px, calc(100vw - 48px)) !important;
        max-height: 84vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border: 1px solid #d8e1ec;
        box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
      }
      .ap-temp-payee-modal .modal-header {
        flex: 0 0 auto;
        padding: 18px 22px 14px;
      }
      .ap-temp-payee-modal .modal-body {
        flex: 1 1 auto;
        overflow: auto;
        padding: 16px 22px 92px;
        scroll-padding-bottom: 92px;
      }
      .ap-temp-payee-modal .modal-footer {
        flex: 0 0 auto;
      }
      .ap-temp-payee-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 24px;
      }
      .ap-temp-payee-form .field,
      .ap-temp-payee-modal .field {
        box-sizing: border-box;
        width: 100%;
      }
      .ap-temp-payee-form .full {
        grid-column: 1 / -1;
      }
      .ap-temp-payee-paste {
        min-height: 74px;
        padding: 10px 12px;
        resize: vertical;
      }
      .ap-temp-payee-parse-button {
        width: fit-content;
      }
      .ap-temp-payee-duplicate {
        margin-top: 14px;
        padding: 10px 12px;
        border: 1px solid #fed7aa;
        border-radius: 10px;
        background: #fffbeb;
        color: #92400e;
        font-size: 13px;
        line-height: 1.55;
      }
      .ap-temp-payee-duplicate.weak {
        border-color: #dbeafe;
        background: #eff6ff;
        color: #1d4ed8;
      }
      .ap-temp-payee-use {
        display: inline-flex;
        margin-left: 8px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #2563eb;
        cursor: pointer;
        font: inherit;
        font-weight: 700;
      }
      .ap-create-hint {
        margin: -4px 0 0;
        line-height: 1.5;
      }
      .account-form-grid .field.invalid,
      .account-notes.invalid {
        border-color: #ef4444;
      }
      .field-error {
        margin: 5px 0 0;
        color: #ef4444;
        font-size: 12px;
      }
      @media (max-width: 760px) {
        .ap-create-modal {
          width: calc(100vw - 24px) !important;
          max-height: 88vh;
        }
        .ap-create-modal .modal-header,
        .ap-create-modal .modal-body {
          padding-left: 16px;
          padding-right: 16px;
        }
        .ap-create-form-grid {
          grid-template-columns: 1fr;
          gap: 12px;
        }
        .ap-create-form-grid .full {
          grid-column: auto;
        }
        .ap-temp-payee-modal {
          width: calc(100vw - 24px) !important;
          max-height: 88vh;
        }
        .ap-temp-payee-form {
          grid-template-columns: 1fr;
          gap: 12px;
        }
        .ap-temp-payee-form .full {
          grid-column: auto;
        }
      }
      .account-file-native {
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
        pointer-events: none;
      }
      .account-upload-zone {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100px;
        padding: 14px;
        border: 1px dashed #cbd5e1;
        border-radius: 12px;
        background: #f8fafc;
        color: #64748b;
        cursor: pointer;
        text-align: center;
        transition: border-color 0.16s ease, background 0.16s ease;
      }
      .account-upload-zone:hover,
      .account-upload-zone.drag-over {
        border-color: #2563eb;
        background: #eff6ff;
      }
      .account-upload-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        margin-bottom: 6px;
        border-radius: 999px;
        background: #eff6ff;
        color: #2563eb;
        font-size: 16px;
        font-weight: 500;
      }
      .account-upload-main {
        color: #1e293b;
        font-size: 14px;
        font-weight: 500;
      }
      .account-upload-sub {
        margin-top: 4px;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 400;
      }
      .account-file-list {
        display: grid;
        gap: 8px;
      }
      .account-file-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 12px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #ffffff;
      }
      .account-file-name {
        color: #1e293b;
        font-size: 13px;
        font-weight: 500;
      }
      .account-file-meta {
        margin-top: 2px;
        color: #94a3b8;
        font-size: 12px;
      }
      .account-file-remove {
        border: 0;
        background: transparent;
        color: #64748b;
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
      }
      .account-file-remove:hover {
        color: #ef4444;
      }
      .account-notes {
        min-height: 72px;
        max-height: 96px;
        resize: vertical;
        border-radius: 10px;
      }
      #page-sales-invoices .invoice-request-filters {
        grid-template-columns: minmax(320px, 1fr) 180px 120px 120px;
        align-items: center;
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        padding: 12px 16px;
      }
      #page-sales-invoices .invoice-request-filters .field,
      #page-sales-invoices .invoice-request-filters .button {
        height: 40px;
      }
      #page-sales-invoices .invoice-request-filters .button {
        width: 120px;
        justify-content: center;
      }
      #page-sales-invoices .sales-ledger-filters {
        grid-template-columns: minmax(300px, 1fr) 150px 150px 170px 170px 120px 120px;
        align-items: center;
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        padding: 12px 16px;
      }
      #page-sales-invoices .sales-ledger-filters .field,
      #page-sales-invoices .sales-ledger-filters .button {
        height: 40px;
        min-width: 0;
      }
      #page-sales-invoices .sales-ledger-filters .button {
        width: 120px;
        justify-content: center;
      }
      #page-sales-invoices .filter-date-control {
        min-width: 0;
        height: 40px;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0 12px;
        border: 1px solid #d8e1ec;
        border-radius: 10px;
        background: #fff;
        color: #334155;
      }
      #page-sales-invoices .filter-date-control span {
        flex: 0 0 auto;
        color: #64748b;
        font-size: 13px;
        white-space: nowrap;
      }
      #page-sales-invoices .filter-date-control input {
        min-width: 0;
        width: 100%;
        border: 0;
        outline: 0;
        background: transparent;
        color: #334155;
        font: inherit;
      }
      #page-sales-invoices .filter-date-control:focus-within {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
      }
      #page-sales-invoices .invoice-request-table-card {
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        overflow-x: auto;
        overflow-y: visible;
        max-width: 100%;
      }
      #page-sales-invoices .invoice-request-table-card table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
      }
      #page-sales-invoices .invoice-request-table-card th:nth-child(1),
      #page-sales-invoices .invoice-request-table-card td:nth-child(1) {
        width: 140px;
        min-width: 140px;
        max-width: 140px;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
      }
      #page-sales-invoices .invoice-request-table-card th:nth-child(2),
      #page-sales-invoices .invoice-request-table-card td:nth-child(2) {
        width: 34%;
        min-width: 0;
      }
      #page-sales-invoices .invoice-request-table-card th:nth-child(3),
      #page-sales-invoices .invoice-request-table-card td:nth-child(3) {
        width: 90px;
        min-width: 90px;
        max-width: 90px;
      }
      #page-sales-invoices .invoice-request-table-card th:nth-child(4),
      #page-sales-invoices .invoice-request-table-card td:nth-child(4) {
        width: 150px;
        min-width: 0;
        max-width: 150px;
      }
      #page-sales-invoices .invoice-request-table-card th:nth-child(5),
      #page-sales-invoices .invoice-request-table-card td:nth-child(5) {
        width: 140px;
        min-width: 0;
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-sales-invoices .invoice-request-table-card th:nth-child(6),
      #page-sales-invoices .invoice-request-table-card td:nth-child(6) {
        width: 130px;
        min-width: 130px;
        max-width: 130px;
      }
      #page-sales-invoices .invoice-request-table-card th:nth-child(7),
      #page-sales-invoices .invoice-request-table-card td:nth-child(7) {
        width: 90px;
        min-width: 90px;
        max-width: 90px;
      }
      #page-sales-invoices .invoice-request-table-card th:nth-child(8),
      #page-sales-invoices .invoice-request-table-card td:nth-child(8) {
        width: 110px;
        min-width: 110px;
        max-width: 110px;
        overflow: visible;
        white-space: nowrap;
        text-align: right;
      }
      #page-sales-invoices .sales-ledger-table-card {
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        overflow-x: auto;
        overflow-y: visible;
        max-width: 100%;
        padding-right: 4px;
      }
      #page-sales-invoices .sales-ledger-table-card table {
        width: 100%;
        min-width: 920px;
        table-layout: fixed;
      }
      #page-sales-invoices .invoice-request-table-card th,
      #page-sales-invoices .sales-ledger-table-card th {
        background: #f8fafc;
        color: #64748b;
        font-weight: 500;
        white-space: nowrap;
      }
      #page-sales-invoices .invoice-request-table-card .badge {
        display: inline-flex;
        align-items: center;
        white-space: nowrap;
        flex: 0 0 auto;
      }
      #page-sales-invoices .invoice-request-table-card .badge.invoice-request-status-requested {
        border-color: #fed7aa;
        background: #fff7ed;
        color: #c2410c;
      }
      #page-sales-invoices .invoice-request-table-card .badge.invoice-request-status-review {
        border-color: #fca5a5;
        background: #fef2f2;
        color: #b91c1c;
      }
      #page-sales-invoices .invoice-request-table-card .badge.invoice-request-status-completed {
        border-color: #bfdbfe;
        background: #eff6ff;
        color: #1d4ed8;
      }
      #page-sales-invoices .invoice-request-table-card .badge.invoice-request-status-cancelled {
        border-color: #e2e8f0;
        background: #f1f5f9;
        color: #64748b;
      }
      #page-sales-invoices .invoice-request-project-text,
      #page-sales-invoices .invoice-request-category-text {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-sales-invoices .invoice-request-no-link {
        display: inline-flex;
        align-items: center;
        max-width: 100%;
        padding: 0;
        border: 0;
        background: transparent;
        color: #2563eb;
        cursor: pointer;
        font: inherit;
        font-weight: 700;
        white-space: nowrap;
      }
      #page-sales-invoices .invoice-request-no-link:hover {
        color: #1d4ed8;
        text-decoration: underline;
      }
      #page-sales-invoices .sales-ledger-table-card th,
      #page-sales-invoices .sales-ledger-table-card td {
        height: 56px;
        color: #334155;
        font-size: 14px;
        vertical-align: middle;
      }
      #page-sales-invoices .sales-ledger-table-card th:nth-child(1),
      #page-sales-invoices .sales-ledger-table-card td:nth-child(1) {
        width: 250px;
        min-width: 220px;
        max-width: 260px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-sales-invoices .sales-ledger-table-card th:nth-child(3),
      #page-sales-invoices .sales-ledger-table-card td:nth-child(3) {
        white-space: nowrap;
      }
      #page-sales-invoices .sales-ledger-table-card th:nth-child(4),
      #page-sales-invoices .sales-ledger-table-card td:nth-child(4) {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-sales-invoices .sales-ledger-table-card th:nth-child(8),
      #page-sales-invoices .sales-ledger-table-card td:nth-child(8) {
        width: 110px;
        min-width: 100px;
        max-width: 110px;
        overflow: visible;
        white-space: nowrap;
      }
      #page-sales-invoices .sales-ledger-doc-link {
        display: inline-block;
        max-width: 100%;
        padding: 0;
        border: 0;
        overflow: hidden;
        background: transparent;
        color: #2563eb;
        cursor: pointer;
        font: inherit;
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
        text-decoration: none;
      }
      #page-sales-invoices .sales-ledger-doc-link:hover {
        color: #1d4ed8;
        text-decoration: underline;
      }
      #page-sales-invoices .sales-ledger-table-card .primary-text,
      #page-sales-invoices .sales-ledger-table-card .secondary-text {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-sales-invoices .sales-ledger-table-card .primary-text {
        color: #1e293b;
        font-weight: 600;
      }
      #page-sales-invoices .sales-ledger-table-card .secondary-text {
        color: #94a3b8;
        font-size: 13px;
      }
      #page-sales-invoices .sales-ledger-table-card .money {
        text-align: right;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
      }
      #page-sales-invoices .sales-ledger-table-card td:nth-child(7).money {
        font-weight: 600;
      }
      #page-sales-invoices .sales-ledger-status-stack {
        display: grid;
        gap: 4px;
        justify-items: start;
        min-width: 100px;
        max-width: 110px;
        white-space: nowrap;
      }
      #page-sales-invoices .sales-ledger-status-stack .badge {
        max-width: 100%;
        white-space: nowrap;
      }
      #page-sales-invoices .sales-ledger-status-stack > span:last-child {
        color: #64748b;
        font-size: 12px;
      }
      .sales-invoice-detail-modal {
        display: flex;
        flex-direction: column;
        width: min(940px, calc(100vw - 36px));
        height: min(86vh, 820px);
        max-height: 86vh;
        overflow: hidden;
      }
      .sales-invoice-detail-modal .modal-header {
        flex: 0 0 auto;
      }
      .sales-invoice-detail-actions {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        gap: 10px;
        white-space: nowrap;
      }
      .sales-invoice-detail-body {
        flex: 1 1 auto;
        min-height: 0;
        display: grid;
        gap: 18px;
        align-content: start;
        overflow: auto;
        padding-bottom: 34px;
      }
      .sales-invoice-detail-grid {
        display: grid;
        gap: 14px;
      }
      .sales-invoice-detail-group {
        display: grid;
        gap: 10px;
        padding: 12px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #fff;
      }
      .sales-invoice-detail-group-title {
        color: #0f172a;
        font-size: 15px;
        font-weight: 600;
      }
      .sales-invoice-detail-group-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 14px;
      }
      .sales-invoice-detail-group-grid.compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
      .sales-invoice-detail-field-wide {
        grid-column: 1 / -1;
      }
      .sales-invoice-detail-field-wrap strong {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        word-break: break-word;
        line-height: 1.55;
      }
      .sales-invoice-amount-cards {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
      }
      .sales-invoice-amount-card {
        display: grid;
        gap: 6px;
        min-width: 0;
        padding: 12px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #f8fafc;
      }
      .sales-invoice-amount-card span {
        color: #64748b;
        font-size: 13px;
        font-weight: 600;
      }
      .sales-invoice-amount-card strong {
        color: #0f172a;
        font-size: 18px;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
      }
      .sales-invoice-amount-card.strong {
        border-color: #bfdbfe;
        background: #eff6ff;
      }
      .sales-invoice-amount-card.strong strong {
        color: #1d4ed8;
        font-weight: 700;
      }
      .sales-invoice-source-link {
        display: inline;
        max-width: 100%;
        padding: 0;
        border: 0;
        overflow: hidden;
        background: transparent;
        color: #2563eb;
        cursor: pointer;
        font: inherit;
        font-weight: 600;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .sales-invoice-source-link:hover {
        color: #1d4ed8;
        text-decoration: underline;
      }
      .sales-invoice-detail-section {
        display: grid;
        gap: 10px;
        padding: 12px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #fff;
      }
      .sales-invoice-receipt-list {
        display: grid;
        gap: 8px;
      }
      .sales-invoice-receipt-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        min-width: 0;
        padding: 10px 12px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #fff;
      }
      .sales-invoice-receipt-row div {
        min-width: 0;
      }
      .sales-invoice-receipt-row strong,
      .sales-invoice-receipt-row span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .sales-invoice-receipt-row strong {
        color: #0f172a;
        font-variant-numeric: tabular-nums;
      }
      .sales-invoice-receipt-row span {
        color: #94a3b8;
        font-size: 12px;
      }
      #page-sales-invoices .badge.info {
        border-color: #bfdbfe;
        background: #eff6ff;
        color: #2563eb;
      }
      #page-sales-invoices .badge.danger {
        border-color: #fecaca;
        background: #fef2f2;
        color: #dc2626;
      }
      #page-unbilled-revenues .unbilled-revenue-filters {
        display: grid;
        grid-template-columns: minmax(260px, 1fr) 190px 120px 120px;
        gap: 12px;
        align-items: center;
      }
      #page-unbilled-revenues .unbilled-revenue-table-card table {
        table-layout: fixed;
        width: 100%;
      }
      #page-unbilled-revenues .unbilled-revenue-table-card th,
      #page-unbilled-revenues .unbilled-revenue-table-card td {
        font-size: 14px;
        color: #334155;
        vertical-align: middle;
      }
      #page-unbilled-revenues .unbilled-revenue-table-card th:nth-child(1),
      #page-unbilled-revenues .unbilled-revenue-table-card td:nth-child(1) {
        width: 140px;
        white-space: nowrap;
      }
      #page-unbilled-revenues .unbilled-revenue-table-card th:nth-child(3),
      #page-unbilled-revenues .unbilled-revenue-table-card td:nth-child(3) {
        width: 108px;
        white-space: nowrap;
      }
      #page-unbilled-revenues .unbilled-revenue-table-card th:nth-child(5),
      #page-unbilled-revenues .unbilled-revenue-table-card td:nth-child(5),
      #page-unbilled-revenues .unbilled-revenue-table-card th:nth-child(7),
      #page-unbilled-revenues .unbilled-revenue-table-card td:nth-child(7) {
        width: 130px;
      }
      #page-unbilled-revenues .unbilled-revenue-table-card th:nth-child(6),
      #page-unbilled-revenues .unbilled-revenue-table-card td:nth-child(6) {
        width: 92px;
      }
      #page-unbilled-revenues .unbilled-revenue-table-card th:nth-child(8),
      #page-unbilled-revenues .unbilled-revenue-table-card td:nth-child(8),
      #page-unbilled-revenues .unbilled-revenue-table-card th:nth-child(9),
      #page-unbilled-revenues .unbilled-revenue-table-card td:nth-child(9) {
        width: 104px;
        white-space: nowrap;
      }
      .unbilled-revenue-link {
        border: 0;
        padding: 0;
        background: transparent;
        color: #2563eb;
        font-weight: 600;
        cursor: pointer;
      }
      .unbilled-revenue-link:hover {
        color: #1d4ed8;
        text-decoration: underline;
      }
      .unbilled-revenue-actions {
        display: flex;
        gap: 10px;
        align-items: center;
        white-space: nowrap;
      }
      .unbilled-revenue-modal,
      .unbilled-revenue-detail-modal {
        width: min(960px, calc(100vw - 48px));
        max-height: calc(100vh - 48px);
      }
      .unbilled-revenue-modal-body,
      .unbilled-revenue-detail-body {
        overflow-y: auto;
        padding-bottom: 96px;
      }
      .unbilled-revenue-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 18px;
      }
      .unbilled-revenue-form-grid .full {
        grid-column: 1 / -1;
      }
      .unbilled-revenue-form-grid textarea {
        min-height: 96px;
        resize: vertical;
      }
      .unbilled-revenue-upload-block {
        margin-top: 18px;
      }
      .unbilled-revenue-upload-zone.dragover {
        border-color: #2563eb;
        background: #eff6ff;
      }
      @media (max-width: 1180px) {
        #page-unbilled-revenues .unbilled-revenue-filters {
          grid-template-columns: 1fr 180px 110px 110px;
        }
        #page-unbilled-revenues .unbilled-revenue-table-card {
          overflow-x: auto;
        }
        #page-unbilled-revenues .unbilled-revenue-table-card table {
          min-width: 1040px;
        }
      }
      #page-bank-accounts {
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
      }
      #page-bank-accounts .page-title,
      #page-bank-accounts .bank-account-filters,
      #page-bank-accounts .bank-account-table-card {
        min-width: 0;
        max-width: 100%;
      }
      #page-bank-accounts .page-title .button.primary {
        height: 40px;
        border-color: #2563eb;
        border-radius: 10px;
        background: #2563eb;
        color: #ffffff;
        font-weight: 500;
      }
      #page-bank-accounts .page-title .button.primary:hover {
        border-color: #1d4ed8;
        background: #1d4ed8;
      }
      #page-bank-accounts .bank-account-filters {
        grid-template-columns: minmax(240px, 1fr) 210px 150px 130px 120px 112px 112px;
        gap: 12px;
        align-items: center;
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        padding: 12px 16px;
      }
      #page-bank-accounts .bank-account-filters .field,
      #page-bank-accounts .bank-account-filters .button {
        height: 40px;
        min-width: 0;
        border-color: #d8e1ec;
        border-radius: 10px;
      }
      #page-bank-accounts .bank-account-filters .button {
        width: 120px;
        justify-content: center;
      }
      #page-bank-accounts .bank-account-table-card {
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        overflow-x: auto;
        overflow-y: visible;
      }
      #page-bank-accounts .bank-account-table-card table {
        min-width: 1188px;
      }
      #page-bank-accounts .table-header {
        height: 52px;
      }
      #page-bank-accounts .table-header .table-title {
        color: #0f172a;
        font-size: 17px;
        font-weight: 600;
      }
      #page-bank-accounts #bankAccountMeta {
        color: #64748b;
        font-size: 14px;
      }
      #page-bank-accounts .bank-account-table-card th {
        background: #f8fafc;
        color: #64748b;
        font-weight: 500;
        white-space: nowrap;
      }
      #page-bank-accounts .bank-account-table-card th,
      #page-bank-accounts .bank-account-table-card td {
        height: 58px;
        color: #334155;
        font-size: 14px;
        vertical-align: middle;
      }
      #page-bank-accounts .bank-account-table-card tbody tr:hover {
        background: #f8fafc;
      }
      #page-bank-accounts .bank-account-name,
      #page-bank-accounts .bank-account-purpose,
      #page-bank-accounts .bank-account-company,
      #page-bank-accounts .bank-account-bank {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #page-bank-accounts .bank-account-name {
        color: #1e293b;
        font-weight: 600;
      }
      #page-bank-accounts .bank-account-purpose {
        margin-top: 3px;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 400;
      }
      #page-bank-accounts .bank-account-no {
        color: #334155;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
      }
      #page-bank-accounts .bank-account-status {
        display: inline-flex;
        align-items: center;
        height: 24px;
        padding: 0 9px;
        border: 1px solid;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
      }
      #page-bank-accounts .bank-account-status.active {
        border-color: #bbf7d0;
        background: #dcfce7;
        color: #059669;
      }
      #page-bank-accounts .bank-account-status.inactive {
        border-color: #e2e8f0;
        background: #f1f5f9;
        color: #64748b;
      }
      #page-bank-accounts .bank-account-actions {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        min-width: 120px;
        white-space: nowrap;
      }
      #page-bank-accounts .bank-account-text-action,
      #page-bank-accounts .bank-account-more-button {
        height: 28px;
        border: 0;
        padding: 0;
        background: transparent;
        color: #475569;
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
        line-height: 28px;
        white-space: nowrap;
      }
      #page-bank-accounts .bank-account-more-button {
        color: #64748b;
      }
      #page-bank-accounts .bank-account-text-action:hover,
      #page-bank-accounts .bank-account-more-button:hover {
        color: #1d4ed8;
      }
      #page-bank-accounts .bank-account-more {
        position: relative;
        display: inline-flex;
        flex: 0 0 auto;
      }
      #page-bank-accounts .bank-account-menu {
        position: absolute;
        right: 0;
        top: calc(100% + 6px);
        z-index: 8;
        display: none;
        min-width: 108px;
        padding: 6px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
      }
      #page-bank-accounts .bank-account-more:hover .bank-account-menu,
      #page-bank-accounts .bank-account-more:focus-within .bank-account-menu {
        display: grid;
      }
      #page-bank-accounts .bank-account-menu-item {
        height: 30px;
        border: 0;
        border-radius: 7px;
        padding: 0 9px;
        background: transparent;
        color: #334155;
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
        text-align: left;
      }
      #page-bank-accounts .bank-account-menu-item:hover {
        background: #f8fafc;
      }
      #page-bank-accounts .bank-account-menu-item.danger {
        color: #dc2626;
      }
      .bank-account-modal {
        width: min(720px, 96vw);
      }
      .bank-account-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 14px;
      }
      .bank-account-form-grid .field {
        height: 40px;
        border-color: #d8e1ec;
        border-radius: 10px;
      }
      .bank-account-form-grid textarea.field {
        min-height: 80px;
        resize: vertical;
      }
      .bank-account-form-grid .field.invalid {
        border-color: #ef4444;
      }
      .bank-account-form-message {
        margin-bottom: 14px;
        padding: 9px 11px;
        border: 1px solid #fecaca;
        border-radius: 10px;
        background: #fef2f2;
        color: #dc2626;
        font-size: 13px;
      }
      @media (max-width: 1280px) {
        #page-bank-accounts .bank-account-filters {
          grid-template-columns: minmax(0, 1fr) 190px 150px 130px 120px 112px 112px;
        }
      }
      @media (max-width: 760px) {
        .bank-account-form-grid {
          grid-template-columns: 1fr;
        }
      }
      #page-sales-invoices .invoice-request-empty-row:hover {
        background: #ffffff;
      }
      #page-sales-invoices .invoice-request-empty-row td {
        height: 240px;
        padding: 0;
        border-bottom: 0;
      }
      #page-sales-invoices .invoice-request-empty-state {
        min-height: 240px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        text-align: center;
      }
      #page-sales-invoices .invoice-request-empty-icon {
        width: 42px;
        height: 42px;
        border: 1px solid #d8e1ec;
        border-radius: 14px;
        background:
          linear-gradient(#bfdbfe, #bfdbfe) 12px 14px / 18px 2px no-repeat,
          linear-gradient(#e0f2fe, #e0f2fe) 12px 22px / 14px 2px no-repeat,
          #f8fafc;
      }
      #page-sales-invoices .invoice-request-empty-title {
        color: #334155;
        font-size: 15px;
        font-weight: 500;
      }
      #page-sales-invoices .invoice-request-empty-desc {
        max-width: 420px;
        color: #94a3b8;
        font-size: 13px;
        font-weight: 400;
        line-height: 1.6;
      }
      #page-sales-invoices .invoice-request-empty-action {
        height: 38px;
        margin-top: 4px;
        border-radius: 10px;
        font-weight: 500;
      }
      .invoice-request-modal {
        width: min(880px, 96vw);
        max-height: 88vh;
        display: flex;
        flex-direction: column;
        border: 1px solid #d8e1ec;
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 18px 52px rgba(15, 23, 42, 0.14);
      }
      .invoice-request-modal-body {
        display: grid;
        gap: 14px;
        overflow: auto;
        padding: 16px 18px 112px;
      }
      .invoice-request-section {
        display: grid;
        gap: 10px;
      }
      .invoice-request-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 32px;
      }
      .invoice-request-form-grid .form-field.full {
        grid-column: 1 / -1;
      }
      .invoice-request-form-grid .form-field label {
        color: #64748b;
        font-size: 13px;
        font-weight: 500;
      }
      .invoice-request-form-grid .field {
        height: 40px;
        border-color: #d8e1ec;
        border-radius: 10px;
      }
      .invoice-request-form-grid select.field {
        cursor: pointer;
      }
      .invoice-request-form-grid select.field:disabled {
        cursor: not-allowed;
        background: #f8fafc;
        color: #94a3b8;
      }
      .invoice-request-form-grid .field:focus {
        border-color: #2563eb;
        outline: none;
      }
      .invoice-request-form-grid .field::placeholder {
        color: #94a3b8;
      }
      .customer-combobox {
        position: relative;
      }
      .customer-options {
        position: absolute;
        z-index: 12;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        max-height: 260px;
        overflow: auto;
        padding: 6px;
        border: 1px solid #d8e1ec;
        border-radius: 12px;
        background: #ffffff;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
      }
      .customer-option {
        width: 100%;
        display: grid;
        gap: 4px;
        padding: 9px 10px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        cursor: pointer;
        text-align: left;
      }
      .customer-option:hover,
      .customer-option.highlighted {
        background: #f8fafc;
      }
      .customer-option.selected {
        background: #eff6ff;
      }
      .customer-option-name {
        color: #1e293b;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.35;
      }
      .customer-option-name-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }
      .customer-detail-open {
        flex: 0 0 auto;
        color: #2563eb;
        font-size: 12px;
        font-weight: 600;
      }
      .customer-detail-open:hover {
        text-decoration: underline;
      }
      .customer-option-name.customer-detail-open {
        min-width: 0;
        color: #1e293b;
        font-size: 14px;
        font-weight: 500;
      }
      .customer-option-name.customer-detail-open:hover {
        color: #2563eb;
      }
      .customer-option-meta {
        color: #94a3b8;
        font-size: 12px;
        font-weight: 400;
        line-height: 1.35;
      }
      .customer-option-empty {
        display: grid;
        gap: 4px;
        padding: 14px 12px;
        color: #94a3b8;
        font-size: 12px;
      }
      .customer-option-empty strong {
        color: #334155;
        font-size: 14px;
        font-weight: 500;
      }
      .invoice-request-form-grid .field[readonly] {
        background: #f8fafc;
        color: #475569;
      }
      .customer-detail-modal {
        width: min(820px, 96vw);
      }
      .customer-detail-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 12px 18px;
      }
      .customer-detail-grid .full {
        grid-column: 1 / -1;
      }
      .customer-detail-view-grid {
        padding: 2px 0 4px;
      }
      .customer-detail-info {
        min-width: 0;
        padding: 4px 0 10px;
        border-bottom: 1px solid #e6edf5;
      }
      .customer-detail-info-label {
        margin-bottom: 5px;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.3;
      }
      .customer-detail-info-value {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 22px;
        color: #1e293b;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.45;
        word-break: break-word;
      }
      .customer-detail-info-value.is-empty {
        color: #94a3b8;
        font-weight: 400;
      }
      .customer-detail-info-value.is-mono {
        font-variant-numeric: tabular-nums;
        word-break: keep-all;
        overflow-wrap: anywhere;
      }
      .customer-detail-copy {
        flex: 0 0 auto;
        padding: 0;
        border: 0;
        background: transparent;
        color: #2563eb;
        cursor: pointer;
        font-size: 12px;
        font-weight: 700;
      }
      .customer-detail-copy:hover {
        text-decoration: underline;
      }
      .customer-detail-edit-grid {
        align-items: start;
      }
      .customer-detail-edit-grid .field {
        min-height: 42px;
      }
      .customer-detail-edit-grid textarea.field {
        min-height: 74px;
      }
      .customer-detail-link {
        display: inline;
        max-width: 100%;
        padding: 0;
        border: 0;
        background: transparent;
        color: #2563eb;
        cursor: pointer;
        font: inherit;
        font-weight: 750;
        text-align: left;
      }
      .customer-detail-link:hover {
        text-decoration: underline;
      }
      .invoice-request-form-grid .money-display {
        font-variant-numeric: tabular-nums;
      }
      .invoice-request-form-grid textarea.field {
        min-height: 72px;
      }
      .invoice-request-notes-section {
        margin-top: 18px;
      }
      .invoice-request-notes-field {
        grid-column: 1 / -1;
      }
      .invoice-request-notes-textarea {
        min-height: 120px !important;
        max-height: 240px;
        resize: vertical;
        overflow-y: auto;
        line-height: 1.55;
        white-space: pre-wrap;
      }
      .invoice-request-form-grid .form-field.has-error .field {
        border-color: #ef4444 !important;
      }
      .field-error {
        display: none;
        margin-top: 5px;
        color: #ef4444;
        font-size: 12px;
        font-weight: 400;
      }
      .field-error.visible {
        display: block;
      }
      .invoice-request-form-message {
        padding: 10px 12px;
        border: 1px solid #d8e1ec;
        border-radius: 12px;
        background: #f8fafc;
        color: #475569;
        font-size: 13px;
        font-weight: 400;
      }
      .invoice-request-form-message.info {
        border-color: #bfdbfe;
        background: #eff6ff;
        color: #2563eb;
      }
      .invoice-request-form-message.warning {
        border-color: #fed7aa;
        background: #fff7ed;
        color: #c2410c;
      }
      .invoice-request-form-message.success {
        border-color: #bbf7d0;
        background: #f0fdf4;
        color: #059669;
      }
      .invoice-request-form-message.danger {
        border-color: #fecaca;
        background: #fee2e2;
        color: #ef4444;
      }
      .invoice-request-upload {
        display: flex;
        align-items: center;
        gap: 14px;
        min-height: 104px;
        padding: 16px;
        border: 1px dashed #cbd5e1;
        border-radius: 12px;
        background: #f8fafc;
        color: #334155;
        cursor: pointer;
        transition: border-color 0.16s ease, background 0.16s ease;
      }
      .invoice-request-upload:hover,
      .invoice-request-upload.is-dragging {
        border-color: #2563eb;
        background: #eff6ff;
      }
      .invoice-request-upload:focus-visible {
        border-color: #2563eb;
        outline: 3px solid rgba(37, 99, 235, 0.14);
        outline-offset: 2px;
      }
      .invoice-request-file-list {
        display: grid;
        gap: 8px;
      }
      .invoice-request-file-list .upload-file-row {
        min-height: 46px;
        padding: 9px 12px;
        border-color: #e6edf5;
        border-radius: 10px;
        background: #ffffff;
      }
      .invoice-request-file-empty {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 34px;
        padding: 6px 2px 2px;
        border-top: 1px dashed #e2e8f0;
        background: transparent;
      }
      .invoice-request-file-empty strong {
        color: #334155;
        font-size: 14px;
        font-weight: 600;
      }
      .invoice-request-file-empty span {
        color: #94a3b8;
        font-size: 13px;
      }
      .invoice-request-modal-footer {
        position: sticky;
        bottom: 0;
        z-index: 2;
        flex: 0 0 auto;
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        padding: 14px 18px;
        border-top: 1px solid #e2e8f0;
        background: rgba(255, 255, 255, 0.96);
      }
      .invoice-request-modal-footer .button {
        height: 40px;
        min-width: 96px;
        justify-content: center;
      }
      .invoice-request-detail-modal {
        width: min(860px, calc(100vw - 36px));
        max-height: 84vh;
        display: flex;
        flex-direction: column;
      }
      .invoice-request-detail-modal .modal-header {
        align-items: flex-start;
      }
      .invoice-request-detail-modal .modal-close-button {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 18px;
        line-height: 1;
      }
      .invoice-request-detail-body {
        display: grid;
        gap: 18px;
        overflow: auto;
      }
      .invoice-request-detail-message {
        border: 1px solid #bfdbfe;
        border-radius: 10px;
        padding: 10px 12px;
        background: #eff6ff;
        color: #2563eb;
        font-size: 13px;
      }
      .invoice-request-detail-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 14px;
      }
      .invoice-request-detail-field {
        min-width: 0;
        padding: 8px 0 10px;
        border-bottom: 1px solid #edf2f7;
        background: transparent;
      }
      .invoice-request-detail-field span {
        display: block;
        margin-bottom: 5px;
        color: #64748b;
        font-size: 12px;
        font-weight: 650;
      }
      .invoice-request-detail-field strong {
        display: block;
        overflow: hidden;
        color: #0f172a;
        font-size: 14px;
        font-weight: 650;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .invoice-request-detail-edit-field {
        display: grid;
        gap: 6px;
        min-width: 0;
      }
      .invoice-request-detail-edit-field.full {
        grid-column: 1 / -1;
      }
      .invoice-request-detail-edit-field span {
        color: #64748b;
        font-size: 12px;
        font-weight: 650;
      }
      .invoice-request-detail-edit-field .field {
        width: 100%;
        box-sizing: border-box;
        height: 38px;
        border-color: #d8e1ec;
        border-radius: 10px;
      }
      .invoice-request-detail-edit-field textarea.field {
        height: 76px;
        resize: vertical;
      }
      .invoice-request-detail-edit-field input[readonly] {
        background: #f8fafc;
        color: #64748b;
      }
      .invoice-request-detail-section {
        display: grid;
        gap: 12px;
      }
      .invoice-request-detail-section-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }
      .invoice-request-detail-files {
        display: grid;
        gap: 8px;
      }
      .invoice-request-detail-upload {
        display: grid;
        width: 100%;
        min-height: 96px;
        gap: 8px;
        place-items: center;
        padding: 16px 18px;
        border: 1px dashed #bfdbfe;
        border-radius: 12px;
        background: #f8fbff;
        color: #1e3a8a;
        text-align: center;
        cursor: pointer;
        transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
      }
      .invoice-request-detail-upload:hover,
      .invoice-request-detail-upload.is-dragover {
        border-color: #2563eb;
        background: #eff6ff;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
      }
      .invoice-request-detail-upload.is-uploading {
        cursor: progress;
        opacity: 0.9;
      }
      .invoice-request-detail-upload-main {
        color: #1d4ed8;
        font-size: 14px;
        font-weight: 750;
      }
      .invoice-request-detail-upload-sub {
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
      }
      .invoice-request-detail-file-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-width: 0;
        padding: 10px 12px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #fff;
      }
      .invoice-request-detail-file-row div {
        min-width: 0;
      }
      .invoice-request-detail-file-row strong,
      .invoice-request-detail-file-row span,
      .invoice-request-detail-file-name {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .invoice-request-detail-file-name {
        color: #1e293b;
        font-size: 14px;
        font-weight: 650;
        text-decoration: none;
      }
      .invoice-request-detail-file-name:hover {
        color: #2563eb;
      }
      .invoice-request-detail-file-row span {
        margin-top: 3px;
        color: #94a3b8;
        font-size: 12px;
      }
      .invoice-request-issued-card {
        display: grid;
        gap: 12px;
        padding: 14px;
        border: 1px solid #d8e1ec;
        border-radius: 12px;
        background: #ffffff;
      }
      .invoice-request-issued-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
      }
      .invoice-request-issued-head > div {
        display: grid;
        gap: 4px;
        min-width: 0;
      }
      .invoice-request-issued-head span:not(.badge),
      .invoice-request-issued-file span {
        color: #94a3b8;
        font-size: 13px;
      }
      .invoice-request-issued-no {
        width: fit-content;
        max-width: 100%;
        padding: 0;
        overflow: hidden;
        border: 0;
        background: transparent;
        color: #2563eb;
        cursor: pointer;
        font: inherit;
        font-weight: 700;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .invoice-request-issued-no:hover {
        color: #1d4ed8;
        text-decoration: underline;
      }
      .invoice-request-issued-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
      }
      .invoice-request-issued-grid > div {
        display: grid;
        gap: 4px;
        min-width: 0;
        padding: 10px 12px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #f8fafc;
      }
      .invoice-request-issued-grid span {
        color: #64748b;
        font-size: 12px;
      }
      .invoice-request-issued-grid strong {
        overflow: hidden;
        color: #1e293b;
        font-size: 14px;
        font-variant-numeric: tabular-nums;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .invoice-request-issued-files {
        display: grid;
        gap: 8px;
      }
      .invoice-request-issued-file {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #f8fafc;
      }
      .invoice-request-issued-file .invoice-request-detail-file-name {
        min-width: 0;
      }
      .invoice-request-detail-system {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 18px;
        padding-top: 2px;
        color: #94a3b8;
        font-size: 12px;
      }
      .invoice-request-issue-modal {
        display: flex;
        flex-direction: column;
        width: min(940px, calc(100vw - 36px));
        height: min(900px, calc(100vh - 48px));
        max-height: calc(100vh - 48px);
        overflow: hidden;
      }
      .invoice-request-issue-modal .modal-header,
      .invoice-request-issue-modal .modal-footer {
        flex: 0 0 auto;
      }
      .invoice-request-issue-body {
        display: grid;
        flex: 1 1 auto;
        min-height: 0;
        gap: 18px;
        overflow-y: auto;
        padding: 16px 22px 24px;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 transparent;
      }
      .invoice-request-issue-body::-webkit-scrollbar {
        width: 8px;
      }
      .invoice-request-issue-body::-webkit-scrollbar-track {
        background: transparent;
      }
      .invoice-request-issue-body::-webkit-scrollbar-thumb {
        border: 2px solid #ffffff;
        border-radius: 999px;
        background: #cbd5e1;
      }
      .invoice-request-issue-section {
        display: grid;
        gap: 12px;
      }
      .invoice-request-issue-context {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 14px;
        padding: 12px 14px;
        border: 1px solid #dbeafe;
        border-radius: 12px;
        background: #f8fbff;
      }
      .invoice-request-issue-context div {
        display: grid;
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        min-width: 0;
      }
      .invoice-request-issue-context span {
        color: #64748b;
        font-size: 12px;
        font-weight: 650;
      }
      .invoice-request-issue-context strong {
        min-width: 0;
        overflow: hidden;
        color: #1e293b;
        font-size: 14px;
        font-weight: 650;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .invoice-request-issue-upload {
        display: grid;
        width: 100%;
        min-height: 104px;
        gap: 8px;
        place-items: center;
        padding: 18px;
        border: 1px dashed #bfdbfe;
        border-radius: 12px;
        background: #f8fbff;
        color: #1e3a8a;
        text-align: center;
        cursor: pointer;
        transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
      }
      .invoice-request-issue-upload:hover,
      .invoice-request-issue-upload.is-dragover {
        border-color: #2563eb;
        background: #eff6ff;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
      }
      .invoice-request-issue-upload.is-uploading {
        cursor: progress;
        opacity: 0.9;
      }
      .invoice-request-issue-upload-main {
        color: #1d4ed8;
        font-size: 14px;
        font-weight: 750;
        line-height: 1.35;
      }
      .invoice-request-issue-upload-sub {
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.5;
      }
      .invoice-request-issue-status {
        min-height: 38px;
        padding: 9px 12px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #f8fafc;
        color: #64748b;
        font-size: 13px;
        font-weight: 600;
      }
      .invoice-request-issue-status.is-uploading {
        border-color: #bfdbfe;
        background: #eff6ff;
        color: #2563eb;
      }
      .invoice-request-issue-status.is-success {
        border-color: #bbf7d0;
        background: #f0fdf4;
        color: #059669;
      }
      .invoice-request-issue-status.is-failed {
        border-color: #fecaca;
        background: #fef2f2;
        color: #dc2626;
      }
      .invoice-request-issue-form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 28px;
        row-gap: 14px;
      }
      .invoice-request-issue-form .form-field.full {
        grid-column: 1 / -1;
      }
      .invoice-request-issue-form .field {
        width: 100%;
        box-sizing: border-box;
      }
      .invoice-request-issue-form .money-input {
        text-align: right;
        font-variant-numeric: tabular-nums;
      }
      .invoice-request-issue-warning {
        margin: 6px 0 0;
        color: #b45309;
        font-size: 12px;
        font-weight: 600;
      }
      .invoice-request-issue-footer {
        padding: 14px 22px;
      }
      .invoice-request-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: 100%;
        color: #475569;
        white-space: nowrap;
      }
      .text-action {
        display: inline-flex;
        align-items: center;
        flex: 0 0 auto;
        min-width: max-content;
        border: 0;
        background: transparent;
        color: #475569;
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
      }
      .text-action:hover {
        color: #2563eb;
      }
      .invoice-request-file-actions {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        max-width: 100%;
        white-space: nowrap;
      }
      .invoice-request-file-actions .link {
        font-weight: 500;
      }
      .invoice-request-file-actions .muted-link {
        color: #64748b;
      }
      .invoice-request-file-actions .muted-link:hover {
        color: #2563eb;
      }
      @media (max-width: 860px) {
        .invoice-request-issued-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .invoice-request-issued-file {
          grid-template-columns: minmax(0, 1fr);
          align-items: start;
        }
      }
      .invoice-file-count,
      .invoice-file-dot {
        flex: 0 0 auto;
        color: #64748b;
      }
      .action-separator {
        width: 1px;
        height: 12px;
        background: #e2e8f0;
      }
      .action-hint {
        color: #94a3b8;
        font-size: 12px;
      }
      @media (max-width: 900px) {
        #page-sales-invoices .invoice-request-filters {
          grid-template-columns: minmax(220px, 1fr) 160px;
        }
        .invoice-request-form-grid {
          grid-template-columns: 1fr;
        }
      }
      .link {
        color: var(--primary);
        font-weight: 600;
      }
      .link:hover {
        color: var(--primary-hover);
        text-decoration: underline;
      }
      .primary-text {
        color: var(--text-strong);
        font-weight: 600;
      }
      .secondary-text,
      .muted {
        color: var(--muted-soft);
        font-size: 13px;
        font-weight: 400;
      }
      .money {
        color: var(--text-body);
        font-weight: 400;
        font-variant-numeric: tabular-nums;
      }
      .money.is-negative {
        color: var(--danger);
        font-weight: 600;
      }
      .badge {
        min-height: 24px;
        height: auto;
        padding: 4px 9px;
        border: 1px solid var(--border);
        border-radius: 999px;
        background: #f1f5f9;
        color: var(--muted);
        font-size: 12px;
        font-weight: 600;
        line-height: 1;
      }
      .badge.success {
        border-color: #bbf7d0;
        background: #dcfce7;
        color: #059669;
      }
      .badge.warning {
        border-color: #fde68a;
        background: #fef3c7;
        color: #d97706;
      }
      .badge.danger {
        border-color: #fecaca;
        background: #fee2e2;
        color: #ef4444;
      }
      .badge.info {
        border-color: #bfdbfe;
        background: #eff6ff;
        color: var(--primary);
      }
      .badge.neutral {
        border-color: #e2e8f0;
        background: #f1f5f9;
        color: #64748b;
      }
      .row-actions,
      .reimbursement-file-actions,
      .bc-table-actions {
        gap: 8px;
      }
      .row-actions .button:not(.primary),
      .reimbursement-file-actions .button,
      .bc-view-action,
      .bc-menu-item {
        color: var(--text-action);
        font-weight: 500;
      }
      .row-actions .button:not(.primary):hover,
      .reimbursement-file-actions .button:hover,
      .bc-view-action:hover,
      .bc-menu-item:hover {
        color: var(--primary);
      }
      .list-pagination,
      #page-bc .bc-pagination {
        min-height: 52px;
        border-top: 1px solid var(--border);
        color: var(--muted);
        font-size: 13px;
        font-weight: 400;
      }
      .list-page-button,
      #page-bc .bc-page-button {
        color: var(--muted);
        font-weight: 500;
      }
      .list-page-button.active,
      #page-bc .bc-page-button.active {
        background: var(--primary-soft);
        color: var(--primary);
      }
      .modal-header,
      .bc-section-header {
        border-bottom-color: var(--border);
      }
      .modal-title,
      .section-title,
      .bc-detail-title,
      .bc-section-header h2 {
        color: var(--text);
        font-weight: 600;
      }
      label,
      .bc-info-field span {
        color: var(--text-body);
        font-weight: 500;
      }
      .bc-info-field strong {
        color: var(--text-strong);
        font-weight: 500;
      }

      /* BC detail page density and hierarchy polish. */
      #page-bc .bc-detail-header {
        margin-bottom: 12px;
      }
      #page-bc .bc-detail-title-row {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
      }
      #page-bc .bc-detail-title {
        color: #0f172a;
        font-size: 22px;
        font-weight: 700;
        letter-spacing: 0;
        line-height: 1.25;
      }
      #page-bc .bc-detail-title-status {
        display: inline-flex;
        align-items: center;
      }
      #page-bc .bc-detail-kpis {
        gap: 12px;
        margin-bottom: 12px;
      }
      #page-bc .bc-detail-kpis .kpi {
        height: 84px;
        min-height: 84px;
        padding: 13px 18px;
        border: 1px solid #d8e1ec;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
      }
      #page-bc .bc-detail-kpis .kpi-label {
        margin-bottom: 4px;
        color: #64748b;
        font-size: 13px;
        font-weight: 500;
      }
      #page-bc .bc-detail-kpis .kpi-value {
        color: #0f172a;
        font-size: 22px;
        font-weight: 600;
        line-height: 1.12;
        letter-spacing: 0;
        font-variant-numeric: tabular-nums;
      }
      #page-bc .bc-detail-kpis .kpi:nth-child(4) .kpi-value {
        font-weight: 700;
      }
      #page-bc .bc-detail-kpis .kpi:nth-child(3) .kpi-value {
        font-weight: 700;
      }
      #page-bc .bc-detail-kpis .kpi-value.is-negative {
        color: #ef4444;
      }
      #page-bc .bc-currency-lines,
      #page-bc .bc-kpi-currency-lines {
        display: grid;
        gap: 3px;
        line-height: 1.25;
        white-space: nowrap;
      }
      #page-bc .bc-kpi-currency-lines {
        gap: 4px;
      }
      #page-bc .bc-kpi-currency-lines span {
        display: block;
      }
      #page-bc .bc-currency-base {
        margin-top: 4px;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 500;
        white-space: nowrap;
      }
      #page-bc .bc-detail-kpis .kpi-helper {
        margin-top: 4px;
        color: #64748b;
        font-size: 12px;
        font-weight: 400;
      }
      #page-bc .bc-detail-content {
        gap: 12px;
      }
      #page-bc .bc-info-card {
        padding: 16px;
      }
      #page-bc .bc-section-header {
        margin-bottom: 12px;
      }
      #page-bc .bc-basic-edit-button,
      #page-bc .bc-basic-edit-button.button.ghost {
        height: 34px;
        min-height: 34px;
        border: 1px solid #d8e1ec;
        background: #ffffff;
        color: #475569;
        font-weight: 500;
      }
      #page-bc .bc-basic-edit-button:hover,
      #page-bc .bc-basic-edit-button.button.ghost:hover {
        border-color: #d8e1ec;
        background: #f8fafc;
        color: #2563eb;
      }
      #page-bc .bc-info-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px 18px;
      }
      #page-bc .bc-info-field span {
        margin-bottom: 4px;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 500;
      }
      #page-bc .bc-info-field strong {
        color: #1e293b;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.42;
      }
      #page-bc .bc-info-span-2 {
        grid-column: span 2;
      }
      #page-bc .bc-info-wide {
        grid-column: 1 / -1;
        margin-top: 0;
        padding-top: 10px;
      }
      #page-bc .bc-detail-workspace {
        gap: 10px;
      }
      #page-bc .bc-underline-tabs {
        gap: 20px;
      }
      #page-bc .bc-underline-tabs .tab-button {
        height: 36px;
        font-weight: 600;
      }
      #page-bc .bc-underline-tabs .tab-button span {
        margin-left: 4px;
        color: #64748b;
        font-size: 13px;
        font-weight: 400;
      }
      #page-bc .bc-underline-tabs .tab-button.active span {
        color: #2563eb;
      }
      #page-bc .bc-line-table .table-header {
        height: 46px;
        min-height: 46px;
      }
      #page-bc .bc-line-table th,
      #page-bc .bc-line-table td {
        height: 52px;
      }
      #page-bc .bc-view-action,
      #page-bc .bc-table-actions .bc-view-action {
        height: 28px;
        padding: 0 6px;
        border-radius: 7px;
        background: transparent;
        color: #475569;
        font-size: 13px;
        font-weight: 500;
      }
      #page-bc .bc-view-action:hover,
      #page-bc .bc-table-actions .bc-view-action:hover {
        background: #eff6ff;
        color: #2563eb;
        text-decoration: none;
      }
      #page-bc .bc-line-table {
        overflow-x: auto;
      }
      #page-bc .bc-detail-lines-table {
        min-width: 1040px;
        table-layout: fixed;
      }
      #page-bc .bc-income-lines-table {
        min-width: 1110px;
      }
      #page-bc .bc-income-invoice-col,
      #page-bc .bc-income-invoice-cell {
        width: 220px;
        min-width: 220px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      #page-bc .bc-income-date-col,
      #page-bc .bc-income-date-cell {
        width: 110px;
        min-width: 110px;
        white-space: nowrap;
      }
      #page-bc .bc-income-customer-col {
        width: auto;
      }
      #page-bc .bc-income-invoice-link {
        display: block;
        width: 100%;
        border: 0;
        padding: 0;
        background: transparent;
        color: #2563eb;
        font: inherit;
        font-weight: 600;
        text-align: left;
        cursor: pointer;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      #page-bc .bc-income-invoice-link:hover {
        color: #1d4ed8;
        text-decoration: underline;
      }
      #page-bc .bc-expense-lines-table {
        min-width: 1180px;
      }
      #page-bc .bc-line-table .bc-actions-col,
      #page-bc .bc-line-table th:last-child,
      #page-bc .bc-line-table td:last-child {
        width: 236px;
        min-width: 236px;
        max-width: 236px;
      }
      #page-bc .bc-line-table th:last-child {
        text-align: center;
      }
      #page-bc .bc-line-table td:last-child {
        padding-right: 16px;
        white-space: nowrap;
      }
      #page-bc .bc-table-actions {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        width: 100%;
        min-width: 0;
        white-space: nowrap;
        flex-wrap: nowrap;
      }
      #page-bc .bc-table-actions .link,
      #page-bc .bc-view-action,
      #page-bc .bc-table-actions .bc-view-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        height: 28px;
        min-width: 40px;
        padding: 0 8px;
        border: 1px solid transparent;
        border-radius: 7px;
        background: transparent;
        color: #475569;
        font-size: 13px;
        font-weight: 600;
        line-height: 1;
        text-decoration: none;
        white-space: nowrap;
        word-break: keep-all;
        cursor: pointer;
      }
      #page-bc .bc-table-actions .link:hover,
      #page-bc .bc-view-action:hover,
      #page-bc .bc-table-actions .bc-view-action:hover {
        border-color: #bfdbfe;
        background: #eff6ff;
        color: #2563eb;
        text-decoration: none;
      }
      #page-bc .bc-table-actions .danger {
        color: #b91c1c;
      }
      #page-bc .bc-table-actions .danger:hover {
        border-color: #fecaca;
        background: #fef2f2;
        color: #b91c1c;
      }
      #page-bc .bc-receipt-state {
        display: flex;
        justify-content: flex-end;
      }
      #page-bc .bc-receipt-stack {
        display: grid;
        gap: 3px;
        justify-items: end;
        line-height: 1.25;
      }
      #page-bc .bc-attachment-empty {
        color: #94a3b8;
        font-size: 12px;
        font-weight: 400;
        white-space: nowrap;
      }
      #page-bc .bc-empty-code {
        color: #94a3b8;
        font-weight: 400;
      }

      /* UploadRecognizeDialog prototype. */
      .upload-recognize-modal {
        width: min(680px, 96vw);
      }
      .upload-recognize-body {
        display: grid;
        gap: 14px;
      }
      .upload-recognize-section {
        display: grid;
        gap: 10px;
      }
      .upload-section-title {
        color: #0f172a;
        font-size: 14px;
        font-weight: 600;
      }
      .upload-dropzone {
        display: flex;
        align-items: center;
        gap: 14px;
        min-height: 108px;
        padding: 18px;
        border: 1px dashed #bfd0e5;
        border-radius: 14px;
        background: #f8fafc;
        color: #334155;
        cursor: pointer;
        transition: border-color 0.16s ease, background 0.16s ease;
      }
      .upload-dropzone:hover,
      .upload-dropzone.is-dragging {
        border-color: #2563eb;
        background: #eff6ff;
      }
      .upload-dropzone-icon {
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        border-radius: 12px;
        background: #ffffff;
        border: 1px solid #d8e1ec;
        color: #2563eb;
        font-size: 20px;
        font-weight: 500;
        flex: 0 0 auto;
      }
      .upload-dropzone-title {
        margin-bottom: 4px;
        color: #1e293b;
        font-size: 14px;
        font-weight: 600;
      }
      .upload-dropzone-hint {
        color: #64748b;
        font-size: 13px;
        line-height: 1.5;
      }
      .upload-file-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 42px;
        padding: 10px 12px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #ffffff;
      }
      .upload-file-row > div:first-child {
        min-width: 0;
      }
      .upload-file-main {
        min-width: 0;
      }
      .upload-file-row strong {
        display: block;
        color: #1e293b;
        font-size: 14px;
        font-weight: 500;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .upload-file-row span {
        color: #94a3b8;
        font-size: 12px;
        font-weight: 400;
      }
      .upload-file-actions {
        display: inline-flex;
        align-items: center;
        flex-shrink: 0;
        gap: 10px;
        white-space: nowrap;
      }
      .recognize-type-options {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
      }
      .recognize-type-option {
        height: 38px;
        border: 1px solid #d8e1ec;
        border-radius: 10px;
        background: #ffffff;
        color: #475569;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
      }
      .recognize-type-option.active {
        border-color: #bfdbfe;
        background: #eff6ff;
        color: #2563eb;
      }
      .upload-result-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }
      .upload-recognize-alert {
        padding: 10px 12px;
        border: 1px solid #d8e1ec;
        border-radius: 12px;
        background: #f8fafc;
        color: #475569;
        font-size: 13px;
        font-weight: 400;
      }
      .upload-recognize-alert.recognizing,
      .upload-recognize-alert.pending {
        border-color: #bfdbfe;
        background: #eff6ff;
        color: #2563eb;
      }
      .upload-recognize-alert.complete {
        border-color: #bbf7d0;
        background: #dcfce7;
        color: #059669;
      }
      .upload-recognize-alert.failed {
        border-color: #fecaca;
        background: #fee2e2;
        color: #ef4444;
      }
      .upload-result-form {
        gap: 12px;
      }
      .upload-recognize-footer {
        position: sticky;
        bottom: 0;
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        padding: 14px 18px;
        border-top: 1px solid #e2e8f0;
        background: rgba(255, 255, 255, 0.96);
      }
      .upload-recognize-footer .button:disabled {
        cursor: not-allowed;
        opacity: 0.48;
      }

      /* BC create modal tabs. */
      .bc-create-modal {
        width: min(1180px, 96vw);
        max-height: 92vh;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        overflow: hidden;
      }
      .bc-create-modal .modal-header {
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 14px 18px;
      }
      .bc-create-body {
        overflow: auto;
        padding: 12px 16px;
      }
      .bc-create-basic-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px 14px;
      }
      .bc-create-basic-grid .form-field.full {
        grid-column: 1 / -1;
      }
      .bc-create-basic-grid .form-field label {
        margin-bottom: 3px;
        line-height: 16px;
      }
      .bc-create-basic-grid .field {
        height: 36px;
        width: 100%;
        box-sizing: border-box;
      }
      .bc-create-basic-grid textarea.field {
        height: 60px;
        min-height: 56px;
        max-height: 64px;
        resize: none;
      }
      .bc-create-collection {
        display: grid;
        gap: 8px;
        margin-top: 10px;
        position: relative;
      }
      .bc-create-section-title {
        color: #0f172a;
        font-size: 15px;
        font-weight: 600;
      }
      .bc-create-tabs {
        display: flex;
        gap: 20px;
        border-bottom: 1px solid #d8e1ec;
        padding-right: 470px;
      }
      .bc-create-tab {
        position: relative;
        height: 36px;
        border: 0;
        border-bottom: 2px solid transparent;
        background: transparent;
        color: #64748b;
        cursor: pointer;
        font-size: 14px;
        font-weight: 600;
        padding: 0 2px;
      }
      .bc-create-tab span {
        margin-left: 8px;
        color: #94a3b8;
        font-size: 13px;
        font-weight: 400;
      }
      .bc-create-tab.active {
        border-bottom-color: #2563eb;
        color: #2563eb;
      }
      .bc-create-tab.active span {
        color: #64748b;
      }
      .bc-create-tab-panel {
        display: none;
        min-width: 0;
      }
      .bc-create-tab-panel.active {
        display: grid;
        gap: 0;
        position: relative;
      }
      .bc-create-panel-toolbar {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        position: absolute;
        right: 0;
        top: -44px;
      }
      .bc-create-panel-toolbar .field {
        width: min(360px, 100%);
        height: 36px;
      }
      .bc-create-panel-toolbar .button {
        height: 36px;
        min-width: 64px;
        white-space: nowrap;
        flex: 0 0 auto;
      }
      .bc-create-table-card {
        max-height: min(420px, calc(92vh - 380px));
        min-height: 300px;
        overflow: auto;
      }
      .bc-create-table-card table {
        min-width: 980px;
      }
      .bc-create-table-card thead th {
        position: sticky;
        top: 0;
        z-index: 1;
      }
      #page-bc .bc-create-table-card th,
      #page-bc .bc-create-table-card td {
        height: 44px;
        padding-top: 6px;
        padding-bottom: 6px;
      }
      #page-bc .bc-create-table-card .select-col,
      #page-bc .bc-create-table-card th:first-child,
      #page-bc .bc-create-table-card td:first-child {
        white-space: nowrap;
        text-align: center;
        padding-left: 8px;
        padding-right: 8px;
      }
      .bc-create-checkbox {
        appearance: none;
        width: 16px;
        height: 16px;
        margin: 0;
        display: inline-grid;
        place-content: center;
        vertical-align: middle;
        border: 1px solid #cbd5e1;
        border-radius: 4px;
        background: #ffffff;
        cursor: pointer;
        transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
      }
      .bc-create-checkbox:hover {
        border-color: #2563eb;
      }
      .bc-create-checkbox:checked,
      .bc-create-checkbox:indeterminate {
        border-color: #2563eb;
        background: #2563eb;
      }
      .bc-create-checkbox:checked::after {
        content: "";
        width: 8px;
        height: 5px;
        border: solid #ffffff;
        border-width: 0 0 2px 2px;
        transform: rotate(-45deg) translateY(-1px);
      }
      .bc-create-checkbox:indeterminate::after {
        content: "";
        width: 8px;
        height: 2px;
        border-radius: 999px;
        background: #ffffff;
      }
      .bc-create-checkbox:focus-visible {
        outline: 0;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
      }
      .bc-create-footer {
        position: sticky;
        bottom: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 12px 18px;
        border-top: 1px solid #d8e1ec;
        background: rgba(255, 255, 255, 0.98);
      }
      .bc-create-summary {
        display: flex;
        align-items: center;
        gap: 16px;
        flex-wrap: wrap;
        color: #64748b;
        font-size: 13px;
        font-weight: 400;
      }
      .bc-create-summary strong {
        color: #1e293b;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
      }
      .bc-create-summary strong.is-negative {
        color: #ef4444;
      }
      .bc-create-submit-hint {
        color: #94a3b8;
        font-size: 12px;
        font-weight: 400;
        white-space: nowrap;
      }
      #bcCreateSaveButton:not(:disabled) {
        border-color: #2563eb;
        background: #2563eb;
        color: #ffffff;
        cursor: pointer;
      }
      #bcCreateSaveButton:not(:disabled):hover {
        border-color: #1d4ed8;
        background: #1d4ed8;
      }
      #bcCreateSaveButton:disabled,
      #bcCreateSaveButton:disabled:hover {
        border-color: #e2e8f0;
        background: #e2e8f0;
        color: #94a3b8;
        cursor: not-allowed;
        box-shadow: none;
      }
      .bc-create-empty {
        line-height: 1.6;
      }
      .bc-create-empty span {
        color: #94a3b8;
        font-size: 12px;
        font-weight: 400;
      }
      .nav-item {
        gap: 10px;
        color: #475569;
        font-weight: 400;
      }
      .nav-item:hover {
        color: #2563eb;
      }
      .nav-item.active {
        color: #2563eb;
        font-weight: 500;
      }
      .nav-icon {
        width: 22px;
        height: 22px;
        color: #64748b;
      }
      .nav-icon svg {
        width: 16px;
        height: 16px;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
      }
      .nav-item:hover .nav-icon,
      .nav-item.active .nav-icon {
        color: #2563eb;
      }
      .temporary-payee-kpis {
        margin-bottom: 16px;
      }
      .temporary-payee-filters {
        grid-template-columns: minmax(260px, 1.4fr) repeat(4, minmax(120px, 1fr));
      }
      .temporary-payee-table-card {
        overflow-x: auto;
      }
      .temporary-payee-table-card table {
        min-width: 820px;
      }
      .temporary-payee-table-card td {
        height: 56px;
        vertical-align: top;
      }
      .temporary-payee-table-card tr.is-muted {
        color: #94a3b8;
        background: #fafafa;
      }
      .temporary-payee-name-link {
        padding: 0;
        border: 0;
        background: transparent;
        color: #2563eb;
        cursor: pointer;
        font: inherit;
        font-weight: 750;
        text-align: left;
      }
      .temporary-payee-name-link:hover {
        text-decoration: underline;
      }
      .temporary-payee-cell-main {
        color: #0f172a;
        font-weight: 650;
        line-height: 1.45;
      }
      .temporary-payee-cell-sub {
        margin-top: 3px;
        color: #64748b;
        font-size: 12px;
        line-height: 1.45;
      }
      .temporary-payee-sensitive {
        font-variant-numeric: tabular-nums;
        letter-spacing: 0;
      }
      .temporary-payee-status {
        display: inline-flex;
        align-items: center;
        height: 24px;
        padding: 0 10px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 750;
      }
      .temporary-payee-status.success {
        background: #ecfdf5;
        color: #047857;
      }
      .temporary-payee-status.warning {
        background: #fffbeb;
        color: #b45309;
      }
      .temporary-payee-status.info {
        background: #eff6ff;
        color: #2563eb;
      }
      .temporary-payee-status.neutral {
        background: #f1f5f9;
        color: #64748b;
      }
      .temporary-payee-actions,
      .temporary-payee-detail-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
      }
      .temporary-payee-detail-modal {
        width: min(1120px, 96vw);
      }
      .temporary-payee-copy {
        margin-left: 8px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #2563eb;
        cursor: pointer;
        font-size: 12px;
        font-weight: 750;
      }
      .temporary-payee-copy:hover {
        text-decoration: underline;
      }
      .temporary-payee-transfer-prompt {
        display: grid;
        gap: 8px;
        padding: 12px;
        border: 1px solid #fde68a;
        border-radius: 8px;
        background: #fffbeb;
        color: #92400e;
      }
      .temporary-payee-transfer-prompt strong {
        color: #78350f;
      }
      .temporary-payee-edit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .file-preview-modal {
        position: fixed;
        inset: 0;
        z-index: 10000;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 18px;
        background: rgba(15, 23, 42, 0.55);
      }
      .file-preview-modal.hidden {
        display: none;
      }
      .file-preview-panel {
        display: flex;
        flex-direction: column;
        width: min(1180px, 96vw);
        height: 96vh;
        overflow: hidden;
        border: 1px solid #d9e3f2;
        border-radius: 14px;
        background: #f8fafc;
        box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
      }
      .file-preview-toolbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        min-height: 64px;
        padding: 12px 16px;
        border-bottom: 1px solid #d9e3f2;
        background: #fff;
      }
      .file-preview-print-tip {
        padding: 8px 16px;
        border-bottom: 1px solid #d9e3f2;
        background: #f8fafc;
        color: #64748b;
        font-size: 12px;
        line-height: 1.5;
        text-align: center;
      }
      .file-preview-heading {
        display: grid;
        gap: 3px;
        min-width: 0;
      }
      .file-preview-title {
        min-width: 0;
        overflow: hidden;
        color: #172033;
        font-size: 16px;
        font-weight: 750;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .file-preview-subtitle {
        min-width: 0;
        overflow: hidden;
        color: #64748b;
        font-size: 13px;
        font-weight: 500;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .file-preview-subtitle.hidden {
        display: none;
      }
      .file-preview-actions {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        gap: 10px;
      }
      .file-preview-page {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        justify-content: center;
        min-height: 0;
        overflow: auto;
        padding: 12px;
        background: #eef2f7;
        text-align: center;
      }
      .file-preview-object,
      .file-preview-image,
      .file-preview-pdf-shell,
      .file-preview-frame,
      .file-preview-pdf-canvas {
        display: block;
        max-width: 100%;
        margin: 0 auto;
      }
      .file-preview-loading,
      .file-preview-empty {
        display: grid;
        justify-items: center;
        gap: 8px;
        color: #64748b;
        font-size: 14px;
      }
      .file-preview-empty strong {
        color: #334155;
        font-size: 16px;
      }
      .file-preview-image {
        max-width: 90%;
        max-height: calc(96vh - 92px);
        object-fit: contain;
        box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16);
      }
      .file-preview-pdf-pages {
        display: grid;
        justify-items: center;
        gap: 18px;
        width: 100%;
      }
      .file-preview-pdf-page {
        display: flex;
        align-items: center;
        justify-content: center;
        max-width: 100%;
      }
      .file-preview-pdf-canvas {
        width: auto;
        max-width: 90%;
        height: auto;
        background: #fff;
        box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16);
      }
      .file-preview-pdf-shell {
        width: min(100%, 920px);
        height: calc(96vh - 104px);
        overflow: hidden;
        background: #fff;
        box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16);
      }
      .file-preview-frame {
        width: 100%;
        height: 100%;
        border: 0;
        background: #fff;
      }
      @media print {
        @page {
          size: A4 landscape;
          margin: 8mm;
        }
        html,
        body {
          margin: 0 !important;
          padding: 0 !important;
          width: auto !important;
          height: auto !important;
          background: #ffffff !important;
          overflow: visible !important;
        }
        body * {
          visibility: hidden !important;
        }
        .file-preview-print-area,
        .file-preview-print-area * {
          visibility: visible !important;
        }
        body.file-preview-open #filePreviewModal,
        body.file-preview-open .file-preview-panel {
          position: fixed !important;
          inset: 0 !important;
          display: block !important;
          width: auto !important;
          height: auto !important;
          padding: 0 !important;
          margin: 0 !important;
          border: 0 !important;
          background: #ffffff !important;
          box-shadow: none !important;
          overflow: visible !important;
        }
        body.file-preview-open .file-preview-toolbar,
        body.file-preview-open .file-preview-actions,
        body.file-preview-open .file-preview-print-tip,
        body.file-preview-open .modal-close-button {
          display: none !important;
        }
        body.file-preview-open .file-preview-print-area {
          position: fixed !important;
          left: 0 !important;
          top: 0 !important;
          width: 281mm !important;
          height: 194mm !important;
          display: flex !important;
          align-items: center !important;
          justify-content: center !important;
          padding: 0 !important;
          margin: 0 !important;
          overflow: hidden !important;
          background: #ffffff !important;
          text-align: center !important;
          page-break-after: avoid !important;
          break-after: avoid !important;
        }
        body.file-preview-open .file-preview-pdf-pages {
          display: flex !important;
          align-items: center !important;
          justify-content: center !important;
          width: auto !important;
          height: auto !important;
        }
        body.file-preview-open .file-preview-pdf-page {
          display: flex !important;
          align-items: center !important;
          justify-content: center !important;
          width: auto !important;
          height: auto !important;
          max-width: none !important;
          max-height: none !important;
          margin: 0 auto !important;
          page-break-after: avoid !important;
          break-after: avoid !important;
          page-break-inside: avoid !important;
          break-inside: avoid !important;
        }
        body.file-preview-open .file-preview-pdf-page:last-child {
          page-break-after: avoid !important;
          break-after: avoid !important;
        }
        body.file-preview-open .file-preview-pdf-canvas {
          width: auto !important;
          height: auto !important;
          max-width: none !important;
          max-height: none !important;
          page-break-after: avoid !important;
          break-after: avoid !important;
          page-break-inside: avoid !important;
          break-inside: avoid !important;
          transform: none !important;
          zoom: 1 !important;
        }
        body.file-preview-open .file-preview-object,
        body.file-preview-open .file-preview-image,
        body.file-preview-open .file-preview-pdf-shell,
        body.file-preview-open .file-preview-frame,
        body.file-preview-open iframe,
        body.file-preview-open embed,
        body.file-preview-open canvas,
        body.file-preview-open img {
          display: block !important;
          margin: 0 auto !important;
          width: auto !important;
          height: auto !important;
          max-width: none !important;
          max-height: none !important;
          object-fit: initial !important;
          box-shadow: none !important;
          transform: none !important;
          zoom: 1 !important;
          page-break-inside: avoid !important;
          break-inside: avoid !important;
        }
        body.file-preview-open .file-preview-pdf-shell {
          width: auto !important;
          height: auto !important;
          overflow: visible !important;
        }
        body.file-preview-open .file-preview-frame {
          width: auto !important;
          height: auto !important;
          border: 0 !important;
        }
      }
      #page-bc .bc-detail-kpis {
        align-items: stretch;
      }
      #page-bc .bc-detail-kpis .kpi {
        height: auto;
        min-height: 104px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow: visible;
      }
      #page-bc .bc-detail-kpis .kpi-value {
        height: auto;
        min-height: 0;
        overflow: visible;
        line-height: 1.2;
      }
      #page-bc .bc-detail-kpis .bc-kpi-currency-lines {
        display: grid;
        gap: 5px;
        overflow: visible;
        white-space: nowrap;
      }
      #page-bc .bc-detail-kpis .bc-kpi-currency-lines.is-columns {
        grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
        column-gap: 16px;
        row-gap: 6px;
        align-items: start;
      }
      #page-bc .bc-detail-kpis .bc-kpi-currency-lines span {
        display: block;
        overflow: visible;
        text-overflow: clip;
      }
      #page-bc .bc-detail-kpis .bc-kpi-currency-lines .primary {
        font-size: 24px;
        font-weight: 700;
      }
      #page-bc .bc-detail-kpis .bc-kpi-currency-lines .secondary {
        font-size: 19px;
        font-weight: 650;
      }
      #page-bc .bc-detail-kpis .kpi-value.is-negative,
      #page-bc .bc-detail-kpis .bc-kpi-currency-lines .is-negative {
        color: #ef4444;
      }
      #page-bc .bc-detail-kpis .kpi-helper {
        margin-top: 8px;
        line-height: 1.35;
      }
      /* Stable sidebar layout: keep navigation independent from page scrolling. */
      html,
      body {
        height: 100%;
        overflow: hidden;
      }
      .shell {
        display: block;
        width: 100%;
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
      }
      .shell.collapsed {
        --sidebar: 76px;
      }
      .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 30;
        display: flex;
        flex-direction: column;
        width: var(--sidebar);
        height: 100vh;
        height: 100dvh;
        padding: 0 12px 14px;
        overflow: hidden;
        background: #ffffff;
        border-right: 1px solid #e5edf6;
        box-shadow: none;
        transition: width 0.18s ease, padding 0.18s ease;
      }
      .brand {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 0 0 64px;
        height: 64px;
        min-height: 64px;
        margin: 0;
        padding: 0 2px 0 8px;
      }
      .brand img {
        width: 168px;
        max-width: calc(var(--sidebar) - 72px);
        display: block;
      }
      .collapse {
        flex: 0 0 auto;
        width: 34px;
        height: 34px;
        margin-left: auto;
        border-radius: 10px;
        border: 1px solid #d7e2ef;
        background: #ffffff;
        color: #64748b;
        box-shadow: none;
      }
      .collapse:hover {
        background: #f8fafc;
        color: #1e293b;
      }
      #nav {
        flex: 1 1 auto;
        min-height: 0;
        padding: 4px 2px 18px;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
      }
      .sidebar:hover #nav {
        scrollbar-color: #cbd5e1 transparent;
      }
      #nav::-webkit-scrollbar {
        width: 6px;
      }
      #nav::-webkit-scrollbar-track {
        background: transparent;
      }
      #nav::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: transparent;
      }
      .sidebar:hover #nav::-webkit-scrollbar-thumb {
        background: #cbd5e1;
      }
      .nav-group {
        margin: 0 0 8px;
      }
      .nav-group + .nav-group {
        margin-top: 18px;
      }
      .nav-title {
        margin: 0;
        padding: 0 10px 6px;
        color: #94a3b8;
        font-size: 12px;
        font-weight: 500;
        line-height: 16px;
      }
      .nav-item {
        position: relative;
        display: flex;
        align-items: center;
        gap: 10px;
        height: 40px;
        margin: 2px 0;
        padding: 0 10px 0 14px;
        border-radius: 10px;
        background: transparent;
        color: #475569;
        font-size: 14px;
        font-weight: 500;
        line-height: 40px;
        cursor: pointer;
      }
      .nav-item:hover {
        background: #f1f5f9;
        color: #1e293b;
      }
      .nav-icon {
        display: inline-grid;
        place-items: center;
        flex: 0 0 22px;
        width: 22px;
        height: 22px;
        color: #64748b;
      }
      .nav-icon svg {
        width: 18px;
        height: 18px;
        stroke-width: 1.7;
      }
      .nav-item:hover .nav-icon {
        color: #1e293b;
      }
      .nav-item.active {
        background: #eff6ff;
        color: #2563eb;
        font-weight: 600;
      }
      .nav-item.active .nav-icon {
        color: #2563eb;
      }
      .nav-item.active::before {
        content: "";
        position: absolute;
        left: 0;
        top: 8px;
        width: 3px;
        height: 24px;
        border-radius: 999px;
        background: #2563eb;
      }
      .main {
        display: flex;
        flex-direction: column;
        min-width: 0;
        height: 100vh;
        min-height: 0;
        margin-left: var(--sidebar);
        overflow-x: hidden;
        overflow-y: auto;
        transition: margin-left 0.18s ease;
      }
      .header {
        position: sticky;
        top: 0;
        z-index: 20;
      }
      .collapsed .sidebar {
        padding-right: 10px;
        padding-left: 10px;
      }
      .collapsed .brand {
        justify-content: center;
        padding: 0;
      }
      .collapsed .brand img,
      .collapsed .nav-title,
      .collapsed .nav-label {
        display: none;
      }
      .collapsed .collapse {
        margin-left: 0;
        transform: rotate(180deg);
      }
      .collapsed .nav-group {
        margin: 0 0 8px;
      }
      .collapsed .nav-group + .nav-group {
        margin-top: 10px;
      }
      .collapsed .nav-item {
        justify-content: center;
        padding: 0;
      }
      .collapsed .nav-item.active::before {
        left: 0;
      }
      @media (max-width: 1100px) {
        .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .temporary-payee-filters {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        #page-bc .bc-detail-kpis,
        #page-bc .bc-info-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
      }
      @media (max-width: 760px) {
        .vehicle-edit-grid {
          grid-template-columns: 1fr;
        }
        .temporary-payee-edit-grid {
          grid-template-columns: 1fr;
        }
        #page-bc .bc-detail-header { display: grid; }
        #page-bc .bc-detail-actions { flex-wrap: wrap; }
        #page-bc .bc-detail-kpis,
        #page-bc .bc-info-grid {
          grid-template-columns: 1fr;
        }
      }
