@font-face {
  font-family: "Sarabun";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/sarabun/Sarabun-Light.ttf") format("truetype");
}

/* Company bank transfer report */
.company-bank-transfer-report {
  --company-transfer-primary: #0f766e;
  --company-transfer-border: #d8e2ea;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.company-transfer-filter-card {
  border: 1px solid var(--company-transfer-border);
}

.company-transfer-filter-grid {
  display: grid;
  grid-template-columns: minmax(130px, .55fr) minmax(150px, .65fr) minmax(280px, 1.8fr);
  gap: 1rem;
  align-items: end;
}

.company-transfer-advanced summary {
  color: #0f5fa8;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.company-transfer-advanced summary::-webkit-details-marker { display: none; }

.company-transfer-advanced-grid {
  display: grid;
  grid-template-columns: minmax(150px, .85fr) minmax(150px, .85fr) minmax(150px, .85fr) minmax(280px, 1.6fr);
  gap: 1rem;
  align-items: end;
}

.company-transfer-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  min-height: 1.75rem;
}

.company-transfer-chip {
  align-items: center;
  background: #eef6ff;
  border: 1px solid #bfd8f4;
  border-radius: 999px;
  color: #164e79;
  display: inline-flex;
  font-size: .78rem;
  gap: .35rem;
  padding: .3rem .65rem;
}

.company-transfer-chip button {
  background: transparent;
  border: 0;
  color: inherit;
  line-height: 1;
  padding: 0;
}

.company-transfer-state {
  align-items: center;
  border: 1px dashed #b8c8d8;
  border-radius: .75rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  justify-content: center;
  margin-top: 1rem;
  min-height: 230px;
  padding: 2rem;
  text-align: center;
}

.company-transfer-state > .ti { color: #3976b8; font-size: 2.5rem; }
.company-transfer-state-error { border-color: #efb1ad; color: #a12b24; }
.company-transfer-state-error > .ti { color: #c43c35; }

.company-transfer-kpi-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 1rem;
}

.company-transfer-kpi {
  background: #fff;
  border: 1px solid var(--company-transfer-border);
  border-left: 4px solid #64748b;
  border-radius: .65rem;
  min-width: 0;
  padding: 1rem;
}

.company-transfer-kpi span,
.company-transfer-kpi small { color: #64748b; display: block; }
.company-transfer-kpi strong { display: block; font-size: clamp(1.25rem, 2vw, 1.8rem); margin: .25rem 0; overflow-wrap: anywhere; }
.company-transfer-kpi-primary { border-left-color: var(--company-transfer-primary); }
.company-transfer-kpi-primary strong { color: var(--company-transfer-primary); }
.company-transfer-kpi-warning { border-left-color: #d97706; }
.company-transfer-kpi-warning strong { color: #a85605; }
.company-transfer-kpi-danger { border-left-color: #dc2626; }
.company-transfer-kpi-danger strong { color: #b91c1c; }

.company-transfer-bank-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.company-transfer-bank-item {
  background: linear-gradient(135deg, #f5fbff 0%, #f8fafc 100%);
  border: 1px solid #d7e7f3;
  border-radius: .65rem;
  min-width: 0;
  padding: .9rem;
}

.company-transfer-bank-heading {
  align-items: center;
  color: #334155;
  display: flex;
  gap: .45rem;
  min-width: 0;
}
.company-transfer-bank-heading span { overflow-wrap: anywhere; }
.company-transfer-bank-heading .ti { color: #3976b8; flex: 0 0 auto; font-size: 1.2rem; }
.company-transfer-bank-meta { color: #64748b; display: block; margin-top: .3rem; overflow-wrap: anywhere; }
.company-transfer-bank-item strong { color: #0f766e; display: block; font-size: 1.2rem; margin-top: .45rem; }

.company-transfer-breakdown-grid {
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.company-transfer-breakdown-item,
.company-transfer-branch-item {
  background: #f7fafc;
  border: 1px solid #e3eaf0;
  border-radius: .55rem;
  min-width: 0;
  padding: .75rem;
}

.company-transfer-breakdown-item strong,
.company-transfer-branch-item strong { color: #0f766e; display: block; font-size: 1.05rem; }
.company-transfer-branch-breakdown { display: grid; gap: .5rem; max-height: 250px; overflow-y: auto; }
.company-transfer-branch-item { display: flex; gap: .75rem; justify-content: space-between; }

.company-transfer-table { table-layout: fixed; width: 100%; }
.company-transfer-desktop-table { overflow-x: clip; }
.company-transfer-table th:nth-child(1) { width: 16%; }
.company-transfer-table th:nth-child(2) { width: 11%; }
.company-transfer-table th:nth-child(3) { width: 16%; }
.company-transfer-table th:nth-child(4) { width: 18%; }
.company-transfer-table th:nth-child(5) { width: 12%; }
.company-transfer-table th:nth-child(6) { width: 27%; }
.company-transfer-table td { overflow-wrap: anywhere; vertical-align: top; }

.company-transfer-sort,
.bank-statement-date-sort,
.bank-reconciliation-date-sort,
.bank-income-date-sort {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  display: inline-flex;
  font: inherit;
  font-weight: 600;
  gap: .35rem;
  padding: .15rem 0;
}

.company-transfer-sort:focus-visible,
.bank-statement-date-sort:focus-visible,
.bank-reconciliation-date-sort:focus-visible,
.bank-income-date-sort:focus-visible { outline: 2px solid #206bc4; outline-offset: 3px; }
.company-transfer-cell-primary { color: #182433; font-weight: 600; }
.company-transfer-cell-secondary { color: #667382; display: block; font-size: .78rem; margin-top: .2rem; }
.company-transfer-money { color: #047857; font-size: 1rem; font-weight: 700; white-space: nowrap; }

.company-transfer-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.company-transfer-note {
  background: #fff7ed;
  border-left: 3px solid #f59e0b;
  color: #92400e;
  display: block;
  font-size: .76rem;
  margin-top: .4rem;
  padding: .3rem .45rem;
}
.company-transfer-note-danger { background: #fef2f2; border-left-color: #dc2626; color: #991b1b; }

.company-transfer-mobile-list { padding: .75rem; }
.company-transfer-mobile-card {
  border: 1px solid var(--company-transfer-border);
  border-radius: .65rem;
  margin-bottom: .75rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: .85rem;
}
.company-transfer-mobile-card:last-child { margin-bottom: 0; }
.company-transfer-mobile-header { align-items: flex-start; display: flex; gap: .75rem; justify-content: space-between; }
.company-transfer-mobile-grid { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; margin-top: .75rem; }
.company-transfer-mobile-grid > div { min-width: 0; }

.company-transfer-pager { align-items: center; display: flex; gap: 1rem; justify-content: space-between; }

@media (max-width: 991.98px) {
  .company-transfer-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-transfer-bank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1199.98px) and (min-width: 768px) {
  .company-transfer-advanced-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-transfer-keyword-filter { grid-column: span 2; }
}

@media (max-width: 767.98px) {
  .company-transfer-filter-grid,
  .company-transfer-advanced-grid,
  .company-transfer-breakdown-grid,
  .company-transfer-bank-grid { grid-template-columns: 1fr; }
  .company-transfer-kpi-grid { grid-template-columns: 1fr; }
  .company-transfer-mobile-grid { grid-template-columns: 1fr; }
  .company-transfer-pager { gap: .5rem; }
  .company-transfer-pager .btn { min-width: 0; }
}

/* Bank income report (Bank Reconciliation Phase 3) */
.bank-income-report-page {
    --bank-income-primary: #0f5e9c;
    --bank-income-border: #dbe5ef;
    padding-bottom: 2rem;
}

.bank-income-filter-card {
    border-color: var(--bank-income-border);
    box-shadow: 0 10px 28px rgba(15, 94, 156, .06);
}

.bank-income-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr)) minmax(240px, 1.4fr);
    gap: 1rem;
    align-items: end;
}

.bank-income-advanced summary {
    color: var(--bank-income-primary);
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    width: max-content;
}

.bank-income-advanced summary::-webkit-details-marker {
    display: none;
}

.bank-income-advanced-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: 1rem;
}

.bank-income-empty-state {
    min-height: 330px;
    margin-top: 1rem;
    border: 1px dashed #b8cce0;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff, #f8fbfe);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.bank-income-empty-state h3 {
    margin: 1rem 0 .35rem;
    font-size: 1.15rem;
}

.bank-income-empty-state p {
    color: #68798a;
    max-width: 680px;
    margin: 0;
}

.bank-income-empty-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--bank-income-primary);
    background: #e8f2fc;
    font-size: 2rem;
}

.bank-income-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(165px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.bank-income-kpi {
    border: 1px solid var(--bank-income-border);
    border-radius: 12px;
    background: #fff;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-shadow: 0 8px 22px rgba(31, 50, 68, .05);
}

.bank-income-kpi span,
.bank-income-kpi small {
    color: #667788;
}

.bank-income-kpi strong {
    margin-top: .4rem;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.bank-income-kpi-primary strong { color: #0f5e9c; }
.bank-income-kpi-success strong { color: #168249; }
.bank-income-kpi-warning strong { color: #c77900; }
.bank-income-kpi-danger strong { color: #c23b3b; }

.bank-income-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.bank-income-group-select {
    width: min(260px, 100%);
}

.bank-income-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.bank-income-source-card,
.bank-income-attachment {
    border: 1px solid #dce5ee;
    border-radius: 10px;
    padding: .8rem;
    margin-bottom: .65rem;
    background: #fff;
}

.bank-income-source-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .25rem 1rem;
}

.bank-income-source-card span {
    grid-column: 1;
    color: #667788;
    overflow-wrap: anywhere;
}

.bank-income-source-card b {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    color: #168249;
}

.bank-income-attachment {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.bank-income-attachment strong,
.bank-income-attachment small {
    display: block;
    overflow-wrap: anywhere;
}

.bank-income-attachment small {
    color: #667788;
}

@media (max-width: 1199.98px) {
    .bank-income-filter-grid {
        grid-template-columns: repeat(3, minmax(170px, 1fr));
    }

    .bank-income-keyword-filter {
        grid-column: span 2;
    }

    .bank-income-advanced-grid {
        grid-template-columns: repeat(3, minmax(170px, 1fr));
    }

    .bank-income-kpi-grid {
        grid-template-columns: repeat(3, minmax(170px, 1fr));
    }
}

@media (max-width: 767.98px) {
    .bank-income-filter-grid,
    .bank-income-advanced-grid,
    .bank-income-kpi-grid {
        grid-template-columns: 1fr;
    }

    .bank-income-keyword-filter {
        grid-column: auto;
    }

    .bank-income-view-header {
        align-items: stretch;
        flex-direction: column;
    }

    .bank-income-group-select {
        width: 100%;
    }

    .bank-income-pager .btn {
        min-height: 42px;
    }

    .bank-income-source-card {
        display: flex;
        flex-direction: column;
    }
}

.transaction-detail-action {
    gap: 0.35rem;
    align-items: center;
    white-space: nowrap;
    justify-content: center;
    max-width: 100%;
}

.transaction-detail-action .transaction-detail-action-text {
    display: inline-block;
}

.transaction-detail-action .transaction-detail-action-count {
    font-weight: 700;
    line-height: 1;
}

.transaction-payment-channel-summary {
    display: block;
    min-width: 0;
    color: var(--tblr-secondary, #667085);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

.transaction-payment-channel-summary.is-empty {
    color: var(--tblr-secondary, #667085);
    font-weight: 600;
}

.transaction-payment-channel-token {
    font-weight: 800;
}

.transaction-payment-channel-token.is-cash {
    color: #18794e;
}

.transaction-payment-channel-token.is-transfer {
    color: #1558a8;
}

.transaction-payment-channel-token.is-credit {
    color: #7048b8;
}

.transaction-payment-channel-token.is-company {
    color: #b54708;
}

.transaction-payment-channel-separator,
.transaction-payment-channel-bracket {
    color: var(--tblr-secondary, #667085);
}

.transaction-payment-channel-bracket.is-transfer {
    color: #d63939;
    font-weight: 900;
}

.lyy-transaction-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.lyy-transaction-detail-meta-item {
    border: 1px solid var(--tblr-border-color, #dce3ec);
    border-radius: 8px;
    padding: 0.75rem;
    background: var(--tblr-bg-surface-secondary, #f8fafc);
    min-width: 0;
}

.lyy-transaction-detail-meta-detail {
    margin-top: 0.25rem;
    color: var(--tblr-secondary, #667085);
    font-size: 0.75rem;
    line-height: 1.35;
}

.lyy-transaction-detail-meta.part-receipt-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.part-receipt-detail-meta .lyy-transaction-detail-meta-item {
    flex: 0 1 auto;
}

.part-receipt-detail-meta .part-receipt-detail-meta-card--count {
    min-width: 9rem;
}

.part-receipt-detail-meta .part-receipt-detail-meta-card--invoice {
    min-width: 10rem;
    max-width: 18rem;
}

.part-receipt-detail-meta .part-receipt-detail-meta-card--amount {
    min-width: 10.5rem;
}

.part-receipt-detail-meta .part-receipt-detail-meta-card--amount > .fw-semibold {
    white-space: nowrap;
}

.transaction-detail-table-wrap {
    max-width: 100%;
}

.lyy-transaction-detail-table {
    table-layout: auto;
    width: 100%;
}

.lyy-transaction-detail-table th,
.lyy-transaction-detail-table td {
    white-space: normal;
    vertical-align: top;
}

.transaction-detail-empty,
.transaction-detail-loading {
    border: 1px dashed var(--tblr-border-color, #dce3ec);
    border-radius: 8px;
    padding: 1rem;
    color: var(--tblr-secondary, #667085);
    background: var(--tblr-bg-surface-secondary, #f8fafc);
}

#inoutPage {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

#inoutPage .inout-summary-row .card {
    min-height: 88px;
}

#inoutPage .inout-search-panel .inout-category-field {
    flex: 1 1 230px;
    min-width: 220px;
}

#inoutPage .grid-shell {
    max-width: 100%;
    overflow-x: clip;
}

#inoutPage .gridjs-wrapper,
#inoutPage .inout-native-table-wrap {
    max-width: 100%;
    overflow-x: visible;
}

#inoutPage .inout-grid-table {
    table-layout: fixed;
    width: 100%;
    min-width: 0;
}

#inoutPage .inout-grid-table th,
#inoutPage .inout-grid-table td {
    vertical-align: top;
    font-size: 0.875rem;
    line-height: 1.35;
    padding: 0.65rem 0.75rem;
}

#inoutPage .inout-grid-table th {
    white-space: nowrap;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
}

#inoutPage .inout-grid-table td {
    white-space: normal;
}

#inoutPage .inout-grid-table .gridjs-th-content {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

#inoutPage .inout-grid-table .gridjs-td:nth-child(3),
#inoutPage .inout-grid-table .gridjs-td:nth-child(4),
#inoutPage .inout-grid-table .gridjs-td:nth-child(5) {
    overflow-wrap: anywhere;
}

#inoutPage .inout-grid-table .gridjs-td:nth-child(6),
#inoutPage .inout-grid-table .gridjs-td:nth-child(7),
#inoutPage .inout-grid-table .gridjs-td:nth-child(8) {
    white-space: nowrap;
}

#inoutPage .inout-grid-detail {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #334155;
    max-width: 100%;
}

#inoutPage .inout-open-action {
    min-width: 34px;
    justify-content: center;
}

#inoutPage .inout-date-doc-cell {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    min-width: 0;
}

#inoutPage .inout-expand-action {
    flex: 0 0 auto;
    margin-top: -0.15rem;
}

#inoutPage .inout-cashflow-cell {
    display: grid;
    gap: 0.2rem;
}

#inoutPage .inout-cashflow-cell > div {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

#inoutPage .gridjs-tbody > tr:not(.inout-expanded-row),
#inoutPage .inout-native-table-wrap tbody > tr:not(.inout-expanded-row) {
    cursor: pointer;
}

#inoutPage .inout-expanded-row > td {
    padding: 0 !important;
    background: #f8fafc;
    white-space: normal !important;
}

#inoutPage .inout-expanded-panel {
    padding: 0.85rem 1rem 1rem 2.75rem;
    border-top: 2px solid rgba(32, 107, 196, 0.18);
    border-bottom: 1px solid var(--tblr-border-color, #dce3ec);
}

#inoutPage .inout-expanded-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.65rem;
}

#inoutPage .inout-expanded-list {
    display: grid;
    gap: 0.45rem;
}

#inoutPage .inout-expanded-line {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) minmax(100px, auto);
    gap: 0.75rem;
    align-items: start;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--tblr-border-color, #dce3ec);
    border-radius: 8px;
    background: #fff;
}

#inoutPage .inout-expanded-line-no {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: #e9f2ff;
    color: #206bc4;
    font-weight: 700;
}

#inoutPage .inout-expanded-line-main {
    min-width: 0;
    overflow-wrap: anywhere;
}

#inoutPage .inout-expanded-line-amount {
    display: grid;
    justify-items: end;
    gap: 0.35rem;
    white-space: nowrap;
}

#inoutPage .gridjs-th {
    padding-right: 1.35rem;
}

#inoutPage .gridjs-sort {
    width: 0.75rem;
    height: 0.75rem;
    right: 0.35rem;
    opacity: 0.52;
    transform: scale(0.72);
}

#inoutPage .gridjs-search {
    display: none;
}

.inout-modal-body {
    background: #f8fafc;
}

.inout-entry-card {
    border: 1px solid var(--tblr-border-color, #dce3ec);
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
}

.inout-entry-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.inout-entry-card .form-label {
    font-weight: 600;
}

.inout-line-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.inout-line-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--tblr-border-color, #dce3ec);
    border-radius: 8px;
    background: #fff;
}

.inout-line-summary-item-income {
    border-left: 4px solid #2fb344;
    background: #f2fbf4;
}

.inout-line-summary-item-expense {
    border-left: 4px solid #d63939;
    background: #fff5f5;
}

.inout-line-summary-item-net {
    border-left: 4px solid #206bc4;
    background: #f1f6fd;
}

.inout-line-summary-label {
    color: #334155;
    font-weight: 600;
}

.inout-line-summary-hint {
    margin-top: 0.1rem;
    color: #64748b;
    font-size: 0.75rem;
}

.inout-line-summary-value {
    flex: 0 0 auto;
    color: #1e293b;
    font-size: 1.05rem;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.inout-line-summary-value.is-positive {
    color: #15803d;
}

.inout-line-summary-value.is-negative {
    color: #c2410c;
}

.inout-line-summary-value.is-zero {
    color: #475569;
}

@media (max-width: 767.98px) {
    #inoutPage .inout-search-panel .inout-category-field {
        min-width: 0;
    }

    #inoutPage .gridjs-wrapper {
        border: 0;
    }

    #inoutPage .inout-grid-table,
    #inoutPage .inout-grid-table tbody {
        display: block;
        width: 100%;
    }

    #inoutPage .inout-grid-table thead {
        display: none;
    }

    #inoutPage .inout-grid-table tbody > tr:not(.inout-expanded-row) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        margin: 0.75rem;
        border: 1px solid var(--tblr-border-color, #dce3ec);
        border-radius: 10px;
        overflow: hidden;
        background: #fff;
    }

    #inoutPage .inout-grid-table tbody > tr:not(.inout-expanded-row) > td {
        display: block;
        width: 100%;
        min-width: 0;
        border: 0;
        padding: 0.5rem 0.75rem;
    }

    #inoutPage .inout-grid-table tbody > tr:not(.inout-expanded-row) > td:nth-child(3),
    #inoutPage .inout-grid-table tbody > tr:not(.inout-expanded-row) > td:nth-child(4),
    #inoutPage .inout-grid-table tbody > tr:not(.inout-expanded-row) > td:nth-child(5),
    #inoutPage .inout-grid-table tbody > tr:not(.inout-expanded-row) > td:nth-child(6) {
        grid-column: 1 / -1;
    }

    #inoutPage .inout-grid-table tbody > tr:not(.inout-expanded-row) > td:nth-child(n+2)::before {
        display: block;
        margin-bottom: 0.15rem;
        color: #64748b;
        font-size: 0.72rem;
        font-weight: 600;
    }

    #inoutPage .inout-grid-table tbody > tr:not(.inout-expanded-row) > td:nth-child(2)::before { content: 'สาขา'; }
    #inoutPage .inout-grid-table tbody > tr:not(.inout-expanded-row) > td:nth-child(3)::before { content: 'หมวด'; }
    #inoutPage .inout-grid-table tbody > tr:not(.inout-expanded-row) > td:nth-child(4)::before { content: 'รายละเอียด'; }
    #inoutPage .inout-grid-table tbody > tr:not(.inout-expanded-row) > td:nth-child(5)::before { content: 'จ่ายให้ / รับจาก'; }
    #inoutPage .inout-grid-table tbody > tr:not(.inout-expanded-row) > td:nth-child(6)::before { content: 'ค่าใช้จ่าย / รายได้'; }
    #inoutPage .inout-grid-table tbody > tr:not(.inout-expanded-row) > td:nth-child(7)::before { content: 'สถานะ'; }

    #inoutPage .inout-expanded-row {
        display: block;
        margin: -0.75rem 0.75rem 0.75rem;
    }

    #inoutPage .inout-expanded-row > td {
        display: block;
        width: 100%;
    }

    #inoutPage .inout-expanded-panel {
        padding: 0.75rem;
    }

    #inoutPage .inout-expanded-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }

    #inoutPage .inout-expanded-line {
        grid-template-columns: 2rem minmax(0, 1fr);
    }

    #inoutPage .inout-expanded-line-amount {
        grid-column: 2;
        justify-items: start;
        grid-auto-flow: column;
        align-items: center;
    }

    .inout-entry-card-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .inout-line-summary {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 575.98px) {
    .transaction-detail-action {
        min-height: 44px;
        width: 100%;
        justify-content: center;
    }

    .lyy-transaction-detail-meta {
        grid-template-columns: 1fr;
    }

    .lyy-transaction-detail-meta.part-receipt-detail-meta {
        display: grid;
        grid-template-columns: 1fr;
    }

    .part-receipt-detail-meta .lyy-transaction-detail-meta-item {
        min-width: 0;
        max-width: none;
    }
}

@font-face {
  font-family: "Sarabun";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/sarabun/Sarabun-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Sarabun";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/sarabun/Sarabun-Medium.ttf") format("truetype");
}

@font-face {
  font-family: "Sarabun";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/sarabun/Sarabun-SemiBold.ttf") format("truetype");
}

@font-face {
  font-family: "Sarabun";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/sarabun/Sarabun-Bold.ttf") format("truetype");
}

html {
  font-size: 14px;
  font-family: "Sarabun", "TH Sarabun New", "Leelawadee UI", system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root {
  --tblr-font-sans-serif: "Sarabun", "TH Sarabun New", "Leelawadee UI", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-font-family: "Sarabun", "TH Sarabun New", "Leelawadee UI", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Profit Report: lazy net-profit view */
#profitReportPage {
  max-width: 100%;
  overflow-x: hidden;
}

#profitReportPage > *,
#profitReportPage .vehicle-movement-view-panel,
#profitReportPage .profit-net-panel,
#profitReportPage .profit-net-content {
  min-width: 0;
  max-width: 100%;
}

#profitReportPage .vehicle-movement-kpi-strip {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

#profitReportPage .profit-net-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 190px;
  padding: 32px 18px;
  border: 1px dashed #b6c6d8;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
}

#profitReportPage .profit-net-state strong {
  color: #0f172a;
  font-size: 1rem;
}

#profitReportPage .profit-net-state-icon {
  display: grid;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 24px;
  place-items: center;
}

#profitReportPage .profit-net-state-error {
  border-color: #fecaca;
  background: #fff7f7;
}

#profitReportPage .profit-net-state-error .profit-net-state-icon {
  background: #fee2e2;
  color: #b91c1c;
}

#profitReportPage .profit-net-incomplete-badge {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 10px;
  padding: 7px 10px;
  border: 1px solid #f4cf73;
  border-radius: 999px;
  background: #fff7d6;
  color: #854d0e;
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

#profitReportPage .profit-net-table-shell {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
}

#profitReportPage .profit-net-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

#profitReportPage .profit-net-col-sequence { width: 4%; }
#profitReportPage .profit-net-col-sale { width: 13%; }
#profitReportPage .profit-net-col-type { width: 14%; }
#profitReportPage .profit-net-col-vehicle { width: 15%; }
#profitReportPage .profit-net-col-cost { width: 14%; }
#profitReportPage .profit-net-col-vat { width: 11%; }
#profitReportPage .profit-net-col-trade { width: 14%; }
#profitReportPage .profit-net-col-result { width: 15%; }

#profitReportPage .profit-net-table th {
  white-space: normal;
  line-height: 1.25;
}

#profitReportPage .profit-net-table th,
#profitReportPage .profit-net-table td {
  min-width: 0;
  padding: 0.5rem 0.38rem;
  overflow: hidden;
}

#profitReportPage .profit-net-cell-lines {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#profitReportPage .profit-net-cell-line {
  display: flex;
  min-width: 0;
  min-height: 1.45rem;
  align-items: center;
  gap: 0.3rem;
  overflow: hidden;
  color: #0f172a;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profitReportPage .profit-net-cell-line > * {
  min-width: 0;
}

#profitReportPage .profit-net-cell-line-secondary {
  padding: 0.12rem 0.28rem;
  border-radius: 4px;
  background: #eef6ff;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 600;
}

#profitReportPage .profit-net-cell-lines-end .profit-net-cell-line {
  justify-content: space-between;
}

#profitReportPage .profit-net-line-label {
  flex: 0 1 auto;
  overflow: hidden;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profitReportPage .profit-net-cell-line-secondary .profit-net-line-label {
  color: #2563eb;
}

#profitReportPage .profit-net-cell-line strong {
  flex: 0 0 auto;
  font-weight: 800;
}

#profitReportPage .profit-net-number,
#profitReportPage .profit-net-card-values dd,
#profitReportPage .profit-net-detail-amount strong,
#profitReportPage .profit-net-detail-item-values,
#profitReportPage .profit-net-equation {
  font-variant-numeric: tabular-nums;
}

#profitReportPage .profit-net-number {
  font-variant-numeric: tabular-nums;
}

#profitReportPage .profit-net-total-cell {
  font-variant-numeric: tabular-nums;
}

#profitReportPage .profit-net-result-label,
#profitReportPage .profit-net-total-cell strong {
  display: inline;
}

#profitReportPage .profit-net-result-label {
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profitReportPage .profit-net-total-cell .btn-icon {
  width: 1.65rem;
  height: 1.65rem;
  min-height: 1.65rem;
  flex: 0 0 1.65rem;
  padding: 0;
}

#profitReportPage .profit-net-row-loss > td {
  background: #fff8f8;
}

#profitReportPage .profit-net-row-incomplete > td:first-child {
  box-shadow: inset 4px 0 0 #d97706;
}

#profitReportPage .profit-net-card-list {
  display: none;
}

#profitReportPage .profit-net-details-drawer {
  width: min(720px, 100vw);
  max-width: 100vw;
}

#profitReportPage .profit-net-details-drawer:focus {
  outline: none;
}

#profitReportPage .profit-net-details-drawer .report-detail-drawer-body {
  padding-right: max(18px, 6.5rem);
  padding-bottom: max(18px, 7rem);
  overflow-x: hidden;
  scroll-padding: 18px 6.5rem 7rem 18px;
}

#profitReportPage .profit-net-details-drawer .btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

#profitReportPage .profit-net-detail-section {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #fff;
}

#profitReportPage .profit-net-detail-section h4 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 800;
}

#profitReportPage .profit-net-gross-formula {
  padding: 10px;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  background: #eff6ff;
}

#profitReportPage .profit-net-gross-formula p {
  overflow-wrap: anywhere;
}

#profitReportPage .profit-net-detail-grid,
#profitReportPage .profit-net-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#profitReportPage .profit-net-detail-field {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}

#profitReportPage .profit-net-detail-field span,
#profitReportPage .profit-net-detail-field strong {
  display: block;
}

#profitReportPage .profit-net-detail-field span {
  margin-bottom: 4px;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
}

#profitReportPage .profit-net-detail-field strong {
  color: #0f172a;
  overflow-wrap: anywhere;
}

#profitReportPage .profit-net-detail-amount strong {
  text-align: right;
  white-space: nowrap;
}

#profitReportPage .profit-net-detail-item-list {
  display: grid;
  gap: 8px;
}

#profitReportPage .profit-net-detail-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}

#profitReportPage .profit-net-detail-item strong,
#profitReportPage .profit-net-detail-item small,
#profitReportPage .profit-net-detail-item-values span {
  display: block;
}

#profitReportPage .profit-net-detail-item small,
#profitReportPage .profit-net-detail-item-values span {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.76rem;
}

#profitReportPage .profit-net-detail-item-values {
  text-align: right;
  white-space: nowrap;
}

#profitReportPage .profit-net-detail-empty {
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
}

#profitReportPage .profit-net-detail-complete {
  margin-top: 10px;
  background: #ecfdf5;
  color: #047857;
}

#profitReportPage .profit-net-equation {
  background: #f8fbff;
}

#profitReportPage .profit-net-equation > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 1rem;
}

#profitReportPage .profit-net-equation > div strong {
  font-size: 1.2rem;
}

#profitReportPage .profit-net-equation small {
  display: block;
  margin-top: 8px;
  color: #64748b;
}

#profitReportPage .profit-net-warning-list {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 1.25rem;
  color: #92400e;
}

@media (max-width: 1199.98px) {
  #profitReportPage .profit-net-priority-low {
    display: none;
  }
}

@media (max-width: 767.98px) {
  #profitReportPage .vehicle-movement-view-bar .btn-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  #profitReportPage .vehicle-movement-view-bar .btn-group .btn {
    min-width: 0;
    border-radius: 6px;
  }

  #profitReportPage .vehicle-movement-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #profitReportPage .profit-net-table-shell {
    display: none;
  }

  #profitReportPage .profit-net-card-list {
    display: grid;
    gap: 10px;
  }

  #profitReportPage .profit-net-card {
    min-width: 0;
    padding: 12px;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  }

  #profitReportPage .profit-net-card-incomplete {
    border-left: 4px solid #d97706;
  }

  #profitReportPage .profit-net-card-loss {
    background: #fffafa;
  }

  #profitReportPage .profit-net-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  #profitReportPage .profit-net-card-header > div:first-child {
    min-width: 0;
  }

  #profitReportPage .profit-net-card-header strong,
  #profitReportPage .profit-net-card-header small,
  #profitReportPage .profit-net-card-sequence {
    display: block;
    overflow-wrap: anywhere;
  }

  #profitReportPage .profit-net-card-sequence,
  #profitReportPage .profit-net-card-header small,
  #profitReportPage .profit-net-card-identity {
    color: #64748b;
    font-size: 0.76rem;
  }

  #profitReportPage .profit-net-card-identity {
    margin-top: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eef2f7;
  }

  #profitReportPage .profit-net-card-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 10px 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #e2e8f0;
  }

  #profitReportPage .profit-net-card-values > div {
    min-width: 0;
    padding: 8px;
    background: #f8fafc;
  }

  #profitReportPage .profit-net-card-values dt {
    color: #64748b;
    font-size: 0.7rem;
  }

  #profitReportPage .profit-net-card-values dd {
    margin: 3px 0 0;
    color: #0f172a;
    font-weight: 800;
    overflow-wrap: anywhere;
  }

  #profitReportPage .profit-net-card-values .profit-net-card-total {
    grid-column: 1 / -1;
    background: #eff6ff;
  }

  #profitReportPage .vehicle-movement-pager {
    flex-wrap: wrap;
    justify-content: center;
  }

  #profitReportPage .profit-net-details-drawer .report-detail-drawer-header {
    padding: 14px;
  }

  #profitReportPage .profit-net-details-drawer .report-detail-drawer-body {
    padding: 14px 14px 7rem;
    scroll-padding: 14px 14px 7rem;
  }

  #profitReportPage .profit-net-detail-grid,
  #profitReportPage .profit-net-detail-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  #profitReportPage .profit-net-detail-item {
    grid-template-columns: minmax(0, 1fr);
  }

  #profitReportPage .profit-net-detail-item-values {
    text-align: left;
  }
}

@media (max-width: 420px) {
  #profitReportPage .vehicle-movement-kpi-strip,
  #profitReportPage .profit-net-card-values {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Persistent overdue pre-sale CRM alert */
.crm-lead-overdue-alert {
  position: fixed;
  right: 110px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 1070;
  width: min(440px, calc(100vw - 132px));
  max-height: min(70vh, 620px);
  overflow: hidden;
  border: 1px solid #f1b7b7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(91, 33, 33, 0.24);
}

.crm-lead-overdue-alert-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.85rem;
  border-bottom: 1px solid #f6d6d6;
  background: linear-gradient(135deg, #fff3f3 0%, #fff 100%);
}

.crm-lead-overdue-alert-icon {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #d63939;
  color: #fff;
  font-size: 1.15rem;
}

.crm-lead-overdue-alert-heading {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  line-height: 1.35;
}

.crm-lead-overdue-alert-heading strong {
  color: #8f1d1d;
  font-size: 0.98rem;
}

.crm-lead-overdue-alert-heading span {
  color: #667085;
  font-size: 0.78rem;
}

.crm-lead-overdue-alert-close {
  flex: 0 0 auto;
}

.crm-lead-overdue-alert-error {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid #f6d6d6;
  background: #fff4f4;
  font-size: 0.8rem;
}

.crm-lead-overdue-alert-list {
  max-height: min(52vh, 480px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.crm-lead-overdue-alert-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid #edf0f4;
}

.crm-lead-overdue-alert-item:last-child {
  border-bottom: 0;
}

.crm-lead-overdue-alert-item-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.25rem;
}

.crm-lead-overdue-group {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: #ffeded;
  color: #a61e1e;
  padding: 0.12rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-lead-overdue-alert-item-main strong {
  overflow-wrap: anywhere;
  color: #1f2937;
}

.crm-lead-overdue-contact,
.crm-lead-overdue-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0.25rem 0.65rem;
  color: #667085;
  font-size: 0.76rem;
}

.crm-lead-overdue-contact span,
.crm-lead-overdue-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.crm-lead-overdue-contact i {
  margin-right: 0.2rem;
  color: #a61e1e;
}

.crm-lead-overdue-meta span:first-child {
  color: #b42318;
  font-weight: 700;
}

.crm-lead-overdue-alert-action {
  display: flex;
  max-width: 9rem;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.crm-lead-overdue-action-reason {
  color: #667085;
  font-size: 0.7rem;
  line-height: 1.3;
  text-align: right;
}

@media (max-width: 767.98px) {
  .crm-lead-overdue-alert {
    right: 12px;
    bottom: calc(94px + env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 112px - env(safe-area-inset-bottom));
  }

  .crm-lead-overdue-alert-list {
    max-height: calc(100dvh - 220px - env(safe-area-inset-bottom));
  }
}

@media (max-width: 399.98px) {
  .crm-lead-overdue-alert-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .crm-lead-overdue-alert-action {
    max-width: none;
    align-items: stretch;
  }

  .crm-lead-overdue-action-reason {
    text-align: left;
  }
}

/* Shared source-document tax panel (Phase 20). */
.tax-source-panel {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd8e8;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  overflow: hidden;
}

.tax-source-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding: 0.85rem 1rem;
  background: #f7f9fc;
}

.tax-source-panel__title-group,
.tax-source-panel__header-actions,
.tax-source-panel__section-heading,
.tax-source-panel__actions,
.tax-source-panel__loading {
  display: flex;
  align-items: center;
}

.tax-source-panel__title-group {
  min-width: 0;
  gap: 0.75rem;
}

.tax-source-panel__icon {
  display: inline-flex;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e5f3ea;
  color: #16813f;
  font-size: 1.25rem;
}

.tax-source-panel__title {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

.tax-source-panel__summary {
  margin: 0;
  color: #56657a;
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.tax-source-panel__header-actions {
  flex: 0 0 auto;
  gap: 0.55rem;
}

.tax-source-panel__body {
  border-top: 1px solid #dce4ef;
}

.tax-source-panel__feedback,
.tax-source-panel__section,
.tax-source-panel__history {
  padding: 1rem;
}

.tax-source-panel__feedback:empty {
  display: none;
}

.tax-source-panel__loading {
  gap: 0.5rem;
  color: #43546a;
}

.tax-source-panel__section + .tax-source-panel__section,
.tax-source-panel__amounts,
.tax-source-panel__missing,
.tax-source-panel__actions,
.tax-source-panel__history {
  border-top: 1px solid #e2e8f0;
}

.tax-source-panel__section legend,
.tax-source-panel__section h4,
.tax-source-panel__missing h4 {
  margin: 0;
  color: #183b62;
  font-size: 0.95rem;
  font-weight: 700;
}

.tax-source-panel__intent > .form-hint {
  margin-bottom: 0.85rem;
}

.tax-source-panel__intent-grid,
.tax-source-panel__intent-amounts {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.tax-source-panel__intent-grid > div,
.tax-source-panel__intent-amounts > div {
  min-width: 0;
}

.tax-source-panel__intent-amounts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 0.85rem;
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  background: #f8fafc;
}

.tax-source-panel__intent-amounts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
}

.tax-source-panel__intent-amounts > div + div {
  border-left: 1px solid #dce4ef;
}

.tax-source-panel__intent-amounts span {
  color: #66758a;
  font-size: 0.82rem;
}

.tax-source-panel__intent-amounts strong {
  color: #183b62;
  font-size: 1rem;
  white-space: nowrap;
}

.tax-source-panel__intent-reason {
  margin-top: 0.85rem;
}

.tax-source-panel__intent-recipient {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.tax-source-panel__intent-recipient > div {
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  background: #fff;
}

.tax-source-panel__intent-recipient span,
.tax-source-panel__intent-recipient strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.tax-source-panel__intent-recipient span {
  color: #66758a;
  font-size: 0.78rem;
}

.tax-source-panel__intent-recipient strong {
  margin-top: 0.2rem;
  color: #183b62;
  font-size: 0.88rem;
}

.tax-source-panel__intent-gaps {
  margin-top: 0.85rem;
}

.tax-source-panel__intent input:disabled,
.tax-source-panel__intent select:disabled,
.tax-source-panel__intent textarea:disabled {
  color: #56657a;
  background: #f1f5f9;
  opacity: 1;
}

.tax-source-panel__section-heading {
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.tax-source-panel__timing-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0 0.5rem;
}

.tax-source-panel__choice {
  display: flex;
  min-width: 0;
  min-height: 76px;
  align-items: flex-start;
  gap: 0.65rem;
  border: 1px solid #d6dfeb;
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
}

.tax-source-panel__choice:has(input:checked) {
  border-color: #206bc4;
  background: #eef6ff;
}

.tax-source-panel__choice input {
  flex: 0 0 auto;
  margin-top: 0.2rem;
}

.tax-source-panel__choice span,
.tax-source-panel__choice small {
  display: block;
  min-width: 0;
}

.tax-source-panel__choice small {
  margin-top: 0.2rem;
  color: #66758a;
  line-height: 1.4;
}

.tax-source-panel__details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  margin: 0;
}

.tax-source-panel__details div,
.tax-source-panel__details dd {
  min-width: 0;
}

.tax-source-panel__details dt {
  margin-bottom: 0.25rem;
  color: #6a7788;
  font-size: 0.8rem;
  font-weight: 600;
}

.tax-source-panel__details dd {
  margin: 0;
  color: #182433;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.tax-source-panel__detail-wide {
  grid-column: span 2;
}

.tax-source-panel__amounts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #f8fafc;
}

.tax-source-panel__amounts div {
  min-width: 0;
  padding: 0.85rem 1rem;
}

.tax-source-panel__amounts div + div {
  border-left: 1px solid #e2e8f0;
}

.tax-source-panel__amounts span,
.tax-source-panel__amounts strong {
  display: block;
}

.tax-source-panel__amounts span {
  color: #68778b;
  font-size: 0.8rem;
}

.tax-source-panel__amounts strong {
  margin-top: 0.2rem;
  color: #0f5132;
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.tax-source-panel__missing {
  padding: 0.9rem 1rem;
  background: #fff8e6;
  color: #7a4c00;
}

.tax-source-panel__missing ul {
  margin: 0.55rem 0 0;
  padding-left: 1.25rem;
}

.tax-source-panel__actions {
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
}

.tax-source-panel__documents {
  margin-top: 0.6rem;
  border-top: 1px solid #e2e8f0;
}

.tax-source-panel__document {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(120px, auto);
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.tax-source-panel__document div:first-child span,
.tax-source-panel__history li span,
.tax-source-panel__history li small {
  display: block;
  color: #66758a;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.tax-source-panel__document-amount {
  text-align: right;
  font-weight: 700;
}

.tax-source-panel__history summary {
  color: #183b62;
  font-weight: 700;
  cursor: pointer;
}

.tax-source-panel__history ol {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.tax-source-panel__history li + li {
  margin-top: 0.65rem;
}

@media (max-width: 991.98px) {
  .tax-source-panel__details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .tax-source-panel__header,
  .tax-source-panel__section-heading {
    align-items: flex-start;
  }

  .tax-source-panel__header {
    flex-direction: column;
  }

  .tax-source-panel__header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .tax-source-panel__timing-options,
  .tax-source-panel__details,
  .tax-source-panel__amounts,
  .tax-source-panel__document {
    grid-template-columns: minmax(0, 1fr);
  }

  .tax-source-panel__detail-wide {
    grid-column: auto;
  }

  .tax-source-panel__amounts div + div {
    border-top: 1px solid #e2e8f0;
    border-left: 0;
  }

  .tax-source-panel__section-heading {
    flex-direction: column;
  }

  .tax-source-panel__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .tax-source-panel__document-amount {
    text-align: left;
  }
}

body.tax-issue-review-open {
  overflow: hidden;
}

.tax-issue-review {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 1rem;
}

.tax-issue-review__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.66);
}

.tax-issue-review__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(1080px, 100%);
  max-height: calc(100vh - 2rem);
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.35);
}

.tax-issue-review__header,
.tax-issue-review__footer,
.tax-issue-review__item-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tax-issue-review__header {
  flex: 0 0 auto;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #dce4ef;
  background: #f7f9fc;
}

.tax-issue-review__title {
  margin: 0;
  color: #183b62;
  font-size: 1.1rem;
}

.tax-issue-review__subtitle {
  margin: 0.2rem 0 0;
  color: #66758a;
  font-size: 0.85rem;
}

.tax-issue-review__body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 1.15rem;
}

.tax-issue-review__items {
  display: grid;
  min-width: 0;
  gap: 0.85rem;
}

.tax-issue-review__item {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid #d6dfeb;
  border-radius: 8px;
  background: #fff;
}

.tax-issue-review__item.is-invalid {
  border-color: #d63939;
  background: #fff8f8;
}

.tax-issue-review__item-heading {
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.tax-issue-review__item-heading > div,
.tax-issue-review__item-heading strong,
.tax-issue-review__item-heading small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.tax-issue-review__item-heading small {
  margin-top: 0.15rem;
  color: #66758a;
}

.tax-issue-review__identity {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
  margin: 0 0 0.8rem;
}

.tax-issue-review__identity > div,
.tax-issue-review__identity dd {
  min-width: 0;
}

.tax-issue-review__identity-wide {
  grid-column: span 2;
}

.tax-issue-review__identity dt {
  margin-bottom: 0.15rem;
  color: #6a7788;
  font-size: 0.75rem;
}

.tax-issue-review__identity dd {
  margin: 0;
  color: #182433;
  font-size: 0.87rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.tax-issue-review__amount-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #f8fafc;
}

.tax-issue-review__amount-box {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0.7rem;
}

.tax-issue-review__amount-box + .tax-issue-review__amount-box {
  border-left: 1px solid #dce4ef;
}

.tax-issue-review__amount-box span,
.tax-issue-review__amount-box strong {
  display: block;
  min-width: 0;
}

.tax-issue-review__amount-box span {
  color: #66758a;
  font-size: 0.76rem;
  line-height: 1.3;
}

.tax-issue-review__amount-box strong {
  margin-top: 0.3rem;
  color: #0f5132;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.tax-issue-review__amount-box.is-source strong {
  color: #183b62;
}

.tax-issue-review__amount-box.is-editable {
  background: #eef6ff;
}

.tax-issue-review__amount-box .form-control {
  min-width: 0;
  margin-top: 0.35rem;
  font-weight: 700;
}

.tax-issue-review__reason {
  margin-top: 0.75rem;
}

.tax-issue-review__reason textarea {
  resize: vertical;
}

.tax-issue-review__source-note {
  margin-top: 0.85rem;
  overflow-wrap: anywhere;
}

.tax-issue-review__footer {
  flex: 0 0 auto;
  justify-content: flex-end;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid #dce4ef;
  background: #fff;
}

@media (max-width: 767.98px) {
  .tax-issue-review__identity,
  .tax-issue-review__amount-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tax-issue-review__amount-box:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #dce4ef;
  }

  .tax-issue-review__amount-box:nth-child(4) {
    border-top: 1px solid #dce4ef;
  }
}

@media (max-width: 575.98px) {
  .tax-issue-review {
    padding: 0;
  }

  .tax-issue-review__dialog {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }

  .tax-issue-review__header,
  .tax-issue-review__item-heading {
    align-items: flex-start;
  }

  .tax-issue-review__header {
    padding: 0.85rem;
  }

  .tax-issue-review__body {
    padding: 0.75rem;
  }

  .tax-issue-review__identity,
  .tax-issue-review__amount-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tax-issue-review__identity-wide {
    grid-column: auto;
  }

  .tax-issue-review__amount-box + .tax-issue-review__amount-box,
  .tax-issue-review__amount-box:nth-child(3),
  .tax-issue-review__amount-box:nth-child(4) {
    border-top: 1px solid #dce4ef;
    border-left: 0;
  }

  .tax-issue-review__footer {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: 0.75rem;
  }

  .tax-issue-review__footer .btn {
    width: 100%;
  }

  .tax-source-panel__intent-grid,
  .tax-source-panel__intent-amounts,
  .tax-source-panel__intent-recipient {
    grid-template-columns: minmax(0, 1fr);
  }

  .tax-source-panel__intent-amounts > div + div {
    border-top: 1px solid #dce4ef;
    border-left: 0;
  }
}

body.tax-cancellation-impact-open {
  overflow: hidden;
}

.tax-cancellation-impact[hidden] {
  display: none;
}

.tax-cancellation-impact [hidden],
.tax-source-panel__intent [hidden] {
  display: none !important;
}

.tax-cancellation-impact {
  position: fixed;
  inset: 0;
  z-index: 1220;
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 1rem;
}

.tax-cancellation-impact__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
}

.tax-cancellation-impact__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(1040px, 100%);
  max-height: calc(100vh - 2rem);
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.4);
}

.tax-cancellation-impact__header,
.tax-cancellation-impact__footer,
.tax-cancellation-impact__section-heading,
.tax-cancellation-impact__tax-heading,
.tax-cancellation-impact__result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tax-cancellation-impact__header {
  flex: 0 0 auto;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #dce4ef;
  background: #fff7f7;
}

.tax-cancellation-impact__eyebrow {
  margin: 0 0 0.15rem;
  color: #c0392b;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tax-cancellation-impact__title {
  margin: 0;
  color: #7f1d1d;
  font-size: 1.1rem;
}

.tax-cancellation-impact__subtitle {
  margin: 0.2rem 0 0;
  color: #66758a;
  font-size: 0.85rem;
}

.tax-cancellation-impact__body {
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem 1.15rem;
}

.tax-cancellation-impact__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 120px;
  color: #43546a;
}

.tax-cancellation-impact__content,
.tax-cancellation-impact__result-groups {
  display: grid;
  min-width: 0;
  gap: 1rem;
}

.tax-cancellation-impact__section {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #fff;
}

.tax-cancellation-impact__section h5 {
  margin: 0 0 0.75rem;
  color: #183b62;
  font-size: 0.95rem;
}

.tax-cancellation-impact__section-heading h5 {
  margin-bottom: 0;
}

.tax-cancellation-impact__source-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1rem;
  margin: 0;
}

.tax-cancellation-impact__source-grid > div,
.tax-cancellation-impact__source-grid dd,
.tax-cancellation-impact__tax-heading > div {
  min-width: 0;
}

.tax-cancellation-impact__source-grid dt,
.tax-cancellation-impact__tax-document dt {
  color: #66758a;
  font-size: 0.76rem;
  font-weight: 600;
}

.tax-cancellation-impact__source-grid dd,
.tax-cancellation-impact__tax-document dd {
  margin: 0.15rem 0 0;
  overflow-wrap: anywhere;
}

.tax-cancellation-impact__impact-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.tax-cancellation-impact__impact-card {
  display: flex;
  min-width: 0;
  gap: 0.75rem;
  padding: 0.8rem;
  border-radius: 7px;
  background: #f7f9fc;
}

.tax-cancellation-impact__impact-card > div {
  min-width: 0;
}

.tax-cancellation-impact__impact-card p {
  margin: 0.15rem 0 0;
  color: #56657a;
  overflow-wrap: anywhere;
}

.tax-cancellation-impact__impact-card ul,
.tax-cancellation-impact__result-group ul {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
}

.tax-cancellation-impact__impact-icon,
.tax-cancellation-impact__result-icon {
  display: inline-flex;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eaf3ff;
  color: #206bc4;
}

.tax-cancellation-impact__vehicle-list,
.tax-cancellation-impact__tax-documents,
.tax-cancellation-impact__vehicle-results {
  display: grid;
  min-width: 0;
  gap: 0.65rem;
}

.tax-cancellation-impact__vehicle,
.tax-cancellation-impact__vehicle-result {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #dce4ef;
  border-radius: 7px;
}

.tax-cancellation-impact__vehicle span,
.tax-cancellation-impact__vehicle-result span {
  color: #66758a;
  text-align: right;
  overflow-wrap: anywhere;
}

.tax-cancellation-impact__tax-document {
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid #dce4ef;
  border-left: 4px solid #206bc4;
  border-radius: 7px;
}

.tax-cancellation-impact__tax-document.is-blocked {
  border-left-color: #d63939;
  background: #fff7f7;
}

.tax-cancellation-impact__tax-heading {
  align-items: flex-start;
}

.tax-cancellation-impact__tax-heading small {
  display: block;
  margin-top: 0.15rem;
  color: #66758a;
  overflow-wrap: anywhere;
}

.tax-cancellation-impact__tax-document dl {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.7rem 0 0;
}

.tax-cancellation-impact__permission {
  margin-top: 0.65rem;
  color: #b42318;
  font-size: 0.82rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.tax-cancellation-impact__empty {
  padding: 0.9rem;
  border: 1px dashed #d6a4a4;
  border-radius: 7px;
  color: #9f1239;
  text-align: center;
}

.tax-cancellation-impact__form {
  min-width: 0;
}

.tax-cancellation-impact__reason-section {
  border-color: #9bc4ef;
  background: #f7fbff;
}

.tax-cancellation-impact__result {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid #86c69a;
  border-radius: 8px;
  background: #f0faf3;
}

.tax-cancellation-impact__result-heading {
  justify-content: flex-start;
  align-items: flex-start;
}

.tax-cancellation-impact__result-heading p {
  margin: 0.15rem 0 0;
  color: #3f5f49;
}

.tax-cancellation-impact__result-icon {
  background: #dff3e5;
  color: #16813f;
}

.tax-cancellation-impact__result-groups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.8rem;
  gap: 0.65rem;
}

.tax-cancellation-impact__result-group {
  min-width: 0;
  padding: 0.7rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  overflow-wrap: anywhere;
}

.tax-cancellation-impact__result-group.is-warning {
  color: #8a4b08;
  background: #fff4d6;
}

.tax-cancellation-impact__vehicle-results {
  margin-top: 0.8rem;
}

.tax-cancellation-impact__vehicle-result.is-success {
  border-color: #86c69a;
  background: #f0faf3;
}

.tax-cancellation-impact__vehicle-result.is-blocked {
  border-color: #e0a2a2;
  background: #fff7f7;
}

.tax-cancellation-impact__footer {
  flex: 0 0 auto;
  justify-content: flex-end;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid #dce4ef;
  background: #fff;
}

@media (max-width: 767.98px) {
  .tax-cancellation-impact__source-grid,
  .tax-cancellation-impact__impact-grid,
  .tax-cancellation-impact__result-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .tax-cancellation-impact__tax-document dl {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 575.98px) {
  .tax-cancellation-impact {
    padding: 0;
  }

  .tax-cancellation-impact__dialog {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }

  .tax-cancellation-impact__header {
    align-items: flex-start;
    padding: 0.85rem;
  }

  .tax-cancellation-impact__body {
    padding: 0.75rem;
  }

  .tax-cancellation-impact__vehicle,
  .tax-cancellation-impact__vehicle-result,
  .tax-cancellation-impact__tax-heading {
    flex-direction: column;
  }

  .tax-cancellation-impact__vehicle span,
  .tax-cancellation-impact__vehicle-result span {
    text-align: left;
  }

  .tax-cancellation-impact__footer {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: 0.75rem;
  }

  .tax-cancellation-impact__footer .btn {
    width: 100%;
  }
}

/* Bank Statement workspace */
.bank-statement-page {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  overflow-y: visible;
}

.bank-statement-filter-grid {
  grid-template-columns: minmax(260px, 2fr) repeat(5, minmax(125px, 1fr));
}

.bank-statement-account-trigger {
  display: flex;
  align-items: center;
  min-height: 38px;
  overflow: hidden;
}

.bank-statement-account-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-statement-account-menu {
  width: min(420px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  overflow: hidden;
}

.bank-statement-account-options {
  display: grid;
  max-height: 300px;
  max-height: min(300px, calc(100dvh - 220px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.bank-statement-account-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 14px;
  border-bottom: 1px solid #edf2f7;
  cursor: pointer;
}

.bank-statement-account-option:hover {
  background: #f8fafc;
}

.bank-statement-account-option:last-child {
  border-bottom: 0;
}

.bank-statement-account-option strong,
.bank-statement-account-option small {
  display: block;
  overflow-wrap: anywhere;
}

.bank-statement-account-option strong {
  color: #172b4d;
  font-size: 0.86rem;
}

.bank-statement-account-option small {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.74rem;
}

.bank-statement-kpi-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bank-statement-kpi-strip small {
  display: block;
  margin-top: 8px;
  line-height: 1.25;
}

.bank-statement-kpi-balance strong {
  color: #2563eb;
}

.bank-statement-kpi-review strong {
  color: #d97706;
}

.bank-statement-list-panel {
  min-width: 0;
}

.bank-statement-list-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.bank-statement-list-header h3,
.bank-statement-list-header p {
  margin: 0;
}

.bank-statement-list-header h3 {
  color: #0f172a;
  font-size: 1rem;
}

.bank-statement-list-header p {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.82rem;
}

.bank-statement-invoice-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.bank-statement-invoice-notice > .ti {
  flex: 0 0 auto;
  margin-top: 0.1rem;
  font-size: 1.25rem;
}

.bank-statement-invoice-notice__content {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
}

.bank-statement-invoice-notice__content strong,
.bank-statement-invoice-notice__content span {
  display: block;
}

.bank-statement-invoice-row-status {
  margin-top: 0.35rem;
}

.bank-statement-invoice-row-status .badge {
  max-width: 100%;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.bank-statement-invoice-row-status .badge .ti {
  margin-right: 0.25rem;
}

.bank-statement-table tbody tr {
  box-shadow: inset 3px 0 0 transparent;
}

.bank-statement-table tbody tr.bank-statement-row-in {
  box-shadow: inset 3px 0 0 #10b981;
}

.bank-statement-table tbody tr.bank-statement-row-out {
  box-shadow: inset 3px 0 0 #ef4444;
}

.bank-statement-table tbody tr.bank-statement-row-review {
  background: #fffaf0;
  box-shadow: inset 3px 0 0 #f59e0b;
}

.bank-statement-table tbody tr.bank-statement-row-internal {
  background: #f8fafc;
  box-shadow: inset 3px 0 0 #94a3b8;
}

.bank-statement-amount-in {
  color: #047857 !important;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.bank-statement-amount-out {
  color: #dc2626 !important;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.bank-statement-status-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 4px;
  white-space: normal;
}

.bank-statement-import-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bank-statement-dropzone {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px 16px;
  border: 2px dashed #93b4dc;
  border-radius: 10px;
  background: #f8fbff;
  color: #475569;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.bank-statement-dropzone:focus-visible,
.bank-statement-dropzone.is-dragover {
  border-color: #206bc4;
  outline: 0;
  background: #eef6ff;
  box-shadow: 0 0 0 3px rgba(32, 107, 196, 0.16);
}

.bank-statement-dropzone.is-disabled {
  opacity: 0.65;
  cursor: wait;
}

.bank-statement-dropzone-icon {
  display: grid;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 28px;
  place-items: center;
}

.bank-statement-selected-file {
  max-width: 100%;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.bank-statement-import-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.bank-statement-import-summary > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
}

.bank-statement-import-summary span,
.bank-statement-import-summary strong {
  display: block;
}

.bank-statement-import-summary span {
  color: #64748b;
  font-size: 0.76rem;
}

.bank-statement-import-summary strong {
  margin-top: 5px;
  color: #0f172a;
  font-size: 1.35rem;
}

.bank-statement-import-ready strong {
  color: #047857;
}

.bank-statement-import-duplicate strong {
  color: #d97706;
}

.bank-statement-import-error strong {
  color: #dc2626;
}

.bank-statement-import-table-shell {
  max-height: min(440px, 52vh);
  overflow-x: hidden;
  overflow-y: auto;
}

.bank-statement-import-table-shell .report-priority-table thead th {
  top: 0;
}

.bank-statement-preview-warning,
.bank-statement-preview-duplicate {
  background: #fffaf0;
}

.bank-statement-preview-invalid {
  background: #fff5f5;
}

.bank-statement-preview-ignored {
  background: #f8fafc;
}

@media (max-width: 1199.98px) {
  .bank-statement-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bank-statement-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .bank-statement-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-left: 0 !important;
  }

  .bank-statement-actions .btn {
    justify-content: center;
    min-height: 44px;
  }

  .bank-statement-filter-grid,
  .bank-statement-kpi-strip,
  .bank-statement-import-context,
  .bank-statement-import-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .bank-statement-list-header {
    align-items: start;
    flex-direction: column;
  }

  .bank-statement-invoice-notice {
    align-items: stretch;
  }

  .bank-statement-page .vehicle-movement-command-bar {
    position: static;
  }

  .bank-statement-page .vehicle-movement-pager {
    justify-content: space-between;
  }

  .bank-statement-page .vehicle-movement-page-status {
    min-width: 0;
  }

  .bank-statement-import-table-shell {
    max-height: none;
    overflow-y: visible;
  }
}

@media (max-width: 419.98px) {
  .bank-statement-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Bank Reconciliation workspace */
.bank-reconciliation-page,
#bankReconciliationMatchModal .modal-content,
#bankReconciliationMatchModal .modal-body {
  min-width: 0;
  max-width: 100%;
}

.bank-reconciliation-page {
  overflow-x: clip;
  overflow-y: visible;
}

.bank-reconciliation-command-bar,
.bank-reconciliation-list-panel,
.bank-reconciliation-existing-section,
.bank-reconciliation-candidate-section,
.bank-reconciliation-allocation-section {
  min-width: 0;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.bank-reconciliation-filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(150px, 1fr)) minmax(220px, 1.35fr);
  gap: 12px;
  align-items: end;
}

.bank-reconciliation-account-trigger {
  display: flex;
  align-items: center;
  min-height: 38px;
  overflow: hidden;
}

.bank-reconciliation-account-trigger > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-reconciliation-account-menu {
  width: min(440px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  overflow: hidden;
}

.bank-reconciliation-account-options {
  display: grid;
  max-height: 300px;
  max-height: min(300px, calc(100dvh - 220px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.bank-reconciliation-account-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 14px;
  border-bottom: 1px solid #edf2f7;
  cursor: pointer;
}

.bank-reconciliation-account-option:hover,
.bank-reconciliation-account-option:focus-within {
  background: #f8fafc;
}

.bank-reconciliation-account-option:last-child {
  border-bottom: 0;
}

.bank-reconciliation-account-option strong,
.bank-reconciliation-account-option small {
  display: block;
  overflow-wrap: anywhere;
}

.bank-reconciliation-account-option strong {
  color: #172b4d;
  font-size: 0.86rem;
}

.bank-reconciliation-account-option small {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.74rem;
}

.bank-reconciliation-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.bank-reconciliation-status-tabs .btn.active {
  color: #fff;
  background: #206bc4;
  border-color: #206bc4;
}

.bank-reconciliation-empty-state {
  display: grid;
  justify-items: center;
  min-height: 240px;
  padding: 40px 20px;
  border: 1px dashed #bfd0e4;
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  text-align: center;
  place-content: center;
}

.bank-reconciliation-empty-state h3,
.bank-reconciliation-empty-state p {
  margin: 0;
}

.bank-reconciliation-empty-state h3 {
  margin-top: 12px;
  color: #172b4d;
  font-size: 1.05rem;
}

.bank-reconciliation-empty-state p {
  margin-top: 6px;
}

.bank-reconciliation-empty-icon {
  display: grid;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e8f2ff;
  color: #206bc4;
  font-size: 28px;
  place-items: center;
}

.bank-reconciliation-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.bank-reconciliation-kpi {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #fff;
}

.bank-reconciliation-kpi span,
.bank-reconciliation-kpi strong,
.bank-reconciliation-kpi small {
  display: block;
}

.bank-reconciliation-kpi span,
.bank-reconciliation-kpi small {
  color: #64748b;
}

.bank-reconciliation-kpi strong {
  margin-top: 5px;
  color: #172b4d;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.bank-reconciliation-kpi-confirmed strong {
  color: #047857;
}

.bank-reconciliation-kpi-remaining strong,
.bank-reconciliation-kpi-pending strong {
  color: #d97706;
}

.bank-reconciliation-list-header,
.bank-reconciliation-section-heading,
.bank-reconciliation-candidate-pager,
.bank-reconciliation-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bank-reconciliation-list-header,
.bank-reconciliation-section-heading {
  align-items: flex-start;
  margin-bottom: 12px;
}

.bank-reconciliation-list-header h3,
.bank-reconciliation-list-header p,
.bank-reconciliation-section-heading h6,
.bank-reconciliation-section-heading p {
  margin: 0;
}

.bank-reconciliation-list-header h3 {
  color: #172b4d;
  font-size: 1rem;
}

.bank-reconciliation-list-header p,
.bank-reconciliation-section-heading p {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.8rem;
}

.bank-reconciliation-table tbody tr {
  box-shadow: inset 3px 0 0 transparent;
}

.bank-reconciliation-table tbody tr.bank-reconciliation-row-matched {
  box-shadow: inset 3px 0 0 #10b981;
}

.bank-reconciliation-table tbody tr.bank-reconciliation-row-review {
  background: #fffaf0;
  box-shadow: inset 3px 0 0 #f59e0b;
}

.bank-reconciliation-table tbody tr.bank-reconciliation-row-unmatched {
  box-shadow: inset 3px 0 0 #ef4444;
}

.bank-reconciliation-table tbody tr.bank-reconciliation-row-muted {
  background: #f8fafc;
  box-shadow: inset 3px 0 0 #94a3b8;
}

.bank-reconciliation-table tbody tr.bank-reconciliation-row-outbound-complete {
  background: #f7fcf9;
  box-shadow: inset 3px 0 0 #10b981;
}

.bank-reconciliation-table tbody tr.bank-reconciliation-row-outbound-review {
  background: #fffaf0;
  box-shadow: inset 3px 0 0 #f59e0b;
}

.bank-reconciliation-table tbody tr.bank-reconciliation-row-outbound-pending {
  background: #f8fafc;
  box-shadow: inset 3px 0 0 #64748b;
}

.bank-reconciliation-table .bank-reconciliation-statement-row > td {
  border-bottom: 0;
}

.bank-reconciliation-table tbody tr.bank-reconciliation-preview-row {
  background: inherit;
  box-shadow: none;
}

.bank-reconciliation-preview-row > td {
  padding: 0 12px 12px;
  border-top: 0;
}

.bank-reconciliation-row-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dbe4ef;
  border-radius: 9px;
  background: #f8fafc;
}

.bank-reconciliation-row-preview.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.bank-reconciliation-preview-section,
.bank-reconciliation-preview-list,
.bank-reconciliation-preview-card,
.bank-reconciliation-preview-identity,
.bank-reconciliation-preview-actions {
  min-width: 0;
}

.bank-reconciliation-preview-section {
  padding: 10px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
}

.bank-reconciliation-preview-section.is-confirmed {
  border-color: #b9e3cd;
}

.bank-reconciliation-preview-section.is-exact {
  border-color: #bed7f2;
}

.bank-reconciliation-preview-section:only-child {
  grid-column: 1 / -1;
}

.bank-reconciliation-preview-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  margin-bottom: 8px;
  color: #334155;
  font-size: .78rem;
  font-weight: 800;
}

.bank-reconciliation-preview-heading > span,
.bank-reconciliation-preview-heading > div {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.bank-reconciliation-preview-heading .btn-link {
  min-height: 0;
  padding: 0 3px;
  font-size: .76rem;
}

.bank-reconciliation-preview-list {
  display: grid;
  gap: 7px;
}

.bank-reconciliation-preview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
}

.bank-reconciliation-preview-card.is-exact-candidate {
  background: #f8fbff;
}

.bank-reconciliation-preview-card.is-confirmed-match {
  background: #f7fcf9;
}

.bank-reconciliation-preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.bank-reconciliation-preview-identity > strong,
.bank-reconciliation-preview-identity > small,
.bank-reconciliation-preview-amount > span,
.bank-reconciliation-preview-amount > strong {
  display: block;
  overflow-wrap: anywhere;
}

.bank-reconciliation-preview-identity > strong {
  color: #0f172a;
  font-size: .82rem;
}

.bank-reconciliation-preview-identity > small,
.bank-reconciliation-preview-amount > span {
  margin-top: 2px;
  color: #64748b;
  font-size: .72rem;
}

.bank-reconciliation-preview-invoices {
  display: block;
  margin-top: 4px;
  color: #475569 !important;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.bank-reconciliation-candidate-card > .bank-reconciliation-preview-invoices {
  display: block;
  margin-top: 6px;
}

.bank-reconciliation-preview-amount {
  min-width: 112px;
  text-align: right;
}

.bank-reconciliation-preview-amount > strong {
  color: #047857;
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bank-reconciliation-preview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.bank-reconciliation-preview-reason {
  flex: 1 0 100%;
  max-width: 260px;
  color: #9a6700;
  font-size: .69rem;
  overflow-wrap: anywhere;
  text-align: right;
}

.bank-reconciliation-preview-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px dashed #cbd5e1;
  border-radius: 7px;
  color: #64748b;
  font-size: .76rem;
}

.bank-reconciliation-preview-empty .btn-link {
  min-height: 0;
  padding: 0;
  font-size: .76rem;
}

.bank-reconciliation-money-in {
  color: #047857 !important;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bank-reconciliation-money-out {
  color: #b91c1c !important;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bank-reconciliation-direction-label {
  display: block;
  margin-bottom: 2px;
  color: inherit;
  font-size: .72rem;
  font-weight: 600;
}

.bank-reconciliation-status-badge,
.bank-reconciliation-suggestion-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  white-space: normal;
}

.bank-reconciliation-suggestion-count {
  margin-top: 5px;
  color: #b45309;
  font-size: 0.75rem;
}

.bank-reconciliation-pager,
.bank-reconciliation-candidate-pager {
  margin-top: 14px;
}

.bank-reconciliation-page-status,
.bank-reconciliation-candidate-pager span {
  min-width: 0;
  color: #64748b;
  font-size: 0.82rem;
  text-align: center;
}

#bankReconciliationMatchModal .modal-dialog {
  width: min(1140px, calc(100vw - 24px));
}

.bank-reconciliation-modal-body {
  background: #f6f8fb;
  overflow-x: hidden;
}

.bank-reconciliation-statement-summary,
.bank-reconciliation-allocation-totals {
  display: grid;
  gap: 10px;
}

.bank-reconciliation-statement-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.bank-reconciliation-allocation-totals {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.bank-reconciliation-statement-summary {
  margin-bottom: 12px;
}

.bank-reconciliation-statement-summary > div,
.bank-reconciliation-allocation-totals > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
}

.bank-reconciliation-statement-summary span,
.bank-reconciliation-statement-summary strong,
.bank-reconciliation-allocation-totals span,
.bank-reconciliation-allocation-totals strong {
  display: block;
}

.bank-reconciliation-statement-summary span,
.bank-reconciliation-allocation-totals span {
  color: #64748b;
  font-size: 0.75rem;
}

.bank-reconciliation-statement-summary strong,
.bank-reconciliation-allocation-totals strong {
  margin-top: 4px;
  color: #172b4d;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.bank-reconciliation-context-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.6fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #cbdced;
  border-radius: 10px;
  background: #eef6ff;
}

.bank-reconciliation-context-card strong,
.bank-reconciliation-context-card span {
  display: block;
  overflow-wrap: anywhere;
}

.bank-reconciliation-candidate-filters {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(230px, 1.5fr) repeat(3, minmax(145px, 0.85fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.bank-reconciliation-candidate-search-action .btn {
  min-height: 38px;
  white-space: nowrap;
}

.bank-reconciliation-candidate-list,
.bank-reconciliation-existing-list,
.bank-reconciliation-selected-list {
  display: grid;
  gap: 10px;
}

.bank-reconciliation-candidate-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.bank-reconciliation-candidate-card.is-selected {
  border-color: #70a6df;
  background: #f5f9ff;
  box-shadow: 0 0 0 2px rgba(32, 107, 196, 0.1);
}

.bank-reconciliation-candidate-card.is-highlighted {
  border-color: #206bc4;
  background: #eef6ff;
  box-shadow: 0 0 0 3px rgba(32, 107, 196, 0.16);
  scroll-margin-block: 12px;
}

.bank-reconciliation-candidate-card.is-disabled {
  background: #f8fafc;
  opacity: 0.78;
}

.bank-reconciliation-candidate-select {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.bank-reconciliation-candidate-select label,
.bank-reconciliation-candidate-select label > strong,
.bank-reconciliation-candidate-select label > small {
  display: block;
  min-width: 0;
}

.bank-reconciliation-candidate-select label > strong,
.bank-reconciliation-candidate-select label > small {
  overflow-wrap: anywhere;
}

.bank-reconciliation-candidate-select label > small {
  margin-top: 3px;
  color: #64748b;
}

.bank-reconciliation-candidate-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 5px;
}

.bank-reconciliation-score {
  min-width: 68px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #e8f2ff;
  color: #1d4ed8;
  text-align: center;
}

.bank-reconciliation-score span,
.bank-reconciliation-score strong {
  display: block;
}

.bank-reconciliation-score span {
  font-size: 0.68rem;
}

.bank-reconciliation-score strong {
  font-size: 1.05rem;
}

.bank-reconciliation-candidate-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.bank-reconciliation-candidate-grid > div {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 7px;
  background: #f8fafc;
}

.bank-reconciliation-candidate-grid span,
.bank-reconciliation-candidate-grid strong {
  display: block;
  overflow-wrap: anywhere;
}

.bank-reconciliation-candidate-grid span {
  color: #64748b;
  font-size: 0.72rem;
}

.bank-reconciliation-candidate-description,
.bank-reconciliation-candidate-disabled-reason {
  margin-top: 10px;
  color: #475569;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.bank-reconciliation-candidate-detail-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
}

.bank-reconciliation-candidate-receipt-detail {
  min-width: 0;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #dbe4ef;
}

.bank-reconciliation-candidate-detail-error strong,
.bank-reconciliation-candidate-detail-error span,
.bank-reconciliation-drill-down-error strong,
.bank-reconciliation-drill-down-error span {
  display: block;
  overflow-wrap: anywhere;
}

.bank-reconciliation-detail-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.bank-reconciliation-candidate-disabled-reason {
  color: #b45309;
}

.bank-reconciliation-candidate-disabled-reason .ti {
  margin-right: 5px;
}

.bank-reconciliation-candidate-allocation {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #dbe4ef;
}

.bank-reconciliation-bank-binding,
.bank-reconciliation-selected-binding {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.bank-reconciliation-candidate-reasons {
  margin-top: 10px;
  color: #475569;
  font-size: 0.8rem;
}

.bank-reconciliation-candidate-reasons summary {
  color: #206bc4;
  cursor: pointer;
}

.bank-reconciliation-candidate-reasons ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.bank-reconciliation-candidate-reasons li.is-strong {
  color: #047857;
  font-weight: 700;
}

.bank-reconciliation-inline-state {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 13px 14px;
  border: 1px dashed #bfd0e4;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
}

.bank-reconciliation-inline-state.is-warning {
  border-color: #f0cf8e;
  background: #fffaf0;
  color: #9a6700;
}

.bank-reconciliation-inline-state.is-danger {
  border-color: #efb2b2;
  background: #fff5f5;
  color: #b42318;
}

.bank-reconciliation-existing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
}

.bank-reconciliation-existing-row.is-masked {
  background: #f8fafc;
}

.bank-reconciliation-existing-row strong,
.bank-reconciliation-existing-row small {
  display: block;
  overflow-wrap: anywhere;
}

.bank-reconciliation-existing-row .badge {
  margin-bottom: 4px;
}

.bank-reconciliation-existing-amount {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bank-reconciliation-existing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.report-detail-drawer.bank-reconciliation-drill-down-drawer {
  width: min(860px, calc(100vw - 24px));
}

.bank-reconciliation-drill-down-drawer .report-detail-drawer-body {
  overflow-x: hidden;
}

.bank-reconciliation-receipt-details {
  min-width: 0;
  padding: 14px;
  border: 1px solid #bfd5ec;
  border-radius: 10px;
  background: #f8fbff;
}

.bank-reconciliation-receipt-details.is-compact {
  padding: 12px;
  background: #fff;
}

.bank-reconciliation-receipt-details-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, auto) auto;
  gap: 12px;
  align-items: start;
}

.bank-reconciliation-receipt-details-header > div,
.bank-reconciliation-receipt-details-header span,
.bank-reconciliation-receipt-details-header strong,
.bank-reconciliation-receipt-details-header small {
  min-width: 0;
}

.bank-reconciliation-receipt-details-header span,
.bank-reconciliation-receipt-details-header strong,
.bank-reconciliation-receipt-details-header small {
  display: block;
  overflow-wrap: anywhere;
}

.bank-reconciliation-receipt-details-header > div:first-child > span,
.bank-reconciliation-receipt-finance > span {
  color: #64748b;
  font-size: .72rem;
  font-weight: 700;
}

.bank-reconciliation-receipt-details-header > div:first-child > strong {
  margin-top: 2px;
  color: #0f172a;
  font-size: .95rem;
}

.bank-reconciliation-receipt-details-header > div:first-child > small {
  margin-top: 2px;
  color: #64748b;
}

.bank-reconciliation-receipt-finance {
  padding: 7px 9px;
  border-radius: 7px;
  background: #e8f2ff;
}

.bank-reconciliation-receipt-finance > strong {
  margin-top: 2px;
  color: #1d4ed8;
}

.bank-reconciliation-receipt-amounts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.bank-reconciliation-receipt-amounts > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #dbe4ef;
  border-radius: 7px;
  background: #fff;
}

.bank-reconciliation-receipt-amounts span,
.bank-reconciliation-receipt-amounts strong {
  display: block;
  overflow-wrap: anywhere;
}

.bank-reconciliation-receipt-amounts span {
  color: #64748b;
  font-size: .7rem;
}

.bank-reconciliation-receipt-amounts strong {
  margin-top: 2px;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.bank-reconciliation-receipt-unallocated-warning {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #f0cf8e;
  border-radius: 7px;
  background: #fff8e8;
  color: #9a6700;
}

.bank-reconciliation-receipt-unallocated-warning span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bank-reconciliation-vehicle-detail-table {
  min-width: 0;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
}

.bank-reconciliation-vehicle-detail-header,
.bank-reconciliation-vehicle-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .9fr);
}

.bank-reconciliation-vehicle-detail-header {
  background: #eef4fb;
  color: #475569;
  font-size: .72rem;
  font-weight: 800;
}

.bank-reconciliation-vehicle-detail-row {
  border-top: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: .78rem;
}

.bank-reconciliation-vehicle-detail-header > div,
.bank-reconciliation-vehicle-detail-row > div {
  min-width: 0;
  padding: 9px 10px;
  overflow-wrap: anywhere;
}

.bank-reconciliation-vehicle-detail-row strong,
.bank-reconciliation-vehicle-detail-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.bank-reconciliation-vehicle-detail-row small {
  margin-top: 3px;
  color: #64748b;
}

.bank-reconciliation-vehicle-invoice .badge {
  max-width: 100%;
  white-space: normal;
}

.bank-reconciliation-vehicle-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bank-reconciliation-generic-receipt-detail {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 11px;
  border: 1px dashed #bfd0e4;
  border-radius: 8px;
  background: #fff;
  color: #475569;
}

.bank-reconciliation-generic-receipt-detail strong,
.bank-reconciliation-generic-receipt-detail span {
  display: block;
  overflow-wrap: anywhere;
}

.bank-reconciliation-generic-receipt-detail span {
  margin-top: 3px;
  color: #64748b;
  font-size: .76rem;
}

.bank-reconciliation-drill-down-section {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
}

.bank-reconciliation-drill-down-section > h4 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: .95rem;
}

.bank-reconciliation-drill-down-section .report-drawer-section {
  margin-top: 8px;
  background: #fff;
}

.bank-reconciliation-drill-down-error {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #efb2b2;
  border-radius: 8px;
  background: #fff5f5;
  color: #b42318;
}

.bank-reconciliation-phase3-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #dbe4ef;
}

.bank-reconciliation-phase3-section h4,
.bank-reconciliation-drill-down-drawer .report-drawer-section h4 {
  font-size: .95rem;
}

.bank-reconciliation-related-documents,
.bank-reconciliation-attribution-history,
.bank-reconciliation-phase3-timeline {
  display: grid;
  gap: 8px;
}

.bank-reconciliation-related-document,
.bank-reconciliation-attribution-history > div,
.bank-reconciliation-phase3-timeline > div,
.bank-reconciliation-phase3-attachment {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
}

.bank-reconciliation-related-document strong,
.bank-reconciliation-related-document span,
.bank-reconciliation-attribution-history span,
.bank-reconciliation-attribution-history strong,
.bank-reconciliation-attribution-history small,
.bank-reconciliation-phase3-timeline span,
.bank-reconciliation-phase3-timeline strong,
.bank-reconciliation-phase3-timeline small,
.bank-reconciliation-phase3-attachment strong,
.bank-reconciliation-phase3-attachment small {
  display: block;
  overflow-wrap: anywhere;
}

.bank-reconciliation-attribution-history small,
.bank-reconciliation-phase3-timeline small,
.bank-reconciliation-phase3-attachment small,
.bank-reconciliation-related-document span {
  color: #64748b;
}

.bank-reconciliation-attribution-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f5;
}

.bank-reconciliation-attribution-input.is-unallocated {
  margin-top: 6px;
  padding: 11px;
  border: 1px solid #f0cf8e;
  border-radius: 8px;
  background: #fffaf0;
}

.bank-reconciliation-attribution-input strong,
.bank-reconciliation-attribution-input small {
  display: block;
  overflow-wrap: anywhere;
}

.bank-reconciliation-attribution-input small {
  color: #64748b;
}

.bank-reconciliation-attachment-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

@media (max-width: 575.98px) {
  .bank-reconciliation-attribution-input,
  .bank-reconciliation-attachment-upload {
    grid-template-columns: 1fr;
  }

  .bank-reconciliation-existing-actions,
  .bank-reconciliation-existing-actions .btn {
    width: 100%;
  }

  .bank-reconciliation-related-document,
  .bank-reconciliation-phase3-attachment {
    align-items: stretch;
    flex-direction: column;
  }

  .bank-reconciliation-detail-error-actions,
  .bank-reconciliation-detail-error-actions .btn,
  .bank-reconciliation-candidate-detail-actions,
  .bank-reconciliation-candidate-detail-actions .btn {
    width: 100%;
  }
}

.bank-reconciliation-selected-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 210px) minmax(130px, auto) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
}

.bank-reconciliation-selected-row strong,
.bank-reconciliation-selected-row small {
  display: block;
  overflow-wrap: anywhere;
}

.bank-reconciliation-selected-row small {
  color: #64748b;
}

.bank-reconciliation-allocation-totals {
  margin-top: 12px;
}

.bank-reconciliation-modal-footer {
  flex-wrap: wrap;
}

.bank-reconciliation-manual-outbound-body {
  min-width: 0;
  background: #f8fafc;
}

.bank-reconciliation-manual-outbound-loading,
.bank-reconciliation-manual-outbound-history-state {
  display: flex;
  min-height: 124px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #64748b;
  text-align: center;
}

.bank-reconciliation-manual-outbound-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin-bottom: 14px;
}

.bank-reconciliation-manual-outbound-context > div,
.bank-reconciliation-manual-outbound-statement,
#bankReconciliationManualOutboundForm,
.bank-reconciliation-manual-outbound-history {
  min-width: 0;
  border: 1px solid #dbe4ef;
  border-radius: 9px;
  background: #fff;
}

.bank-reconciliation-manual-outbound-context > div {
  padding: 11px 12px;
}

.bank-reconciliation-manual-outbound-context span,
.bank-reconciliation-manual-outbound-context strong {
  display: block;
  overflow-wrap: anywhere;
}

.bank-reconciliation-manual-outbound-context span {
  margin-bottom: 3px;
  color: #64748b;
  font-size: .72rem;
}

.bank-reconciliation-manual-outbound-context strong {
  color: #172b4d;
  font-size: .88rem;
}

.bank-reconciliation-manual-outbound-statement,
#bankReconciliationManualOutboundForm {
  padding: 14px;
}

.bank-reconciliation-manual-outbound-statement {
  margin-bottom: 14px;
}

.bank-reconciliation-manual-outbound-statement p,
.bank-reconciliation-manual-outbound-history-item,
.bank-reconciliation-manual-outbound-history-item * {
  overflow-wrap: anywhere;
}

.bank-reconciliation-manual-outbound-history {
  overflow: hidden;
}

.bank-reconciliation-manual-outbound-history > .btn {
  min-height: 44px;
  border: 0;
  border-radius: 0;
}

#bankReconciliationManualOutboundHistoryPanel {
  border-top: 1px solid #dbe4ef;
}

.bank-reconciliation-manual-outbound-history-list {
  display: grid;
  gap: 0;
}

.bank-reconciliation-manual-outbound-history-item {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.bank-reconciliation-manual-outbound-history-item:last-child {
  border-bottom: 0;
}

.bank-reconciliation-manual-outbound-history-state {
  min-height: 84px;
  padding: 14px;
}

.bank-reconciliation-manual-outbound-footer {
  flex-wrap: wrap;
  gap: 8px;
}

.bank-reconciliation-manual-outbound-footer .btn {
  min-height: 44px;
}

.bank-reconciliation-manual-outbound-footer #btnBankReconciliationDeactivateManualOutbound {
  margin-right: auto;
}

@media (max-width: 1199.98px) {
  .bank-reconciliation-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bank-reconciliation-account-filter,
  .bank-reconciliation-keyword-filter {
    grid-column: span 2;
  }

  .bank-reconciliation-kpi-strip,
  .bank-reconciliation-statement-summary,
  .bank-reconciliation-allocation-totals,
  .bank-reconciliation-candidate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bank-reconciliation-candidate-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bank-reconciliation-row-preview {
    grid-template-columns: minmax(0, 1fr);
  }

  .bank-reconciliation-candidate-keyword {
    grid-column: span 2;
  }
}

@media (max-width: 767.98px) {
  .report-detail-drawer.bank-reconciliation-drill-down-drawer {
    width: 100vw;
    max-width: 100vw;
  }

  .bank-reconciliation-drill-down-drawer .report-detail-drawer-header,
  .bank-reconciliation-drill-down-drawer .report-detail-drawer-body {
    padding-inline: 14px;
  }

  .bank-reconciliation-receipt-details-header,
  .bank-reconciliation-receipt-amounts {
    grid-template-columns: minmax(0, 1fr);
  }

  .bank-reconciliation-receipt-details-header > .badge {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
  }

  .bank-reconciliation-vehicle-detail-header {
    display: none;
  }

  .bank-reconciliation-vehicle-detail-row {
    grid-template-columns: minmax(0, 1fr);
    padding: 7px;
    border-top: 8px solid #f1f5f9;
  }

  .bank-reconciliation-vehicle-detail-header + .bank-reconciliation-vehicle-detail-row {
    border-top-width: 0;
  }

  .bank-reconciliation-vehicle-detail-row > div {
    display: grid;
    grid-template-columns: minmax(105px, .42fr) minmax(0, 1fr);
    gap: 8px;
    padding: 7px 5px;
    text-align: left;
  }

  .bank-reconciliation-vehicle-detail-row > div::before {
    content: attr(data-label);
    grid-row: 1 / span 4;
    color: #64748b;
    font-size: .7rem;
    font-weight: 800;
  }

  .bank-reconciliation-vehicle-detail-row > div > * {
    grid-column: 2;
  }

  .bank-reconciliation-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-left: 0 !important;
  }

  .bank-reconciliation-actions .btn {
    justify-content: center;
    min-height: 44px;
  }

  .bank-reconciliation-filter-grid,
  .bank-reconciliation-kpi-strip,
  .bank-reconciliation-statement-summary,
  .bank-reconciliation-allocation-totals,
  .bank-reconciliation-context-card,
  .bank-reconciliation-manual-outbound-context,
  .bank-reconciliation-candidate-filters,
  .bank-reconciliation-candidate-grid,
  .bank-reconciliation-candidate-allocation,
  .bank-reconciliation-existing-row,
  .bank-reconciliation-selected-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .bank-reconciliation-account-filter,
  .bank-reconciliation-keyword-filter,
  .bank-reconciliation-candidate-keyword {
    grid-column: auto;
  }

  .bank-reconciliation-list-header,
  .bank-reconciliation-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .bank-reconciliation-section-heading .btn,
  .bank-reconciliation-candidate-search-action .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .bank-reconciliation-page .report-table-shell {
    overflow-x: hidden;
  }

  .bank-reconciliation-table .bank-reconciliation-statement-row {
    padding-bottom: 4px;
    border-bottom: 0;
  }

  .bank-reconciliation-table .bank-reconciliation-preview-row {
    padding-top: 0;
  }

  .bank-reconciliation-preview-row > td {
    padding: 0;
  }

  .bank-reconciliation-preview-row > td::before {
    display: none;
  }

  .bank-reconciliation-row-preview,
  .bank-reconciliation-preview-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .bank-reconciliation-preview-amount {
    min-width: 0;
    text-align: left;
  }

  .bank-reconciliation-preview-amount > strong {
    white-space: normal;
  }

  .bank-reconciliation-preview-actions {
    justify-content: flex-start;
  }

  .bank-reconciliation-preview-actions .btn {
    flex: 1 1 140px;
    min-height: 42px;
    justify-content: center;
  }

  .bank-reconciliation-preview-reason {
    max-width: none;
    text-align: left;
  }

  .bank-reconciliation-pager,
  .bank-reconciliation-candidate-pager {
    align-items: stretch;
  }

  .bank-reconciliation-page-status,
  .bank-reconciliation-candidate-pager span {
    align-self: center;
  }

  #bankReconciliationMatchModal .modal-dialog {
    width: auto;
  }

  .bank-reconciliation-existing-row {
    align-items: stretch;
  }

  .bank-reconciliation-existing-row .btn,
  .bank-reconciliation-existing-row > span:last-child {
    width: 100%;
  }

  .bank-reconciliation-existing-amount {
    white-space: normal;
  }

  .bank-reconciliation-selected-row .btn-icon {
    width: 100%;
  }

  .bank-reconciliation-modal-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .bank-reconciliation-modal-footer .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .bank-reconciliation-manual-outbound-body {
    padding: 12px;
    overflow-x: hidden;
  }

  .bank-reconciliation-manual-outbound-context {
    grid-template-columns: minmax(0, 1fr);
  }

  .bank-reconciliation-manual-outbound-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .bank-reconciliation-manual-outbound-footer .btn,
  .bank-reconciliation-manual-outbound-footer #btnBankReconciliationDeactivateManualOutbound {
    width: 100%;
    margin-right: 0;
    justify-content: center;
  }
}

/* Monthly Dashboard manager monitor */
.monthly-dashboard-view-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  min-width: 0;
  padding: .35rem;
  border: 1px solid var(--md-border, #dbe3ee);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

.monthly-dashboard-page:not(.is-capabilities-ready) [data-dashboard-capability] {
  visibility: hidden;
}

.monthly-dashboard-page:not(.is-capabilities-ready) .monthly-dashboard-monitor-panel,
.monthly-dashboard-page:not(.is-capabilities-ready) #monthlyDashboardOverviewPanel {
  visibility: hidden;
}

.monthly-dashboard-view-tab {
  display: flex;
  min-width: 0;
  min-height: 58px;
  gap: .7rem;
  align-items: center;
  padding: .65rem .85rem;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #475569;
  font: inherit;
  text-align: left;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.monthly-dashboard-view-tab > i {
  display: grid;
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9px;
  place-items: center;
  background: #f1f5f9;
  font-size: 1.15rem;
}

.monthly-dashboard-view-tab > span {
  display: grid;
  min-width: 0;
  gap: .1rem;
}

.monthly-dashboard-view-tab strong,
.monthly-dashboard-view-tab small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-view-tab strong {
  color: inherit;
  font-size: .9rem;
}

.monthly-dashboard-view-tab small {
  color: #64748b;
  font-size: .72rem;
}

.monthly-dashboard-view-tab:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
  color: #1e40af;
}

.monthly-dashboard-view-tab.is-active,
.monthly-dashboard-view-tab[aria-selected="true"] {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e40af;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .06);
}

.monthly-dashboard-view-tab.is-active > i,
.monthly-dashboard-view-tab[aria-selected="true"] > i {
  background: #dbeafe;
  color: #1d4ed8;
}

.monthly-dashboard-view-tab:focus-visible,
.monthly-dashboard-monitor-panel:focus-visible,
#monthlyDashboardOverviewPanel:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28);
  outline-offset: 2px;
}

.monthly-dashboard-monitor-panel {
  display: grid;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.monthly-dashboard-monitor-meta {
  display: flex;
  min-width: 0;
  gap: .45rem;
  align-items: center;
  justify-content: flex-end;
  color: #64748b;
  font-size: .72rem;
}

.monthly-dashboard-monitor-meta > span {
  overflow: hidden;
  padding: .3rem .55rem;
  border-radius: 999px;
  background: #f1f5f9;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-layout-toolbar {
  display: flex;
  min-width: 0;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  padding: .7rem .85rem;
  border: 1px dashed #93c5fd;
  border-radius: 10px;
  background: #f8fbff;
}

.monthly-dashboard-layout-toolbar > div:first-child {
  display: grid;
  min-width: 0;
  gap: .08rem;
}

.monthly-dashboard-layout-toolbar strong {
  color: #1e3a8a;
  font-size: .8rem;
}

.monthly-dashboard-layout-toolbar span {
  color: #64748b;
  font-size: .7rem;
  overflow-wrap: anywhere;
}

.monthly-dashboard-layout-actions {
  display: flex;
  flex: 0 0 auto;
  gap: .45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.monthly-dashboard-monitor-panel[hidden],
#monthlyDashboardOverviewPanel[hidden] {
  display: none !important;
}

.monthly-dashboard-monitor-status,
.monthly-dashboard-monitor-warnings {
  display: flex;
  min-width: 0;
  gap: .55rem;
  align-items: center;
  padding: .7rem .85rem;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e40af;
  font-size: .8rem;
}

.monthly-dashboard-monitor-status:empty {
  display: none;
}

.monthly-dashboard-monitor-status.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.monthly-dashboard-monitor-status.is-warning,
.monthly-dashboard-monitor-warnings {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.monthly-dashboard-monitor-section {
  min-width: 0;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid var(--md-border, #dbe3ee);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

.monthly-dashboard-monitor-layout {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  align-items: start;
}

.monthly-dashboard-monitor-calendar-section,
.monthly-dashboard-monitor-crm-queue-section {
  display: flex;
  height: 44rem;
  min-height: 0;
  flex-direction: column;
}

.monthly-dashboard-monitor-calendar-section > .monthly-dashboard-monitor-heading,
.monthly-dashboard-monitor-crm-queue-section > .monthly-dashboard-monitor-heading {
  flex: 0 0 auto;
}

.monthly-dashboard-monitor-calendar,
.monthly-dashboard-monitor-crm-queue {
  flex: 1 1 auto;
  min-height: 0;
}

.monthly-dashboard-monitor-calendar {
  display: flex;
  flex-direction: column;
}

.monthly-dashboard-monitor-layout > [data-dashboard-card-span="full"] {
  grid-column: 1 / -1;
}

.monthly-dashboard-monitor-layout > .is-layout-full {
  grid-column: 1 / -1;
}

.monthly-dashboard-card-order-bar {
  display: none;
  min-width: 0;
  gap: .6rem;
  align-items: center;
  justify-content: space-between;
  margin: -.35rem -.35rem .75rem;
  padding: .42rem .5rem;
  border: 1px dashed #93c5fd;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: .7rem;
}

.monthly-dashboard-card-order-bar > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-card-order-bar > div {
  display: flex;
  flex: 0 0 auto;
  gap: .3rem;
}

.monthly-dashboard-card-order-bar button {
  display: grid;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  place-items: center;
  background: #fff;
  color: #1d4ed8;
}

.monthly-dashboard-card-order-bar button:hover,
.monthly-dashboard-card-order-bar button:focus-visible {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

.monthly-dashboard-card-drag-handle {
  cursor: grab;
  touch-action: none;
}

.monthly-dashboard-card-drag-handle:active {
  cursor: grabbing;
}

.monthly-dashboard-monitor-layout.is-arranging > .monthly-dashboard-monitor-section {
  outline: 2px solid rgba(37, 99, 235, .2);
  outline-offset: -2px;
}

.monthly-dashboard-monitor-layout.is-arranging .monthly-dashboard-card-order-bar {
  display: flex;
}

.monthly-dashboard-monitor-layout > .monthly-dashboard-monitor-section.is-dragging {
  opacity: .55;
  box-shadow: 0 12px 30px rgba(30, 64, 175, .18);
}

.monthly-dashboard-monitor-heading {
  display: flex;
  min-width: 0;
  gap: 1rem;
  align-items: start;
  justify-content: space-between;
  margin-bottom: .85rem;
}

.monthly-dashboard-monitor-heading > div {
  min-width: 0;
}

.monthly-dashboard-monitor-heading h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
}

.monthly-dashboard-monitor-heading p {
  margin: .18rem 0 0;
  color: #64748b;
  font-size: .76rem;
  line-height: 1.45;
}

.monthly-dashboard-monitor-heading .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.monthly-dashboard-monitor-heading-actions {
  display: flex;
  flex: 0 0 auto;
  min-width: 0;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.monthly-dashboard-monitor-target-grid,
.monthly-dashboard-monitor-work-grid,
.monthly-dashboard-monitor-main-grid,
.monthly-dashboard-monitor-lower-grid,
.monthly-dashboard-monitor-inventory-grid {
  display: grid;
  min-width: 0;
  gap: .8rem;
}

.monthly-dashboard-monitor-target-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.monthly-dashboard-monitor-main-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(19rem, .75fr);
  align-items: stretch;
}

.monthly-dashboard-monitor-work-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.monthly-dashboard-monitor-lower-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.monthly-dashboard-monitor-inventory-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.monthly-dashboard-monitor-inventory-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.monthly-dashboard-monitor-skeleton {
  min-height: 116px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e8eef6 37%, #f1f5f9 63%);
  background-size: 400% 100%;
  animation: monthly-dashboard-monitor-shimmer 1.25s ease-in-out infinite;
}

.monthly-dashboard-monitor-skeleton.is-tall {
  min-height: 242px;
}

@keyframes monthly-dashboard-monitor-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.monthly-dashboard-monitor-target-card,
.monthly-dashboard-monitor-work-card,
.monthly-dashboard-monitor-alert-card {
  min-width: 0;
  padding: .85rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.monthly-dashboard-monitor-target-card {
  display: grid;
  gap: .65rem;
  background: linear-gradient(150deg, #fff 55%, #f8fbff 100%);
}

.monthly-dashboard-monitor-target-body {
  display: grid;
  grid-template-columns: minmax(8rem, .72fr) minmax(0, 1fr);
  min-width: 0;
  gap: .8rem;
  align-items: center;
}

.monthly-dashboard-monitor-gauge {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
}

.monthly-dashboard-monitor-gauge svg {
  display: block;
  width: min(100%, 11rem);
  height: auto;
  overflow: visible;
}

.monthly-dashboard-monitor-gauge path {
  fill: none;
  stroke-linecap: round;
  stroke-width: 10;
}

.monthly-dashboard-monitor-gauge-track {
  stroke: #e2e8f0;
}

.monthly-dashboard-monitor-gauge-value {
  stroke: #2563eb;
  transition: stroke-dasharray .28s ease;
}

.monthly-dashboard-monitor-target-card.is-achieved .monthly-dashboard-monitor-gauge-value {
  stroke: #16a34a;
}

.monthly-dashboard-monitor-target-card.is-behind .monthly-dashboard-monitor-gauge-value,
.monthly-dashboard-monitor-target-card.is-not-configured .monthly-dashboard-monitor-gauge-value,
.monthly-dashboard-monitor-target-card.is-zero-target .monthly-dashboard-monitor-gauge-value {
  stroke: #dc2626;
}

.monthly-dashboard-monitor-gauge > span {
  position: absolute;
  left: 50%;
  bottom: .15rem;
  display: grid;
  width: 78%;
  min-width: 0;
  gap: .05rem;
  text-align: center;
  transform: translateX(-50%);
}

.monthly-dashboard-monitor-gauge > span strong {
  color: #0f172a;
  font-size: 1.18rem;
  line-height: 1;
}

.monthly-dashboard-monitor-gauge > span small {
  overflow: hidden;
  color: #64748b;
  font-size: .62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-target-components {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: 1 / -1;
  min-width: 0;
  gap: .4rem;
}

.monthly-dashboard-monitor-target-components.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.monthly-dashboard-monitor-target-components > span {
  display: grid;
  min-width: 0;
  gap: .08rem;
  padding: .48rem .55rem;
  border-radius: 8px;
  background: #f8fafc;
}

.monthly-dashboard-monitor-target-components small,
.monthly-dashboard-monitor-target-components strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-target-components small {
  color: #64748b;
  font-size: .65rem;
}

.monthly-dashboard-monitor-target-components strong {
  color: #0f172a;
  font-size: .76rem;
}

.monthly-dashboard-monitor-target-deadline {
  display: grid;
  grid-template-columns: 2.15rem minmax(0, 1fr) repeat(2, minmax(6.4rem, auto));
  min-width: 0;
  gap: .55rem;
  align-items: center;
  padding: .58rem .65rem;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  background: #eff6ff;
  color: #1e40af;
}

.monthly-dashboard-monitor-target-deadline > i {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 8px;
  place-items: center;
  background: rgba(255, 255, 255, .76);
  font-size: 1rem;
}

.monthly-dashboard-monitor-target-deadline > span {
  display: grid;
  min-width: 0;
  gap: .05rem;
}

.monthly-dashboard-monitor-target-deadline strong,
.monthly-dashboard-monitor-target-deadline small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-target-deadline strong {
  color: inherit;
  font-size: .74rem;
}

.monthly-dashboard-monitor-target-deadline small {
  color: currentColor;
  font-size: .61rem;
  opacity: .8;
}

.monthly-dashboard-monitor-target-deadline.is-danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.monthly-dashboard-monitor-target-deadline.is-warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.monthly-dashboard-monitor-target-deadline.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.monthly-dashboard-monitor-ranking {
  display: grid;
  min-width: 0;
  gap: .4rem;
  padding-top: .65rem;
  border-top: 1px solid #edf2f7;
}

.monthly-dashboard-monitor-ranking h4 {
  margin: 0;
  color: #334155;
  font-size: .72rem;
}

.monthly-dashboard-monitor-ranking > div {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .28rem .65rem;
}

.monthly-dashboard-monitor-ranking-row {
  display: grid;
  grid-template-columns: 1.3rem minmax(0, 1fr) auto;
  min-width: 0;
  gap: .4rem;
  align-items: center;
  padding: .3rem .35rem;
  border-radius: 7px;
  background: #f8fafc;
}

.monthly-dashboard-monitor-ranking-row > b {
  display: grid;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  place-items: center;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: .6rem;
}

.monthly-dashboard-monitor-ranking-row > span {
  display: grid;
  min-width: 0;
  gap: .18rem;
}

.monthly-dashboard-monitor-ranking-row strong {
  overflow: hidden;
  color: #334155;
  font-size: .66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-ranking-row i {
  display: block;
  overflow: hidden;
  height: .24rem;
  border-radius: 999px;
  background: #e2e8f0;
}

.monthly-dashboard-monitor-ranking-row i > em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #3b82f6;
}

.monthly-dashboard-monitor-ranking-row > small {
  color: #475569;
  font-size: .62rem;
  white-space: nowrap;
}

.monthly-dashboard-monitor-ranking-row.is-other {
  background: #fff7ed;
}

.monthly-dashboard-monitor-target-head,
.monthly-dashboard-monitor-work-head,
.monthly-dashboard-monitor-alert-head,
.monthly-dashboard-monitor-reorder-row,
.monthly-dashboard-monitor-stock-brand {
  display: flex;
  min-width: 0;
  gap: .65rem;
  align-items: center;
  justify-content: space-between;
}

.monthly-dashboard-monitor-target-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  gap: .5rem .65rem;
  align-items: start;
}

.monthly-dashboard-monitor-target-head strong,
.monthly-dashboard-monitor-work-head strong,
.monthly-dashboard-monitor-alert-head strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-target-head > div {
  display: grid;
  min-width: 0;
  gap: .1rem;
}

.monthly-dashboard-monitor-target-head > div > span {
  color: #64748b;
  font-size: .68rem;
}

.monthly-dashboard-monitor-target-head h3 {
  overflow: hidden;
  margin: 0;
  color: #0f172a;
  font-size: .92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-icon {
  display: grid;
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 9px;
  place-items: center;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 1.12rem;
}

.monthly-dashboard-monitor-icon.tone-green {
  background: #dcfce7;
  color: #15803d;
}

.monthly-dashboard-monitor-icon.tone-orange {
  background: #ffedd5;
  color: #c2410c;
}

.monthly-dashboard-monitor-icon.tone-purple {
  background: #f3e8ff;
  color: #7e22ce;
}

.monthly-dashboard-monitor-icon.tone-teal {
  background: #ccfbf1;
  color: #0f766e;
}

.monthly-dashboard-monitor-icon.tone-amber {
  background: #fef3c7;
  color: #92400e;
}

.monthly-dashboard-monitor-status-pill,
.monthly-dashboard-monitor-agenda-status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: .24rem .48rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: .64rem;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.monthly-dashboard-monitor-status-pill.is-achieved,
.monthly-dashboard-monitor-agenda-status.is-upcoming,
.monthly-dashboard-monitor-agenda-status.is-clear {
  background: #dcfce7;
  color: #166534;
}

.monthly-dashboard-monitor-status-pill.is-near,
.monthly-dashboard-monitor-agenda-status.is-today {
  background: #fef3c7;
  color: #92400e;
}

.monthly-dashboard-monitor-status-pill.is-behind,
.monthly-dashboard-monitor-status-pill.is-not-configured,
.monthly-dashboard-monitor-status-pill.is-unavailable,
.monthly-dashboard-monitor-status-pill.is-actual-unavailable,
.monthly-dashboard-monitor-agenda-status.is-overdue,
.monthly-dashboard-monitor-agenda-status.is-danger {
  background: #fee2e2;
  color: #991b1b;
}

.monthly-dashboard-monitor-status-pill.is-partial-configuration {
  background: #ffedd5;
  color: #9a3412;
}

.monthly-dashboard-monitor-status-pill.is-zero-target {
  background: #e0f2fe;
  color: #075985;
}

.monthly-dashboard-monitor-target-value {
  display: grid;
  min-width: 0;
  gap: .08rem;
}

.monthly-dashboard-monitor-target-value small,
.monthly-dashboard-monitor-work-card small,
.monthly-dashboard-monitor-alert-card small,
.monthly-dashboard-monitor-reorder-row small {
  color: #64748b;
  font-size: .7rem;
}

.monthly-dashboard-monitor-target-value strong {
  color: #0f172a;
  font-size: 1.15rem;
}

.monthly-dashboard-monitor-target-track {
  display: block;
  overflow: hidden;
  height: .55rem;
  border-radius: 999px;
  background: #e2e8f0;
}

.monthly-dashboard-monitor-target-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #22c55e);
}

.monthly-dashboard-monitor-card-footer {
  display: flex;
  min-width: 0;
  gap: .6rem;
  align-items: center;
  justify-content: space-between;
  color: #64748b;
  font-size: .68rem;
}

.monthly-dashboard-monitor-card-footer a,
.monthly-dashboard-monitor-card-link {
  display: inline-flex;
  flex: 0 0 auto;
  gap: .28rem;
  align-items: center;
  color: #1d4ed8;
  font-size: .68rem;
  font-weight: 700;
  text-decoration: none;
}

.monthly-dashboard-monitor-crm-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
  margin-bottom: .75rem;
}

.monthly-dashboard-monitor-crm-metric {
  display: grid;
  min-width: 0;
  gap: .1rem;
  padding: .55rem .65rem;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
}

.monthly-dashboard-monitor-crm-metric strong {
  color: #0f172a;
  font-size: 1.05rem;
}

.monthly-dashboard-monitor-crm-metric small {
  overflow: hidden;
  color: #64748b;
  font-size: .67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-calendar-grid {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: auto;
  grid-auto-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.monthly-dashboard-monitor-calendar-grid > .monthly-dashboard-monitor-empty {
  grid-column: 1 / -1;
}

.monthly-dashboard-monitor-calendar-weekday {
  padding: .45rem .25rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: .66rem;
  font-weight: 700;
  text-align: center;
}

.monthly-dashboard-monitor-calendar-day {
  min-width: 0;
  min-height: 0;
  padding: .35rem;
  border-right: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
  background: #fff;
}

.monthly-dashboard-monitor-calendar-day:nth-child(7n) {
  border-right: 0;
}

.monthly-dashboard-monitor-calendar-day.is-outside {
  background: #f8fafc;
  color: #94a3b8;
}

.monthly-dashboard-monitor-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px #60a5fa;
}

.monthly-dashboard-monitor-calendar-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .25rem;
  font-size: .68rem;
  font-weight: 800;
}

.monthly-dashboard-monitor-calendar-add {
  appearance: none;
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  place-items: center;
  background: transparent;
  color: #2563eb;
  font-size: .75rem;
  line-height: 1;
}

.monthly-dashboard-monitor-calendar-add:hover,
.monthly-dashboard-monitor-calendar-add:focus-visible {
  border-color: #93c5fd;
  outline: none;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .14);
}

.monthly-dashboard-monitor-calendar-events {
  display: grid;
  min-width: 0;
  gap: .2rem;
}

.monthly-dashboard-monitor-calendar-event {
  appearance: none;
  width: 100%;
  overflow: hidden;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  padding: .16rem .25rem;
  border-left: 3px solid #2563eb;
  border-radius: 4px;
  background: #eff6ff;
  color: #1e40af;
  font-size: .61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

button.monthly-dashboard-monitor-calendar-event {
  cursor: pointer;
}

.monthly-dashboard-monitor-calendar-event:focus-visible,
.monthly-dashboard-monitor-agenda-row:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .3);
  outline-offset: 2px;
}

.monthly-dashboard-monitor-calendar-event.is-overdue {
  border-left-color: #dc2626;
  background: #fef2f2;
  color: #991b1b;
}

.monthly-dashboard-monitor-calendar-event.is-danger {
  border-left-color: #dc2626;
  background: #fef2f2;
  color: #991b1b;
}

.monthly-dashboard-monitor-calendar-event.is-today {
  border-left-color: #d97706;
  background: #fffbeb;
  color: #92400e;
}

.monthly-dashboard-monitor-calendar-more {
  display: block;
  overflow: hidden;
  padding: .14rem .22rem;
  border-left: 3px solid #94a3b8;
  border-radius: 4px;
  background: #f8fafc;
  color: #64748b;
  font-size: .57rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-agenda {
  display: grid;
  min-width: 0;
  gap: .45rem;
}

.monthly-dashboard-monitor-agenda:empty {
  display: none;
}

.monthly-dashboard-monitor-agenda-row {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  min-width: 0;
  gap: .65rem;
  align-items: center;
  padding: .55rem .65rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

button.monthly-dashboard-monitor-agenda-row {
  cursor: pointer;
}

.monthly-dashboard-monitor-agenda-row:hover {
  border-color: #93c5fd;
  box-shadow: 0 5px 12px rgba(30, 64, 175, .06);
}

.monthly-dashboard-monitor-crm-queue {
  display: flex;
  min-width: 0;
  overflow: hidden;
}

.monthly-dashboard-monitor-crm-queue .monthly-dashboard-monitor-agenda {
  flex: 1 1 auto;
  min-height: 0;
  padding-right: .2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  align-content: start;
}

.monthly-dashboard-monitor-crm-queue-section .monthly-dashboard-monitor-agenda-row {
  grid-template-columns: 3.8rem minmax(0, 1fr) auto;
}

.monthly-dashboard-monitor-crm-queue-section .monthly-dashboard-monitor-agenda-row > span:nth-child(2) > small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-agenda-row strong,
.monthly-dashboard-monitor-agenda-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-agenda-row > span:nth-child(1),
.monthly-dashboard-monitor-agenda-row > span:nth-child(2) {
  display: grid;
  gap: .08rem;
}

.monthly-dashboard-monitor-agenda-row > span:nth-child(1) {
  color: #1e40af;
  font-size: .68rem;
}

.monthly-dashboard-monitor-agenda-row > span:nth-child(2) > strong {
  color: #0f172a;
  font-size: .76rem;
}

.monthly-dashboard-monitor-agenda-row > span > span,
.monthly-dashboard-monitor-agenda-row > span > small {
  color: #64748b;
  font-size: .64rem;
}

.monthly-dashboard-monitor-agenda-source-line {
  display: flex !important;
  min-width: 0;
  gap: .28rem;
  align-items: center;
  flex-wrap: wrap;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.monthly-dashboard-monitor-agenda-source {
  display: inline-flex !important;
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  gap: .2rem;
  align-items: center;
  padding: .12rem .38rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .61rem !important;
  font-weight: 700;
  line-height: 1.2;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.monthly-dashboard-monitor-agenda-source > i {
  flex: 0 0 auto;
  font-size: .71rem;
}

.monthly-dashboard-monitor-agenda-source.is-line {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #166534 !important;
}

.monthly-dashboard-monitor-agenda-source.is-crm {
  border-color: #bfdbfe;
  background: #dbeafe;
  color: #1d4ed8 !important;
}

.monthly-dashboard-monitor-agenda-source.is-manual {
  border-color: #e9d5ff;
  background: #f3e8ff;
  color: #7e22ce !important;
}

.monthly-dashboard-monitor-agenda-source.is-other {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #475569 !important;
}

.monthly-dashboard-monitor-agenda-phone,
.monthly-dashboard-monitor-agenda-source-detail {
  overflow: hidden !important;
  color: #64748b !important;
  font-size: .64rem !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.monthly-dashboard-monitor-inventory-time {
  margin: -.35rem 0 .65rem;
  color: #64748b;
  font-size: .7rem;
}

.monthly-dashboard-monitor-vehicle-stock {
  display: grid;
  min-width: 0;
  gap: .7rem;
}

.monthly-dashboard-monitor-inventory-grid .monthly-dashboard-monitor-section,
.monthly-dashboard-monitor-stock-section,
.monthly-dashboard-monitor-reorder-section {
  padding: .9rem;
}

.monthly-dashboard-monitor-inventory-grid .monthly-dashboard-monitor-heading,
.monthly-dashboard-monitor-stock-section .monthly-dashboard-monitor-heading,
.monthly-dashboard-monitor-reorder-section .monthly-dashboard-monitor-heading {
  margin-bottom: .65rem;
}

.monthly-dashboard-monitor-inventory-grid .monthly-dashboard-monitor-stock-total,
.monthly-dashboard-monitor-stock-section .monthly-dashboard-monitor-stock-total {
  grid-template-columns: 2.5rem minmax(0, 1fr) repeat(2, auto);
  padding: .7rem;
}

.monthly-dashboard-monitor-inventory-grid .monthly-dashboard-monitor-stock-total > div:nth-child(n + 3),
.monthly-dashboard-monitor-stock-section .monthly-dashboard-monitor-stock-total > div:nth-child(n + 3) {
  text-align: right;
}

.monthly-dashboard-monitor-inventory-grid .monthly-dashboard-monitor-reorder-items,
.monthly-dashboard-monitor-inventory-grid .monthly-dashboard-monitor-stock-brands,
.monthly-dashboard-monitor-reorder-section .monthly-dashboard-monitor-reorder-items,
.monthly-dashboard-monitor-stock-section .monthly-dashboard-monitor-stock-brands {
  max-height: 18rem;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.monthly-dashboard-monitor-stock-total {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1.4fr) repeat(2, minmax(0, .8fr));
  min-width: 0;
  gap: .65rem;
  align-items: center;
  padding: .85rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f766e, #0f5f78);
  color: #fff;
}

.monthly-dashboard-monitor-stock-total .monthly-dashboard-monitor-icon {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

.monthly-dashboard-monitor-stock-total > div {
  display: grid;
  min-width: 0;
  gap: .05rem;
}

.monthly-dashboard-monitor-stock-total span {
  color: rgba(255, 255, 255, .76);
  font-size: .63rem;
}

.monthly-dashboard-monitor-stock-total strong {
  overflow: hidden;
  font-size: .9rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-stock-total > div:nth-child(2) strong {
  font-size: 1.35rem;
}

.monthly-dashboard-monitor-stock-locations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  min-width: 0;
  gap: .45rem;
}

.monthly-dashboard-monitor-stock-locations > span {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-width: 0;
  gap: .08rem .5rem;
  align-items: center;
  padding: .5rem .6rem;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  background: #f0fdfa;
}

.monthly-dashboard-monitor-stock-locations small {
  color: #0f766e;
  font-size: .7rem;
  font-weight: 800;
}

.monthly-dashboard-monitor-stock-locations strong {
  overflow: hidden;
  color: #134e4a;
  font-size: .82rem;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-stock-locations em {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #64748b;
  font-size: .62rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-stock-brands {
  display: grid;
  min-width: 0;
  gap: .35rem;
}

.monthly-dashboard-monitor-stock-brand {
  display: grid;
  grid-template-columns: minmax(5rem, .8fr) minmax(4rem, 1fr) auto;
  min-width: 0;
  gap: .55rem;
  align-items: center;
  padding: .5rem 0;
  border-bottom: 1px solid #edf2f7;
  font-size: .76rem;
}

.monthly-dashboard-monitor-stock-brand > span {
  display: grid;
  min-width: 0;
}

.monthly-dashboard-monitor-stock-brand strong,
.monthly-dashboard-monitor-stock-brand small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-stock-brand strong {
  color: #0f172a;
  font-size: .72rem;
}

.monthly-dashboard-monitor-stock-brand small,
.monthly-dashboard-monitor-stock-brand em {
  color: #64748b;
  font-size: .64rem;
  font-style: normal;
}

.monthly-dashboard-monitor-stock-brand > div {
  overflow: hidden;
  height: .4rem;
  border-radius: 999px;
  background: #e2e8f0;
}

.monthly-dashboard-monitor-stock-brand > div > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0d9488;
}

.monthly-dashboard-monitor-stock-brand:last-child {
  border-bottom: 0;
}

.monthly-dashboard-monitor-work-card {
  display: grid;
  gap: .55rem;
  color: inherit;
  text-decoration: none;
}

.monthly-dashboard-monitor-work-card.has-pending {
  border-color: #fed7aa;
  background: #fffaf4;
}

.monthly-dashboard-monitor-work-card.is-clear {
  border-color: #bbf7d0;
  background: #f8fff9;
}

.monthly-dashboard-monitor-work-head {
  width: 100%;
}

.monthly-dashboard-monitor-work-head > strong {
  flex: 1 1 auto;
}

.monthly-dashboard-monitor-work-head > em {
  min-width: 1.8rem;
  padding: .24rem .42rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: .72rem;
  font-style: normal;
  font-weight: 800;
  text-align: center;
}

.monthly-dashboard-monitor-work-card.has-pending .monthly-dashboard-monitor-work-head > em {
  background: #ffedd5;
  color: #9a3412;
}

.monthly-dashboard-monitor-work-card:hover,
.monthly-dashboard-monitor-work-card:focus-visible {
  border-color: #93c5fd;
  color: inherit;
  box-shadow: 0 7px 18px rgba(30, 64, 175, .08);
}

.monthly-dashboard-monitor-work-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
}

.monthly-dashboard-monitor-work-counts.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.monthly-dashboard-monitor-work-counts > span,
.monthly-dashboard-monitor-work-counts > a {
  display: grid;
  padding: .45rem;
  border-radius: 7px;
  background: #f8fafc;
}

.monthly-dashboard-monitor-work-counts > a {
  color: inherit;
  text-decoration: none;
  transition: background-color .16s ease, box-shadow .16s ease;
}

.monthly-dashboard-monitor-work-counts > a:hover,
.monthly-dashboard-monitor-work-counts > a:focus-visible {
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #93c5fd;
  outline: none;
}

.monthly-dashboard-monitor-work-counts strong {
  color: #0f172a;
  font-size: 1rem;
}

.monthly-dashboard-monitor-alert-list,
.monthly-dashboard-monitor-reorder-list {
  display: grid;
  min-width: 0;
  gap: .55rem;
}

.monthly-dashboard-monitor-alert-card {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
  border-color: #fed7aa;
  background: #fffaf4;
}

.monthly-dashboard-monitor-alert-card.is-clear {
  border-color: #bbf7d0;
  background: #f8fff9;
}

.monthly-dashboard-monitor-alert-card.is-danger:not(.is-clear),
.monthly-dashboard-monitor-alert-card.is-error {
  border-color: #fecaca;
  background: #fff7f7;
}

.monthly-dashboard-monitor-alert-card.is-danger:not(.is-clear) .monthly-dashboard-monitor-alert-icon,
.monthly-dashboard-monitor-alert-card.is-error .monthly-dashboard-monitor-alert-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.monthly-dashboard-monitor-alert-card.is-danger:not(.is-clear) .monthly-dashboard-monitor-alert-action > em {
  background: #fee2e2;
  color: #991b1b;
}

.monthly-dashboard-monitor-alert-icon {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9px;
  place-items: center;
  background: #ffedd5;
  color: #c2410c;
}

.monthly-dashboard-monitor-alert-copy {
  display: grid;
  min-width: 0;
  gap: .3rem;
}

.monthly-dashboard-monitor-alert-copy > small {
  overflow: hidden;
  color: #64748b;
  font-size: .65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-alert-head > strong {
  color: #0f172a;
  font-size: .78rem;
}

.monthly-dashboard-monitor-alert-items {
  display: grid;
  min-width: 0;
  gap: .25rem;
}

.monthly-dashboard-monitor-alert-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  gap: .5rem;
  padding: .42rem .5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, .82);
  color: inherit;
  font-size: .68rem;
  text-decoration: none;
}

.monthly-dashboard-monitor-alert-item > span:first-child {
  display: grid;
  min-width: 0;
}

.monthly-dashboard-monitor-alert-item strong,
.monthly-dashboard-monitor-alert-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-alert-item strong {
  color: #0f172a;
}

.monthly-dashboard-monitor-alert-item small {
  color: #64748b;
  font-size: .63rem;
}

.monthly-dashboard-monitor-alert-action {
  display: grid;
  gap: .35rem;
  justify-items: end;
}

.monthly-dashboard-monitor-alert-action > em {
  min-width: 1.8rem;
  padding: .25rem .42rem;
  border-radius: 999px;
  background: #ffedd5;
  color: #9a3412;
  font-size: .72rem;
  font-style: normal;
  font-weight: 800;
  text-align: center;
}

.monthly-dashboard-monitor-alert-clear {
  display: flex;
  gap: .4rem;
  align-items: center;
  padding: .5rem;
  border-radius: 7px;
  background: #f0fdf4;
  color: #166534;
  font-size: .68rem;
}

.monthly-dashboard-monitor-alert-section .monthly-dashboard-monitor-alert-card {
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-items: start;
}

.monthly-dashboard-monitor-alert-section .monthly-dashboard-monitor-alert-action {
  grid-column: 2;
  grid-template-columns: auto auto;
  justify-content: space-between;
  justify-items: initial;
}

.monthly-dashboard-monitor-alert-section .monthly-dashboard-monitor-alert-copy > small {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: initial;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.monthly-dashboard-monitor-outstanding {
  display: grid;
  min-width: 0;
  gap: .65rem;
}

.monthly-dashboard-monitor-outstanding-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  gap: .5rem;
}

.monthly-dashboard-monitor-outstanding-summary > span {
  display: grid;
  min-width: 0;
  gap: .08rem;
  padding: .55rem .65rem;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.monthly-dashboard-monitor-outstanding-summary small {
  overflow: hidden;
  color: #64748b;
  font-size: .65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-outstanding-summary strong {
  overflow: hidden;
  color: #0f172a;
  font-size: .9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-outstanding-summary > span.is-danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.monthly-dashboard-monitor-outstanding-summary > span.is-danger strong {
  color: #b91c1c;
}

.monthly-dashboard-monitor-outstanding-list {
  display: grid;
  min-width: 0;
  gap: .3rem;
}

.monthly-dashboard-monitor-outstanding-pagination {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding-top: .1rem;
}

.monthly-dashboard-monitor-outstanding-pagination > span {
  color: #64748b;
  font-size: .72rem;
  white-space: nowrap;
}

.monthly-dashboard-monitor-outstanding-pagination > div {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .4rem;
}

.monthly-dashboard-monitor-outstanding-pagination .btn {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.monthly-dashboard-monitor-outstanding-paging-message {
  padding: .45rem .6rem;
  border: 1px solid #fecaca;
  border-radius: 7px;
  background: #fff7f7;
  color: #b91c1c;
  font-size: .72rem;
}

.monthly-dashboard-monitor-outstanding-row {
  display: grid;
  grid-template-columns: 5.6rem minmax(10rem, 1.3fr) minmax(8rem, 1fr) minmax(7.5rem, .7fr) minmax(8.8rem, .85fr) 1rem;
  min-width: 0;
  gap: .6rem;
  align-items: center;
  padding: .55rem .65rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

button.monthly-dashboard-monitor-outstanding-row {
  width: 100%;
  border: 1px solid #e2e8f0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

a.monthly-dashboard-monitor-outstanding-row:hover,
a.monthly-dashboard-monitor-outstanding-row:focus-visible,
button.monthly-dashboard-monitor-outstanding-row:hover,
button.monthly-dashboard-monitor-outstanding-row:focus-visible {
  border-color: #93c5fd;
  outline: none;
  box-shadow: 0 5px 14px rgba(30, 64, 175, .07);
}

.monthly-dashboard-monitor-outstanding-row > span {
  display: grid;
  min-width: 0;
  gap: .06rem;
}

.monthly-dashboard-monitor-outstanding-row small,
.monthly-dashboard-monitor-outstanding-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-outstanding-row small {
  color: #64748b;
  font-size: .62rem;
}

.monthly-dashboard-monitor-outstanding-row strong {
  color: #0f172a;
  font-size: .72rem;
}

.monthly-dashboard-monitor-outstanding-customer > strong {
  font-size: .76rem;
}

.monthly-dashboard-monitor-outstanding-amount {
  text-align: right;
}

.monthly-dashboard-monitor-outstanding-amount > strong {
  color: #b91c1c;
}

.monthly-dashboard-monitor-outstanding-due {
  padding: .32rem .45rem;
  border-radius: 7px;
  background: #f1f5f9;
}

.monthly-dashboard-monitor-outstanding-due.is-danger {
  background: #fee2e2;
}

.monthly-dashboard-monitor-outstanding-due.is-danger > strong {
  color: #991b1b;
}

.monthly-dashboard-monitor-outstanding-due.is-warning {
  background: #fef3c7;
}

.monthly-dashboard-monitor-outstanding-due.is-warning > strong {
  color: #92400e;
}

.monthly-dashboard-monitor-outstanding-due.is-normal {
  background: #dcfce7;
}

.monthly-dashboard-monitor-outstanding-due.is-normal > strong {
  color: #166534;
}

.monthly-dashboard-monitor-outstanding-row > i {
  color: #2563eb;
}

.monthly-dashboard-monitor-reorder-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(6.5rem, .65fr) auto;
  min-width: 0;
  gap: .65rem;
  align-items: center;
  padding: .55rem 0;
  border-bottom: 1px solid #edf2f7;
}

.monthly-dashboard-monitor-reorder-row > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: .05rem;
}

.monthly-dashboard-monitor-reorder-row > span:nth-child(2) small {
  color: #64748b;
  font-size: .62rem;
}

.monthly-dashboard-monitor-reorder-row > span:nth-child(2) strong {
  color: #0f172a;
  font-size: .7rem;
}

.monthly-dashboard-monitor-reorder-row > em {
  padding: .22rem .4rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: .63rem;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.monthly-dashboard-monitor-reorder-row.is-out > em {
  background: #fee2e2;
  color: #991b1b;
}

.monthly-dashboard-monitor-reorder-row:last-child {
  border-bottom: 0;
}

.monthly-dashboard-monitor-reorder-copy {
  display: grid;
  min-width: 0;
  gap: .1rem;
}

.monthly-dashboard-monitor-reorder-copy strong,
.monthly-dashboard-monitor-reorder-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-monitor-reorder-copy strong {
  color: #0f172a;
  font-size: .7rem;
}

.monthly-dashboard-monitor-reorder-copy small {
  color: #64748b;
  font-size: .62rem;
}

.monthly-dashboard-monitor-reorder-summary {
  display: flex;
  min-width: 0;
  gap: .5rem;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .65rem;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: .68rem;
}

.monthly-dashboard-monitor-reorder-summary .is-danger {
  color: #b91c1c;
}

.monthly-dashboard-monitor-reorder-items {
  display: grid;
  min-width: 0;
}

.monthly-dashboard-monitor-widget-warning {
  grid-column: 1 / -1;
  display: flex;
  gap: .4rem;
  align-items: center;
  margin-bottom: .5rem;
  padding: .45rem .55rem;
  border-radius: 7px;
  background: #fff7ed;
  color: #9a3412;
  font-size: .67rem;
}

.monthly-dashboard-monitor-empty {
  display: grid;
  min-width: 0;
  gap: .25rem;
  justify-items: center;
  padding: 1.3rem .8rem;
  color: #64748b;
  font-size: .76rem;
  text-align: center;
}

.monthly-dashboard-monitor-empty > i {
  color: #94a3b8;
  font-size: 1.35rem;
}

.monthly-dashboard-monitor-empty > strong {
  color: #334155;
  font-size: .76rem;
}

@media (max-width: 1199.98px) {
  .monthly-dashboard-monitor-main-grid,
  .monthly-dashboard-monitor-lower-grid,
  .monthly-dashboard-monitor-inventory-grid,
  .monthly-dashboard-monitor-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .monthly-dashboard-monitor-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monthly-dashboard-monitor-outstanding-row {
    grid-template-columns: 5.2rem minmax(9rem, 1.2fr) minmax(7rem, .9fr) minmax(7rem, .7fr) minmax(8rem, .8fr) 1rem;
  }
}

@media (max-width: 767.98px) {
  .monthly-dashboard-view-tabs,
  .monthly-dashboard-monitor-target-grid,
  .monthly-dashboard-monitor-work-grid,
  .monthly-dashboard-monitor-main-grid,
  .monthly-dashboard-monitor-lower-grid,
  .monthly-dashboard-monitor-inventory-grid,
  .monthly-dashboard-monitor-layout,
  .monthly-dashboard-monitor-crm-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .monthly-dashboard-view-tab {
    min-height: 52px;
  }

  .monthly-dashboard-monitor-meta {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .monthly-dashboard-layout-toolbar,
  .monthly-dashboard-layout-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .monthly-dashboard-layout-actions,
  .monthly-dashboard-layout-actions .btn {
    width: 100%;
  }

  .monthly-dashboard-monitor-heading {
    display: grid;
  }

  .monthly-dashboard-monitor-heading .btn {
    min-height: 44px;
    width: 100%;
  }

  .monthly-dashboard-monitor-heading-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .monthly-dashboard-monitor-calendar-grid {
    display: none;
  }

  .monthly-dashboard-monitor-calendar-section,
  .monthly-dashboard-monitor-crm-queue-section {
    height: auto;
  }

  .monthly-dashboard-monitor-calendar,
  .monthly-dashboard-monitor-crm-queue {
    flex: 0 1 auto;
  }

  .monthly-dashboard-monitor-crm-queue .monthly-dashboard-monitor-agenda {
    max-height: 34rem;
  }

  .monthly-dashboard-monitor-target-body,
  .monthly-dashboard-monitor-ranking > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .monthly-dashboard-monitor-target-body {
    gap: .35rem;
  }

  .monthly-dashboard-monitor-target-deadline {
    grid-template-columns: 2.15rem minmax(0, 1fr);
  }

  .monthly-dashboard-monitor-target-deadline > span:nth-of-type(n + 2) {
    grid-column: 2;
  }

  .monthly-dashboard-monitor-outstanding-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .monthly-dashboard-monitor-outstanding-row {
    grid-template-columns: 5rem minmax(0, 1fr) 1rem;
    align-items: start;
  }

  .monthly-dashboard-monitor-outstanding-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .monthly-dashboard-monitor-outstanding-pagination > div {
    justify-content: flex-start;
  }

  .monthly-dashboard-monitor-outstanding-customer,
  .monthly-dashboard-monitor-outstanding-vehicle,
  .monthly-dashboard-monitor-outstanding-amount,
  .monthly-dashboard-monitor-outstanding-due {
    grid-column: 2;
    text-align: left;
  }

  .monthly-dashboard-monitor-outstanding-row > i {
    grid-column: 3;
    grid-row: 1;
  }

  .monthly-dashboard-monitor-gauge svg {
    width: min(100%, 12rem);
  }

  .monthly-dashboard-monitor-agenda-row {
    grid-template-columns: 4.1rem minmax(0, 1fr);
  }

  .monthly-dashboard-monitor-agenda-row > :last-child {
    grid-column: 2;
  }

  .monthly-dashboard-monitor-alert-card {
    grid-template-columns: 2.25rem minmax(0, 1fr);
  }

  .monthly-dashboard-monitor-alert-card > :last-child {
    grid-column: 2;
  }

  .monthly-dashboard-monitor-target-head {
    display: grid;
    grid-template-columns: 2.35rem minmax(0, 1fr);
  }

  .monthly-dashboard-monitor-target-head > :last-child {
    grid-column: 2;
  }

  .monthly-dashboard-monitor-stock-total {
    grid-template-columns: 2.5rem minmax(0, 1fr);
  }

  .monthly-dashboard-monitor-stock-total > div:nth-child(n + 3) {
    grid-column: 2;
  }

  .monthly-dashboard-monitor-reorder-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .monthly-dashboard-monitor-reorder-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .monthly-dashboard-monitor-reorder-row > span:nth-child(2) {
    grid-column: 1;
  }

  .monthly-dashboard-monitor-reorder-row > em {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 419.98px) {
  .monthly-dashboard-monitor-section {
    padding: .75rem;
  }

  .monthly-dashboard-monitor-target-components {
    grid-template-columns: minmax(0, 1fr);
  }

  .monthly-dashboard-monitor-target-values {
    grid-template-columns: minmax(0, 1fr);
  }

  .monthly-dashboard-monitor-outstanding-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .monthly-dashboard-monitor-outstanding-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .monthly-dashboard-monitor-outstanding-row > span,
  .monthly-dashboard-monitor-outstanding-row > i {
    grid-column: 1;
  }

  .monthly-dashboard-monitor-outstanding-row > i {
    display: none;
  }

  .monthly-dashboard-monitor-agenda-row,
  .monthly-dashboard-monitor-crm-queue-section .monthly-dashboard-monitor-agenda-row {
    grid-template-columns: 3.6rem minmax(0, 1fr);
  }

  .monthly-dashboard-monitor-agenda-row > :last-child {
    grid-column: 2;
  }

  .monthly-dashboard-monitor-ranking-row {
    grid-template-columns: 1.3rem minmax(0, 1fr);
  }

  .monthly-dashboard-monitor-ranking-row > small {
    grid-column: 2;
  }

  .monthly-dashboard-monitor-alert-item,
  .monthly-dashboard-monitor-reorder-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .monthly-dashboard-monitor-reorder-row > em {
    grid-column: 1;
    grid-row: auto;
    width: fit-content;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .monthly-dashboard-view-tab,
  .monthly-dashboard-monitor-skeleton,
  .monthly-dashboard-monitor-work-card {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 419.98px) {
  .bank-reconciliation-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .bank-reconciliation-command-bar,
  .bank-reconciliation-list-panel,
  .bank-reconciliation-existing-section,
  .bank-reconciliation-candidate-section,
  .bank-reconciliation-allocation-section {
    padding: 12px;
  }

  .bank-reconciliation-status-tabs .btn {
    flex: 1 1 calc(50% - 8px);
  }

  .bank-reconciliation-candidate-select {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .bank-reconciliation-score {
    grid-column: 2;
    width: fit-content;
  }

  .bank-reconciliation-pager .btn,
  .bank-reconciliation-candidate-pager .btn {
    min-width: 0;
  }
}

body {
  min-height: 100vh;
  background: #f6f8fb;
  font-family: "Sarabun", "TH Sarabun New", "Leelawadee UI", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.app-test-environment .topbar-shell {
  border-bottom-color: rgba(214, 51, 108, 0.35);
}

.test-environment-banner {
  background: #b42318;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0.35rem 1rem rgba(180, 35, 24, 0.18);
  font-size: 0.92rem;
  padding: 0.55rem 0;
}

.test-environment-banner .ti {
  font-size: 1.15rem;
}

.test-login-banner {
  background: #fff1f0;
  border: 1px solid #f1a8a0;
  border-left: 4px solid #b42318;
  border-radius: 8px;
  color: #7a271a;
  padding: 0.85rem 1rem;
  box-shadow: 0 0.4rem 1.2rem rgba(122, 39, 26, 0.08);
}

button,
input,
select,
textarea,
.page,
.modal,
.dropdown-menu,
.gridjs-container {
  font-family: "Sarabun", "TH Sarabun New", "Leelawadee UI", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.page {
  min-height: 100dvh;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.page-body {
  flex: 1 0 auto;
  padding-bottom: 1.5rem;
}

/* Keep every CRM workspace on the same heading rhythm: title starts near the
   menu bar, actions stay on the opposite edge, and the first working panel
   always has a deliberate gap below the header. */
.page-wrapper .crm-page-header {
  margin: 0.875rem 0 1rem;
  min-width: 0;
}

.crm-page-header .row {
  width: 100%;
}

.crm-page-header .col {
  min-width: 0;
}

.crm-page-header .page-pretitle,
.crm-page-header .page-title,
.crm-page-header .crm-page-subtitle {
  text-align: left;
}

.crm-page-header .page-title {
  justify-content: flex-start;
}

.crm-page-header .crm-page-subtitle {
  max-width: 62rem;
  margin: 0.25rem 0 0;
  color: var(--tblr-secondary-color);
}

@media (max-width: 767.98px) {
  .page-wrapper .crm-page-header {
    margin-top: 0.75rem;
    margin-bottom: 0.875rem;
  }
}

.footer {
  flex-shrink: 0;
  padding: 1rem 0;
  border-top: 1px solid rgba(4, 32, 69, 0.08);
  background: transparent;
}

.form-control:focus,
.btn:focus {
  box-shadow: 0 0 0 0.25rem rgba(32, 107, 196, 0.15);
}

.section-label {
  font-size: 1.12rem;
  font-weight: 700;
  color: #0b4ea2;
  padding-bottom: 0.45rem;
  margin-top: 1.5rem;
  margin-bottom: 0.9rem;
  border-bottom: 2px solid rgba(32, 107, 196, 0.72);
}

.modal-body > .section-label:first-of-type,
.d-flex > .section-label {
  margin-top: 0;
}

.transaction-search-panel,
.sale-order-search-panel {
  padding: 0.65rem 0.75rem;
}

.transaction-filter-bar,
.sale-order-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.5rem 0.75rem;
}

.transaction-keyword-field,
.sale-order-keyword-field {
  flex: 1 1 320px;
  max-width: 560px;
  min-width: 240px;
}

.transaction-date-field,
.sale-order-date-field {
  flex: 0 0 150px;
}

.transaction-date-preset-field {
  flex: 0 0 160px;
}

.transaction-date-preset-field .dropdown,
.transaction-date-preset-field .btn {
  width: 100%;
}

.transaction-date-preset-field .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.transaction-date-preset-field .dropdown-menu {
  min-width: 100%;
}

.transaction-status-field,
.sale-order-status-field {
  flex: 0 0 150px;
}

.transaction-branch-field,
.transaction-finance-field,
.sale-order-branch-field,
.sale-order-finance-field {
  flex: 0 0 180px;
}

.transaction-search-actions,
.sale-order-search-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
}

.transaction-search-actions .btn,
.sale-order-search-actions .btn {
  min-width: 92px;
}

.transaction-search-panel .form-label,
.sale-order-search-panel .form-label {
  margin-bottom: 0.2rem;
  font-size: 0.75rem;
  color: var(--tblr-secondary, #667085);
}

.transaction-pager,
.sale-order-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid var(--tblr-border-color, #dce3ef);
  background: var(--tblr-card-bg, #fff);
}

@media (max-width: 767.98px) {
  .transaction-search-panel .transaction-filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 0.5rem 0.6rem;
  }

  .transaction-search-panel .transaction-keyword-field,
  .transaction-search-panel .transaction-date-preset-field,
  .transaction-search-panel .transaction-date-field,
  .transaction-search-panel .transaction-status-field,
  .transaction-search-panel .transaction-finance-field,
  .transaction-search-panel .transaction-branch-field {
    flex: none;
    grid-column: auto;
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .transaction-search-panel .transaction-search-actions {
    display: grid;
    flex: none;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: none;
    min-width: 0;
    gap: 0.5rem;
  }

  .transaction-search-panel .transaction-search-actions .btn {
    flex: none;
    width: 100%;
    min-width: 0;
  }

  .transaction-keyword-field,
  .transaction-branch-field,
  .transaction-status-field,
  .transaction-finance-field,
  .transaction-search-actions,
  .sale-order-keyword-field,
  .sale-order-branch-field,
  .sale-order-finance-field,
  .sale-order-status-field,
  .sale-order-search-actions {
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
  }

  .transaction-date-field,
  .transaction-date-preset-field,
  .sale-order-date-field {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 130px;
  }

  .transaction-search-actions .btn,
  .sale-order-search-actions .btn {
    flex: 1 1 0;
  }

  .transaction-pager,
  .sale-order-pager {
    align-items: stretch;
    flex-direction: column;
  }

  .transaction-pager .btn-list,
  .sale-order-pager .btn-list {
    justify-content: space-between;
  }

  .transaction-pager .btn,
  .sale-order-pager .btn {
    flex: 1 1 0;
  }
}

.payment-split-control {
  --payment-control-height: 2.5rem;
  --payment-cash: #2fb344;
  --payment-transfer: #206bc4;
  --payment-card: #6f42c1;
  --payment-company-transfer: #d63939;
  container: payment-split / inline-size;
  min-width: 0;
}

.payment-split-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.payment-split-header .form-label {
  margin-bottom: 0;
}

.payment-split-entry {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(17rem, 1fr);
  gap: 0.5rem;
  align-items: end;
}

.payment-split-input {
  height: var(--payment-control-height);
  min-height: var(--payment-control-height);
  max-height: var(--payment-control-height);
  font-weight: 700;
  align-self: end;
}

.payment-split-actions {
  display: grid;
  gap: 0;
  min-width: 0;
}

.payment-split-methods {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  min-width: 0;
  align-items: end;
}

.payment-split-method-wrap {
  min-width: 0;
  display: grid;
  align-content: end;
}

.payment-split-method-amount {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 1.75rem;
  margin-bottom: 0.3rem;
  padding: 0.18rem 0.32rem;
  border: 1px solid currentColor;
  border-radius: 0.35rem;
  box-sizing: border-box;
  background: #fff;
  font-size: 0.79rem;
  font-weight: 800;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
}

.payment-split-summary-text {
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.25rem;
  overflow: hidden;
}

.payment-split-summary-method {
  flex: 0 0 auto;
}

.payment-split-summary-text [data-payment-summary-amount] {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-split-method-amount[hidden] {
  display: none !important;
}

.payment-split-method-amount-cash {
  color: var(--payment-cash);
  background: rgba(47, 179, 68, 0.06);
}

.payment-split-method-amount-transfer {
  color: var(--payment-transfer);
  background: rgba(32, 107, 196, 0.06);
}

.payment-split-method-amount-card {
  color: var(--payment-card);
  background: rgba(111, 66, 193, 0.06);
}

.payment-split-method-amount-company-transfer {
  color: var(--payment-company-transfer);
  background: rgba(214, 57, 57, 0.06);
}

.payment-split-method {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  justify-content: center;
  gap: 0.35rem;
  font-weight: 700;
  height: var(--payment-control-height);
  min-height: var(--payment-control-height);
  max-height: var(--payment-control-height);
  line-height: 1.15;
  white-space: normal;
  border-width: 1px;
}

.payment-split-method i {
  font-size: 1rem;
}

.payment-split-method-cash {
  color: var(--payment-cash);
  border-color: rgba(47, 179, 68, 0.35);
  background: rgba(47, 179, 68, 0.08);
}

.payment-split-method-transfer {
  color: var(--payment-transfer);
  border-color: rgba(32, 107, 196, 0.35);
  background: rgba(32, 107, 196, 0.08);
}

.payment-split-method-card {
  color: var(--payment-card);
  border-color: rgba(111, 66, 193, 0.35);
  background: rgba(111, 66, 193, 0.08);
}

.payment-split-method-company-transfer {
  color: var(--payment-company-transfer);
  border-color: rgba(214, 57, 57, 0.35);
  background: rgba(214, 57, 57, 0.08);
}

.payment-split-method:not(:disabled):hover {
  filter: saturate(1.12);
  transform: translateY(-1px);
}

.payment-split-method.is-used,
.payment-split-method:disabled {
  color: #64748b !important;
  border-color: #d9dee7 !important;
  background: #f1f5f9 !important;
  opacity: 1;
  cursor: not-allowed;
  transform: none;
}

.payment-split-method.is-used i,
.payment-split-method:disabled i {
  color: #64748b;
}

.payment-split-note-row {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(17rem, 1fr);
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.payment-split-note-row .form-label {
  margin-bottom: 0;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
}

.payment-split-note-input {
  min-height: 2.25rem;
}

.payment-split-note-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: center;
}

.payment-split-note-line .payment-split-note-input {
  grid-column: span 3;
}

.payment-split-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 2rem;
  margin-top: 0.55rem;
}

.payment-split-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0.25rem 0.35rem 0.25rem 0.55rem;
  border: 1px solid currentColor;
  border-radius: 0.35rem;
  background: #fff;
  font-weight: 700;
}

.payment-split-chip-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
}

.payment-split-chip-cash {
  color: var(--payment-cash);
  background: rgba(47, 179, 68, 0.06);
}

.payment-split-chip-transfer {
  color: var(--payment-transfer);
  background: rgba(32, 107, 196, 0.06);
}

.payment-split-chip-card {
  color: var(--payment-card);
  background: rgba(111, 66, 193, 0.06);
}

.payment-split-chip-company-transfer {
  color: var(--payment-company-transfer);
  background: rgba(214, 57, 57, 0.06);
}

.payment-split-remove {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  touch-action: manipulation;
}

.payment-split-remove:not(:disabled):hover {
  background: rgba(15, 23, 42, 0.08);
}

.payment-split-remove:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

.payment-split-remove:disabled {
  cursor: not-allowed;
}

.payment-split-total {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.35rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 2.25rem;
  padding: 0.38rem 0.75rem;
  border: 1px solid rgba(32, 107, 196, 0.24);
  border-radius: 0.35rem;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(32, 107, 196, 0.1), rgba(32, 107, 196, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--payment-transfer);
  text-align: right;
  white-space: nowrap;
}

.payment-split-total strong {
  color: var(--payment-transfer);
  font-size: 1.05rem;
  line-height: 1;
}

.payment-split-total-standalone {
  width: fit-content;
  margin-top: 0.5rem;
  margin-left: auto;
}

@container payment-split (max-width: 56rem) {
  .payment-split-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .payment-split-entry,
  .payment-split-note-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .payment-split-note-row {
    gap: 0.25rem;
  }

  .payment-split-note-line {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
  }

  .payment-split-note-line .payment-split-note-input {
    grid-column: auto;
  }

  .payment-split-methods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-split-total {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 767.98px) {
  .payment-split-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .payment-split-entry {
    grid-template-columns: 1fr;
  }

  .payment-split-note-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .payment-split-note-line {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .payment-split-note-line .payment-split-note-input {
    grid-column: auto;
  }

  .payment-split-total {
    width: 100%;
    min-width: 0;
  }

  .payment-split-methods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-split-method {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    font-size: 0.82rem;
  }

  .payment-split-method-amount {
    font-size: 0.76rem;
  }
}

.modal .modal-content {
  border: 2px solid rgba(11, 78, 162, 0.62);
  box-shadow: 0 1.5rem 3.5rem rgba(15, 23, 42, 0.28);
}

.modal .modal-header {
  border-bottom-color: rgba(32, 107, 196, 0.32);
}

.modal .modal-footer {
  border-top: 2px solid rgba(11, 78, 162, 0.62);
}

.page-center {
  min-height: 100vh;
}

.container-tight {
  max-width: 420px;
}

.sidebar-shell {
  --bs-offcanvas-width: min(20rem, 86vw);
  border-right: 1px solid rgba(4, 32, 69, 0.1);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 2px 0 24px rgba(15, 23, 42, 0.04);
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100dvh;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  width: 100%;
}

.sidebar-mobile-header {
  padding: 0.25rem 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(4, 32, 69, 0.08);
  margin-bottom: 0.75rem;
}

.sidebar-brand {
  position: relative;
  padding: 0.25rem 0.5rem 0.75rem;
  margin-bottom: 0;
  gap: 0.5rem;
}

.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.sidebar-brand-link:hover {
  color: #206bc4;
}

.sidebar-brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.125rem;
  color: #fff;
  background: #fff;
  box-shadow: 0 8px 20px rgba(32, 107, 196, 0.28);
  overflow: hidden;
  border: 1px solid rgba(32, 107, 196, 0.16);
}

.sidebar-brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.sidebar-brand-sub {
  font-size: 0.7rem;
  color: var(--tblr-secondary);
  letter-spacing: 0.02em;
}

.login-brand-logo {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(32, 107, 196, 0.22);
}

.sidebar-compact-toggle {
  flex: 0 0 auto;
}

.sidebar-collapse {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  margin: 0 0.35rem 0.75rem;
  padding: 0.85rem 0.75rem;
  border: 1px solid rgba(32, 107, 196, 0.12);
  border-radius: 0.75rem;
  background: rgba(32, 107, 196, 0.04);
}

.sidebar-user-avatar {
  background: linear-gradient(135deg, #206bc4, #5c9ded);
  color: #fff;
  font-weight: 700;
}

.user-photo-avatar {
  overflow: hidden;
  background: #eef2f7;
}

.user-photo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user-body {
  min-width: 0;
}

.sidebar-nav-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0.15rem 0.5rem;
  margin-right: -0.15rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(32, 107, 196, 0.35) transparent;
}

.sidebar-favorites-section {
  margin: 0 0.35rem 0.6rem;
  border: 1px solid rgba(32, 107, 196, 0.16);
  border-left: 4px solid #206bc4;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(32, 107, 196, 0.08), rgba(255, 255, 255, 0.82));
  box-shadow: 0 0.35rem 1.1rem rgba(15, 23, 42, 0.04);
  padding: 0.45rem 0.4rem 0.25rem;
}

.menu-theme-list {
  display: grid;
  gap: 0.75rem;
}

.menu-theme-row {
  display: grid;
  grid-template-columns: minmax(17rem, 0.85fr) minmax(20rem, 1.6fr);
  gap: 0.9rem;
  align-items: stretch;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
}

.menu-theme-preview {
  --sidebar-accent: #206bc4;
  --sidebar-accent-rgb: 32, 107, 196;
  --sidebar-soft: rgba(32, 107, 196, 0.1);
  --sidebar-border: rgba(32, 107, 196, 0.2);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--sidebar-border);
  border-left: 4px solid var(--sidebar-accent);
  border-radius: 0.55rem;
  background: linear-gradient(90deg, var(--sidebar-soft), #fff);
}

.menu-theme-preview-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 0.45rem;
  background: var(--sidebar-accent);
  color: #fff;
  box-shadow: 0 0.35rem 0.9rem rgba(var(--sidebar-accent-rgb), 0.24);
}

.menu-theme-preview-text {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.menu-theme-preview-title {
  overflow: hidden;
  color: #0f172a;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-theme-preview-meta {
  overflow: hidden;
  color: #64748b;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-theme-preview-active {
  margin-left: auto;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: var(--sidebar-accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.menu-theme-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.6rem, 1fr));
  gap: 0.45rem;
}

.menu-theme-swatch {
  --sidebar-accent: #206bc4;
  --sidebar-accent-rgb: 32, 107, 196;
  --sidebar-soft: rgba(32, 107, 196, 0.1);
  --sidebar-border: rgba(32, 107, 196, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  min-height: 2.15rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid #dbe3ee;
  border-radius: 0.45rem;
  background: #fff;
  color: #1e293b;
  font-size: 0.76rem;
  font-weight: 600;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.menu-theme-swatch:hover {
  border-color: var(--sidebar-border);
  background: var(--sidebar-soft);
}

.menu-theme-swatch.is-selected {
  border-color: var(--sidebar-accent);
  background: var(--sidebar-soft);
  box-shadow: inset 0 0 0 1px var(--sidebar-accent);
}

.menu-theme-swatch-dot {
  width: 0.85rem;
  height: 0.85rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--sidebar-accent);
  box-shadow: 0 0 0 3px var(--sidebar-soft);
}

@media (max-width: 991.98px) {
  .menu-theme-row {
    grid-template-columns: 1fr;
  }
}

.sidebar-favorites-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f4c9b;
  padding: 0 0.1rem 0.32rem;
}

.sidebar-favorites-count {
  margin-left: auto;
  font-weight: 600;
  color: #64748b;
  background: rgba(100, 116, 139, 0.12);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  line-height: 1.4;
}

.sidebar-favorite-nav {
  gap: 0.25rem;
}

.sidebar-favorite-item .nav-link,
.sidebar-favorite-link {
  flex: 1;
  min-width: 0;
}

.sidebar-item-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

[data-line-inbox-menu-link] {
  position: relative;
}

.line-inbox-menu-badge {
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: auto;
  color: #fff;
  background: #d63939;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff;
}

.line-inbox-menu-badge[hidden] {
  display: none !important;
}

.sidebar-favorite-btn {
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f4c9b;
  background: transparent;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.sidebar-favorite-btn:hover,
.sidebar-favorite-btn:focus-visible {
  color: #0c3f80;
  background: rgba(32, 107, 196, 0.1);
}

.sidebar-favorite-btn:disabled,
.sidebar-favorite-btn.is-disabled {
  color: #94a3b8;
  background: transparent;
  cursor: not-allowed;
  opacity: 0.72;
}

.sidebar-favorite-btn-compact {
  width: 1.4rem;
  height: 1.4rem;
}

.sidebar-favorite-btn .ti {
  font-size: 0.95rem;
}

.sidebar-nav-scroll::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(32, 107, 196, 0.25);
}

.sidebar-groups {
  gap: 0.35rem;
}

.sidebar-subnav-nested {
  margin-left: 0.85rem;
  padding-left: 0.55rem;
  border-left: 1px solid rgba(4, 32, 69, 0.08);
}

.sidebar-group {
  list-style: none;
  --sidebar-accent: #206bc4;
  --sidebar-accent-rgb: 32, 107, 196;
  --sidebar-soft: rgba(32, 107, 196, 0.09);
  --sidebar-softer: rgba(32, 107, 196, 0.045);
  --sidebar-border: rgba(32, 107, 196, 0.18);
}

.sidebar-theme-blue {
  --sidebar-accent: #206bc4;
  --sidebar-accent-rgb: 32, 107, 196;
  --sidebar-soft: rgba(32, 107, 196, 0.1);
  --sidebar-softer: rgba(32, 107, 196, 0.045);
  --sidebar-border: rgba(32, 107, 196, 0.2);
}

.sidebar-theme-green {
  --sidebar-accent: #22a447;
  --sidebar-accent-rgb: 34, 164, 71;
  --sidebar-soft: rgba(34, 164, 71, 0.1);
  --sidebar-softer: rgba(34, 164, 71, 0.045);
  --sidebar-border: rgba(34, 164, 71, 0.2);
}

.sidebar-theme-orange {
  --sidebar-accent: #f76707;
  --sidebar-accent-rgb: 247, 103, 7;
  --sidebar-soft: rgba(247, 103, 7, 0.1);
  --sidebar-softer: rgba(247, 103, 7, 0.045);
  --sidebar-border: rgba(247, 103, 7, 0.22);
}

.sidebar-theme-purple {
  --sidebar-accent: #ae3ec9;
  --sidebar-accent-rgb: 174, 62, 201;
  --sidebar-soft: rgba(174, 62, 201, 0.1);
  --sidebar-softer: rgba(174, 62, 201, 0.045);
  --sidebar-border: rgba(174, 62, 201, 0.22);
}

.sidebar-theme-teal {
  --sidebar-accent: #0ca678;
  --sidebar-accent-rgb: 12, 166, 120;
  --sidebar-soft: rgba(12, 166, 120, 0.1);
  --sidebar-softer: rgba(12, 166, 120, 0.045);
  --sidebar-border: rgba(12, 166, 120, 0.22);
}

.sidebar-theme-red {
  --sidebar-accent: #d63939;
  --sidebar-accent-rgb: 214, 57, 57;
  --sidebar-soft: rgba(214, 57, 57, 0.1);
  --sidebar-softer: rgba(214, 57, 57, 0.045);
  --sidebar-border: rgba(214, 57, 57, 0.22);
}

.sidebar-theme-indigo {
  --sidebar-accent: #4263eb;
  --sidebar-accent-rgb: 66, 99, 235;
  --sidebar-soft: rgba(66, 99, 235, 0.1);
  --sidebar-softer: rgba(66, 99, 235, 0.045);
  --sidebar-border: rgba(66, 99, 235, 0.22);
}

.sidebar-theme-sky {
  --sidebar-accent: #0ea5e9;
  --sidebar-accent-rgb: 14, 165, 233;
  --sidebar-soft: rgba(14, 165, 233, 0.1);
  --sidebar-softer: rgba(14, 165, 233, 0.045);
  --sidebar-border: rgba(14, 165, 233, 0.2);
}

.sidebar-theme-cyan {
  --sidebar-accent: #0891b2;
  --sidebar-accent-rgb: 8, 145, 178;
  --sidebar-soft: rgba(8, 145, 178, 0.1);
  --sidebar-softer: rgba(8, 145, 178, 0.045);
  --sidebar-border: rgba(8, 145, 178, 0.2);
}

.sidebar-theme-emerald {
  --sidebar-accent: #059669;
  --sidebar-accent-rgb: 5, 150, 105;
  --sidebar-soft: rgba(5, 150, 105, 0.1);
  --sidebar-softer: rgba(5, 150, 105, 0.045);
  --sidebar-border: rgba(5, 150, 105, 0.2);
}

.sidebar-theme-lime {
  --sidebar-accent: #65a30d;
  --sidebar-accent-rgb: 101, 163, 13;
  --sidebar-soft: rgba(101, 163, 13, 0.1);
  --sidebar-softer: rgba(101, 163, 13, 0.045);
  --sidebar-border: rgba(101, 163, 13, 0.2);
}

.sidebar-theme-amber {
  --sidebar-accent: #d97706;
  --sidebar-accent-rgb: 217, 119, 6;
  --sidebar-soft: rgba(217, 119, 6, 0.1);
  --sidebar-softer: rgba(217, 119, 6, 0.045);
  --sidebar-border: rgba(217, 119, 6, 0.22);
}

.sidebar-theme-rose {
  --sidebar-accent: #e11d48;
  --sidebar-accent-rgb: 225, 29, 72;
  --sidebar-soft: rgba(225, 29, 72, 0.1);
  --sidebar-softer: rgba(225, 29, 72, 0.045);
  --sidebar-border: rgba(225, 29, 72, 0.22);
}

.sidebar-theme-pink {
  --sidebar-accent: #db2777;
  --sidebar-accent-rgb: 219, 39, 119;
  --sidebar-soft: rgba(219, 39, 119, 0.1);
  --sidebar-softer: rgba(219, 39, 119, 0.045);
  --sidebar-border: rgba(219, 39, 119, 0.22);
}

.sidebar-theme-violet {
  --sidebar-accent: #7c3aed;
  --sidebar-accent-rgb: 124, 58, 237;
  --sidebar-soft: rgba(124, 58, 237, 0.1);
  --sidebar-softer: rgba(124, 58, 237, 0.045);
  --sidebar-border: rgba(124, 58, 237, 0.22);
}

.sidebar-theme-slate {
  --sidebar-accent: #475569;
  --sidebar-accent-rgb: 71, 85, 105;
  --sidebar-soft: rgba(71, 85, 105, 0.1);
  --sidebar-softer: rgba(71, 85, 105, 0.045);
  --sidebar-border: rgba(71, 85, 105, 0.2);
}

.sidebar-group + .sidebar-group {
  margin-top: 0.15rem;
}

.sidebar-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  background: transparent;
  color: #1e293b;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-group-toggle:hover {
  background: var(--sidebar-softer);
  border-color: var(--sidebar-border);
  color: var(--sidebar-accent);
}

.sidebar-group-toggle:not(.collapsed) {
  background: linear-gradient(90deg, var(--sidebar-soft), rgba(255, 255, 255, 0.72));
  border-color: var(--sidebar-border);
  box-shadow: inset 4px 0 0 var(--sidebar-accent), 0 0.35rem 1rem rgba(15, 23, 42, 0.05);
  color: var(--sidebar-accent);
}

.sidebar-group-leading {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sidebar-accent);
  color: #fff;
  box-shadow: 0 0.35rem 0.9rem rgba(var(--sidebar-accent-rgb), 0.24);
  flex-shrink: 0;
}

.sidebar-group-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-group-count {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  background: rgba(100, 116, 139, 0.12);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  line-height: 1.4;
}

.sidebar-group-chevron {
  font-size: 0.95rem;
  color: rgba(var(--sidebar-accent-rgb), 0.62);
  transition: transform 0.2s ease;
}

.sidebar-group-toggle:not(.collapsed) .sidebar-group-chevron,
.sidebar-submenu-toggle:not(.collapsed) .sidebar-submenu-chevron {
  transform: rotate(180deg);
}

.sidebar-group-nav {
  padding: 0.15rem 0 0.35rem 0.35rem;
}

.sidebar-footer {
  padding: 0.75rem 0.35rem 0;
  border-top: 1px solid rgba(4, 32, 69, 0.08);
  margin-top: 0.35rem;
}

.btn-sidebar-logout {
  border: 1px solid rgba(4, 32, 69, 0.12);
  background: #fff;
  color: #475569;
  font-weight: 600;
}

.btn-sidebar-logout:hover {
  background: #fef2f2;
  border-color: rgba(214, 57, 57, 0.25);
  color: #d63939;
}

.topbar-shell {
  min-height: 4rem;
  border-bottom: 1px solid rgba(4, 32, 69, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.topbar-title {
  min-width: 0;
}

.topbar-actions {
  min-width: 0;
}

.menu-group-filter {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  max-width: min(42vw, 18rem);
  position: relative;
}

.menu-group-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  overflow: visible;
}

.menu-group-pill,
.menu-group-more-toggle {
  --sidebar-accent: #206bc4;
  --sidebar-accent-rgb: 32, 107, 196;
  --sidebar-soft: rgba(32, 107, 196, 0.1);
  min-height: 2.25rem;
  border: 1px solid rgba(var(--sidebar-accent-rgb), 0.2);
  border-radius: 999px;
  background: #fff;
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.42rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.menu-group-pill {
  flex: 0 1 auto;
  max-width: 8.5rem;
}

.menu-group-pill .ti,
.menu-group-more-toggle .ti {
  flex: 0 0 auto;
  font-size: 1rem;
}

.menu-group-pill-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-group-pill:hover,
.menu-group-more-toggle:hover,
.menu-group-pill:focus-visible,
.menu-group-more-toggle:focus-visible {
  border-color: rgba(var(--sidebar-accent-rgb), 0.34);
  background: var(--sidebar-soft);
  color: var(--sidebar-accent);
  box-shadow: 0 0.35rem 0.95rem rgba(var(--sidebar-accent-rgb), 0.12);
}

.menu-group-pill.is-active {
  border-color: var(--sidebar-accent);
  background: var(--sidebar-accent);
  color: #fff;
  box-shadow: 0 0.45rem 1.05rem rgba(var(--sidebar-accent-rgb), 0.22);
}

.menu-group-pill-all {
  --sidebar-accent: #0f4c9b;
  --sidebar-accent-rgb: 15, 76, 155;
  --sidebar-soft: rgba(15, 76, 155, 0.1);
}

.menu-group-more {
  flex: 0 0 auto;
  position: relative;
}

.menu-group-more-toggle[aria-expanded="true"] {
  border-color: #206bc4;
  background: rgba(32, 107, 196, 0.1);
  color: #0f4c9b;
}

.menu-group-more-toggle.is-active {
  border-color: #206bc4;
  background: #206bc4;
  color: #fff;
  box-shadow: 0 0.45rem 1.05rem rgba(32, 107, 196, 0.22);
}

.menu-group-more-toggle.is-active[aria-expanded="true"] {
  border-color: #0f4c9b;
  background: #0f4c9b;
  color: #fff;
}

.menu-group-more-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 1060;
  width: min(92vw, 32rem);
  padding: 0.75rem;
  border: 1px solid rgba(4, 32, 69, 0.12);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1.2rem 2.8rem rgba(15, 23, 42, 0.18);
}

.menu-group-more-panel[hidden] {
  display: none !important;
}

.menu-group-more-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0.1rem 0.55rem;
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 800;
}

.menu-group-more-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  max-height: min(64vh, 27rem);
  overflow-y: auto;
  padding-right: 0.15rem;
}

.menu-group-card {
  --sidebar-accent: #206bc4;
  --sidebar-accent-rgb: 32, 107, 196;
  --sidebar-soft: rgba(32, 107, 196, 0.1);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  min-height: 4.1rem;
  padding: 0.65rem;
  border: 1px solid rgba(var(--sidebar-accent-rgb), 0.18);
  border-radius: 0.65rem;
  background: #fff;
  color: #1e293b;
  text-align: left;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.menu-group-card:hover,
.menu-group-card:focus-visible {
  border-color: rgba(var(--sidebar-accent-rgb), 0.35);
  background: var(--sidebar-soft);
  box-shadow: 0 0.5rem 1.15rem rgba(var(--sidebar-accent-rgb), 0.12);
  transform: translateY(-1px);
}

.menu-group-card.is-active {
  border-color: var(--sidebar-accent);
  background: var(--sidebar-soft);
  box-shadow: inset 4px 0 0 var(--sidebar-accent), 0 0.5rem 1.15rem rgba(var(--sidebar-accent-rgb), 0.12);
}

.menu-group-card-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: var(--sidebar-accent);
  color: #fff;
  box-shadow: 0 0.35rem 0.8rem rgba(var(--sidebar-accent-rgb), 0.2);
}

.menu-group-card-text {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.menu-group-card-title {
  overflow: hidden;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-group-card-count {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 600;
}

.sidebar-group-filter-hidden {
  display: none !important;
}

@media (max-width: 1199.98px) {
  .menu-group-filter {
    max-width: 18rem;
  }

  .menu-group-pill {
    max-width: 8rem;
  }
}

.navbar-vertical .nav-link,
.navbar-vertical .sidebar-submenu-toggle {
  border-radius: 0.45rem;
  margin: 0.1rem 0.2rem;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.65rem;
  color: #334155;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.navbar-vertical .nav-link:hover,
.navbar-vertical .sidebar-submenu-toggle:hover {
  color: var(--sidebar-accent, #206bc4);
  background: var(--sidebar-softer, rgba(32, 107, 196, 0.07));
  border-color: var(--sidebar-border, rgba(32, 107, 196, 0.14));
}

.navbar-vertical .nav-link.active,
.navbar-vertical .sidebar-sublink.active {
  color: var(--sidebar-accent, #206bc4);
  background: var(--sidebar-soft, rgba(32, 107, 196, 0.12));
  border-color: var(--sidebar-border, rgba(32, 107, 196, 0.18));
  box-shadow: inset 3px 0 0 var(--sidebar-accent, #206bc4);
  font-weight: 600;
}

.navbar-vertical .nav-link-icon {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.42rem;
  color: var(--sidebar-accent, #206bc4);
  background: rgba(var(--sidebar-accent-rgb, 32, 107, 196), 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.navbar-vertical .nav-link-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-submenu-toggle {
  background: transparent;
}

.sidebar-has-children:has(.sidebar-sublink.active) > .sidebar-submenu-toggle {
  color: var(--sidebar-accent, #206bc4);
  background: var(--sidebar-softer, rgba(32, 107, 196, 0.06));
  font-weight: 600;
}

.sidebar-submenu-chevron {
  margin-left: auto;
  font-size: 0.9rem;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.sidebar-subnav {
  padding: 0.1rem 0 0.25rem 0.15rem;
  margin-left: 0.85rem;
  border-left: 2px solid rgba(var(--sidebar-accent-rgb, 32, 107, 196), 0.16);
}

.sidebar-sublink {
  display: grid !important;
  grid-template-columns: 0.5rem minmax(0, 1fr);
  column-gap: 0.65rem;
  align-items: center;
  padding: 0.4rem 0.65rem 0.4rem 0.85rem !important;
  font-size: 0.875rem;
}

.sidebar-sublink-bullet {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
  justify-self: center;
}

.sidebar-sublink span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stat-card {
  min-height: 8.25rem;
}

.subheader {
  font-size: 0.88rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.stat-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
}

.chart-box {
  height: 20rem;
}

.grid-shell .gridjs-wrapper {
  border: 0;
  box-shadow: none;
}

.grid-shell .gridjs-table {
  width: 100%;
}

.grid-shell .gridjs-th,
.grid-shell .gridjs-td {
  border-color: rgba(4, 32, 69, 0.08);
}

.grid-shell .gridjs-th,
.table thead th {
  font-size: 0.95rem;
  font-weight: 700;
}

.grid-shell .gridjs-footer {
  border-color: rgba(4, 32, 69, 0.08);
  box-shadow: none;
}

#motorcyclePage {
  min-width: 0;
}

#motorcyclePage .motorcycle-list-card,
#motorcyclePage .motorcycle-grid-shell,
#motorcyclePage .gridjs-container {
  min-width: 0;
}

#motorcyclePage .motorcycle-list-card > .card-header {
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

#motorcyclePage .motorcycle-filter-panel {
  border-bottom: 1px solid rgba(4, 32, 69, 0.08);
  padding: 1rem 1.25rem;
}

#motorcyclePage .motorcycle-filter-grid {
  display: grid;
  grid-template-columns: minmax(13rem, 1.45fr) repeat(4, minmax(8.75rem, 1fr)) minmax(6.75rem, 0.65fr);
  gap: 0.75rem;
  align-items: end;
}

#motorcyclePage .motorcycle-filter-field {
  min-width: 0;
}

#motorcyclePage .motorcycle-filter-field .form-label {
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--tblr-secondary-color, #667382);
}

#motorcyclePage .motorcycle-filter-field .form-control,
#motorcyclePage .motorcycle-filter-field .form-select {
  min-height: 2.5rem;
}

#motorcyclePage .motorcycle-grid-shell .gridjs-wrapper {
  overflow-x: clip;
}

#motorcyclePage .motorcycle-master-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
  margin-bottom: 0;
}

#motorcyclePage .motorcycle-master-table .gridjs-th,
#motorcyclePage .motorcycle-master-table .gridjs-td {
  min-width: 0;
  padding: 0.65rem 0.55rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: middle;
}

#motorcyclePage .motorcycle-master-table .gridjs-th {
  color: var(--tblr-primary, #206bc4);
  line-height: 1.25;
}

#motorcyclePage .motorcycle-master-table .gridjs-th-content {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#motorcyclePage .motorcycle-master-table .gridjs-th:nth-child(1) { width: 7%; }
#motorcyclePage .motorcycle-master-table .gridjs-th:nth-child(2) { width: 7%; }
#motorcyclePage .motorcycle-master-table .gridjs-th:nth-child(3) { width: 10%; }
#motorcyclePage .motorcycle-master-table .gridjs-th:nth-child(4) { width: 26.5%; }
#motorcyclePage .motorcycle-master-table .gridjs-th:nth-child(5) { width: 9%; }
#motorcyclePage .motorcycle-master-table .gridjs-th:nth-child(6) { width: 9%; }
#motorcyclePage .motorcycle-master-table .gridjs-th:nth-child(7) { width: 6.5%; }
#motorcyclePage .motorcycle-master-table .gridjs-th:nth-child(8) { width: 7%; }
#motorcyclePage .motorcycle-master-table .gridjs-th:nth-child(9) { width: 8%; }
#motorcyclePage .motorcycle-master-table .gridjs-th:nth-child(10) { width: 10%; }

#motorcyclePage .motorcycle-master-table .gridjs-th:nth-child(5),
#motorcyclePage .motorcycle-master-table .gridjs-th:nth-child(6),
#motorcyclePage .motorcycle-money-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#motorcyclePage .motorcycle-description-cell,
#motorcyclePage .motorcycle-description-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#motorcyclePage .motorcycle-description-text {
  display: block;
  width: 100%;
}

#motorcyclePage .motorcycle-coverage-cell,
#motorcyclePage .motorcycle-status-cell {
  text-align: center;
}

#motorcyclePage .motorcycle-coverage-badge {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  white-space: nowrap;
  line-height: 1.2;
  text-align: center;
}

#motorcyclePage .motorcycle-action-cell .btn-list {
  gap: 0.35rem;
}

#motorcyclePage .gridjs-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}

@media (max-width: 1199.98px) {
  #motorcyclePage .motorcycle-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #motorcyclePage .motorcycle-master-table .gridjs-th,
  #motorcyclePage .motorcycle-master-table .gridjs-td {
    padding: 0.55rem 0.4rem;
    font-size: 0.8125rem;
  }
}

@media (max-width: 991.98px) {
  #motorcyclePage .motorcycle-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #motorcyclePage .motorcycle-filter-keyword {
    grid-column: 1 / -1;
  }

  #motorcyclePage .motorcycle-grid-shell {
    padding: 0.75rem;
  }

  #motorcyclePage .motorcycle-grid-shell .gridjs-head {
    display: none;
  }

  #motorcyclePage .motorcycle-master-table,
  #motorcyclePage .motorcycle-master-table .gridjs-tbody {
    display: block;
  }

  #motorcyclePage .motorcycle-master-table .gridjs-thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  #motorcyclePage .motorcycle-master-table .gridjs-tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0.75rem;
    border: 1px solid rgba(4, 32, 69, 0.1);
    border-radius: 0.625rem;
    background: #fff;
    overflow: hidden;
  }

  #motorcyclePage .motorcycle-master-table .gridjs-td {
    display: flex;
    min-height: 3.75rem;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.2rem;
    border: 0;
    border-bottom: 1px solid rgba(4, 32, 69, 0.07);
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
  }

  #motorcyclePage .motorcycle-master-table .gridjs-td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--tblr-secondary-color, #667382);
  }

  #motorcyclePage .motorcycle-master-table .gridjs-td:only-child {
    grid-column: 1 / -1;
    align-items: center;
    text-align: center;
  }

  #motorcyclePage .motorcycle-master-table .gridjs-td:only-child::before {
    display: none;
  }

  #motorcyclePage .motorcycle-description-cell,
  #motorcyclePage .motorcycle-action-cell {
    grid-column: 1 / -1;
  }

  #motorcyclePage .motorcycle-description-cell {
    overflow: hidden;
  }

  #motorcyclePage .motorcycle-money-cell {
    align-items: flex-end !important;
  }

  #motorcyclePage .motorcycle-coverage-cell,
  #motorcyclePage .motorcycle-status-cell {
    text-align: left;
  }

  #motorcyclePage .motorcycle-action-cell .btn-list {
    width: 100%;
    justify-content: flex-end !important;
  }
}

@media (max-width: 575.98px) {
  #motorcyclePage .motorcycle-filter-panel {
    padding: 0.875rem;
  }

  #motorcyclePage .motorcycle-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #motorcyclePage .motorcycle-filter-keyword {
    grid-column: auto;
  }
}

.grid-shell .grid-image-column {
  width: 3.5rem;
  min-width: 3.5rem;
  max-width: 3.5rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  text-align: center;
  border-top: 1px solid rgba(4, 32, 69, 0.08);
  border-right: 1px solid rgba(4, 32, 69, 0.08);
  border-bottom: 1px solid rgba(4, 32, 69, 0.08);
  border-left: 0;
  background: #fff;
  vertical-align: middle;
}

#registrationPage .registration-master-filter-bar {
  min-width: min(100%, 28rem);
}

#registrationPage .registration-master-filter-select {
  width: auto;
  min-width: 12rem;
}

@media (max-width: 575.98px) {
  #registrationPage .registration-master-filter-bar {
    width: 100%;
    margin-left: 0 !important;
    justify-content: stretch !important;
  }

  #registrationPage .registration-master-filter-select {
    width: 100%;
    min-width: 0;
  }
}

.employee-photo-preview {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(4, 32, 69, 0.12);
  border-radius: 0.5rem;
  background: #f6f8fb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.employee-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.employee-avatar-cell {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
  background: #eef2f7;
}

#employeePage .employee-list-card {
  overflow: hidden;
}

#employeePage .employee-filter-panel {
  border-top: 1px solid var(--tblr-border-color, #dce3ef);
  border-bottom: 1px solid var(--tblr-border-color, #dce3ef);
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9ff 100%);
}

#employeePage .employee-filter-grid {
  display: grid;
  grid-template-columns: minmax(13rem, 1.7fr) repeat(4, minmax(10rem, 1fr));
  gap: .75rem;
  align-items: end;
}

#employeePage .employee-filter-field {
  min-width: 0;
}

#employeePage .employee-filter-keyword {
  min-width: 13rem;
}

#employeePage .employee-filter-page-size {
  max-width: 10rem;
}

#employeePage .employee-mobile-sort-field {
  display: none;
}

#employeePage .employee-grid-shell {
  min-height: 8rem;
}

#employeePage .employee-grid-shell .gridjs-wrapper {
  overflow-x: hidden;
}

#employeePage .employee-master-table {
  width: 100%;
  table-layout: fixed;
  margin-bottom: 0;
}

#employeePage .employee-master-table th,
#employeePage .employee-master-table .gridjs-th {
  padding: .7rem .65rem;
  background: #eaf2fb;
  color: #0f5ca8;
  font-size: .77rem;
  font-weight: 800;
  letter-spacing: .01em;
  vertical-align: middle;
}

#employeePage .employee-master-table th.gridjs-th {
  text-align: center;
}

#employeePage .employee-master-table th.employee-sortable-header .gridjs-th-content {
  float: none !important;
  display: inline-block !important;
  width: auto !important;
  max-width: calc(100% - 1.6rem);
  overflow: visible;
  text-overflow: clip;
  vertical-align: middle;
  white-space: normal;
}

#employeePage .employee-master-table .employee-grid-sort-button {
  float: none !important;
  display: inline-flex !important;
  width: 1rem;
  height: 1rem;
  margin: 0 0 0 .28rem;
  padding: 0;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  background-image: none !important;
  color: currentColor;
}

#employeePage .employee-master-table .employee-grid-sort-button:focus-visible {
  outline: 2px solid #206bc4;
  outline-offset: 2px;
  border-radius: .2rem;
}

#employeePage .employee-master-table th.employee-image-cell,
#employeePage .employee-master-table td.employee-image-cell {
  border-top: 1px solid rgba(4, 32, 69, 0.08) !important;
  border-bottom: 1px solid rgba(4, 32, 69, 0.08) !important;
}

#employeePage .employee-master-table td,
#employeePage .employee-master-table .gridjs-td {
  min-width: 0;
  padding: .7rem .65rem;
  vertical-align: middle;
}

#employeePage .employee-master-table tbody tr:nth-child(even) > td {
  background: #f8fafc;
}

#employeePage .employee-master-table tbody tr:hover > td {
  background: #f1f5f9;
}

#employeePage .employee-two-line-cell {
  min-width: 0;
  display: grid;
  gap: .14rem;
}

#employeePage .employee-row-main {
  min-width: 0;
  color: #172033;
  font-size: .83rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#employeePage .employee-row-subline {
  min-width: 0;
  color: #0f5ca8;
  font-size: .76rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#employeePage .employee-branch-cell,
#employeePage .employee-image-cell,
#employeePage .employee-social-security-cell,
#employeePage .employee-status-cell,
#employeePage .employee-action-cell {
  text-align: center;
}

#employeePage .employee-image-cell .employee-avatar-cell {
  display: inline-block;
}

#employeePage .employee-coverage-badge,
#employeePage .employee-status-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  justify-self: center;
}

#employeePage .employee-action-cell .btn {
  min-width: 2.25rem;
  min-height: 2.25rem;
}

#employeePage .employee-grid-shell .gridjs-footer {
  border-top: 1px solid var(--tblr-border-color, #dce3ef);
  padding: .65rem .85rem;
}

@media (max-width: 1199.98px) {
  #employeePage .employee-filter-grid {
    grid-template-columns: minmax(14rem, 1.5fr) repeat(3, minmax(10rem, 1fr));
  }
}

@media (max-width: 767.98px) {
  #employeePage .employee-filter-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  #employeePage .employee-filter-keyword {
    grid-column: 1 / -1;
  }

  #employeePage .employee-filter-page-size {
    max-width: none;
  }

  #employeePage .employee-mobile-sort-field {
    display: block;
  }

  #employeePage .employee-master-table,
  #employeePage .employee-master-table tbody,
  #employeePage .employee-master-table tr,
  #employeePage .employee-master-table td {
    display: block;
    width: 100%;
  }

  #employeePage .employee-master-table thead {
    display: none;
  }

  #employeePage .employee-master-table tbody {
    display: grid;
    gap: .65rem;
    padding: .65rem;
  }

  #employeePage .employee-master-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    grid-template-areas:
      "photo branch branch"
      "profile profile profile"
      "user user user"
      "organization organization organization"
      "schedule schedule schedule"
      "social status action";
    gap: .5rem .7rem;
    padding: .75rem;
    border: 1px solid var(--tblr-border-color, #dce3ef);
    border-radius: .65rem;
    background: #fff;
  }

  #employeePage .employee-master-table.employee-no-work-schedule.employee-has-social-security tbody tr {
    grid-template-areas:
      "photo branch branch"
      "profile profile profile"
      "user user user"
      "organization organization organization"
      "social status action";
  }

  #employeePage .employee-master-table.employee-has-work-schedule.employee-no-social-security tbody tr {
    grid-template-areas:
      "photo branch branch"
      "profile profile profile"
      "user user user"
      "organization organization organization"
      "schedule schedule schedule"
      "status status action";
  }

  #employeePage .employee-master-table.employee-no-work-schedule.employee-no-social-security tbody tr {
    grid-template-areas:
      "photo branch branch"
      "profile profile profile"
      "user user user"
      "organization organization organization"
      "status status action";
  }

  #employeePage .employee-master-table tbody td {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent !important;
    text-align: left;
  }

  #employeePage .employee-branch-cell { grid-area: branch; text-align: left !important; }
  #employeePage .employee-image-cell { grid-area: photo; align-self: center; }
  #employeePage .employee-profile-cell { grid-area: profile; }
  #employeePage .employee-user-cell { grid-area: user; }
  #employeePage .employee-organization-cell { grid-area: organization; }
  #employeePage .employee-schedule-cell { grid-area: schedule; }
  #employeePage .employee-social-security-cell { grid-area: social; text-align: left !important; }
  #employeePage .employee-status-cell { grid-area: status; text-align: left !important; }
  #employeePage .employee-action-cell { grid-area: action; align-self: center; }

  #employeePage .employee-coverage-badge,
  #employeePage .employee-status-badge {
    justify-self: start;
  }

  #employeePage .employee-action-cell .btn-list {
    justify-content: flex-end !important;
  }

  #employeePage .employee-grid-shell .gridjs-footer {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: space-between;
  }
}

@media (max-width: 575.98px) {
  #employeePage .employee-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #employeePage .employee-filter-keyword {
    grid-column: auto;
  }
}

#employeeModal .employee-modal-body {
  background: #f8fafc;
  padding: 1.15rem;
}

#employeeModal .employee-profile-rail,
#employeeModal .employee-form-sections,
#employeeModal .employee-form-section,
#employeeModal .employee-work-schedule-grid > *,
#employeeModal .employee-branch-holiday-heading > * {
  min-width: 0;
}

#employeeModal .employee-profile-rail-card,
#employeeModal .employee-form-section {
  background: #fff;
  border: 1px solid #dbe5f1;
  border-radius: .65rem;
  box-shadow: 0 .25rem .8rem rgba(15, 23, 42, .035);
}

#employeeModal .employee-profile-rail-card {
  padding: .9rem;
  position: sticky;
  top: 0;
}

#employeeModal .employee-photo-preview {
  align-items: center;
  background: #eaf2fb;
  border-style: dashed;
  display: flex;
  justify-content: center;
  position: relative;
}

#employeeModal .employee-photo-preview img {
  position: relative;
  z-index: 1;
}

#employeeModal .employee-photo-placeholder {
  align-items: center;
  color: #206bc4;
  display: inline-flex;
  font-size: 3rem;
  justify-content: center;
}

#employeeModal .employee-photo-preview.has-photo .employee-photo-placeholder {
  display: none;
}

#employeeModal .employee-form-sections {
  display: grid;
  gap: .85rem;
}

#employeeModal .employee-form-section {
  padding: .95rem;
}

#employeeModal .employee-form-section-heading {
  align-items: flex-start;
  display: flex;
  gap: .65rem;
  margin-bottom: .85rem;
}

#employeeModal .employee-form-section-heading h6 {
  color: #173b68;
  font-size: .96rem;
  font-weight: 700;
  line-height: 1.3;
  margin: .04rem 0 0;
}

#employeeModal .employee-form-section-heading p {
  color: #64748b;
  font-size: .78rem;
  line-height: 1.35;
  margin: .16rem 0 0;
}

#employeeModal .employee-form-section-icon {
  align-items: center;
  background: #eaf2fb;
  border-radius: .45rem;
  color: #206bc4;
  display: inline-flex;
  flex: 0 0 auto;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

#employeeModal .employee-payroll-setup {
  border-color: #b9d4f2;
  background: linear-gradient(180deg, #fff 0%, #f4f9ff 100%);
}

#employeeModal .employee-work-schedule-grid {
  align-items: end;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(13rem, .65fr);
}

#employeeModal .employee-current-schedule {
  background: #f1f5f9;
  border: 1px solid #dbe5f1;
  border-radius: .45rem;
  color: #475569;
  font-size: .8rem;
  line-height: 1.4;
  min-height: 2.4rem;
  padding: .5rem .65rem;
}

#employeeModal .employee-current-schedule strong,
#employeeModal .employee-holiday-label,
#employeeModal .employee-holiday-meta {
  display: block;
  overflow-wrap: anywhere;
}

#employeeModal .employee-current-schedule strong {
  color: #173b68;
  font-size: .82rem;
}

#employeeModal .employee-branch-holiday-panel {
  background: rgba(234, 242, 251, .55);
  border: 1px solid #d6e6f7;
  border-radius: .5rem;
  margin-top: .85rem;
  padding: .75rem;
}

#employeeModal .employee-branch-holiday-heading {
  align-items: flex-start;
  display: flex;
  gap: .65rem;
  justify-content: space-between;
}

#employeeModal .employee-holiday-label {
  color: #173b68;
  font-size: .84rem;
  font-weight: 700;
}

#employeeModal .employee-holiday-meta {
  color: #64748b;
  font-size: .74rem;
  margin-top: .1rem;
}

#employeeModal .employee-holiday-list {
  display: grid;
  gap: .3rem;
  list-style: none;
  margin: .6rem 0 0;
  padding: 0;
}

#employeeModal .employee-holiday-list li {
  align-items: baseline;
  border-top: 1px solid rgba(148, 163, 184, .3);
  color: #334155;
  display: flex;
  font-size: .78rem;
  gap: .45rem;
  justify-content: space-between;
  padding-top: .3rem;
}

#employeeModal .employee-holiday-list time {
  color: #206bc4;
  flex: 0 0 auto;
  font-weight: 700;
}

#employeeModal .employee-inline-holiday-editor {
  border-top: 1px solid #d6e6f7;
  margin-top: .7rem;
  padding-top: .6rem;
}

#employeeModal .employee-inline-holiday-editor summary {
  color: #0f5ca8;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 700;
}

@media (max-width: 991.98px) {
  #employeeModal .employee-profile-rail-card {
    position: static;
  }

  #employeeModal .employee-photo-preview {
    aspect-ratio: 16 / 7;
  }
}

@media (max-width: 767.98px) {
  #employeeModal .employee-modal-body {
    padding: .8rem;
  }

  #employeeModal .employee-work-schedule-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 575.98px) {
  #employeeModal .employee-form-section,
  #employeeModal .employee-profile-rail-card {
    border-radius: .5rem;
    padding: .75rem;
  }

  #employeeModal .employee-branch-holiday-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  #employeeModal .employee-holiday-list li {
    align-items: flex-start;
    flex-direction: column;
    gap: .08rem;
  }
}

.customer-photo-preview {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(4, 32, 69, 0.12);
  border-radius: 0.5rem;
  background: #f6f8fb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.customer-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.customer-avatar-cell {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
  background: #eef2f7;
}

.part-image-preview {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(4, 32, 69, 0.12);
  border-radius: 0.5rem;
  background: #f6f8fb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: default;
}

.part-image-preview.has-image {
  cursor: zoom-in;
}

.part-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.part-thumb {
  width: 3rem;
  height: 2.25rem;
  border: 1px solid rgba(4, 32, 69, 0.12);
  border-radius: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #64748b;
  background: #f8fafc;
}

.part-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.part-thumb-button {
  padding: 0;
  cursor: zoom-in;
}

.finance-logo-preview {
  width: 100%;
  aspect-ratio: 1.35;
  border: 1px solid rgba(4, 32, 69, 0.12);
  border-radius: 0.5rem;
  background: #f6f8fb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.finance-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.finance-logo-cell {
  width: 3rem;
  height: 2rem;
  object-fit: contain;
  border-radius: 0.35rem;
  background: #eef2f7;
}

.checker-photo-preview {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(4, 32, 69, 0.12);
  border-radius: 0.5rem;
  background: #f6f8fb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.checker-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.checker-avatar-cell {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
  background: #eef2f7;
}

.filter-card {
  border-style: solid;
  border-color: rgba(32, 107, 196, 0.16);
}

.report-export-surface {
  background: #fff;
  border-radius: 0.5rem;
  padding: 1rem;
}

.report-print-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.25rem 0 1rem;
}

.report-company {
  color: #206bc4;
  font-weight: 700;
  font-size: 0.85rem;
}

.report-print-header h1 {
  margin: 0.15rem 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.report-print-meta {
  min-width: 10rem;
  text-align: right;
  color: #64748b;
}

.report-kpi-card {
  min-height: 7.25rem;
}

.payroll-breakdown-line-wrap {
  max-height: 16rem;
  overflow: auto;
  border: 1px solid rgba(4, 32, 69, 0.08);
  border-radius: 0.35rem;
}

.payroll-breakdown-daily-wrap {
  max-height: 23rem;
  overflow: auto;
  border: 1px solid rgba(4, 32, 69, 0.08);
  border-radius: 0.35rem;
}

.payroll-breakdown-line-wrap thead th,
.payroll-breakdown-daily-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

.payroll-breakdown-daily-wrap td {
  text-align: center;
}

.payroll-breakdown-daily-wrap td:last-child {
  text-align: left;
}

.report-chart-box {
  height: 18rem;
}

@media print {
  body:has(#payrollReportsPage) {
    background: #fff !important;
  }

  body:has(#payrollReportsPage) .sidebar-shell,
  body:has(#payrollReportsPage) .topbar-shell,
  body:has(#payrollReportsPage) .page-header {
    display: none !important;
  }

  body:has(#payrollReportsPage) .page-wrapper,
  body:has(#payrollReportsPage) .page-body,
  body:has(#payrollReportsPage) .container-xl {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }

  body:has(#payrollReportsPage) .report-export-surface {
    border-radius: 0;
    padding: 0;
  }

  body:has(#payrollReportsPage) .card {
    box-shadow: none !important;
    border: 1px solid #d9e2ef !important;
  }

  body:has(#payrollReportsPage) .payroll-breakdown-line-wrap,
  body:has(#payrollReportsPage) .payroll-breakdown-daily-wrap {
    max-height: none;
    overflow: visible;
  }

  body.payroll-breakdown-print-mode:has(#payrollReportsPage) .report-print-header,
  body.payroll-breakdown-print-mode:has(#payrollReportsPage) .report-export-surface > .row,
  body.payroll-breakdown-print-mode:has(#payrollReportsPage) #payrollReportPrintTable {
    display: none !important;
  }
}

.role-checkbox-grid,
.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.5rem 1rem;
}

.permission-panel {
  display: grid;
  gap: 1rem;
}

.permission-module {
  border: 1px solid rgba(4, 32, 69, 0.08);
  border-radius: 0.5rem;
  padding: 0.85rem;
  background: #fff;
}

.permission-module-title {
  font-weight: 700;
  margin-bottom: 0.65rem;
  color: #1e293b;
}

.permission-item {
  min-height: 3rem;
  align-items: flex-start;
}

.user-modal-tab-pane {
  display: none;
}

.user-modal-tab-pane.active {
  display: block;
}

.permission-panel.compact {
  max-height: 20rem;
  overflow: auto;
  padding-right: 0.25rem;
}

.permission-panel.compact .permission-module {
  padding: 0.65rem;
}

.form-control[data-thai-date] {
  background-color: #fff;
  cursor: pointer;
}

.flatpickr-calendar {
  font-family: var(--tblr-body-font-family);
  border-radius: 0.5rem;
  box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.14);
}

.flatpickr-current-month .numInputWrapper {
  width: 7ch;
}

.flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  font-weight: 700;
}

.form-control[readonly],
.form-control:disabled,
.form-select:disabled,
textarea.form-control[readonly],
textarea.form-control:disabled {
  background-color: #eef6ff;
  border-color: #bfdbfe;
  color: #0f172a;
  opacity: 1;
}

.motorcycle-price-grid .form-control {
  min-height: 2.45rem;
}

.motorcycle-cost-formula {
  padding: 0.85rem 1rem;
  border: 1px solid #bfdbfe;
  border-left: 0.25rem solid #206bc4;
  border-radius: 0.5rem;
  background: #f0f7ff;
  color: #163a63;
}

.motorcycle-cost-formula-icon {
  margin-top: 0.1rem;
  color: #206bc4;
  font-size: 1.25rem;
  flex: 0 0 auto;
}

.motorcycle-cost-formula-text {
  margin-top: 0.2rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.motorcycle-cost-output-field .form-label {
  color: #35506d;
}

.motorcycle-cost-total-field .form-control[readonly] {
  border-color: #86c69a;
  background: #edf9f0;
  color: #176b36;
  font-size: 1.05rem;
}

.motorcycle-cost-breakdown {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  min-width: 0;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #f8fafc;
  color: #334155;
}

.motorcycle-cost-breakdown-label {
  flex: 0 0 auto;
  color: #64748b;
}

.motorcycle-cost-breakdown strong {
  min-width: 0;
  text-align: right;
  color: #0f172a;
  overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
  .motorcycle-cost-formula {
    padding: 0.75rem;
  }

  .motorcycle-cost-breakdown {
    display: grid;
    gap: 0.25rem;
  }

  .motorcycle-cost-breakdown strong {
    text-align: left;
  }
}

.motorcycle-color-thumb {
  width: 3rem;
  height: 2.25rem;
  border: 1px solid rgba(4, 32, 69, 0.12);
  border-radius: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  color: #64748b;
  background: #f8fafc;
}

.motorcycle-color-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.motorcycle-edit-table input[type="number"] {
  min-width: 8rem;
}

.nested-master-modal {
  border: 2px solid rgba(11, 78, 162, 0.62);
  background: #eef6ff;
  box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.28);
}

.nested-master-modal .modal-header,
.nested-master-modal .modal-footer {
  background: #dbeeff;
}

.modal-body .hr-text {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0b4ea2;
  letter-spacing: 0;
  padding-bottom: 0.45rem;
  margin-bottom: 0.9rem;
  border-bottom: 2px solid rgba(32, 107, 196, 0.72);
}

.lyy-autocomplete {
  position: relative;
}

.lyy-autocomplete-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  z-index: 1085;
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.25rem;
  border: 1px solid rgba(32, 107, 196, 0.18);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.14);
}

.lyy-autocomplete-option {
  width: 100%;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: #1e293b;
  display: block;
  padding: 0.45rem 0.6rem;
  text-align: left;
}

.lyy-autocomplete-option:hover,
.lyy-autocomplete-option.active {
  background: rgba(32, 107, 196, 0.1);
  color: #0f4c9b;
}

.lyy-autocomplete-empty {
  padding: 0.55rem 0.65rem;
  color: #64748b;
  font-size: 0.875rem;
}

.lyy-autocomplete-preview {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: calc(100% + 0.5rem);
  z-index: 1090;
  width: 10.5rem;
  padding: 0.5rem;
  border: 1px solid rgba(32, 107, 196, 0.22);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.16);
}

.lyy-autocomplete-preview.is-left {
  left: auto;
  right: calc(100% + 0.5rem);
}

.lyy-autocomplete-preview img {
  width: 100%;
  height: 7rem;
  object-fit: contain;
  display: block;
  border-radius: 0.35rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.lyy-autocomplete-preview-title {
  margin-top: 0.4rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: #0f4c9b;
  line-height: 1.25;
}

.lyy-autocomplete-preview-subtitle {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.25;
}

.image-preview-modal .modal-body {
  background: #fff;
  padding: 0.75rem;
}

.motorcycle-color-thumb-button {
  cursor: zoom-in;
  padding: 0;
}

.motorcycle-image-preview {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  border-radius: 0.35rem;
}

.sale-registration-preview {
  min-height: 3.75rem;
  border: 1px solid rgba(32, 107, 196, 0.18);
  border-radius: 0.35rem;
  background: #f8fafc;
  padding: 0.35rem;
}

.sale-registration-preview img {
  width: 5rem;
  height: 3.75rem;
  object-fit: cover;
  border-radius: 0.25rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  cursor: zoom-in;
}

.sale-registration-preview a {
  display: inline-flex;
  align-items: center;
  min-height: 3.75rem;
  color: #206bc4;
  font-weight: 600;
  text-decoration: none;
}

#modelModal,
#sizeModal,
#colorImagePreviewModal,
#registrationPreviewModal {
  z-index: 1075;
}

.swal2-container {
  z-index: 20000 !important;
}

@media (min-width: 992px) {
  .sidebar-shell {
    width: 18rem;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1030;
    visibility: visible !important;
    transform: none !important;
  }

  .page-wrapper {
    margin-left: 18rem;
  }

  body.sidebar-compact .sidebar-shell {
    width: 5rem;
  }

  body.sidebar-compact .page-wrapper {
    margin-left: 5rem;
  }

  body.sidebar-compact .sidebar-inner {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }

  body.sidebar-compact .sidebar-brand {
    justify-content: center;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }

  body.sidebar-compact .sidebar-brand-text,
  body.sidebar-compact .sidebar-user-body,
  body.sidebar-compact .sidebar-favorites-title,
  body.sidebar-compact .sidebar-group-label,
  body.sidebar-compact .nav-link-title,
  body.sidebar-compact .sidebar-sublink span:not(.sidebar-sublink-bullet),
  body.sidebar-compact .btn-sidebar-logout span {
    display: none !important;
  }

  body.sidebar-compact .sidebar-brand-link {
    gap: 0;
  }

  body.sidebar-compact .sidebar-compact-toggle {
    position: absolute;
    top: 0.85rem;
    right: -0.9rem;
    border: 1px solid rgba(32, 107, 196, 0.18);
    background: #fff;
    box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.12);
  }

  body.sidebar-compact .sidebar-compact-toggle .ti {
    transform: rotate(180deg);
  }

  body.sidebar-compact .sidebar-user {
    justify-content: center;
    padding: 0.65rem 0.4rem;
  }

  body.sidebar-compact .sidebar-favorites-section {
    margin-left: 0.1rem;
    margin-right: 0.1rem;
    padding: 0.25rem 0.15rem;
  }

  body.sidebar-compact .sidebar-group-toggle,
  body.sidebar-compact .navbar-vertical .nav-link,
  body.sidebar-compact .navbar-vertical .sidebar-submenu-toggle {
    justify-content: center;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
  }

  body.sidebar-compact .sidebar-group-leading,
  body.sidebar-compact .navbar-vertical .nav-link-icon {
    margin: 0;
  }

  body.sidebar-compact .line-inbox-menu-badge {
    position: absolute;
    top: 0.05rem;
    right: 0.05rem;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.22rem;
    margin: 0;
    font-size: 0.58rem;
  }

  body.sidebar-compact .sidebar-group-chevron,
  body.sidebar-compact .sidebar-submenu-chevron,
  body.sidebar-compact .sidebar-subnav {
    display: none !important;
  }

  body.sidebar-compact .sidebar-footer {
    padding-left: 0.1rem;
    padding-right: 0.1rem;
  }

  body.sidebar-compact .btn-sidebar-logout {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  body.sidebar-compact .btn-sidebar-logout .ti {
    margin-right: 0 !important;
  }
}

@media (max-width: 991.98px) {
  .sidebar-shell {
    border-right: 0;
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.18);
  }

  .sidebar-inner {
    min-height: 100%;
    padding: 0.75rem;
  }

  .sidebar-user {
    margin-top: 0;
  }

  .page-wrapper {
    min-width: 0;
  }

  .page-body {
    margin-top: 0;
    padding-bottom: 2.75rem;
  }

  .topbar-shell .container-xl {
    flex-wrap: nowrap;
  }

  .topbar-title {
    overflow: hidden;
  }

  .menu-group-filter {
    max-width: 52vw;
  }

  .menu-group-pill {
    max-width: 10rem;
  }

  .menu-group-more-panel {
    position: fixed;
    top: 4.35rem;
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    max-height: calc(100vh - 5.25rem);
    overflow-y: auto;
  }

  .menu-group-more-grid {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .report-print-header {
    flex-direction: column;
  }

  .report-print-meta {
    min-width: 0;
    text-align: left;
  }
}

.vehicle-stock-filter-card .form-label {
  margin-bottom: 0.25rem;
  color: #475467;
  font-size: 0.82rem;
  font-weight: 700;
}

.vehicle-stock-summary {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 0.75rem;
  align-items: stretch;
}

.vehicle-stock-total,
.vehicle-stock-brand-strip {
  min-height: 76px;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0.25rem 0.75rem rgba(15, 23, 42, 0.04);
}

.vehicle-stock-total {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.85rem 1rem;
}

.vehicle-stock-total strong {
  color: #0f172a;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.vehicle-stock-brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-content: center;
  padding: 0.75rem;
}

.vehicle-stock-brand-pill,
.vehicle-stock-empty-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid #d8e2ef;
  background: #f8fafc;
  padding: 0.35rem 0.7rem;
  color: #334155;
  white-space: nowrap;
}

.vehicle-stock-brand-pill strong {
  color: #0b4ea2;
  font-size: 1.05rem;
}

.vehicle-stock-workspace .nav-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

.vehicle-stock-table-wrap {
  max-height: min(68vh, 720px);
  overflow: auto;
}

.vehicle-stock-table {
  min-width: 980px;
  table-layout: auto;
}

.vehicle-stock-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #1e293b;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.vehicle-stock-table tbody td {
  vertical-align: middle;
}

.vehicle-stock-table tbody tr.vehicle-stock-subtotal-row td {
  background: #e7f5ff;
  color: #0b4ea2;
  font-weight: 800;
}

.vehicle-stock-chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.vehicle-stock-chart-panel {
  min-width: 0;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #fff;
  padding: 0.85rem;
}

.vehicle-stock-chart-panel-main {
  grid-row: span 2;
}

.vehicle-stock-chart-title {
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.vehicle-stock-chart-box {
  position: relative;
  height: 320px;
}

.vehicle-stock-chart-panel-main .vehicle-stock-chart-box {
  height: 520px;
}

@media (max-width: 1199.98px) {
  .vehicle-stock-summary,
  .vehicle-stock-chart-layout {
    grid-template-columns: 1fr;
  }

  .vehicle-stock-chart-panel-main {
    grid-row: auto;
  }

  .vehicle-stock-chart-panel-main .vehicle-stock-chart-box,
  .vehicle-stock-chart-box {
    height: 340px;
  }
}

@media (max-width: 575.98px) {
  .vehicle-stock-total strong {
    font-size: 1.65rem;
  }

  .vehicle-stock-brand-strip {
    align-content: flex-start;
  }

  .vehicle-stock-brand-pill,
  .vehicle-stock-empty-pill {
    width: 100%;
    justify-content: space-between;
  }
}

.vehicle-stock-dynamic-page {
  --stock-ink: #111827;
  --stock-muted: #667085;
  --stock-line: #d9e2ec;
  --stock-panel: #ffffff;
  --stock-soft: #f6f8fb;
  --stock-blue: #1d4ed8;
  --stock-green: #059669;
  --stock-amber: #d97706;
  display: grid;
  gap: 1rem;
}

.vehicle-stock-page-header .page-pretitle {
  color: #2563eb;
  font-weight: 800;
  letter-spacing: 0;
}

.vehicle-stock-command-bar {
  position: sticky;
  top: 0;
  z-index: 12;
  border: 1px solid var(--stock-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.9rem;
  box-shadow: 0 0.5rem 1.4rem rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
}

.vehicle-stock-command-bar.is-collapsed {
  padding: 0.55rem 0.7rem;
  box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.06);
}

.vehicle-stock-criteria-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.vehicle-stock-criteria-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--stock-ink);
  font-size: 0.86rem;
  font-weight: 900;
}

.vehicle-stock-criteria-title .ti {
  color: var(--stock-blue);
  font-size: 1rem;
}

.vehicle-stock-criteria-summary {
  margin-top: 0.15rem;
  color: var(--stock-muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.vehicle-stock-criteria-toggle {
  flex: 0 0 auto;
  white-space: nowrap;
}

.vehicle-stock-filter-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(130px, 0.8fr) minmax(220px, 1.4fr) minmax(150px, 0.9fr) minmax(150px, 0.9fr);
  gap: 0.75rem;
  align-items: end;
  margin-top: 0.75rem;
}

.vehicle-stock-filter-grid .form-label {
  margin-bottom: 0.25rem;
  color: #475467;
  font-size: 0.78rem;
  font-weight: 800;
}

.vehicle-stock-kpi-strip {
  display: grid;
  grid-template-columns: repeat(var(--vehicle-stock-kpi-count, 6), minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--stock-line);
  border-radius: 8px;
  background: var(--stock-panel);
}

.vehicle-stock-kpi {
  min-width: 0;
  min-height: 52px;
  border: 0;
  border-left: 1px solid var(--stock-line);
  background: transparent;
  padding: 0.45rem 0.65rem;
  text-align: left;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.vehicle-stock-kpi:first-child {
  border-left: 0;
}

button.vehicle-stock-kpi {
  appearance: none;
  cursor: pointer;
  touch-action: manipulation;
}

button.vehicle-stock-kpi:hover {
  background: #f7faff;
}

button.vehicle-stock-kpi:focus-visible {
  outline: 2px solid var(--stock-blue);
  outline-offset: -3px;
}

.vehicle-stock-kpi-label {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0.3rem;
  color: var(--stock-muted);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-stock-kpi strong {
  display: block;
  flex: 0 0 auto;
  margin: 0;
  color: var(--stock-ink);
  font-size: clamp(1.15rem, 1.5vw, 1.55rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.vehicle-stock-kpi.is-brand {
  box-shadow: inset 3px 0 0 var(--brand-color, var(--stock-blue));
}

.vehicle-stock-kpi-brand-marker {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--brand-color, var(--stock-blue));
}

.vehicle-stock-kpi-strip.has-many-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vehicle-stock-kpi-strip.has-many-metrics .vehicle-stock-kpi:nth-child(4n + 1) {
  border-left: 0;
}

.vehicle-stock-kpi-strip.has-many-metrics .vehicle-stock-kpi:nth-child(n + 5) {
  border-top: 1px solid var(--stock-line);
}

.vehicle-stock-view-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.vehicle-stock-view-panel {
  display: none;
}

.vehicle-stock-view-panel.active {
  display: block;
}

.vehicle-stock-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 1rem;
  align-items: start;
}

.vehicle-stock-gallery-column,
.vehicle-stock-insight-rail {
  min-width: 0;
}

.vehicle-stock-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.vehicle-stock-section-heading h3,
.vehicle-stock-insight-panel h3 {
  margin: 0;
  color: var(--stock-ink);
  font-size: 1rem;
  font-weight: 900;
}

.vehicle-stock-section-heading p {
  margin: 0.2rem 0 0;
  color: var(--stock-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.vehicle-stock-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.9rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.35rem;
}

.vehicle-stock-gallery-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--stock-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0.45rem 1.1rem rgba(15, 23, 42, 0.06);
}

.vehicle-stock-gallery-image {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 0;
  border-bottom: 1px solid var(--stock-line);
  background: #eef2f7;
  padding: 0;
  place-items: center;
  cursor: pointer;
}

.vehicle-stock-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f8fafc;
}

.vehicle-stock-gallery-body {
  padding: 0.85rem;
}

.vehicle-stock-gallery-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--stock-blue);
  font-size: 0.8rem;
  font-weight: 900;
}

.vehicle-stock-gallery-title strong {
  color: var(--stock-ink);
  font-size: 1.35rem;
}

.vehicle-stock-gallery-body h3 {
  margin: 0.15rem 0;
  color: var(--stock-ink);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.25;
}

.vehicle-stock-gallery-body p,
.vehicle-stock-gallery-name {
  margin: 0;
  color: var(--stock-muted);
  font-size: 0.82rem;
}

.vehicle-stock-gallery-name {
  min-height: 2.3em;
  margin-top: 0.15rem;
}

.vehicle-stock-distribution {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 8px;
  margin: 0.75rem 0;
}

.vehicle-stock-distribution span {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--branch-color, var(--stock-blue));
}

.vehicle-stock-branch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.vehicle-stock-branch-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--branch-color, var(--stock-blue)) 30%, var(--stock-line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--branch-color, var(--stock-blue)) 9%, #fff);
  padding: 0.22rem 0.5rem;
  color: #344054;
  font-size: 0.75rem;
  font-weight: 800;
}

.vehicle-stock-branch-chip::before {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  background: var(--branch-color, var(--stock-blue));
  content: "";
  flex: 0 0 auto;
}

.vehicle-stock-branch-chip strong {
  color: var(--branch-color, var(--stock-blue));
}

.vehicle-stock-insight-rail {
  display: grid;
  gap: 0.85rem;
}

.vehicle-stock-insight-panel {
  border: 1px solid var(--stock-line);
  border-radius: 8px;
  background: #fff;
  padding: 0.85rem;
  box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.05);
}

.vehicle-stock-heatmap,
.vehicle-stock-branch-rank,
.vehicle-stock-top-models {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.vehicle-stock-heatmap-cell,
.vehicle-stock-rank-row,
.vehicle-stock-model-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--stock-line);
  border-radius: 8px;
  background: #fff;
  padding: 0.5rem 0.6rem;
  color: var(--stock-ink);
  text-align: left;
}

.vehicle-stock-heatmap-cell {
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.16) calc(var(--heat) * 100%), #fff 0);
}

.vehicle-stock-rank-row i,
.vehicle-stock-model-row i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  background: var(--stock-green);
}

.vehicle-stock-rank-row .vehicle-stock-rank-total {
  display: flex;
  overflow: hidden;
  height: 5px;
  background: #e5e7eb;
}

.vehicle-stock-rank-row .vehicle-stock-rank-segment {
  display: block;
  flex: 0 0 auto;
  height: 100%;
  min-width: 2px;
}

.vehicle-stock-rank-row span,
.vehicle-stock-model-row span,
.vehicle-stock-heatmap-cell span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-stock-chart-box-compact {
  height: 250px;
}

.vehicle-stock-table-shell {
  max-height: min(72vh, 780px);
  overflow: auto;
  border: 1px solid var(--stock-line);
  border-radius: 8px;
  background: #fff;
}

.vehicle-stock-dynamic-page .vehicle-stock-table {
  min-width: 1120px;
}

.vehicle-stock-image-col {
  width: 76px;
}

.vehicle-stock-row-thumb {
  display: inline-grid;
  width: 64px;
  height: 42px;
  border: 1px solid var(--stock-line);
  border-radius: 8px;
  background: #f8fafc;
  object-fit: contain;
  place-items: center;
}

.vehicle-stock-row-thumb-empty {
  color: #98a2b3;
}

.offcanvas.vehicle-stock-detail-drawer {
  --bs-offcanvas-width: min(42rem, 100vw);
  width: var(--bs-offcanvas-width);
  max-width: 100vw;
  background: #f8fafc;
}

.vehicle-stock-detail-drawer .offcanvas-body {
  padding: 1rem;
}

.vehicle-stock-detail-header {
  align-items: flex-start;
  border-bottom: 1px solid var(--stock-line);
  background: #fff;
  padding: 1rem 1.1rem;
}

.vehicle-stock-detail-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.vehicle-stock-detail-header .btn-close {
  min-width: 44px;
  min-height: 44px;
  margin: -0.25rem -0.25rem 0 0;
}

.vehicle-stock-detail-heading .page-pretitle {
  color: var(--stock-blue);
  font-weight: 800;
}

.vehicle-stock-detail-heading .offcanvas-title {
  margin-top: 0.15rem;
  color: var(--stock-ink);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.vehicle-stock-detail-price-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  margin-top: 0.8rem;
}

.vehicle-stock-detail-price-strip[hidden] {
  display: none;
}

.vehicle-stock-detail-price-strip.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.vehicle-stock-price-metric {
  min-width: 0;
  border: 0;
  border-right: 1px solid #cbd5e1;
  background: #f8fbff;
  padding: 0.7rem 0.85rem;
}

.vehicle-stock-price-metric.is-cost {
  border-right: 0;
  background: #fff;
}

.vehicle-stock-detail-price-strip.is-single .vehicle-stock-price-metric {
  border-right: 0;
}

.vehicle-stock-price-metric span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 800;
}

.vehicle-stock-price-metric.is-selling span,
.vehicle-stock-price-metric.is-selling strong {
  color: #1d4ed8;
}

.vehicle-stock-price-metric strong {
  display: block;
  margin-top: 0.15rem;
  color: var(--stock-ink);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
}

.vehicle-stock-detail-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.vehicle-stock-detail-summary span {
  border: 1px solid var(--stock-line);
  border-radius: 999px;
  background: var(--stock-soft);
  padding: 0.25rem 0.6rem;
  color: #344054;
  font-weight: 800;
}

.vehicle-stock-detail-summary strong {
  color: var(--stock-blue);
}

.vehicle-stock-detail-list {
  display: grid;
  gap: 0.65rem;
}

.vehicle-stock-detail-row {
  border: 1px solid var(--stock-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0.25rem 0.75rem rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.vehicle-stock-detail-branch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 900;
}

.vehicle-stock-detail-row-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  background: #f8fafc;
  padding: 0.85rem 1rem;
}

.vehicle-stock-detail-row-header > div {
  min-width: 0;
}

.vehicle-stock-detail-row-header h3 {
  margin: 0.2rem 0 0;
  color: var(--stock-ink);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.vehicle-stock-detail-row-header p {
  margin: 0.1rem 0 0;
  color: var(--stock-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.vehicle-stock-detail-unit {
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  padding: 0.25rem 0.55rem;
  color: #475569;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.vehicle-stock-detail-sections {
  border-top: 1px solid #e2e8f0;
}

.vehicle-stock-detail-section {
  min-width: 0;
  padding: 0.85rem 1rem;
}

.vehicle-stock-detail-section + .vehicle-stock-detail-section {
  border-top: 1px solid #e2e8f0;
}

.vehicle-stock-detail-section h4 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.7rem;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 900;
}

.vehicle-stock-detail-section h4 .ti {
  color: var(--stock-blue);
  font-size: 1rem;
}

.vehicle-stock-detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.5rem;
  margin: 0;
}

.vehicle-stock-detail-fact {
  min-width: 0;
}

.vehicle-stock-detail-fact dt,
.vehicle-stock-detail-identity-row dt {
  margin-bottom: 0.2rem;
  color: var(--stock-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.vehicle-stock-detail-fact dd,
.vehicle-stock-detail-identity-row dd {
  margin: 0;
  color: var(--stock-ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.vehicle-stock-detail-identity-section {
  background: #f8fbff;
}

.vehicle-stock-detail-identity-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
}

.vehicle-stock-detail-identity-row {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  align-items: baseline;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  background: #fff;
}

.vehicle-stock-detail-identity-row dt {
  margin-bottom: 0;
}

.vehicle-stock-detail-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.vehicle-stock-pivot-price-col {
  min-width: 180px;
}

.vehicle-stock-pivot-prices {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.vehicle-stock-pivot-prices span {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  gap: 0.35rem;
  align-items: baseline;
}

.vehicle-stock-pivot-prices small {
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 900;
}

.vehicle-stock-pivot-prices .is-cost small {
  color: #64748b;
}

.vehicle-stock-pivot-prices strong {
  color: var(--stock-ink);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.vehicle-stock-image-placeholder {
  display: grid;
  gap: 0.35rem;
  color: #98a2b3;
  font-weight: 800;
  place-items: center;
}

.vehicle-stock-image-placeholder .ti {
  font-size: 2.5rem;
}

.vehicle-stock-empty-state,
.vehicle-stock-detail-loading {
  display: grid;
  min-height: 120px;
  border: 1px dashed var(--stock-line);
  border-radius: 8px;
  background: #fff;
  color: var(--stock-muted);
  font-weight: 800;
  place-items: center;
}

@media (max-width: 1199.98px) {
  .vehicle-stock-filter-grid,
  .vehicle-stock-overview-layout {
    grid-template-columns: 1fr;
  }

  .vehicle-stock-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vehicle-stock-kpi-strip.has-many-metrics .vehicle-stock-kpi {
    border-left: 1px solid var(--stock-line);
  }

  .vehicle-stock-kpi-strip.has-many-metrics .vehicle-stock-kpi:nth-child(3n + 1),
  .vehicle-stock-kpi-strip:not(.has-many-metrics) .vehicle-stock-kpi:nth-child(3n + 1) {
    border-left: 0;
  }

  .vehicle-stock-kpi-strip .vehicle-stock-kpi:nth-child(n + 4) {
    border-top: 1px solid var(--stock-line);
  }
}

@media (max-width: 575.98px) {
  .offcanvas.vehicle-stock-detail-drawer {
    --bs-offcanvas-width: 100vw;
  }

  .vehicle-stock-detail-drawer .offcanvas-body {
    padding: 0.75rem;
  }

  .vehicle-stock-criteria-head {
    align-items: stretch;
    flex-direction: column;
  }

  .vehicle-stock-criteria-toggle {
    width: 100%;
  }

  .vehicle-stock-view-bar,
  .vehicle-stock-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .vehicle-stock-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vehicle-stock-kpi-strip.has-many-metrics .vehicle-stock-kpi {
    border-left: 1px solid var(--stock-line);
  }

  .vehicle-stock-kpi-strip.has-many-metrics .vehicle-stock-kpi:nth-child(2n + 1),
  .vehicle-stock-kpi-strip:not(.has-many-metrics) .vehicle-stock-kpi:nth-child(2n + 1) {
    border-left: 0;
  }

  .vehicle-stock-kpi-strip .vehicle-stock-kpi:nth-child(n + 3) {
    border-top: 1px solid var(--stock-line);
  }

  .vehicle-stock-detail-facts {
    grid-template-columns: 1fr;
  }

  .vehicle-stock-detail-row-header {
    align-items: stretch;
    flex-direction: column;
  }

  .vehicle-stock-detail-unit {
    align-self: flex-start;
  }

  .vehicle-stock-detail-code {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 389.98px) {
  .vehicle-stock-detail-price-strip {
    grid-template-columns: 1fr;
  }

  .vehicle-stock-price-metric {
    border-right: 0;
    border-bottom: 1px solid #cbd5e1;
  }

  .vehicle-stock-price-metric.is-cost {
    border-bottom: 0;
  }

  .vehicle-stock-detail-price-strip.is-single .vehicle-stock-price-metric {
    border-bottom: 0;
  }

  .vehicle-stock-detail-identity-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

.vehicle-movement-page-header .page-pretitle {
  color: #0f766e;
  font-weight: 700;
  letter-spacing: 0;
}

.vehicle-movement-report-page {
  display: grid;
  gap: 16px;
}

.vehicle-movement-command-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
}

.vehicle-movement-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.tax-report-type-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tax-report-type-bar .btn {
  min-height: 38px;
}

.tax-report-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-top: 12px;
}

.tax-report-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #dbe4ef;
}

.tax-report-filter-actions-main,
.tax-report-filter-actions-export {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tax-report-filter-actions-export {
  padding-left: 12px;
  border-left: 1px solid #dbe4ef;
}

.tax-report-filter-actions-label {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.tax-report-filter-actions .btn {
  min-height: 44px;
  min-width: 104px;
  justify-content: center;
}

.tax-report-filter-actions .btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

.tax-report-source-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 600;
}

.tax-report-source-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-movement-empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 48px 18px;
  border: 1px dashed #b6c6d8;
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
}

.vehicle-movement-empty-state h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 700;
}

.vehicle-movement-empty-state p {
  max-width: 560px;
  margin: 0;
  color: #64748b;
}

.vehicle-movement-empty-icon {
  display: grid;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #ccfbf1;
  color: #0f766e;
  font-size: 30px;
  place-items: center;
}

.vehicle-movement-results {
  display: grid;
  gap: 16px;
}

.vehicle-movement-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.vehicle-movement-kpi {
  min-height: 86px;
  padding: 14px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.vehicle-movement-kpi span {
  display: block;
  color: #64748b;
  font-size: 0.82rem;
}

.vehicle-movement-kpi strong {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-size: 1.7rem;
  line-height: 1;
}

.vehicle-movement-kpi-in strong {
  color: #047857;
}

.vehicle-movement-kpi-out strong {
  color: #dc2626;
}

.vehicle-movement-view-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vehicle-movement-view-panel {
  display: none;
}

.vehicle-movement-view-panel.active {
  display: block;
}

.vehicle-movement-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 14px;
}

.vehicle-movement-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.vehicle-movement-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.vehicle-movement-panel-title h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
}

.vehicle-movement-chart-box {
  position: relative;
  min-height: 280px;
}

.vehicle-movement-rank-list {
  display: grid;
  gap: 10px;
}

.vehicle-movement-rank-row {
  display: grid;
  gap: 6px;
}

.vehicle-movement-rank-main {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.vehicle-movement-rank-main span {
  display: grid;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.75rem;
  font-weight: 700;
  place-items: center;
}

.vehicle-movement-rank-main strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-movement-rank-main em {
  color: #334155;
  font-style: normal;
  font-weight: 700;
}

.vehicle-movement-rank-bar {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #e2e8f0;
}

.vehicle-movement-rank-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0f766e;
}

.vehicle-movement-model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.vehicle-movement-model-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 72px;
  padding: 10px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
  text-align: left;
}

.vehicle-movement-model-card span {
  display: grid;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #ccfbf1;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 700;
  place-items: center;
}

.vehicle-movement-model-card strong,
.vehicle-movement-model-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-movement-model-card strong {
  color: #0f172a;
}

.vehicle-movement-model-card small {
  grid-column: 2 / 3;
  color: #64748b;
}

.vehicle-movement-model-card em {
  grid-row: 1 / span 2;
  grid-column: 3;
  color: #0f172a;
  font-style: normal;
  font-weight: 800;
}

.vehicle-movement-table-shell {
  overflow: auto;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

#profitReportPage .profit-report-scroll-shell {
  max-height: min(70vh, 720px);
  overflow: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

#profitReportPage .profit-report-scroll-shell:focus-visible {
  outline: 2px solid #206bc4;
  outline-offset: 2px;
}

.vehicle-movement-table {
  min-width: 980px;
}

.vehicle-movement-list-table {
  min-width: 1700px;
}

#profitRowsTable.profit-legacy-table,
#profitLossTable.profit-loss-table {
  min-width: 2040px;
  table-layout: fixed;
}

#profitRowsTable .profit-col-no,
#profitLossTable .profit-col-no { width: 44px; }
#profitRowsTable .profit-col-sale-date,
#profitLossTable .profit-col-sale-date { width: 86px; }
#profitRowsTable .profit-col-sale-type,
#profitLossTable .profit-col-sale-type { width: 110px; }
#profitRowsTable .profit-col-vehicle,
#profitLossTable .profit-col-vehicle { width: 180px; }
#profitRowsTable .profit-col-machine,
#profitLossTable .profit-col-machine { width: 126px; }
#profitRowsTable .profit-col-front-store,
#profitLossTable .profit-col-front-store { width: 200px; }
#profitRowsTable .profit-col-transfer { width: 132px; }
#profitRowsTable .profit-col-actual-transfer,
#profitLossTable .profit-col-actual-transfer { width: 120px; }
#profitRowsTable .profit-col-cost,
#profitLossTable .profit-col-cost { width: 108px; }
#profitRowsTable .profit-col-profit,
#profitLossTable .profit-col-profit { width: 126px; }
#profitRowsTable .profit-col-finance { width: 108px; }
#profitRowsTable .profit-col-commission,
#profitRowsTable .profit-col-promotion,
#profitRowsTable .profit-col-insurance { width: 90px; }
#profitRowsTable .profit-col-expected-transfer,
#profitLossTable .profit-col-expected-transfer { width: 108px; }
#profitRowsTable .profit-col-transfer-diff,
#profitLossTable .profit-col-transfer-diff { width: 100px; }
#profitRowsTable .profit-col-remark,
#profitLossTable .profit-col-remark { width: 200px; }

#profitRowsTable thead th,
#profitRowsTable tbody td,
#profitLossTable thead th,
#profitLossTable tbody td {
  white-space: nowrap;
}

#profitRowsTable tbody td,
#profitLossTable tbody td {
  overflow: hidden;
  vertical-align: top;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

#profitRowsTable .profit-cell-lines,
#profitLossTable .profit-cell-lines {
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex-direction: column;
  gap: 0.2rem;
}

#profitRowsTable .profit-cell-line,
#profitLossTable .profit-cell-line {
  display: flex;
  min-width: 0;
  max-width: 100%;
  min-height: 1.35rem;
  align-items: center;
  gap: 0.35rem;
  overflow: hidden;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profitRowsTable td.text-end .profit-cell-line,
#profitLossTable td.text-end .profit-cell-line {
  justify-content: flex-end;
}

#profitRowsTable .profit-cell-line-secondary,
#profitLossTable .profit-cell-line-secondary {
  color: #64748b;
}

#profitRowsTable .profit-cell-clip,
#profitLossTable .profit-cell-clip {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#profitRowsTable .profit-payment-chip,
#profitLossTable .profit-payment-chip {
  flex: 0 0 auto;
  margin: 0;
}

#profitRowsTable .profit-vehicle-brand,
#profitLossTable .profit-vehicle-brand {
  display: inline-flex;
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 1.45rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 0.4rem;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
}

#profitRowsTable .profit-vehicle-brand-yamaha,
#profitLossTable .profit-vehicle-brand-yamaha {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1d4ed8;
}

#profitRowsTable .profit-vehicle-brand-honda,
#profitLossTable .profit-vehicle-brand-honda {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #b91c1c;
}

.vehicle-movement-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.78rem;
  white-space: nowrap;
}

.vehicle-movement-sort-button {
  border: 0;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.vehicle-movement-sort-button i {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1;
}

.vehicle-movement-sort-button.is-active,
.vehicle-movement-sort-button.is-active i {
  color: #1d4ed8;
}

.vehicle-movement-sort-button:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.38);
  outline-offset: 3px;
  border-radius: 4px;
}

.vehicle-movement-table tbody td {
  color: #1e293b;
  font-size: 0.82rem;
  vertical-align: top;
}

#partCheckPage .part-check-remaining-grid {
  align-items: stretch;
}

#partCheckPage .part-check-remaining-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: .7rem;
  min-width: 0;
  padding: .8rem;
  border: 1px solid #cbdcf1;
  border-top: 3px solid #2563eb;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
  box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
}

#partCheckPage .part-check-remaining-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .6rem;
  align-items: start;
  min-width: 0;
}

#partCheckPage .part-check-remaining-rank {
  display: grid;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: .78rem;
  font-weight: 800;
  place-items: center;
}

#partCheckPage .part-check-remaining-document {
  display: grid;
  gap: .15rem;
  min-width: 0;
}

#partCheckPage .part-check-remaining-document span {
  display: flex;
  gap: .35rem;
  align-items: center;
  color: #0f766e;
  font-size: .72rem;
  font-weight: 700;
}

#partCheckPage .part-check-remaining-document strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #334155;
  font-size: .78rem;
  line-height: 1.3;
}

#partCheckPage .part-check-remaining-identity {
  display: grid;
  gap: .16rem;
  min-width: 0;
  padding: .65rem .7rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

#partCheckPage .part-check-remaining-identity > span {
  color: #64748b;
  font-size: .68rem;
  font-weight: 700;
}

#partCheckPage .part-check-remaining-identity strong,
#partCheckPage .part-check-remaining-identity p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#partCheckPage .part-check-remaining-identity strong {
  color: #0f172a;
  font-size: .9rem;
  line-height: 1.3;
}

#partCheckPage .part-check-remaining-identity p {
  color: #475569;
  font-size: .75rem;
  line-height: 1.4;
}

#partCheckPage .part-check-remaining-metrics {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: .5rem;
  min-width: 0;
}

#partCheckPage .part-check-remaining-metric {
  display: grid;
  gap: .12rem;
  min-width: 0;
  padding: .55rem .65rem;
  border-radius: 8px;
}

#partCheckPage .part-check-remaining-metric.is-quantity {
  background: #ecfdf5;
  color: #047857;
}

#partCheckPage .part-check-remaining-metric.is-amount {
  background: #eff6ff;
  color: #1d4ed8;
}

#partCheckPage .part-check-remaining-metric > span {
  font-size: .68rem;
  font-weight: 700;
}

#partCheckPage .part-check-remaining-metric strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: inherit;
  font-size: .95rem;
  line-height: 1.25;
}

#partCheckPage .part-check-remaining-metric small {
  color: #64748b;
  font-size: .66rem;
  font-weight: 600;
}

#partCheckPage .part-check-table-shell {
  overflow-x: hidden;
}

#partCheckPage .part-check-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

#partCheckPage .part-check-table thead th {
  background: var(--tblr-blue-lt, #eaf3ff);
  color: var(--tblr-blue, #206bc4);
  font-size: .78rem;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
}

#partCheckPage .part-check-table tbody td {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
}

#partCheckPage .part-check-table tbody tr:nth-child(odd) > td {
  background-color: #fff;
}

#partCheckPage .part-check-table tbody tr:nth-child(even) > td {
  background-color: #f8fafc;
}

#partCheckPage .part-check-table tbody tr.table-warning > td {
  background-color: #fff8e1;
}

#partCheckPage .part-check-table tbody tr:hover > td {
  background-color: #f1f5f9;
}

#partCheckPage .part-check-row-main {
  display: block;
  color: #172033;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#partCheckPage .part-check-row-subline {
  display: block;
  margin-top: .12rem;
  color: var(--tblr-blue, #206bc4);
  font-size: .74rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#partCheckPage .part-check-cell-part .part-check-row-main,
#partCheckPage .part-check-cell-document .part-check-row-main {
  font-size: .86rem;
}

#partCheckPage .part-check-cell-qty .part-check-row-subline,
#partCheckPage .part-check-cell-value .part-check-row-subline {
  color: #64748b;
}

@media (max-width: 768px) {
  #partCheckPage .part-check-table-shell {
    overflow: visible;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  #partCheckPage .part-check-table,
  #partCheckPage .part-check-table tbody,
  #partCheckPage .part-check-table tr,
  #partCheckPage .part-check-table td {
    display: block;
    width: 100%;
  }

  #partCheckPage .part-check-table colgroup,
  #partCheckPage .part-check-table thead {
    display: none;
  }

  #partCheckPage .part-check-table tbody tr {
    margin-bottom: .75rem;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
    overflow: hidden;
  }

  #partCheckPage .part-check-table tbody td {
    display: grid;
    grid-template-columns: minmax(6.5rem, 35%) minmax(0, 1fr);
    gap: .75rem;
    padding: .55rem .7rem;
    border-bottom: 1px solid #eef2f7;
    text-align: left !important;
  }

  #partCheckPage .part-check-table tbody td:last-child {
    border-bottom: 0;
  }

  #partCheckPage .part-check-table tbody td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: .72rem;
    font-weight: 800;
  }

  #partCheckPage .part-check-table tbody td.text-end {
    text-align: left !important;
  }
}

#partReceivePage .part-receive-table-shell {
  overflow-x: hidden;
  overflow-y: visible;
}

#partReceivePage .part-receive-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

#partReceivePage .part-receive-table thead th {
  background: var(--tblr-blue-lt, #eaf3ff);
  color: var(--tblr-blue, #206bc4);
  font-size: .78rem;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
}

#partReceivePage .part-receive-table tbody td {
  background-color: #fff;
  overflow-wrap: anywhere;
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
}

#partReceivePage .part-receive-table tbody tr.part-receive-document-row:nth-of-type(4n + 1) > td {
  background-color: #fff;
}

#partReceivePage .part-receive-table tbody tr.part-receive-document-row:nth-of-type(4n + 3) > td {
  background-color: #f8fafc;
}

#partReceivePage .part-receive-table tbody tr.part-receive-summary-row > td {
  background-color: #f8fafc;
  border-top: 1px solid #bfd2e8;
  border-bottom: 1px solid #dbe4ef;
  font-weight: 700;
}

#partReceivePage .part-receive-table tbody tr.part-receive-grand-total > td {
  background-color: #ecfdf3;
}

#partReceivePage .part-receive-table tbody tr:hover > td {
  background-color: #f1f5f9;
}

#partReceivePage .part-receive-cell-document {
  color: #0f172a;
  font-weight: 800;
}

#partReceivePage .part-receive-expand-cell {
  padding-right: .25rem;
  padding-left: .25rem;
}

#partReceivePage .part-receive-expand-button {
  display: inline-flex;
  width: 1.85rem;
  height: 1.85rem;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#partReceivePage .part-receive-document-net {
  color: #0f172a;
  font-size: .94rem;
  font-weight: 800;
}

#partReceivePage .part-receive-summary-label {
  color: #0f172a;
  font-weight: 800;
}

#partReceivePage .part-receive-row-main {
  display: block;
  color: #172033;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#partReceivePage .part-receive-row-subline {
  display: block;
  margin-top: .12rem;
  color: var(--tblr-blue, #206bc4);
  font-size: .74rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#partReceivePage .part-receive-detail-row > td {
  padding: 0;
  background-color: #f4f8fd !important;
  border-bottom: 2px solid #bfd2e8;
}

#partReceivePage .part-receive-detail-panel {
  padding: .8rem 1rem 1rem 3rem;
}

#partReceivePage .part-receive-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .55rem;
  color: #334155;
}

#partReceivePage .part-receive-detail-heading span {
  color: var(--tblr-blue, #206bc4);
  font-size: .78rem;
  font-weight: 700;
}

#partReceivePage .part-receive-detail-note {
  margin-bottom: .55rem;
  padding: .45rem .6rem;
  border: 1px solid #dbe7f4;
  border-radius: .35rem;
  background: #fff;
  color: #475569;
  font-size: .78rem;
  overflow-wrap: anywhere;
}

#partReceivePage .part-receive-detail-table-wrap {
  overflow-x: hidden;
  border: 1px solid #d7e2ef;
  border-radius: .4rem;
  background: #fff;
}

#partReceivePage .part-receive-detail-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

#partReceivePage .part-receive-detail-table thead th {
  padding: .45rem .55rem;
  background: #e8f1fb;
  color: var(--tblr-blue, #206bc4);
  font-size: .74rem;
  white-space: normal;
}

#partReceivePage .part-receive-detail-table tbody td {
  padding: .5rem .55rem;
  border-bottom: 1px solid #e7edf5;
  background: #fff !important;
  overflow-wrap: anywhere;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
}

#partReceivePage .part-receive-detail-table tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 768px) {
  #partReceivePage .part-receive-table-shell {
    overflow-x: hidden;
    border: 1px solid #dbe4ef;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .02);
    background: #fff;
  }

  #partReceivePage .part-receive-table {
    font-size: .72rem;
  }

  #partReceivePage .part-receive-table th,
  #partReceivePage .part-receive-table td {
    padding: .4rem .3rem;
  }

  #partReceivePage .part-receive-detail-panel {
    padding: .65rem;
  }

  #partReceivePage .part-receive-detail-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: .2rem;
  }
}

#partReceivePage .vehicle-movement-model-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

#partReceivePage .vehicle-movement-model-card span {
  width: auto;
  min-width: 56px;
  height: auto;
  padding: .28rem .45rem;
  white-space: nowrap;
}

#partReceivePage .vehicle-movement-model-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

#partReceivePage .vehicle-movement-model-card small {
  grid-column: 2 / 4;
  white-space: normal;
}

.profit-report-page .profit-sep-left {
  border-left: 2px solid #94a3b8 !important;
}

.profit-report-page .profit-sep-right {
  border-right: 2px solid #94a3b8 !important;
}

.profit-report-page .profit-payment-chip {
  display: inline-flex;
  align-items: center;
  margin: 1px 2px;
  padding: 2px 6px;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  white-space: nowrap;
}

.profit-report-page .profit-payment-chip-outstanding {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

.profit-report-page .profit-pending-cell {
  background: #fef3c7 !important;
  color: #92400e !important;
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.28);
}

.vehicle-movement-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
}

.vehicle-movement-page-status {
  min-width: 120px;
  color: #475569;
  font-size: 0.88rem;
  text-align: center;
}

.vehicle-movement-muted {
  padding: 16px;
  color: #64748b;
  text-align: center;
}

@media (max-width: 1199.98px) {
  .vehicle-movement-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vehicle-movement-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .vehicle-movement-filter-grid,
  .vehicle-movement-kpi-strip,
  .vehicle-movement-model-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-movement-view-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .vehicle-movement-view-bar .btn-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tax-report-type-bar .btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .tax-report-filter-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .tax-report-filter-actions-main,
  .tax-report-filter-actions-export {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .tax-report-filter-actions-export {
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid #dbe4ef;
    border-left: 0;
  }

  .tax-report-filter-actions-label {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .tax-report-filter-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .tax-report-source-chip span {
    white-space: normal;
  }
}

.repair-part-revenue-report-page,
.income-expense-report-page {
  max-width: 100%;
  overflow-x: hidden;
}

.repair-part-revenue-summary-hierarchy {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.repair-part-revenue-total-card,
.repair-part-revenue-type-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.repair-part-revenue-total-card {
  border-left: 5px solid #1d4ed8;
  background: linear-gradient(135deg, #eff6ff 0%, #fff 72%);
}

.repair-part-revenue-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.repair-part-revenue-type-card-repair {
  border-top: 4px solid #0f766e;
}

.repair-part-revenue-type-card-sale {
  border-top: 4px solid #2563eb;
}

.repair-part-revenue-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.repair-part-revenue-card-heading > div {
  min-width: 0;
}

.repair-part-revenue-card-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

.repair-part-revenue-card-heading h2,
.repair-part-revenue-card-heading h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.repair-part-revenue-document-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.74rem;
  white-space: nowrap;
}

.repair-part-revenue-total-value,
.repair-part-revenue-type-value {
  display: block;
  margin-top: 10px;
  color: #0f172a;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.repair-part-revenue-type-card-repair .repair-part-revenue-type-value {
  color: #047857;
}

.repair-part-revenue-type-card-sale .repair-part-revenue-type-value {
  color: #1d4ed8;
}

.repair-part-revenue-total-card > p,
.repair-part-revenue-type-formula {
  margin: 8px 0 0;
  color: #475569;
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.repair-part-revenue-component-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 12px 0 0;
  overflow: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #dbe4ef;
}

.repair-part-revenue-component-grid > div {
  min-width: 0;
  padding: 9px 10px;
  background: #f8fafc;
}

.repair-part-revenue-component-grid dt {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

.repair-part-revenue-component-grid dd {
  margin: 3px 0 0;
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.repair-part-revenue-component-grid .repair-part-revenue-component-discount dd {
  color: #b91c1c;
}

@media (max-width: 767.98px) {
  .repair-part-revenue-type-grid,
  .repair-part-revenue-component-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .repair-part-revenue-card-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .repair-part-revenue-document-badge {
    width: fit-content;
    max-width: 100%;
  }
}

.repair-part-revenue-report-page .vehicle-movement-overview-grid,
.income-expense-report-page .vehicle-movement-overview-grid,
.repair-part-revenue-report-page .vehicle-movement-panel,
.income-expense-report-page .vehicle-movement-panel,
.repair-part-revenue-report-page .vehicle-movement-chart-box,
.income-expense-report-page .vehicle-movement-chart-box {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.report-table-shell {
  max-width: 100%;
  overflow-x: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.report-priority-table {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
}

.report-priority-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  overflow: hidden;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-priority-table tbody td {
  overflow-wrap: anywhere;
  color: #1e293b;
  font-size: 0.82rem;
  vertical-align: top;
}

.report-detail-table tbody tr {
  cursor: pointer;
}

.report-detail-table tbody tr:hover {
  background: #f8fafc;
}

.report-cell-main {
  color: #0f172a;
  font-weight: 700;
  line-height: 1.25;
}

.report-cell-sub {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.25;
}

.report-clamp-2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.report-row-action {
  width: 32px;
  height: 32px;
  padding: 0;
}

.repair-part-revenue-report-page #repairPartRevenueDetailTable th,
.repair-part-revenue-report-page #repairPartRevenueDetailTable td {
  font-size: 0.78rem;
}

.repair-part-revenue-report-page #repairPartRevenueDetailTable th {
  padding-right: 8px;
  padding-left: 8px;
}

.repair-part-revenue-report-page #repairPartRevenueDetailTable td {
  padding-right: 8px;
  padding-left: 8px;
}

.repair-part-revenue-report-page .repair-part-revenue-day-row {
  cursor: default;
}

.repair-part-revenue-report-page .repair-part-revenue-day-row:hover {
  background: transparent;
}

.repair-part-revenue-report-page .repair-part-revenue-day-row td {
  padding: 0;
  border-top: 1px solid #b8cbe4;
  border-bottom: 1px solid #c8d8ec;
  border-left: 3px solid #5277ad;
  background: #e8f1fb;
}

.repair-part-revenue-day-summary {
  display: grid;
  grid-template-columns: 11% 13% 24% 10% 7% 7% 7% 7% 9% 5%;
  align-items: center;
  width: 100%;
}

.repair-part-revenue-day-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  grid-column: 1 / span 3;
  gap: 8px;
  min-width: 0;
  padding: 11px 12px;
}

.repair-part-revenue-day-title span,
.repair-part-revenue-day-title em {
  color: #64748b;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 600;
}

.repair-part-revenue-day-title strong {
  color: #0f172a;
  font-size: 0.96rem;
  font-weight: 800;
}

.repair-part-revenue-summary-chip {
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: 0;
  height: 100%;
  padding: 8px 8px;
  border-left: 1px solid #c8d8ec;
  color: #1e3a8a;
}

.repair-part-revenue-summary-chip em {
  color: #64748b;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 600;
}

.repair-part-revenue-summary-chip strong {
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.repair-part-revenue-summary-chip.is-danger strong {
  color: #dc2626;
}

.repair-part-revenue-summary-chip.is-strong {
  background: #d9e8f8;
}

.repair-part-revenue-day-spacer {
  align-self: stretch;
  border-left: 1px solid #c8d8ec;
}

.repair-part-revenue-amount-cell,
.repair-part-revenue-money {
  white-space: nowrap;
}

.repair-part-revenue-report-page #repairPartRevenueDetailTable .repair-part-revenue-amount-cell {
  padding-right: 8px;
  padding-left: 6px;
}

.repair-part-revenue-money.is-hidden {
  display: inline-block;
  max-width: 100%;
  color: #64748b;
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: normal;
}

.repair-part-revenue-detail-text {
  min-width: 0;
}

.repair-part-revenue-action-cell {
  vertical-align: middle !important;
}

.repair-part-revenue-action-cell .report-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 991.98px) {
  .repair-part-revenue-report-page #repairPartRevenueDetailTable,
  .repair-part-revenue-report-page #repairPartRevenueDetailTable tbody {
    display: block;
    width: 100%;
  }

  .repair-part-revenue-report-page #repairPartRevenueDetailTable colgroup,
  .repair-part-revenue-report-page #repairPartRevenueDetailTable thead {
    display: none;
  }

  .repair-part-revenue-report-page #repairPartRevenueDetailTable tr,
  .repair-part-revenue-report-page #repairPartRevenueDetailTable td {
    display: block;
    width: 100%;
  }

  .repair-part-revenue-report-page .repair-part-revenue-day-row td {
    margin: 0 0 8px;
    border: 1px solid #bfdbfe;
    border-left: 3px solid #5277ad;
    border-radius: 8px;
  }

  .repair-part-revenue-day-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
  }

  .repair-part-revenue-day-title {
    grid-column: 1 / -1;
    padding: 10px 12px;
    border-bottom: 1px solid #c8d8ec;
  }

  .repair-part-revenue-summary-chip {
    border-left: 0;
    border-bottom: 1px solid #d7e3f3;
    justify-items: stretch;
    justify-content: space-between;
    padding: 8px 12px;
  }

  .repair-part-revenue-summary-chip strong {
    text-align: left;
  }

  .repair-part-revenue-day-spacer {
    display: none;
  }

  .repair-part-revenue-report-page .repair-part-revenue-detail-row {
    margin: 0 0 10px;
    padding: 12px;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  }

  .repair-part-revenue-report-page .repair-part-revenue-detail-row td {
    padding: 7px 0;
    border: 0;
  }

  .repair-part-revenue-report-page .repair-part-revenue-detail-row td[data-label]::before {
    display: block;
    margin-bottom: 2px;
    color: #64748b;
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
  }

  .repair-part-revenue-report-page .repair-part-revenue-detail-row .repair-part-revenue-amount-cell {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-top: 1px dashed #e2e8f0;
  }

  .repair-part-revenue-report-page .repair-part-revenue-detail-row .repair-part-revenue-amount-cell::before {
    margin: 0;
  }

  .repair-part-revenue-report-page .repair-part-revenue-action-cell {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
  }
}

.report-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(15, 23, 42, 0.38);
}

.report-detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(480px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  overflow: hidden;
  background: #fff;
  box-shadow: -16px 0 40px rgba(15, 23, 42, 0.2);
  transform: translateX(110%);
  transition: transform 0.2s ease;
}

.report-detail-drawer.open {
  transform: translateX(0);
}

.report-detail-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid #e2e8f0;
}

.report-drawer-label {
  display: block;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 800;
}

.report-detail-drawer-header h3 {
  margin: 4px 0 0;
  color: #0f172a;
  font-size: 1.2rem;
  font-weight: 800;
}

.report-detail-drawer-body {
  display: grid;
  align-content: start;
  gap: 14px;
  overflow-y: auto;
  padding: 18px;
}

.report-drawer-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.report-drawer-summary div,
.report-drawer-item,
.report-drawer-section {
  padding: 10px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
}

.report-drawer-summary span,
.report-drawer-item label,
.report-drawer-section label {
  display: block;
  margin: 0 0 4px;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
}

.report-drawer-summary strong,
.report-drawer-item strong {
  display: block;
  overflow-wrap: anywhere;
  color: #0f172a;
}

.report-drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.report-drawer-section p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #1e293b;
  line-height: 1.55;
}

@media (max-width: 767.98px) {
  .report-drawer-grid,
  .report-drawer-summary {
    grid-template-columns: 1fr;
  }

  .report-priority-table colgroup,
  .report-priority-table thead {
    display: none;
  }

  .report-priority-table,
  .report-priority-table tbody,
  .report-priority-table tr,
  .report-priority-table td {
    display: block;
    width: 100%;
  }

  .report-priority-table tr {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
  }

  .report-priority-table td {
    padding: 4px 0;
    border: 0;
  }

  .report-priority-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
  }

  .report-priority-table td.text-end,
  .report-priority-table td.text-center {
    text-align: left !important;
  }

  .report-row-action {
    width: 100%;
    justify-content: center;
  }
}

.registration-report-page {
  overflow-x: hidden;
}

.registration-report-page *,
.registration-report-page *::before,
.registration-report-page *::after {
  min-width: 0;
}

.registration-filter-grid {
  grid-template-columns: 180px 220px 260px minmax(260px, 1fr);
}

.registration-keyword-field {
  min-width: 0;
}

.registration-kpi-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.registration-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.55fr) minmax(240px, 0.55fr);
  gap: 14px;
  overflow-x: hidden;
}

.registration-chart-panel {
  min-height: 340px;
}

.registration-table-shell {
  overflow-x: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.registration-priority-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.registration-priority-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  overflow: hidden;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registration-priority-table tbody td {
  overflow-wrap: anywhere;
  color: #1e293b;
  font-size: 0.82rem;
  vertical-align: top;
}

.registration-detail-table tbody tr {
  cursor: pointer;
}

.registration-detail-table tbody tr:hover {
  background: #f8fafc;
}

.registration-cell-main {
  color: #0f172a;
  font-weight: 700;
  line-height: 1.25;
}

.registration-cell-sub {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.25;
}

.registration-clamp-2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.registration-row-action {
  width: 32px;
  height: 32px;
  padding: 0;
}

.registration-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(15, 23, 42, 0.38);
}

.registration-detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(460px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  overflow: hidden;
  background: #fff;
  box-shadow: -16px 0 40px rgba(15, 23, 42, 0.2);
  transform: translateX(110%);
  transition: transform 0.2s ease;
}

.registration-detail-drawer.open {
  transform: translateX(0);
}

.registration-detail-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid #e2e8f0;
}

.registration-drawer-label {
  display: block;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 800;
}

.registration-detail-drawer-header h3 {
  margin: 4px 0 0;
  color: #0f172a;
  font-size: 1.2rem;
  font-weight: 800;
}

.registration-detail-drawer-body {
  display: grid;
  align-content: start;
  gap: 14px;
  overflow-y: auto;
  padding: 18px;
}

.registration-drawer-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.registration-drawer-summary div,
.registration-drawer-item,
.registration-drawer-section {
  padding: 10px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
}

.registration-drawer-summary span,
.registration-drawer-item label,
.registration-drawer-section label {
  display: block;
  margin: 0 0 4px;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
}

.registration-drawer-summary strong,
.registration-drawer-item strong {
  display: block;
  overflow-wrap: anywhere;
  color: #0f172a;
}

.registration-drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.registration-drawer-section p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #1e293b;
  line-height: 1.55;
}

.monthly-vehicle-sales-page,
.monthly-vehicle-sales-page * {
  box-sizing: border-box;
}

.monthly-vehicle-sales-page {
  max-width: 100%;
  overflow-x: hidden;
}

.monthly-vehicle-sales-filter-grid {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(220px, 320px);
  gap: 1rem;
  align-items: end;
}

.monthly-vehicle-sales-kpi-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.monthly-vehicle-sales-overview-grid,
.monthly-vehicle-sales-dimension-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 1rem;
  max-width: 100%;
}

.monthly-vehicle-sales-overview-grid {
  grid-template-areas:
    "trend type"
    "brand pending";
}

.monthly-vehicle-sales-overview-grid > :nth-child(1) { grid-area: trend; }
.monthly-vehicle-sales-overview-grid > :nth-child(2) { grid-area: type; }
.monthly-vehicle-sales-overview-grid > :nth-child(3) { grid-area: brand; }
.monthly-vehicle-sales-overview-grid > :nth-child(4) { grid-area: pending; }

.monthly-vehicle-sales-chart-panel,
.monthly-vehicle-sales-chart-panel .vehicle-movement-chart-box {
  min-width: 0;
}

.monthly-vehicle-sales-donut-box {
  min-height: 260px;
}

.monthly-vehicle-sales-month-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.monthly-vehicle-sales-month-card {
  min-width: 0;
  border: 1px solid #dbe7f3;
  border-radius: 8px;
  padding: .85rem;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
}

.monthly-vehicle-sales-month-card > div {
  min-width: 0;
}

.monthly-vehicle-sales-month-card span {
  display: block;
  color: #64748b;
  font-size: .78rem;
}

.monthly-vehicle-sales-month-card strong {
  display: block;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 1.05rem;
  line-height: 1.35;
}

.monthly-vehicle-sales-month-card.is-loss strong {
  color: #b91c1c;
}

.monthly-vehicle-sales-month-meta {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .65rem;
}

.monthly-vehicle-sales-dimension-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}

.monthly-vehicle-sales-table-shell {
  max-width: 100%;
  overflow-x: hidden;
}

.monthly-vehicle-sales-priority-table {
  width: 100%;
  table-layout: fixed;
}

.monthly-vehicle-sales-priority-table th,
.monthly-vehicle-sales-priority-table td {
  overflow-wrap: anywhere;
  white-space: normal;
}

.monthly-vehicle-sales-cell-main,
.monthly-vehicle-sales-cell-sub {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.monthly-vehicle-sales-cell-main {
  font-weight: 600;
}

.monthly-vehicle-sales-sale-type-cell {
  min-width: 0;
}

.monthly-vehicle-sales-sale-type-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid transparent;
  border-radius: .4rem;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.2;
  padding: .3rem .48rem;
  white-space: nowrap;
}

.monthly-vehicle-sales-sale-type-badge.is-cash {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.monthly-vehicle-sales-sale-type-badge.is-credit {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.monthly-vehicle-sales-sale-type-badge.is-wholesale {
  background: #f3e8ff;
  border-color: #e9d5ff;
  color: #7e22ce;
}

.monthly-vehicle-sales-sale-type-badge.is-other {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.monthly-vehicle-sales-cell-sub {
  color: #64748b;
  font-size: .78rem;
}

.monthly-vehicle-sales-detail-row {
  cursor: pointer;
}

.monthly-vehicle-sales-drawer .registration-drawer-item.is-danger strong {
  color: #b91c1c;
}

.monthly-vehicle-sales-drawer .registration-drawer-item.is-warning strong {
  color: #92400e;
}

.monthly-vehicle-sales-detail-drawer {
  width: min(540px, calc(100vw - 24px));
  background: #f8fafc;
}

.monthly-vehicle-sales-detail-drawer .registration-detail-drawer-header {
  background: #fff;
}

.monthly-vehicle-sales-detail-drawer .registration-detail-drawer-body {
  gap: 1rem;
  padding: 1rem;
}

.monthly-vehicle-sales-drawer-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  box-shadow: 0 10px 24px rgba(30, 64, 175, .18);
  color: #fff;
}

.monthly-vehicle-sales-drawer-hero-copy {
  display: grid;
  gap: .18rem;
  min-width: 0;
}

.monthly-vehicle-sales-drawer-hero-copy span,
.monthly-vehicle-sales-drawer-hero-copy small {
  color: rgba(255, 255, 255, .78);
}

.monthly-vehicle-sales-drawer-hero-copy span {
  font-size: .72rem;
  font-weight: 700;
}

.monthly-vehicle-sales-drawer-hero-copy strong {
  overflow-wrap: anywhere;
  font-size: 1.15rem;
}

.monthly-vehicle-sales-drawer-hero-copy small {
  overflow-wrap: anywhere;
  font-size: .76rem;
}

.monthly-vehicle-sales-transfer-status {
  display: inline-flex;
  flex: 0 0 auto;
  gap: .35rem;
  align-items: center;
  padding: .38rem .55rem;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}

.monthly-vehicle-sales-transfer-status.is-pending {
  border-color: #fde68a;
  background: #fef3c7;
  color: #92400e;
}

.monthly-vehicle-sales-drawer-section {
  --monthly-vehicle-sales-drawer-accent: #2563eb;
  --monthly-vehicle-sales-drawer-border: #bfdbfe;
  --monthly-vehicle-sales-drawer-surface: #eff6ff;
  display: grid;
  gap: .8rem;
  padding: .9rem;
  border-color: var(--monthly-vehicle-sales-drawer-border);
  background: var(--monthly-vehicle-sales-drawer-surface);
}

.monthly-vehicle-sales-drawer-section.is-money {
  --monthly-vehicle-sales-drawer-accent: #0f766e;
  --monthly-vehicle-sales-drawer-border: #99f6e4;
  --monthly-vehicle-sales-drawer-surface: #f0fdfa;
}

.monthly-vehicle-sales-drawer-section.is-transfer {
  --monthly-vehicle-sales-drawer-accent: #b45309;
  --monthly-vehicle-sales-drawer-border: #fde68a;
  --monthly-vehicle-sales-drawer-surface: #fffbeb;
}

.monthly-vehicle-sales-drawer-section.is-customer {
  --monthly-vehicle-sales-drawer-accent: #7c3aed;
  --monthly-vehicle-sales-drawer-border: #ddd6fe;
  --monthly-vehicle-sales-drawer-surface: #f5f3ff;
}

.monthly-vehicle-sales-drawer-section.is-note {
  --monthly-vehicle-sales-drawer-accent: #475569;
  --monthly-vehicle-sales-drawer-border: #cbd5e1;
  --monthly-vehicle-sales-drawer-surface: #f8fafc;
}

.monthly-vehicle-sales-drawer-section-heading {
  display: flex;
  gap: .65rem;
  align-items: center;
}

.monthly-vehicle-sales-drawer-section-heading > div {
  display: grid;
  gap: .08rem;
  min-width: 0;
}

.monthly-vehicle-sales-drawer-section-heading h4,
.monthly-vehicle-sales-drawer-section-heading p {
  margin: 0;
}

.monthly-vehicle-sales-drawer-section-heading h4 {
  color: #0f172a;
  font-size: .9rem;
}

.monthly-vehicle-sales-drawer-section-heading p {
  color: #64748b;
  font-size: .7rem;
  line-height: 1.35;
}

.monthly-vehicle-sales-drawer-section-icon {
  display: grid;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--monthly-vehicle-sales-drawer-accent);
  color: #fff;
  place-items: center;
}

.monthly-vehicle-sales-drawer-section .registration-drawer-item {
  border-color: rgba(148, 163, 184, .38);
  background: #fff;
}

.monthly-vehicle-sales-drawer-section .registration-drawer-item span {
  display: block;
  margin-bottom: .18rem;
  color: #64748b;
  font-size: .7rem;
  font-weight: 700;
}

.monthly-vehicle-sales-drawer-section .registration-drawer-item.is-emphasis {
  border-color: var(--monthly-vehicle-sales-drawer-accent);
  box-shadow: inset 3px 0 0 var(--monthly-vehicle-sales-drawer-accent);
}

.monthly-vehicle-sales-drawer-section .registration-drawer-item.is-full {
  grid-column: 1 / -1;
}

.monthly-vehicle-sales-drawer .registration-drawer-item.is-positive strong {
  color: #0f766e;
}

@media (max-width: 1199.98px) {
  .registration-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .registration-overview-grid {
    grid-template-columns: 1fr;
  }

  .monthly-vehicle-sales-overview-grid,
  .monthly-vehicle-sales-dimension-grid {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .monthly-vehicle-sales-overview-grid > * {
    grid-area: auto !important;
  }

  .monthly-vehicle-sales-month-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .registration-filter-grid,
  .registration-kpi-strip,
  .registration-drawer-grid,
  .registration-drawer-summary {
    grid-template-columns: 1fr;
  }

  .monthly-vehicle-sales-filter-grid,
  .monthly-vehicle-sales-kpi-strip,
  .monthly-vehicle-sales-month-grid {
    grid-template-columns: 1fr;
  }

  .monthly-vehicle-sales-page .vehicle-movement-view-bar {
    align-items: stretch;
  }

  .monthly-vehicle-sales-page .vehicle-movement-view-bar .btn-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .monthly-vehicle-sales-dimension-toolbar .btn {
    flex: 1 1 calc(50% - .5rem);
  }

  .registration-priority-table colgroup,
  .registration-priority-table thead {
    display: none;
  }

  .registration-priority-table,
  .registration-priority-table tbody,
  .registration-priority-table tr,
  .registration-priority-table td {
    display: block;
    width: 100%;
  }

  .registration-priority-table tr {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
  }

  .registration-priority-table td {
    padding: 4px 0;
    border: 0;
  }

  .registration-priority-table td.text-end,
  .registration-priority-table td.text-center {
    text-align: left !important;
  }
}
.part-stock-report-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.part-stock-page-header .action-toolbar {
    justify-content: flex-end;
    max-width: 100%;
}

.part-stock-catalog-link {
    white-space: nowrap;
}

.part-stock-command-bar {
    position: sticky;
    top: 0.75rem;
    z-index: 10;
    padding: 1rem;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

.part-stock-filter-grid {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(220px, 1.3fr) minmax(160px, 1fr) minmax(150px, 0.7fr);
    gap: 0.85rem;
    align-items: end;
}

.part-stock-check-wrap {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #f8fafc;
}

.part-stock-empty-state {
    min-height: 360px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 3rem 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
}

.part-stock-empty-state h3 {
    margin: 0.75rem 0 0.35rem;
    color: #0f172a;
}

.part-stock-empty-state p {
    max-width: 520px;
    margin: 0;
}

.part-stock-empty-icon {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 2.1rem;
}

.part-stock-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.part-stock-kpi-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 0.75rem;
}

.part-stock-kpi {
    min-height: 92px;
    padding: 0.9rem;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.part-stock-kpi span {
    display: block;
    color: #64748b;
    font-size: 0.82rem;
}

.part-stock-kpi strong {
    display: block;
    margin-top: 0.35rem;
    color: #0f172a;
    font-size: 1.75rem;
    line-height: 1.1;
}

.part-stock-kpi-primary {
    border-color: #99f6e4;
    background: #f0fdfa;
}

.part-stock-kpi-soft {
    border-color: #fde68a;
    background: #fffbeb;
}

.part-stock-kpi-available {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.part-stock-view-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.part-stock-view-panel {
    display: none;
}

.part-stock-view-panel.active {
    display: block;
}

.part-stock-overview-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
    gap: 1rem;
}

.part-stock-main-column,
.part-stock-insight-rail {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.part-stock-panel {
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.part-stock-panel-title {
    padding: 0.9rem 1rem 0;
}

.part-stock-panel-title h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
}

.part-stock-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

.part-stock-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    text-align: left;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.part-stock-card:hover {
    border-color: #2563eb;
    transform: translateY(-1px);
}

.part-stock-thumb,
.part-stock-table-thumb,
.part-stock-detail-image {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: #f1f5f9;
}

.part-stock-thumb {
    width: 76px;
    height: 76px;
}

.part-stock-table-thumb {
    width: 48px;
    height: 48px;
}

.part-stock-thumb img,
.part-stock-table-thumb img,
.part-stock-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.part-stock-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #64748b;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.part-stock-card-body {
    min-width: 0;
}

.part-stock-card-body span,
.part-stock-card-body small,
.part-stock-card-body em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.part-stock-card-body span {
    color: #2563eb;
    font-size: 0.76rem;
    font-weight: 700;
}

.part-stock-card-body strong {
    display: block;
    color: #0f172a;
    font-size: 0.95rem;
}

.part-stock-card-body small,
.part-stock-card-body em {
    color: #64748b;
    font-style: normal;
    font-size: 0.78rem;
}

.part-stock-card-price {
    margin-top: 0.4rem;
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 700;
}

.part-stock-card-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.part-stock-card-metrics b,
.part-stock-card-metrics span {
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.75rem;
}

.part-stock-card-metrics b {
    background: #ccfbf1;
    color: #0f766e;
}

.part-stock-receipt-list,
.part-stock-rank-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem;
}

.part-stock-receipt-row {
    display: grid;
    grid-template-columns: 82px 110px minmax(0, 1fr) 90px;
    gap: 0.65rem;
    align-items: center;
    width: 100%;
    padding: 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    text-align: left;
}

.part-stock-receipt-row span,
.part-stock-receipt-row small {
    color: #64748b;
    font-size: 0.78rem;
}

.part-stock-receipt-row strong,
.part-stock-receipt-row em {
    overflow: hidden;
    color: #0f172a;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.part-stock-rank-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.part-stock-rank-line {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
}

.part-stock-rank-line span {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--rank-color);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}

.part-stock-rank-line strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.part-stock-rank-line em {
    color: #334155;
    font-style: normal;
    font-weight: 700;
}

.part-stock-rank-bar {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.part-stock-rank-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.part-stock-table-shell {
    overflow: auto;
    max-height: calc(100vh - 250px);
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.part-stock-table {
    min-width: 1120px;
}

.part-stock-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #0f172a;
    color: #fff;
    font-size: 0.78rem;
    white-space: nowrap;
}

.part-stock-table td {
    vertical-align: middle;
}

.part-stock-name-cell {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.part-stock-pager {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.75rem;
}

.part-stock-page-status {
    color: #475569;
    font-size: 0.88rem;
}

.part-stock-detail-drawer {
    width: min(720px, 100vw);
}

.part-stock-detail-hero {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.part-stock-detail-image {
    width: 132px;
    height: 132px;
}

.part-stock-detail-hero span {
    color: #2563eb;
    font-weight: 700;
}

.part-stock-detail-hero h3 {
    margin: 0.25rem 0;
    color: #0f172a;
}

.part-stock-detail-hero p {
    margin: 0;
    color: #64748b;
}

.part-stock-detail-price {
    display: inline-flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 180px;
    margin-top: 0.75rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    background: #f0f9ff;
}

.part-stock-detail-price span {
    color: #0369a1;
    font-size: 0.75rem;
    font-weight: 700;
}

.part-stock-detail-price strong {
    color: #0f172a;
    font-size: 1.25rem;
    line-height: 1.15;
}

.part-stock-detail-price small {
    color: #64748b;
    font-size: 0.75rem;
}

.part-stock-detail-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.part-stock-detail-summary div {
    padding: 0.75rem;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #f8fafc;
}

.part-stock-detail-summary span {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
}

.part-stock-detail-summary strong {
    color: #0f172a;
    font-size: 1.35rem;
}

.part-stock-detail-list,
.part-stock-detail-receipts {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.part-stock-detail-receipts {
    margin-top: 1rem;
}

.part-stock-detail-receipts h3 {
    margin: 0;
    font-size: 1rem;
}

.part-stock-detail-row,
.part-stock-detail-receipt {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.part-stock-detail-row span,
.part-stock-detail-receipt span,
.part-stock-detail-receipt small {
    color: #64748b;
    font-size: 0.78rem;
}

.part-stock-detail-metrics {
    display: flex;
    gap: 0.45rem;
}

.part-stock-detail-metrics span {
    padding: 0.25rem 0.45rem;
    border-radius: 6px;
    background: #f1f5f9;
    white-space: nowrap;
}

.part-stock-detail-receipt {
    grid-template-columns: 86px 110px 50px minmax(0, 1fr);
}

.part-stock-detail-receipt strong,
.part-stock-detail-receipt em {
    color: #0f172a;
    font-style: normal;
}

.part-stock-empty-block {
    padding: 1rem;
    color: #64748b;
    text-align: center;
}

@media (max-width: 1200px) {
    .part-stock-page-header .col-auto {
        width: 100%;
        margin-left: 0 !important;
    }

    .part-stock-page-header .action-toolbar {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .part-stock-page-header .action-toolbar .btn {
        min-width: 0;
    }

    .part-stock-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .part-stock-kpi-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .part-stock-overview-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .part-stock-page-header .action-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .part-stock-command-bar {
        position: static;
    }

    .part-stock-filter-grid,
    .part-stock-kpi-strip,
    .part-stock-detail-summary {
        grid-template-columns: 1fr;
    }

    .part-stock-view-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .part-stock-card-grid {
        grid-template-columns: 1fr;
    }

    .part-stock-receipt-row,
    .part-stock-detail-hero,
    .part-stock-detail-row,
    .part-stock-detail-receipt {
        grid-template-columns: 1fr;
    }

    .part-stock-detail-price {
        width: 100%;
        min-width: 0;
    }
}

/* Yearly dynamic reports */
.yearly-report-page,
.yearly-report-page * {
    min-width: 0;
}

.yearly-report-header .action-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.yearly-report-command-bar,
.yearly-report-results,
.yearly-report-empty-state,
.yearly-report-panel,
.yearly-report-table-shell {
    overflow-x: hidden;
}

.yearly-report-command-bar {
    background: #fff;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
    margin-bottom: 1rem;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.yearly-report-filter-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.yearly-report-empty-state {
    align-items: center;
    background: linear-gradient(135deg, #f8fafc, #eef6ff);
    border: 1px dashed #bfd3ea;
    border-radius: 8px;
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    justify-content: center;
    min-height: 260px;
    padding: 2rem;
    text-align: center;
}

.yearly-report-empty-icon {
    align-items: center;
    background: #e0f2fe;
    border-radius: 8px;
    color: #0369a1;
    display: flex;
    font-size: 2rem;
    height: 4rem;
    justify-content: center;
    width: 4rem;
}

.yearly-report-kpi-strip {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin-bottom: 1rem;
}

.yearly-report-kpi {
    background: #fff;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    padding: .85rem;
}

.yearly-report-kpi span {
    color: #64748b;
    display: block;
    font-size: .78rem;
}

.yearly-report-kpi strong {
    color: #0f172a;
    display: block;
    font-size: clamp(1.05rem, 1.6vw, 1.45rem);
    margin-top: .25rem;
    overflow-wrap: anywhere;
}

.yearly-report-kpi-primary {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.yearly-report-kpi-alert {
    background: #fffbeb;
    border-color: #fde68a;
}

.yearly-report-view-bar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.yearly-report-view-bar .btn-group {
    flex-wrap: wrap;
    gap: .35rem;
}

.yearly-report-view-bar .btn-group > .btn {
    border-radius: 6px !important;
}

.yearly-report-view-panel {
    display: none;
}

.yearly-report-view-panel.active {
    display: block;
}

.yearly-report-overview-grid,
.yearly-report-dimension-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, .8fr);
}

.yearly-report-overview-grid .yearly-report-panel:last-child {
    grid-column: 1 / -1;
}

.yearly-report-panel {
    background: #fff;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    padding: 1rem;
}

.yearly-report-panel-title {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.yearly-report-panel-title h3 {
    font-size: .95rem;
    margin: 0;
}

.yearly-report-chart-box {
    height: 280px;
    position: relative;
}

.yearly-report-donut-box {
    height: 240px;
}

.yearly-report-year-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    margin-bottom: 1rem;
}

.yearly-report-year-card {
    background: #fff;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    display: grid;
    gap: .75rem;
    padding: .9rem;
}

.yearly-report-year-card > div:first-child {
    align-items: baseline;
    display: flex;
    justify-content: space-between;
}

.yearly-report-year-card span,
.yearly-report-year-card small {
    color: #64748b;
}

.yearly-report-year-card strong {
    color: #0f172a;
    font-size: 1.1rem;
}

.yearly-report-year-card-grid {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.yearly-report-year-card-grid span {
    background: #f8fafc;
    border-radius: 6px;
    padding: .45rem;
}

.yearly-report-year-card-grid b {
    color: #0f172a;
    display: block;
    font-size: .88rem;
    overflow-wrap: anywhere;
}

.yearly-report-table-shell {
    background: #fff;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
}

.yearly-report-priority-table {
    table-layout: fixed;
    width: 100%;
}

.yearly-report-priority-table th,
.yearly-report-priority-table td {
    min-width: 0;
    overflow-wrap: anywhere;
    vertical-align: top;
}

.yearly-report-priority-table td small {
    color: #64748b;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.yearly-report-dimension-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

.yearly-report-segment {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #334155;
    padding: .45rem .8rem;
}

.yearly-report-segment.active {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}

.yearly-report-rank-list {
    display: grid;
    gap: .5rem;
}

.yearly-report-rank-item {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: inherit;
    display: grid;
    gap: .65rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: .65rem;
    text-align: left;
    width: 100%;
}

.yearly-report-rank-no {
    align-items: center;
    background: #dbeafe;
    border-radius: 6px;
    color: #1d4ed8;
    display: flex;
    font-weight: 700;
    height: 1.8rem;
    justify-content: center;
    width: 1.8rem;
}

.yearly-report-rank-item strong,
.yearly-report-rank-item small,
.yearly-report-rank-item b {
    overflow-wrap: anywhere;
}

.yearly-report-rank-item small {
    color: #64748b;
    display: block;
}

.yearly-report-rank-button {
    border: 1px solid #e2e8f0;
    cursor: pointer;
}

.yearly-report-matrix {
    display: grid;
    gap: 1rem;
}

.yearly-report-matrix-section {
    background: #fff;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    padding: .85rem;
}

.yearly-report-matrix-section h3 {
    font-size: .95rem;
    margin-bottom: .65rem;
}

.yearly-report-matrix-row {
    align-items: stretch;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: .65rem;
    grid-template-columns: minmax(170px, .7fr) minmax(0, 2fr);
    margin-bottom: .5rem;
    padding: .6rem;
    text-align: left;
    width: 100%;
}

.yearly-report-matrix-name {
    color: #0f172a;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.yearly-report-matrix-values {
    display: grid;
    gap: .35rem;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

.yearly-report-matrix-values em {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-style: normal;
    padding: .35rem;
}

.yearly-report-matrix-values small {
    color: #64748b;
    display: block;
}

.yearly-report-matrix-values b {
    color: #0f172a;
    display: block;
    font-size: .78rem;
    overflow-wrap: anywhere;
}

.yearly-report-matrix-values .total {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.yearly-report-income-detail-tools {
    align-items: end;
    background: #fff;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(220px, 1.3fr) minmax(160px, .7fr) minmax(220px, auto);
    margin-bottom: 1rem;
    padding: .85rem;
}

.yearly-report-income-detail-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.yearly-report-pager {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: flex-end;
    padding: .75rem;
}

.yearly-report-page-status {
    color: #64748b;
    min-width: 64px;
    text-align: center;
}

.yearly-report-drawer-backdrop {
    background: rgba(15, 23, 42, .28);
    inset: 0;
    position: fixed;
    z-index: 1050;
}

.yearly-report-detail-drawer {
    background: #fff;
    box-shadow: -16px 0 36px rgba(15, 23, 42, .16);
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: min(480px, 94vw);
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(105%);
    transition: transform .2s ease;
    width: 480px;
    z-index: 1051;
}

.yearly-report-detail-drawer.open {
    transform: translateX(0);
}

.yearly-report-detail-drawer-header {
    align-items: flex-start;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    padding: 1rem;
}

.yearly-report-detail-drawer-header h3 {
    font-size: 1rem;
    margin: .15rem 0 0;
    overflow-wrap: anywhere;
}

.yearly-report-drawer-label {
    color: #64748b;
    font-size: .78rem;
}

.yearly-report-detail-drawer-body {
    display: grid;
    gap: .6rem;
    overflow-y: auto;
    padding: 1rem;
}

.yearly-report-drawer-field {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: .65rem;
}

.yearly-report-drawer-field span {
    color: #64748b;
    display: block;
    font-size: .76rem;
}

.yearly-report-drawer-field strong {
    color: #0f172a;
    display: block;
    margin-top: .15rem;
    overflow-wrap: anywhere;
}

.yearly-report-no-data {
    color: #64748b;
    padding: 1rem;
    text-align: center;
}

.btn.is-loading {
    opacity: .75;
    pointer-events: none;
}

@media (max-width: 992px) {
    .yearly-report-overview-grid,
    .yearly-report-dimension-grid,
    .yearly-report-income-detail-tools,
    .yearly-report-matrix-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .yearly-report-command-bar {
        position: static;
    }

    .yearly-report-view-bar {
        align-items: stretch;
    }

    .yearly-report-view-bar .btn-group,
    .yearly-report-view-bar .btn {
        width: 100%;
    }

    .yearly-report-chart-box {
        height: 230px;
    }

    .yearly-report-priority-table th,
    .yearly-report-priority-table td {
        font-size: .78rem;
        padding: .45rem;
    }
}

.monthly-income-expense-page {
    overflow-x: hidden;
}

.monthly-income-expense-page .vehicle-movement-view-panel {
    min-width: 0;
    overflow-x: hidden;
}

.monthly-income-expense-page .monthly-vehicle-sales-kpi-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.monthly-income-expense-page .vehicle-movement-kpi {
    display: grid;
    gap: .45rem;
    min-height: 104px;
    padding: .9rem 1rem;
    position: relative;
}

.monthly-income-expense-page .vehicle-movement-kpi::before {
    background: #2563eb;
    border-radius: 8px 0 0 8px;
    bottom: 0;
    content: "";
    left: 0;
    position: absolute;
    top: 0;
    width: 4px;
}

.monthly-income-expense-page .vehicle-movement-kpi-in::before {
    background: #047857;
}

.monthly-income-expense-page .vehicle-movement-kpi-out::before {
    background: #dc2626;
}

.monthly-income-expense-page .vehicle-movement-kpi span {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 0;
}

.monthly-income-expense-page .vehicle-movement-kpi strong {
    font-size: clamp(1.3rem, 1.9vw, 1.85rem);
    line-height: 1.08;
    margin-top: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
}

.monthly-income-expense-page .vehicle-movement-kpi strong,
.monthly-ie-month-cell strong,
.monthly-ie-total-cell strong,
.monthly-ie-month-summary strong,
.monthly-ie-rank-row strong,
.monthly-ie-kpi-amount {
    font-variant-numeric: tabular-nums;
}

.monthly-ie-kpi-month,
.monthly-ie-kpi-amount {
    display: block;
}

.monthly-ie-kpi-month {
    color: #0f172a;
    font-size: clamp(1.05rem, 1.35vw, 1.35rem);
    font-weight: 800;
    line-height: 1.15;
}

.monthly-ie-kpi-amount {
    color: inherit;
    font-size: clamp(1rem, 1.25vw, 1.25rem);
    line-height: 1.12;
}

.income-expense-report-page .vehicle-movement-kpi-strip {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.monthly-ie-matrix-toolbar,
.monthly-ie-detail-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: .85rem;
    min-width: 0;
}

.monthly-income-expense-page .vehicle-movement-panel-title {
    align-items: flex-start;
    gap: .75rem;
}

.monthly-income-expense-page .vehicle-movement-panel-title h3 {
    margin-bottom: .15rem;
}

.monthly-income-expense-page .vehicle-movement-panel-title p {
    color: #64748b;
    font-size: .78rem;
    line-height: 1.35;
    margin: 0;
}

.monthly-income-expense-page .monthly-vehicle-sales-overview-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr);
    grid-template-areas:
        "trend share"
        "trend revenue"
        "expense revenue";
}

.monthly-income-expense-page .monthly-vehicle-sales-overview-grid > :nth-child(1) { grid-area: trend; }
.monthly-income-expense-page .monthly-vehicle-sales-overview-grid > :nth-child(2) { grid-area: share; }
.monthly-income-expense-page .monthly-vehicle-sales-overview-grid > :nth-child(3) { grid-area: expense; }
.monthly-income-expense-page .monthly-vehicle-sales-overview-grid > :nth-child(4) { grid-area: revenue; }

.monthly-income-expense-page .monthly-vehicle-sales-dimension-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
}

.monthly-income-expense-page .monthly-ie-analysis-grid {
    align-items: start;
}

.monthly-income-expense-page .monthly-ie-analysis-grid > .vehicle-movement-panel {
    align-self: start;
}

.monthly-ie-month-cards {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: .85rem;
    min-width: 0;
}

.monthly-ie-month-summary {
    background: #fff;
    border: 1px solid #dbe7f3;
    border-left: 4px solid #0f766e;
    border-radius: 8px;
    color: #0f172a;
    cursor: pointer;
    display: grid;
    gap: .22rem;
    min-width: 0;
    padding: .55rem .65rem;
    text-align: left;
}

.monthly-ie-month-summary:hover {
    background: #f8fafc;
}

.monthly-ie-month-summary.is-negative {
    border-left-color: #dc2626;
}

.monthly-ie-month-summary span {
    color: #475569;
    font-size: .72rem;
    font-weight: 800;
}

.monthly-ie-month-summary strong {
    color: #047857;
    font-size: .86rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.monthly-ie-month-summary.is-negative strong {
    color: #dc2626;
}

.monthly-ie-month-summary small {
    color: #64748b;
    display: -webkit-box;
    font-size: .66rem;
    line-height: 1.25;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.monthly-ie-detail-toolbar {
    align-items: end;
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(160px, .8fr) auto;
}

.monthly-ie-section-chip {
    border-radius: 999px;
    font-weight: 700;
    padding: .35rem .75rem;
}

.monthly-ie-expense-chip {
    background: #fff7ed;
    color: #b45309;
}

.monthly-ie-revenue-chip {
    background: #e0f2fe;
    color: #0369a1;
}

.monthly-ie-non-operating-chip {
    background: #f3e8ff;
    color: #7e22ce;
}

.monthly-ie-matrix {
    display: grid;
    gap: .9rem;
    min-width: 0;
    overflow-x: hidden;
}

.monthly-ie-matrix-section {
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    min-width: 0;
    overflow: hidden;
}

.monthly-ie-matrix-section-title {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: .92rem;
    font-weight: 800;
    padding: .65rem .8rem;
}

.monthly-ie-matrix-section.expense .monthly-ie-matrix-section-title {
    color: #b45309;
}

.monthly-ie-matrix-section.revenue .monthly-ie-matrix-section-title {
    color: #0369a1;
}

.monthly-ie-matrix-section.non-operating .monthly-ie-matrix-section-title {
    color: #7e22ce;
}

.monthly-ie-matrix-header,
.monthly-ie-matrix-row {
    display: grid;
    gap: .35rem;
    grid-template-columns: minmax(150px, 1.35fr) minmax(0, 6fr) minmax(92px, .85fr);
    min-width: 0;
}

.monthly-ie-matrix-header {
    align-items: center;
    background: #edf2f7;
    color: #475569;
    font-size: .72rem;
    font-weight: 800;
    padding: .45rem .6rem;
}

.monthly-ie-matrix-header span:nth-child(n+2):nth-child(-n+13) {
    display: none;
}

.monthly-ie-matrix-row {
    align-items: stretch;
    border-top: 1px solid #edf2f7;
    cursor: pointer;
    padding: .5rem .6rem;
}

.monthly-ie-matrix-row:hover {
    background: #f8fafc;
}

.monthly-ie-row-label {
    min-width: 0;
}

.monthly-ie-row-label strong {
    color: #0f172a;
    display: -webkit-box;
    font-size: .84rem;
    line-height: 1.25;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.monthly-ie-row-label small {
    color: #64748b;
    display: block;
    font-size: .7rem;
    margin-top: .2rem;
}

.monthly-ie-month-strip {
    display: grid;
    gap: .25rem;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    min-width: 0;
}

.monthly-ie-month-cell,
.monthly-ie-total-cell {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #334155;
    display: grid;
    line-height: 1.1;
    min-width: 0;
    min-height: 46px;
    padding: .32rem .22rem;
    text-align: right;
}

.monthly-ie-month-cell span,
.monthly-ie-total-cell span {
    color: #64748b;
    font-size: .62rem;
    text-align: left;
}

.monthly-ie-month-cell strong,
.monthly-ie-total-cell strong {
    font-size: .66rem;
    line-height: 1.15;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
    word-break: normal;
}

.monthly-ie-total-cell {
    font-weight: 800;
}

.monthly-ie-total-cell strong {
    font-size: .72rem;
}

.monthly-ie-matrix-row.revenue .monthly-ie-total-cell strong,
.monthly-ie-matrix-row.revenue .monthly-ie-month-cell strong {
    color: #0369a1;
}

.monthly-ie-matrix-row.expense .monthly-ie-total-cell strong,
.monthly-ie-matrix-row.expense .monthly-ie-month-cell strong {
    color: #b45309;
}

.monthly-ie-matrix-row.non-operating .monthly-ie-total-cell strong,
.monthly-ie-matrix-row.non-operating .monthly-ie-month-cell strong {
    color: #7e22ce;
}

.monthly-ie-matrix-row.total {
    background: #f1f5f9;
    cursor: default;
}

.monthly-ie-matrix-row.total .monthly-ie-total-cell strong {
    color: #0f172a;
}

.monthly-ie-heatmap {
    display: grid;
    gap: .85rem;
    min-width: 0;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
}

.monthly-ie-heatmap-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #64748b;
    border-radius: 8px;
    display: grid;
    gap: .35rem;
    min-width: 0;
    padding: .55rem;
}

.monthly-ie-heatmap-section.expense {
    background: #fffaf2;
    border-color: #fed7aa;
    border-left-color: #f59e0b;
}

.monthly-ie-heatmap-section.revenue {
    background: #f0fdfa;
    border-color: #99f6e4;
    border-left-color: #0f766e;
}

.monthly-ie-heatmap-section.non-operating {
    background: #faf5ff;
    border-color: #e9d5ff;
    border-left-color: #9333ea;
}

.monthly-ie-heatmap-section-title {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    min-width: 0;
    padding: .05rem .15rem .25rem;
}

.monthly-ie-heatmap-section-title h4 {
    color: #334155;
    font-size: .86rem;
    font-weight: 800;
    margin: 0;
}

.monthly-ie-heatmap-section.expense .monthly-ie-heatmap-section-title h4 {
    color: #9a3412;
}

.monthly-ie-heatmap-section.revenue .monthly-ie-heatmap-section-title h4 {
    color: #115e59;
}

.monthly-ie-heatmap-section.non-operating .monthly-ie-heatmap-section-title h4 {
    color: #7e22ce;
}

.monthly-ie-heatmap-section-title p,
.monthly-ie-heatmap-section-title > span {
    color: #64748b;
    font-size: .66rem;
    margin: 0;
}

.monthly-ie-heatmap-section-title > span {
    background: rgba(255, 255, 255, .82);
    border: 1px solid currentColor;
    border-radius: 999px;
    flex: 0 0 auto;
    font-weight: 700;
    padding: .18rem .45rem;
}

.monthly-ie-heatmap-header {
    align-items: center;
    background: #eef5ff;
    border: 1px solid #cbdff7;
    border-radius: 6px;
    color: #334155;
    display: grid;
    font-size: .68rem;
    font-weight: 800;
    gap: .22rem;
    grid-template-columns: minmax(120px, 1.4fr) repeat(12, minmax(0, 1fr));
    padding: .35rem .45rem;
    position: static;
}

.monthly-ie-heatmap-row {
    align-items: center;
    display: grid;
    gap: .22rem;
    grid-template-columns: minmax(120px, 1.4fr) repeat(12, minmax(0, 1fr));
    min-width: 0;
}

.monthly-ie-heatmap-row > span {
    color: #334155;
    font-size: .76rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monthly-ie-heatmap-row button {
    aspect-ratio: 1.8;
    background: color-mix(in srgb, #64748b var(--heat), #f8fafc);
    border: 0;
    border-radius: 4px;
    color: #1e3a8a;
    font-size: .58rem;
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    padding: .1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monthly-ie-heatmap-section.expense .monthly-ie-heatmap-row button {
    background: color-mix(in srgb, #f59e0b var(--heat), #fff7ed);
    color: #7c2d12;
}

.monthly-ie-heatmap-section.revenue .monthly-ie-heatmap-row button {
    background: color-mix(in srgb, #14b8a6 var(--heat), #f0fdfa);
    color: #134e4a;
}

.monthly-ie-heatmap-section.non-operating .monthly-ie-heatmap-row button {
    background: color-mix(in srgb, #a855f7 var(--heat), #faf5ff);
    color: #581c87;
}

.monthly-ie-heatmap-row button:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.monthly-ie-rank-comparison {
    display: grid;
    gap: .85rem;
    grid-template-columns: 1fr;
    min-width: 0;
}

.monthly-ie-rank-column {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 0;
    overflow: hidden;
}

.monthly-ie-rank-heading {
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    padding: .55rem .7rem;
}

.monthly-ie-rank-column.expense,
.monthly-ie-rank-column.expense .monthly-ie-rank-heading {
    background: #fffaf2;
    border-color: #fed7aa;
}

.monthly-ie-rank-column.revenue,
.monthly-ie-rank-column.revenue .monthly-ie-rank-heading {
    background: #f0fdfa;
    border-color: #99f6e4;
}

.monthly-ie-rank-heading h4 {
    color: #0f172a;
    font-size: .86rem;
    font-weight: 800;
    margin: .08rem 0 0;
}

.monthly-ie-rank-column.expense .monthly-ie-rank-heading h4,
.monthly-ie-rank-column.expense .monthly-ie-rank-type {
    color: #9a3412;
}

.monthly-ie-rank-column.revenue .monthly-ie-rank-heading h4,
.monthly-ie-rank-column.revenue .monthly-ie-rank-type {
    color: #115e59;
}

.monthly-ie-rank-type,
.monthly-ie-rank-heading > small {
    color: #64748b;
    font-size: .66rem;
    font-weight: 700;
}

.monthly-ie-rank-type {
    text-transform: uppercase;
}

.monthly-ie-rank-row {
    display: grid;
    gap: .35rem;
    padding: .55rem .7rem;
}

.monthly-ie-rank-row + .monthly-ie-rank-row {
    border-top: 1px solid #edf2f7;
}

.monthly-ie-rank-row > div:first-child {
    align-items: baseline;
    display: grid;
    gap: .5rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.monthly-ie-rank-row span {
    color: #0f172a;
    font-size: .78rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monthly-ie-rank-row strong {
    color: #0f172a;
    font-size: .78rem;
    white-space: nowrap;
}

.monthly-ie-rank-row small {
    color: #64748b;
    font-size: .68rem;
}

.monthly-ie-rank-bar {
    background: #edf2f7;
    border-radius: 999px;
    height: 7px;
    overflow: hidden;
}

.monthly-ie-rank-bar span {
    background: #0ea5e9;
    display: block;
    height: 100%;
}

.monthly-ie-rank-column.expense .monthly-ie-rank-bar span {
    background: #f59e0b;
}

.monthly-ie-rank-column.revenue .monthly-ie-rank-bar span {
    background: #0f766e;
}

.monthly-ie-group-empty {
    color: #64748b;
    font-size: .74rem;
    margin: 0;
    padding: .8rem .7rem;
}

.monthly-ie-detail-table {
    table-layout: fixed;
    width: 100%;
}

.monthly-ie-detail-table th,
.monthly-ie-detail-table td {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 1200px) {
    .monthly-ie-matrix-row,
    .monthly-ie-matrix-header {
        grid-template-columns: minmax(140px, 1fr) minmax(0, 4fr) minmax(88px, .8fr);
    }

    .monthly-ie-month-cell strong,
    .monthly-ie-total-cell strong {
        font-size: .6rem;
    }
}

@media (max-width: 768px) {
    .monthly-income-expense-page .monthly-vehicle-sales-kpi-strip,
    .income-expense-report-page .vehicle-movement-kpi-strip {
        grid-template-columns: 1fr;
    }

    .monthly-ie-detail-toolbar,
    .monthly-ie-matrix-header,
    .monthly-ie-matrix-row {
        grid-template-columns: 1fr;
    }

    .monthly-income-expense-page .monthly-vehicle-sales-overview-grid,
    .monthly-income-expense-page .monthly-vehicle-sales-dimension-grid {
        grid-template-columns: 1fr;
        grid-template-areas: none;
    }

    .monthly-income-expense-page .monthly-vehicle-sales-overview-grid > * {
        grid-area: auto !important;
    }

    .monthly-ie-month-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .monthly-ie-month-strip,
    .monthly-ie-heatmap-row,
    .monthly-ie-heatmap-header {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .monthly-ie-heatmap-row > span,
    .monthly-ie-heatmap-header > span:first-child {
        grid-column: 1 / -1;
    }

    .monthly-ie-heatmap-section-title {
        align-items: flex-start;
    }
}
.global-inquiry-page {
    display: grid;
    gap: 1rem;
    min-width: 0;
    overflow-x: hidden;
}

.global-inquiry-command {
    position: sticky;
    top: var(--topbar-height, 0);
    z-index: 10;
    display: grid;
    gap: .65rem;
    padding: .85rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
    backdrop-filter: blur(10px);
}

.global-inquiry-command-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .6rem;
    align-items: stretch;
    min-width: 0;
}

.global-inquiry-searchbox {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .75rem;
    min-width: 0;
    min-height: 44px;
    padding: .42rem .78rem;
    border: 1px solid #bfd7ff;
    border-radius: 8px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, .03), 0 4px 12px rgba(13, 110, 253, .06);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.global-inquiry-searchbox:focus-within {
    border-color: #0d6efd;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .12);
}

.global-inquiry-searchbox i {
    color: #0d6efd;
    font-size: 1.2rem;
}

.global-inquiry-searchbox .form-control {
    border: 0;
    box-shadow: none;
    background: transparent;
    padding-inline: 0;
    color: #0f172a;
    font-weight: 600;
}

.global-inquiry-searchbox .form-control::placeholder {
    color: #64748b;
    font-weight: 500;
}

.global-inquiry-command-actions {
    display: flex;
    gap: .5rem;
    align-items: stretch;
}

.global-inquiry-command-actions .btn {
    min-height: 44px;
    white-space: nowrap;
}

.global-inquiry-filter-toggle {
    display: none;
}

.global-inquiry-mobile-criteria {
    display: none;
}

@media (min-width: 768px) {
    .global-inquiry-page.has-results .global-inquiry-filter-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .global-inquiry-page.has-results .global-inquiry-filter-tray:not(.is-open) {
        display: none;
    }
}

.global-inquiry-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    min-width: 0;
}

.global-inquiry-active-filters.is-empty {
    display: none;
}

.global-inquiry-filter-token {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    max-width: 100%;
    min-height: 30px;
    padding: .25rem .5rem;
    border: 1px solid rgba(13, 110, 253, .18);
    border-radius: 8px;
    background: #f8fbff;
    color: #0b5ed7;
    font-size: .78rem;
    font-weight: 800;
}

.global-inquiry-filter-token span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-inquiry-filter-token:hover {
    border-color: rgba(13, 110, 253, .42);
    background: #eaf3ff;
}

.global-inquiry-filter-tray {
    display: grid;
    gap: .65rem;
    min-width: 0;
}

.global-inquiry-filter-body {
    min-width: 0;
}

.global-inquiry-filter-actions {
    display: none;
}

.global-inquiry-filter-tray-head,
.global-inquiry-filter-backdrop {
    display: none;
}

.global-inquiry-criteria-grid {
    display: grid;
    grid-template-columns: minmax(18rem, 1.25fr) repeat(2, minmax(13rem, .85fr));
    gap: .65rem;
    align-items: start;
    min-width: 0;
}

.global-inquiry-criteria-block {
    display: grid;
    gap: .55rem;
    min-width: 0;
    padding: .65rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    background: #fff;
}

.global-inquiry-criteria-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-width: 0;
    color: #0f172a;
    font-size: .85rem;
    font-weight: 800;
}

.global-inquiry-criteria-head span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
}

.global-inquiry-criteria-head .btn-link {
    flex: 0 0 auto;
    min-height: auto;
    padding: 0;
    color: #0d6efd;
    font-size: .75rem;
    font-weight: 700;
    text-decoration: none;
}

.global-inquiry-subcriteria-head {
    margin-top: .25rem;
    padding-top: .55rem;
    border-top: 1px solid rgba(15, 23, 42, .08);
}

.global-inquiry-sale-type-criteria {
    display: grid;
    gap: .55rem;
    min-width: 0;
}

.global-inquiry-sale-type-criteria[hidden] {
    display: none;
}

.global-inquiry-chip-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7.75rem, 1fr));
    gap: .5rem;
    min-width: 0;
}

.inquiry-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    width: 100%;
    min-height: 40px;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 8px;
    padding: .45rem .65rem;
    background: #fff;
    color: #334155;
    font-weight: 600;
    text-align: center;
    line-height: 1.1;
    transition: .15s ease;
}

.inquiry-chip:hover {
    border-color: rgba(13, 110, 253, .45);
    color: #0d6efd;
}

.inquiry-chip.active {
    border-color: rgba(13, 110, 253, .55);
    background: #eaf3ff;
    color: #0b5ed7;
    box-shadow: inset 0 0 0 1px rgba(13, 110, 253, .08);
}

.global-inquiry-date-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
}

.global-inquiry-date-range .form-label {
    margin-bottom: .2rem;
    color: #64748b;
    font-size: .75rem;
    font-weight: 700;
}

.global-inquiry-source-select {
    position: relative;
    min-width: 0;
}

.global-inquiry-source-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    width: 100%;
    min-height: 42px;
    padding: .45rem .7rem;
    border: 1px solid rgba(15, 23, 42, .14);
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    text-align: left;
}

.global-inquiry-source-toggle span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-inquiry-source-toggle.is-open,
.global-inquiry-source-toggle:hover {
    border-color: rgba(13, 110, 253, .45);
    background: #f8fbff;
    color: #0b5ed7;
}

.global-inquiry-source-panel {
    position: absolute;
    top: calc(100% + .4rem);
    right: 0;
    left: 0;
    z-index: 30;
    display: grid;
    gap: .35rem;
    max-height: min(420px, 62vh);
    overflow-y: auto;
    padding: .45rem;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .16);
}

.global-inquiry-source-select:has(#inquiryBrandPanel) .global-inquiry-source-panel,
.global-inquiry-source-select:has(#inquirySaleTypePanel) .global-inquiry-source-panel {
    max-height: min(340px, 52vh);
}

.global-inquiry-source-list {
    display: grid;
    gap: .35rem;
}

.global-inquiry-source-option {
    display: grid;
    grid-template-columns: 1.35rem 1.65rem minmax(0, 1fr);
    gap: .5rem;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: .45rem .5rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    text-align: left;
}

.global-inquiry-source-option.is-all {
    grid-template-columns: 1.35rem minmax(0, 1fr);
    border-color: rgba(13, 110, 253, .16);
    background: #f8fbff;
}

.global-inquiry-source-option:hover {
    border-color: rgba(13, 110, 253, .22);
    background: #f8fafc;
}

.global-inquiry-source-option.active {
    border-color: rgba(13, 110, 253, .5);
    background: #eaf3ff;
    color: #0b5ed7;
}

.global-inquiry-source-option strong,
.global-inquiry-source-option small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.global-inquiry-source-option strong {
    color: inherit;
    font-size: .86rem;
}

.global-inquiry-source-option small {
    color: #64748b;
    font-size: .72rem;
}

.global-inquiry-source-check {
    display: grid;
    place-items: center;
    width: 1.1rem;
    height: 1.1rem;
    border: 1px solid rgba(15, 23, 42, .16);
    border-radius: 999px;
    color: transparent;
    background: #fff;
}

.global-inquiry-source-option.active .global-inquiry-source-check {
    border-color: #0d6efd;
    color: #fff;
    background: #0d6efd;
}

.global-inquiry-source-icon {
    display: grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
}

.global-inquiry-source-option.active .global-inquiry-source-icon {
    background: #dbeafe;
    color: #0b5ed7;
}

.global-inquiry-criteria-summary {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    min-width: 0;
}

.global-inquiry-criteria-summary span {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 30px;
    padding: .25rem .6rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: .78rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.global-inquiry-command-warning {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
    padding: .5rem .65rem;
    border: 1px solid rgba(214, 57, 57, .22);
    border-radius: 8px;
    background: #fff7f7;
    color: #b42318;
    font-size: .82rem;
    font-weight: 700;
}

.global-inquiry-empty,
.inquiry-tab-empty {
    display: grid;
    justify-items: center;
    gap: .45rem;
    padding: 2rem 1rem;
    border: 1px dashed rgba(100, 116, 139, .35);
    border-radius: 12px;
    background: #f8fafc;
    text-align: center;
    color: #64748b;
}

.global-inquiry-empty .empty-icon,
.inquiry-tab-empty i {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: #eaf3ff;
    color: #0d6efd;
    font-size: 1.4rem;
}

.global-inquiry-empty h3,
.inquiry-tab-empty strong {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
}

.global-inquiry-results {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.global-inquiry-answer-strip {
    display: grid;
    grid-template-columns: minmax(10rem, .9fr) repeat(2, minmax(8rem, .7fr)) minmax(16rem, 1.25fr) minmax(9rem, .65fr);
    gap: .65rem;
    min-width: 0;
}

.inquiry-answer-card {
    display: grid;
    gap: .2rem;
    min-width: 0;
    min-height: 72px;
    padding: .72rem .8rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .04);
}

.inquiry-answer-card.primary {
    border-color: rgba(13, 110, 253, .18);
    background: #f8fbff;
}

.inquiry-answer-card span {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    min-width: 0;
    color: #64748b;
    font-size: .76rem;
    font-weight: 800;
}

.inquiry-answer-card strong {
    display: block;
    min-width: 0;
    color: #0f172a;
    font-size: 1.08rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#inquiryAnswerDateRange {
    font-size: .86rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inquiry-answer-card.date-range {
    min-width: 0;
}

.inquiry-answer-card.best-match strong {
    font-size: .9rem;
}

.inquiry-answer-card.primary strong {
    color: #0b5ed7;
    font-size: 1.35rem;
}

.global-inquiry-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .85rem;
    align-items: start;
    min-width: 0;
}

.global-inquiry-main-pane {
    display: grid;
    gap: .65rem;
    min-width: 0;
}

.global-inquiry-context-rail {
    position: sticky;
    top: calc(var(--topbar-height, 0) + 6.75rem);
    display: grid;
    gap: .65rem;
    min-width: 0;
}

.global-inquiry-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    min-width: 0;
}

.inquiry-kpi {
    display: grid;
    gap: .25rem;
    padding: .75rem .85rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    background: #fff;
}

.inquiry-kpi span {
    color: #64748b;
    font-size: .78rem;
}

.inquiry-kpi strong {
    color: #0f172a;
    font-size: 1.25rem;
    white-space: nowrap;
}

.global-inquiry-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    min-width: 0;
}

.global-inquiry-summary-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .65rem;
    min-width: 0;
}

.global-inquiry-panel,
.inquiry-group {
    min-width: 0;
    padding: .75rem .85rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    background: #fff;
}

.panel-title,
.inquiry-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .6rem;
    color: #0f172a;
    font-weight: 700;
}

.inquiry-rank-list {
    display: grid;
    gap: .5rem;
    min-width: 0;
}

.global-inquiry-summary-row .inquiry-rank-list {
    display: flex;
    gap: .5rem;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: .15rem;
}

.inquiry-rank-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .55rem;
    min-width: 0;
    width: 100%;
    color: inherit;
    text-align: left;
}

.global-inquiry-summary-row .inquiry-rank-item {
    flex: 0 0 clamp(11rem, 18vw, 16rem);
    padding: .5rem .6rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    background: #f8fafc;
}

.inquiry-rank-item.is-clickable {
    cursor: pointer;
    appearance: none;
}

.inquiry-rank-item.is-clickable:hover,
.inquiry-rank-item.is-clickable:focus-visible {
    border-color: rgba(13, 110, 253, .45);
    background: #eef6ff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
    outline: 0;
}

.inquiry-rank-item.is-selected {
    border-color: rgba(13, 110, 253, .75);
    background: #e7f1ff;
    box-shadow: inset 0 0 0 1px rgba(13, 110, 253, .18);
}

.inquiry-rank-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    color: #fff;
    background: #0d6efd;
    font-size: .85rem;
}

.inquiry-rank-item strong,
.inquiry-rank-item small,
.inquiry-rank-item b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inquiry-rank-item small {
    display: block;
    color: #64748b;
}

.rank-dot {
    width: .7rem;
    height: .7rem;
    border-radius: 999px;
    background: #0d6efd;
}

.rank-dot.green { background: #10b981; }
.rank-dot.cyan { background: #06b6d4; }
.rank-dot.indigo { background: #6366f1; }
.rank-dot.teal { background: #14b8a6; }
.rank-dot.orange { background: #f97316; }
.rank-dot.purple { background: #a855f7; }
.rank-dot.red { background: #ef4444; }
.rank-dot.lime { background: #65a30d; }
.rank-dot.gray,
.rank-dot.branch { background: #64748b; }

.global-inquiry-tabs {
    display: inline-flex;
    gap: .25rem;
    width: fit-content;
    max-width: 100%;
    padding: .25rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    background: #f8fafc;
    overflow-x: auto;
}

.global-inquiry-tabs .nav-item {
    flex: 0 0 auto;
}

.global-inquiry-tabs .nav-link {
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    color: #475569;
    font-weight: 800;
}

.global-inquiry-tabs .nav-link.active {
    color: #0b5ed7;
    background: #fff;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
}

.global-inquiry-tab-content {
    min-width: 0;
    overflow-x: hidden;
}

.global-inquiry-entity-picker {
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
}

.inquiry-entity-card {
    display: grid;
    gap: .2rem;
    min-width: 0;
    padding: .65rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    background: #fff;
}

.inquiry-entity-card.selected {
    border-color: rgba(13, 110, 253, .5);
    background: #eaf3ff;
}

.inquiry-entity-card span,
.inquiry-entity-card small {
    color: #64748b;
}

.inquiry-entity-card strong {
    overflow-wrap: anywhere;
}

.global-inquiry-timeline {
    position: relative;
    display: grid;
    gap: .75rem;
    min-width: 0;
}

.inquiry-timeline-item {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: .65rem;
    min-width: 0;
    cursor: pointer;
}

.timeline-dot {
    width: .85rem;
    height: .85rem;
    margin-top: 1.05rem;
    border-radius: 999px;
    background: #0d6efd;
    box-shadow: 0 0 0 5px rgba(13, 110, 253, .12);
}

.timeline-dot.green { background: #10b981; }
.timeline-dot.cyan { background: #06b6d4; }
.timeline-dot.indigo { background: #6366f1; }
.timeline-dot.teal { background: #14b8a6; }
.timeline-dot.orange { background: #f97316; }
.timeline-dot.purple { background: #a855f7; }
.timeline-dot.red { background: #ef4444; }
.timeline-dot.lime { background: #65a30d; }
.timeline-dot.gray { background: #64748b; }

.timeline-card,
.inquiry-row-card {
    min-width: 0;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

.timeline-card {
    padding: .85rem;
}

.timeline-head,
.row-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    min-width: 0;
}

.timeline-card h4 {
    margin: .5rem 0 .25rem;
    font-size: 1rem;
}

.timeline-card p,
.row-title span {
    margin: 0;
    color: #475569;
    overflow-wrap: anywhere;
}

.branch-badge,
.source-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    border-radius: 999px;
    padding: .22rem .5rem;
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.1;
}

.branch-badge {
    background: #eef2ff;
    color: #3730a3;
}

.source-badge {
    background: #eaf3ff;
    color: #0b5ed7;
}

.source-badge.green { background: #dcfce7; color: #047857; }
.source-badge.cyan { background: #cffafe; color: #0e7490; }
.source-badge.indigo { background: #e0e7ff; color: #4338ca; }
.source-badge.teal { background: #ccfbf1; color: #0f766e; }
.source-badge.orange { background: #ffedd5; color: #c2410c; }
.source-badge.purple { background: #f3e8ff; color: #7e22ce; }
.source-badge.red { background: #fee2e2; color: #b91c1c; }
.source-badge.lime { background: #ecfccb; color: #4d7c0f; }
.source-badge.gray { background: #f1f5f9; color: #475569; }

.timeline-meta,
.row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .6rem;
    min-width: 0;
}

.timeline-meta span,
.row-meta span {
    max-width: 100%;
    border-radius: 999px;
    padding: .25rem .5rem;
    background: #f8fafc;
    color: #475569;
    font-size: .75rem;
    overflow-wrap: anywhere;
}

.global-inquiry-list,
.global-inquiry-grouped {
    display: grid;
    gap: .65rem;
    min-width: 0;
}

.global-inquiry-table-wrap {
    min-width: 0;
    overflow-x: hidden;
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 8px;
    background: #fff;
}

.global-inquiry-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    margin-bottom: 0;
}

.global-inquiry-table thead th {
    background: #e8f2ff;
    color: #155a9c;
    text-align: center;
    vertical-align: middle;
    font-size: .75rem;
    font-weight: 800;
    white-space: normal;
}

.global-inquiry-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.global-inquiry-table tbody tr {
    cursor: pointer;
}

.global-inquiry-table td {
    min-width: 0;
    padding: .52rem .55rem;
    vertical-align: middle;
    overflow: hidden;
}

.global-inquiry-table .inquiry-col-work { width: 11%; }
.global-inquiry-table .inquiry-col-document { width: 15%; }
.global-inquiry-table .inquiry-col-vehicle { width: 18%; }
.global-inquiry-table .inquiry-col-identity { width: 17%; }
.global-inquiry-table .inquiry-col-customer { width: 19%; }
.global-inquiry-table .inquiry-col-amount { width: 14%; }
.global-inquiry-table .inquiry-col-action { width: 6%; }

.inquiry-table-main,
.inquiry-table-sub {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
}

.inquiry-table-main {
    color: #1f2937;
    font-weight: 700;
}

.inquiry-priority-cell .inquiry-table-main {
    color: #0f172a;
    font-size: .88rem;
    font-weight: 800;
}

.inquiry-table-sub {
    margin-top: .12rem;
    color: #0b63b6;
    font-size: .76rem;
    line-height: 1.25;
}

.inquiry-table-detail {
    display: -webkit-box;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.inquiry-status-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin-top: .18rem;
    border-radius: 999px;
    padding: .18rem .45rem;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.1;
}

.inquiry-status-badge.gray { background: #f1f5f9; color: #475569; }
.inquiry-status-badge.green { background: #dcfce7; color: #047857; }
.inquiry-status-badge.orange { background: #ffedd5; color: #c2410c; }
.inquiry-status-badge.red { background: #fee2e2; color: #b91c1c; }

.global-inquiry-table .source-badge,
.global-inquiry-table .branch-badge,
.global-inquiry-table .inquiry-status-badge {
    overflow-wrap: anywhere;
    white-space: normal;
}

.global-inquiry-table .branch-badge,
.global-inquiry-table .source-badge {
    margin: .06rem 0;
}

.inquiry-action-cell .btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
}

.inquiry-row-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .55rem .75rem;
    padding: .8rem;
    cursor: pointer;
}

.inquiry-row-card .row-main,
.inquiry-row-card .row-title,
.inquiry-row-card .row-meta {
    grid-column: 1;
}

.inquiry-row-card .btn {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
}

.row-title {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.row-title strong {
    color: #0f172a;
    overflow-wrap: anywhere;
}

.global-inquiry-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin-top: .9rem;
}

.global-inquiry-drawer .drawer-hero {
    display: grid;
    gap: .5rem;
    padding: .85rem;
    border-radius: 10px;
    background: #f8fafc;
}

.global-inquiry-drawer .drawer-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    min-width: 0;
}

.global-inquiry-drawer .drawer-hero strong {
    overflow-wrap: anywhere;
}

.global-inquiry-drawer .drawer-summary-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}

.global-inquiry-drawer .drawer-metric {
    min-width: 0;
    padding: .55rem .65rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    background: #fff;
}

.global-inquiry-drawer .drawer-metric span {
    display: block;
    color: #64748b;
    font-size: .72rem;
    font-weight: 800;
}

.global-inquiry-drawer .drawer-metric strong {
    display: block;
    color: #0f172a;
    font-size: .95rem;
    line-height: 1.35;
}

.global-inquiry-drawer {
    width: min(600px, calc(100vw - 24px));
}

.global-inquiry-drawer .registration-detail-drawer-header {
    padding: 14px 16px;
}

.global-inquiry-drawer .registration-detail-drawer-header .text-secondary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
}

.global-inquiry-drawer .registration-detail-drawer-header h3 {
    margin-top: .35rem;
}

.global-inquiry-drawer .registration-detail-drawer-body {
    gap: .65rem;
    padding: 14px 16px;
}

.global-inquiry-drawer .inquiry-drawer-field-pair {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
    min-width: 0;
}

.global-inquiry-drawer .inquiry-drawer-field-slot {
    display: grid;
    min-width: 0;
}

.inquiry-drawer-head-meta {
    color: #0f172a;
    font-weight: 800;
}

.drawer-section {
    display: grid;
    gap: .55rem;
    margin-top: 0;
}

.drawer-section-title {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: #155a9c;
    font-weight: 800;
}

.drawer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}

.drawer-field {
    min-width: 0;
    padding: .52rem .58rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    background: #fff;
}

.drawer-field.is-wide {
    grid-column: 1 / -1;
    background: #f8fafc;
}

.drawer-field span {
    display: block;
    color: #64748b;
    font-size: .75rem;
}

.drawer-field strong {
    display: block;
    color: #0f172a;
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
    .global-inquiry-drawer .drawer-summary-strip,
    .global-inquiry-drawer .inquiry-drawer-field-pair,
    .drawer-grid {
        grid-template-columns: 1fr;
    }

    .global-inquiry-drawer .inquiry-drawer-field-slot:empty {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .global-inquiry-command-main,
    .global-inquiry-criteria-grid {
        grid-template-columns: 1fr;
    }

    .global-inquiry-answer-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inquiry-answer-card.wide {
        grid-column: 1 / -1;
    }

    .global-inquiry-workspace {
        grid-template-columns: 1fr;
    }

    .global-inquiry-context-rail {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .global-inquiry-kpis,
    .global-inquiry-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .global-inquiry-command {
        padding: .65rem;
    }

    .global-inquiry-command-main {
        gap: .55rem;
    }

    .global-inquiry-command-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .global-inquiry-filter-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .global-inquiry-command-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .global-inquiry-mobile-criteria {
        display: grid;
        grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
        gap: .5rem;
        min-width: 0;
    }

    .global-inquiry-mobile-criterion {
        display: grid;
        gap: .22rem;
        min-width: 0;
        min-height: 56px;
        padding: .55rem .65rem;
        border: 1px solid rgba(13, 110, 253, .18);
        border-radius: 8px;
        background: #f8fbff;
        color: #0b5ed7;
        text-align: left;
    }

    .global-inquiry-mobile-criterion span,
    .global-inquiry-mobile-criterion strong {
        display: flex;
        align-items: center;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .global-inquiry-mobile-criterion span {
        gap: .32rem;
        color: #475569;
        font-size: .75rem;
        font-weight: 800;
    }

    .global-inquiry-mobile-criterion strong {
        color: #0f172a;
        font-size: .9rem;
        line-height: 1.2;
    }

    .global-inquiry-mobile-criterion:hover,
    .global-inquiry-mobile-criterion:focus-visible {
        border-color: rgba(13, 110, 253, .55);
        background: #eaf3ff;
        outline: 0;
        box-shadow: 0 0 0 .18rem rgba(13, 110, 253, .12);
    }

    .global-inquiry-active-filters {
        overflow: hidden;
    }

    .global-inquiry-filter-token {
        flex: 1 1 auto;
        min-width: min(100%, 8rem);
    }

    .global-inquiry-filter-backdrop:not(.d-none) {
        position: fixed;
        inset: 0;
        z-index: 1040;
        display: block;
        background: rgba(15, 23, 42, .36);
    }

    .global-inquiry-filter-tray {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1050;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        gap: 0;
        height: min(720px, calc(100dvh - 1rem - env(safe-area-inset-top)));
        max-height: calc(100vh - 1rem);
        max-height: calc(100dvh - 1rem - env(safe-area-inset-top));
        overflow: hidden;
        padding: 0;
        border: 1px solid rgba(15, 23, 42, .12);
        border-radius: 16px 16px 0 0;
        background: #fff;
        box-shadow: 0 -18px 42px rgba(15, 23, 42, .22);
        opacity: 0;
        pointer-events: none;
        transform: translateY(105%);
        transition: opacity .18s ease, transform .18s ease;
    }

    .global-inquiry-filter-tray.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .global-inquiry-filter-tray-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
        padding: .85rem .85rem .65rem;
        border-bottom: 1px solid rgba(15, 23, 42, .08);
        background: #fff;
    }

    .global-inquiry-filter-tray-head strong {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        color: #0f172a;
    }

    body.global-inquiry-filter-open {
        overflow: hidden;
    }

    .global-inquiry-filter-body {
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: .75rem .85rem;
    }

    .global-inquiry-criteria-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: .75rem;
    }

    .global-inquiry-filter-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
        gap: .5rem;
        position: sticky;
        bottom: 0;
        padding: .75rem .85rem calc(.75rem + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(15, 23, 42, .08);
        background: #fff;
        box-shadow: 0 -10px 24px rgba(15, 23, 42, .08);
    }

    .global-inquiry-filter-actions .btn {
        min-width: 0;
        min-height: 42px;
        white-space: nowrap;
    }

    .global-inquiry-criteria-block {
        gap: .75rem;
        padding: .85rem;
    }

    #inquiryDateCriteriaBlock {
        scroll-margin-top: .75rem;
    }

    #inquiryDateCriteriaBlock:focus {
        outline: 0;
        box-shadow: 0 0 0 .18rem rgba(13, 110, 253, .12);
    }

    .global-inquiry-criteria-head {
        align-items: flex-start;
        font-size: .95rem;
    }

    .global-inquiry-criteria-head .btn-link {
        font-size: .82rem;
    }

    .global-inquiry-chip-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inquiry-chip {
        min-height: 48px;
        padding: .65rem .55rem;
        font-size: .92rem;
        line-height: 1.2;
    }

    .global-inquiry-date-range .form-label {
        font-size: .82rem;
    }

    .global-inquiry-date-range .form-control,
    .global-inquiry-source-toggle {
        min-height: 50px;
        font-size: .95rem;
    }

    .global-inquiry-source-toggle {
        align-items: flex-start;
        padding: .7rem .8rem;
    }

    .global-inquiry-source-toggle span {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        line-height: 1.25;
    }

    .global-inquiry-source-panel {
        position: static;
        max-height: min(260px, 34dvh);
        margin-top: .4rem;
        box-shadow: none;
    }

    .global-inquiry-source-option {
        min-height: 52px;
        padding: .65rem .6rem;
        align-items: flex-start;
    }

    .global-inquiry-source-option strong,
    .global-inquiry-source-option small {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        line-height: 1.25;
    }

    .global-inquiry-source-option strong {
        font-size: .94rem;
    }

    .global-inquiry-source-option small {
        font-size: .78rem;
    }

    .global-inquiry-date-range,
    .global-inquiry-answer-strip,
    .global-inquiry-summary-row,
    .global-inquiry-context-rail,
    .global-inquiry-kpis,
    .global-inquiry-summary-grid,
    .drawer-grid {
        grid-template-columns: 1fr;
    }

    .global-inquiry-tabs {
        display: flex;
        width: 100%;
    }

    .global-inquiry-tabs .nav-link {
        white-space: nowrap;
    }

    .inquiry-row-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .inquiry-row-card .btn {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
    }

    .global-inquiry-table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .global-inquiry-table,
    .global-inquiry-table thead,
    .global-inquiry-table tbody,
    .global-inquiry-table tr,
    .global-inquiry-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .global-inquiry-table thead {
        display: none;
    }

    .global-inquiry-table tbody tr {
        margin-bottom: .65rem;
        padding: .7rem;
        border: 1px solid rgba(15, 23, 42, .1);
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 6px 16px rgba(15, 23, 42, .04);
    }

    .global-inquiry-table tbody tr:nth-child(even) {
        background: #fff;
    }

    .global-inquiry-table td {
        display: grid;
        grid-template-columns: minmax(6.6rem, 34%) minmax(0, 1fr);
        gap: .5rem;
        padding: .28rem 0;
        border: 0;
        text-align: left !important;
    }

    .global-inquiry-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: .74rem;
        font-weight: 800;
        line-height: 1.25;
    }

    .inquiry-action-cell .btn {
        justify-self: start;
    }
}

@media (max-width: 575.98px) {
    .global-inquiry-command-actions {
        grid-template-columns: 1fr;
    }

    .global-inquiry-mobile-criteria {
        grid-template-columns: 1fr;
    }

    .global-inquiry-mobile-criterion {
        min-height: 52px;
    }

    .global-inquiry-filter-actions {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .global-inquiry-filter-actions .btn-primary {
        grid-column: 1 / -1;
    }

    .global-inquiry-source-panel {
        max-height: min(220px, 30dvh);
    }

    .inquiry-answer-card {
        min-height: 64px;
    }
}

.company-price-diff-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(140px, 180px) minmax(220px, 320px);
    gap: .85rem;
    align-items: end;
}

.company-price-diff-kpi-strip .vehicle-movement-kpi {
    min-height: 78px;
    padding: 12px 14px;
}

.company-price-diff-kpi-strip .vehicle-movement-kpi span {
    font-size: .75rem;
    line-height: 1.2;
}

.company-price-diff-kpi-strip .vehicle-movement-kpi strong {
    margin-top: 6px;
    font-size: clamp(1rem, 1.2vw, 1.35rem);
    line-height: 1.1;
    overflow-wrap: normal;
    word-break: keep-all;
}

.company-price-diff-view {
    min-width: 0;
    padding-top: 1rem;
}

.company-price-diff-table-shell {
    width: 100%;
    min-width: 0;
    border: 1px solid #d4dbe8;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.company-price-diff-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 12px;
}

.company-price-diff-table th,
.company-price-diff-table td {
    min-width: 0;
    padding: .34rem .28rem;
    border: 1px solid #cbd5e1;
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: anywhere;
}

.company-price-diff-table thead th {
    background: #e5e7eb;
    color: #0f172a;
    font-weight: 700;
}

.company-price-diff-table tbody th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
}

.company-price-diff-table td {
    cursor: pointer;
}

.company-price-diff-table td:hover {
    background: #eff6ff;
}

.company-price-diff-table .is-diff {
    font-weight: 700;
    background: #fff7ed;
}

.company-price-diff-table .grand-total th,
.company-price-diff-table .grand-total td {
    background: #ccfbf1;
    font-weight: 700;
}

.company-price-diff-card-list {
    display: none;
    gap: .8rem;
}

.company-price-diff-card {
    min-width: 0;
    padding: .9rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    background: #fff;
}

.company-price-diff-card h3 {
    margin: 0 0 .65rem;
    font-size: 1rem;
}

.company-price-diff-card-line {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: center;
    padding: .45rem 0;
    border: 0;
    border-bottom: 1px solid rgba(15, 23, 42, .07);
    background: transparent;
    text-align: left;
}

.company-price-diff-card-line span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.company-price-diff-card-line strong {
    font-variant-numeric: tabular-nums;
}

.company-price-diff-card-line.is-diff {
    color: #0f172a;
    font-weight: 700;
}

.company-price-diff-overview-grid,
.company-price-diff-analysis-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
    gap: 1rem;
}

.company-price-diff-panel {
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    background: #fff;
}

.company-price-diff-panel h3 {
    margin: 0 0 .8rem;
    font-size: 1rem;
}

.company-price-diff-bar-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 110px;
    gap: .6rem;
    align-items: center;
    padding: .34rem 0;
}

.company-price-diff-bar-track {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.company-price-diff-bar-track i {
    display: block;
    height: 100%;
    border-radius: 999px;
}

.company-price-diff-bar-track .positive {
    background: #0ea5e9;
}

.company-price-diff-bar-track .negative {
    background: #ef4444;
}

.company-price-diff-bar-row strong,
.company-price-diff-rank-row em {
    text-align: right;
    font-style: normal;
    font-variant-numeric: tabular-nums;
}

.company-price-diff-rank-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 120px;
    gap: .6rem;
    align-items: center;
    padding: .45rem 0;
    border-bottom: 1px solid rgba(15, 23, 42, .07);
}

.company-price-diff-rank-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.company-price-diff-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
}

.company-price-diff-split div {
    padding: .8rem;
    border-radius: 8px;
    background: #f8fafc;
}

.company-price-diff-split span,
.company-price-diff-split strong {
    display: block;
}

.company-price-diff-split span {
    color: #64748b;
    font-size: .82rem;
}

.company-price-diff-detail-tools {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) auto;
    gap: .8rem;
    align-items: end;
    margin-bottom: .8rem;
}

.company-price-diff-detail-summary {
    margin-bottom: .6rem;
    color: #475569;
}

.company-price-diff-detail-table td span,
.company-price-diff-detail-table td strong {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 1199.98px) {
    .company-price-diff-table {
        font-size: 11px;
    }

    .company-price-diff-table th,
    .company-price-diff-table td {
        padding: .28rem .2rem;
    }
}

@media (max-width: 991.98px) {
    .company-price-diff-filter-grid,
    .company-price-diff-overview-grid,
    .company-price-diff-analysis-grid,
    .company-price-diff-detail-tools {
        grid-template-columns: 1fr;
    }

    .company-price-diff-table-shell {
        display: none;
    }

    .company-price-diff-card-list {
        display: grid;
    }
}

@media (max-width: 575.98px) {
    .company-price-diff-kpi-strip {
        grid-template-columns: 1fr;
    }

    .company-price-diff-bar-row,
    .company-price-diff-rank-row,
    .company-price-diff-split {
        grid-template-columns: 1fr;
    }

    .company-price-diff-bar-row strong,
    .company-price-diff-rank-row em {
        text-align: left;
    }
}

.dashboard-v2-shell {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
    min-width: 0;
}

.dashboard-v2-command-strip {
    display: grid;
    gap: .55rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    min-width: 0;
}

.dashboard-v2-quick-link {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .09);
    border-radius: 8px;
    color: #0f172a;
    display: grid;
    gap: .55rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 50px;
    padding: .55rem .65rem;
    text-decoration: none;
}

.dashboard-v2-quick-link-icon,
.dashboard-v2-open-bucket-icon {
    align-items: center;
    background: #eaf2ff;
    border-radius: 8px;
    color: #206bc4;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.dashboard-v2-quick-link-body,
.dashboard-v2-open-bucket-body {
    display: grid;
    min-width: 0;
}

.dashboard-v2-quick-link-body strong,
.dashboard-v2-quick-link-body small,
.dashboard-v2-quick-link em,
.dashboard-v2-open-bucket-body strong,
.dashboard-v2-open-bucket-body small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-v2-quick-link-body small,
.dashboard-v2-quick-link em {
    color: #64748b;
    font-size: .72rem;
}

.dashboard-v2-quick-link em {
    background: #f1f5f9;
    border-radius: 999px;
    font-style: normal;
    font-weight: 800;
    padding: .12rem .45rem;
}

.dashboard-v2-quick-link.is-green .dashboard-v2-quick-link-icon { background: #e8f8ee; color: #2fb344; }
.dashboard-v2-quick-link.is-yellow .dashboard-v2-quick-link-icon { background: #fff6db; color: #b77900; }
.dashboard-v2-quick-link.is-orange .dashboard-v2-quick-link-icon { background: #fff1e8; color: #d65f00; }
.dashboard-v2-quick-link.is-red .dashboard-v2-quick-link-icon { background: #fdecec; color: #d63939; }
.dashboard-v2-quick-link.is-purple .dashboard-v2-quick-link-icon { background: #f2ebff; color: #7952b3; }

.dashboard-v2-kpi-strip {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    min-width: 0;
}

.dashboard-v2-kpi,
.dashboard-v2-panel {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .09);
    border-radius: 8px;
    box-shadow: 0 .35rem 1rem rgba(15, 23, 42, .045);
}

.dashboard-v2-kpi {
    align-items: flex-start;
    display: grid;
    gap: .7rem;
    grid-template-columns: auto minmax(0, 1fr);
    min-width: 0;
    padding: .9rem;
}

.dashboard-v2-kpi-icon,
.dashboard-v2-detail-icon,
.dashboard-v2-action-icon,
.dashboard-v2-timeline-dot {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
}

.dashboard-v2-kpi-icon {
    background: #eaf2ff;
    color: #206bc4;
    font-size: 1.25rem;
    height: 2.55rem;
    width: 2.55rem;
}

.dashboard-v2-kpi strong {
    color: #0f172a;
    display: block;
    font-size: 1.22rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.dashboard-v2-kpi p,
.dashboard-v2-kpi-label {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-v2-kpi p {
    color: #64748b;
    font-size: .78rem;
}

.dashboard-v2-kpi-label,
.dashboard-v2-eyebrow {
    color: #64748b;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dashboard-v2-kpi.is-green .dashboard-v2-kpi-icon,
.dashboard-v2-detail-icon.is-green {
    background: #e8f8ee;
    color: #2fb344;
}

.dashboard-v2-kpi.is-yellow .dashboard-v2-kpi-icon,
.dashboard-v2-detail-icon.is-yellow {
    background: #fff6db;
    color: #b77900;
}

.dashboard-v2-kpi.is-orange .dashboard-v2-kpi-icon,
.dashboard-v2-detail-icon.is-orange {
    background: #fff1e8;
    color: #d65f00;
}

.dashboard-v2-kpi.is-red .dashboard-v2-kpi-icon,
.dashboard-v2-detail-icon.is-red {
    background: #fdecec;
    color: #d63939;
}

.dashboard-v2-kpi.is-purple .dashboard-v2-kpi-icon,
.dashboard-v2-detail-icon.is-purple {
    background: #f2ebff;
    color: #7952b3;
}

.dashboard-v2-main-grid {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .34fr);
    min-width: 0;
}

.dashboard-v2-focus-grid {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.65fr) minmax(330px, .8fr);
    min-width: 0;
}

.dashboard-v2-secondary-grid {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr) minmax(300px, .95fr);
    min-width: 0;
}

.dashboard-v2-insight-grid {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(250px, .7fr) minmax(0, 1.1fr) minmax(260px, .75fr);
    min-width: 0;
}

.dashboard-v2-panel {
    min-width: 0;
    padding: .9rem;
}

.dashboard-v2-panel-header {
    align-items: flex-start;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin-bottom: .75rem;
    min-width: 0;
}

.dashboard-v2-panel-header h3 {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.dashboard-v2-panel-tools {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: .4rem;
    justify-content: flex-end;
}

.dashboard-v2-load-meta {
    align-items: center;
    color: #64748b;
    display: inline-flex;
    font-size: .78rem;
    gap: .4rem;
    min-height: 2rem;
}

.dashboard-v2-load-dot {
    background: #94a3b8;
    border-radius: 999px;
    display: inline-block;
    height: .55rem;
    width: .55rem;
}

.dashboard-v2-load-meta.is-loading .dashboard-v2-load-dot { background: #206bc4; animation: dashboard-v2-pulse 1.1s ease-in-out infinite; }
.dashboard-v2-load-meta.is-loaded .dashboard-v2-load-dot { background: #2fb344; }
.dashboard-v2-load-meta.is-failed .dashboard-v2-load-dot { background: #d63939; }

.dashboard-v2-widget-status {
    background: #f1f5f9;
    border-radius: 999px;
    color: #475569;
    font-size: .7rem;
    font-weight: 800;
    padding: .22rem .5rem;
    white-space: nowrap;
}

.dashboard-v2-widget-status.is-loading,
.dashboard-v2-widget-status.is-refreshing { background: #eaf2ff; color: #1558a6; }
.dashboard-v2-widget-status.is-loaded { background: #e8f8ee; color: #16703a; }
.dashboard-v2-widget-status.is-empty,
.dashboard-v2-widget-status.is-forbidden { background: #f1f5f9; color: #64748b; }
.dashboard-v2-widget-status.is-partial { background: #fff6db; color: #8a5b00; }
.dashboard-v2-widget-status.is-failed { background: #fdecec; color: #b42318; }

.dashboard-v2-status {
    background: #e8f8ee;
    border-radius: 999px;
    color: #16703a;
    flex: 0 0 auto;
    font-size: .75rem;
    font-weight: 800;
    padding: .22rem .55rem;
}

.dashboard-v2-status.is-danger {
    background: #fdecec;
    color: #b42318;
}

.dashboard-v2-status.is-warning {
    background: #fff6db;
    color: #9a6700;
}

.dashboard-v2-heatmap {
    display: grid;
    gap: .45rem;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: .15rem;
}

.dashboard-v2-heatmap-row {
    display: grid;
    gap: .45rem;
    grid-template-columns: minmax(128px, 1.05fr) repeat(var(--dashboard-workstream-count), minmax(112px, 1fr));
    min-width: calc(128px + (112px * var(--dashboard-workstream-count)));
}

.dashboard-v2-branch-head,
.dashboard-v2-workstream-head,
.dashboard-v2-branch-label,
.dashboard-v2-workstream-cell {
    min-width: 0;
}

.dashboard-v2-branch-head,
.dashboard-v2-workstream-head {
    color: #64748b;
    font-size: .74rem;
    font-weight: 800;
    padding: .2rem .35rem;
}

.dashboard-v2-workstream-head {
    align-items: center;
    display: inline-flex;
    gap: .3rem;
}

.dashboard-v2-workstream-head span,
.dashboard-v2-branch-label strong,
.dashboard-v2-branch-label span,
.dashboard-v2-workstream-cell em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-v2-branch-label {
    align-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    min-height: 62px;
    padding: .55rem .65rem;
}

.dashboard-v2-branch-label strong {
    color: #0f172a;
    font-size: .82rem;
}

.dashboard-v2-branch-label span {
    color: #64748b;
    font-size: .72rem;
}

.dashboard-v2-workstream-cell {
    background: linear-gradient(90deg, rgba(32, 107, 196, .14) calc(var(--cell-heat) * 100%), #fff 0);
    border: 1px solid #dbe4ef;
    border-left: 4px solid #206bc4;
    border-radius: 8px;
    color: #0f172a;
    display: grid;
    min-height: 62px;
    padding: .48rem .55rem;
    text-align: left;
}

.dashboard-v2-workstream-cell span {
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
}

.dashboard-v2-workstream-cell strong {
    color: #334155;
    font-size: .75rem;
    line-height: 1.1;
}

.dashboard-v2-workstream-cell em {
    color: #64748b;
    font-size: .68rem;
    font-style: normal;
}

.dashboard-v2-workstream-cell.is-green { border-left-color: #2fb344; }
.dashboard-v2-workstream-cell.is-orange { border-left-color: #fd7e14; }
.dashboard-v2-workstream-cell.is-red { border-left-color: #d63939; }
.dashboard-v2-workstream-cell.is-purple { border-left-color: #7952b3; }
.dashboard-v2-workstream-cell.is-cyan { border-left-color: #17a2b8; }
.dashboard-v2-workstream-cell.is-teal { border-left-color: #0ca678; }

.dashboard-v2-workstream-cell.is-warning {
    background: linear-gradient(90deg, rgba(245, 159, 0, .18) calc(var(--cell-heat) * 100%), #fff 0);
}

.dashboard-v2-workstream-cell.is-danger {
    background: linear-gradient(90deg, rgba(214, 57, 57, .18) calc(var(--cell-heat) * 100%), #fff 0);
    border-color: rgba(214, 57, 57, .38);
}

.dashboard-v2-workstream-cell.is-selected {
    outline: 3px solid rgba(32, 107, 196, .18);
}

.dashboard-v2-cell-detail {
    border-top: 1px solid #e2e8f0;
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: .85rem;
    padding-top: .85rem;
}

.dashboard-v2-cell-detail-main {
    align-items: center;
    display: grid;
    gap: .65rem;
    grid-template-columns: auto minmax(0, 1fr);
    min-width: 0;
}

.dashboard-v2-detail-icon {
    background: #eaf2ff;
    color: #206bc4;
    height: 2.35rem;
    width: 2.35rem;
}

.dashboard-v2-cell-detail h4,
.dashboard-v2-cell-detail p {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.dashboard-v2-cell-detail h4 {
    color: #0f172a;
    font-size: .95rem;
    font-weight: 800;
}

.dashboard-v2-cell-detail p {
    color: #64748b;
    font-size: .8rem;
}

.dashboard-v2-cell-detail-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.dashboard-v2-cell-detail-metrics span {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    min-width: 86px;
    padding: .4rem .55rem;
}

.dashboard-v2-cell-detail-metrics strong {
    color: #0f172a;
    font-size: .88rem;
}

.dashboard-v2-cell-detail-metrics small {
    color: #64748b;
    font-size: .68rem;
}

.dashboard-v2-action-list,
.dashboard-v2-branch-rank,
.dashboard-v2-timeline,
.dashboard-v2-cashflow-legend {
    display: grid;
    gap: .5rem;
    min-width: 0;
}

.dashboard-v2-action-list.is-scrollable,
.dashboard-v2-timeline.is-scrollable {
    max-height: 430px;
    overflow-y: auto;
}

.dashboard-v2-action-item,
.dashboard-v2-branch-row,
.dashboard-v2-timeline-item {
    color: #0f172a;
    min-width: 0;
    text-decoration: none;
}

.dashboard-v2-action-item {
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: .6rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 58px;
    padding: .55rem;
}

.dashboard-v2-action-item.is-danger {
    border-color: rgba(214, 57, 57, .3);
    background: #fff7f7;
}

.dashboard-v2-action-item.is-warning {
    border-color: rgba(245, 159, 0, .3);
    background: #fffaf0;
}

.dashboard-v2-action-icon {
    background: #eaf2ff;
    color: #206bc4;
    height: 2.15rem;
    width: 2.15rem;
}

.dashboard-v2-action-body {
    display: grid;
    min-width: 0;
}

.dashboard-v2-action-body strong,
.dashboard-v2-action-body small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-v2-action-body small {
    color: #64748b;
    font-size: .74rem;
}

.dashboard-v2-action-count {
    background: #e2e8f0;
    border-radius: 999px;
    color: #334155;
    font-weight: 900;
    min-width: 2.25rem;
    padding: .18rem .45rem;
    text-align: center;
}

.dashboard-v2-action-item.is-danger .dashboard-v2-action-count {
    background: #d63939;
    color: #fff;
}

.dashboard-v2-action-item.is-warning .dashboard-v2-action-count {
    background: #f59f00;
    color: #111827;
}

.dashboard-v2-cash-position,
.dashboard-v2-open-buckets,
.dashboard-v2-stock-risk {
    display: grid;
    gap: .55rem;
    min-width: 0;
}

.dashboard-v2-cash-position-total {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: .2rem;
    padding: .7rem;
}

.dashboard-v2-cash-position-total span,
.dashboard-v2-cash-position-total small,
.dashboard-v2-cash-position-line em {
    color: #64748b;
    font-size: .74rem;
}

.dashboard-v2-cash-position-total strong {
    color: #0f172a;
    font-size: 1.28rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.dashboard-v2-cash-position-total.is-green {
    background: #f0fbf4;
    border-color: rgba(47, 179, 68, .25);
}

.dashboard-v2-cash-position-total.is-red {
    background: #fff7f7;
    border-color: rgba(214, 57, 57, .25);
}

.dashboard-v2-cash-position-lines {
    display: grid;
    gap: .35rem;
}

.dashboard-v2-cash-position-line {
    align-items: center;
    display: grid;
    gap: .45rem;
    grid-template-columns: auto minmax(0, .55fr) minmax(0, 1fr);
    min-width: 0;
}

.dashboard-v2-cash-position-line i {
    background: #206bc4;
    border-radius: 999px;
    height: .65rem;
    width: .65rem;
}

.dashboard-v2-cash-position-line.is-green i { background: #2fb344; }
.dashboard-v2-cash-position-line.is-teal i { background: #0ca678; }
.dashboard-v2-cash-position-line.is-red i { background: #d63939; }

.dashboard-v2-cash-position-line strong,
.dashboard-v2-cash-position-line em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-v2-open-bucket {
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #0f172a;
    display: grid;
    gap: .55rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 54px;
    padding: .5rem .55rem;
    text-decoration: none;
}

.dashboard-v2-open-bucket.is-danger {
    background: #fff7f7;
    border-color: rgba(214, 57, 57, .3);
}

.dashboard-v2-open-bucket.is-warning {
    background: #fffaf0;
    border-color: rgba(245, 159, 0, .3);
}

.dashboard-v2-open-bucket.is-danger .dashboard-v2-open-bucket-icon { background: #fdecec; color: #d63939; }
.dashboard-v2-open-bucket.is-warning .dashboard-v2-open-bucket-icon { background: #fff6db; color: #b77900; }

.dashboard-v2-open-bucket-body small,
.dashboard-v2-open-bucket-count small {
    color: #64748b;
    font-size: .72rem;
}

.dashboard-v2-open-bucket-count {
    display: grid;
    justify-items: end;
    min-width: 4.5rem;
}

.dashboard-v2-open-bucket-count strong {
    color: #0f172a;
    font-size: 1rem;
    line-height: 1;
}

.dashboard-v2-stock-risk-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #0f172a;
    display: grid;
    gap: .65rem;
    min-height: 100%;
    padding: .7rem;
    text-decoration: none;
}

.dashboard-v2-stock-risk-card.is-warning {
    background: #fffaf0;
    border-color: rgba(245, 159, 0, .35);
}

.dashboard-v2-stock-risk-top,
.dashboard-v2-stock-risk-grid {
    display: grid;
    min-width: 0;
}

.dashboard-v2-stock-risk-top strong {
    font-size: 1.2rem;
    line-height: 1.15;
}

.dashboard-v2-stock-risk-top small,
.dashboard-v2-stock-risk-card em,
.dashboard-v2-stock-risk-grid small {
    color: #64748b;
    font-size: .72rem;
}

.dashboard-v2-stock-risk-card em {
    font-style: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-v2-stock-risk-grid {
    gap: .45rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-v2-stock-risk-grid span {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    min-width: 0;
    padding: .45rem .5rem;
}

.dashboard-v2-widget-loading,
.dashboard-v2-widget-error {
    align-items: center;
    display: grid;
    gap: .65rem;
    min-height: 112px;
    padding: .65rem;
}

.dashboard-v2-widget-loading p {
    color: #64748b;
    font-size: .78rem;
    margin: 0;
    text-align: center;
}

.dashboard-v2-widget-skeleton {
    display: grid;
    gap: .5rem;
}

.dashboard-v2-widget-skeleton span {
    animation: dashboard-v2-shimmer 1.25s ease-in-out infinite;
    background: linear-gradient(90deg, #edf2f7 25%, #f8fafc 50%, #edf2f7 75%);
    background-size: 200% 100%;
    border-radius: 8px;
    display: block;
    height: 2.5rem;
}

.dashboard-v2-widget-error {
    background: #fff7f7;
    border: 1px solid rgba(214, 57, 57, .25);
    border-radius: 8px;
    grid-template-columns: auto minmax(0, 1fr);
}

.dashboard-v2-widget-error > i {
    color: #d63939;
    font-size: 1.5rem;
}

.dashboard-v2-widget-error span {
    display: grid;
}

.dashboard-v2-widget-error small { color: #64748b; }

.dashboard-v2-crm-summary {
    display: grid;
    gap: .45rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: .65rem;
    min-width: 0;
}

.dashboard-v2-crm-metric {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    min-width: 0;
    padding: .48rem .55rem;
}

.dashboard-v2-crm-metric strong { color: #0f172a; font-size: 1.05rem; line-height: 1; }
.dashboard-v2-crm-metric small { color: #64748b; font-size: .68rem; margin-top: .2rem; }
.dashboard-v2-crm-metric.is-danger { background: #fff7f7; border-color: rgba(214, 57, 57, .25); }
.dashboard-v2-crm-metric.is-danger strong { color: #b42318; }
.dashboard-v2-crm-metric.is-primary { background: #f1f6ff; border-color: rgba(32, 107, 196, .22); }
.dashboard-v2-crm-metric.is-primary strong { color: #1558a6; }
.dashboard-v2-crm-metric.is-success { background: #f0fbf4; border-color: rgba(47, 179, 68, .22); }
.dashboard-v2-crm-metric.is-success strong { color: #16703a; }

.dashboard-v2-crm-agenda {
    display: grid;
    gap: .45rem;
    min-width: 0;
}

.dashboard-v2-crm-item {
    align-items: center;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2fb344;
    border-radius: 8px;
    color: #0f172a;
    display: grid;
    gap: .5rem;
    grid-template-columns: minmax(76px, auto) minmax(0, 1fr) auto;
    min-width: 0;
    padding: .5rem .55rem;
    text-decoration: none;
}

.dashboard-v2-crm-item.is-danger { border-left-color: #d63939; background: #fffafa; }
.dashboard-v2-crm-item.is-primary { border-left-color: #206bc4; }
.dashboard-v2-crm-time { color: #475569; font-size: .7rem; font-weight: 800; }
.dashboard-v2-crm-copy { display: grid; min-width: 0; }
.dashboard-v2-crm-copy strong,
.dashboard-v2-crm-copy small,
.dashboard-v2-crm-copy em { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-v2-crm-copy small,
.dashboard-v2-crm-copy em { color: #64748b; font-size: .69rem; font-style: normal; }

.dashboard-v2-crm-open-link {
    align-items: center;
    color: #206bc4;
    display: inline-flex;
    font-size: .75rem;
    font-weight: 800;
    gap: .3rem;
    justify-self: end;
    padding: .25rem;
    text-decoration: none;
}

@keyframes dashboard-v2-pulse {
    0%, 100% { opacity: .4; transform: scale(.9); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes dashboard-v2-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.dashboard-v2-chart-box {
    height: 230px;
    min-height: 230px;
}

.dashboard-v2-cashflow-legend {
    margin-top: .65rem;
}

.dashboard-v2-cashflow-single {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #206bc4;
    border-radius: 8px;
    display: grid;
    gap: .25rem;
    min-height: 112px;
    padding: 1rem;
}

.dashboard-v2-cashflow-single strong { color: #0f172a; font-size: 1.45rem; }
.dashboard-v2-cashflow-single span,
.dashboard-v2-cashflow-single small { color: #64748b; }
.dashboard-v2-cashflow-single.is-red { background: #fff7f7; border-left-color: #d63939; }
.dashboard-v2-cashflow-single.is-green { background: #f0fbf4; border-left-color: #2fb344; }

.dashboard-v2-cashflow-legend span {
    align-items: center;
    display: grid;
    gap: .45rem;
    grid-template-columns: auto minmax(0, .55fr) minmax(0, 1fr);
}

.dashboard-v2-cashflow-legend i {
    border-radius: 999px;
    height: .65rem;
    width: .65rem;
}

.dashboard-v2-cashflow-legend strong,
.dashboard-v2-cashflow-legend em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-v2-cashflow-legend em {
    color: #64748b;
    font-size: .75rem;
    font-style: normal;
}

.dashboard-v2-branch-row {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    gap: .4rem .65rem;
    grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
    min-height: 56px;
    overflow: hidden;
    padding: .55rem .65rem .7rem;
    position: relative;
    text-align: left;
}

.dashboard-v2-branch-row i {
    background: #206bc4;
    bottom: 0;
    height: 3px;
    left: 0;
    position: absolute;
}

.dashboard-v2-branch-row.is-green i { background: #2fb344; }
.dashboard-v2-branch-row.is-yellow i { background: #f59f00; }
.dashboard-v2-branch-row.is-red i { background: #d63939; }

.dashboard-v2-branch-row-title,
.dashboard-v2-branch-row-metrics {
    display: grid;
    min-width: 0;
}

.dashboard-v2-branch-row-title strong,
.dashboard-v2-branch-row-title small,
.dashboard-v2-branch-row-metrics em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-v2-branch-row-title small,
.dashboard-v2-branch-row-metrics em {
    color: #64748b;
    font-size: .73rem;
    font-style: normal;
}

.dashboard-v2-timeline-item {
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    display: grid;
    gap: .55rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 52px;
    padding: .45rem 0;
}

.dashboard-v2-timeline-dot {
    background: #eaf2ff;
    color: #206bc4;
    height: 2rem;
    width: 2rem;
}

.dashboard-v2-timeline-dot.is-green { background: #e8f8ee; color: #2fb344; }
.dashboard-v2-timeline-dot.is-orange { background: #fff1e8; color: #d65f00; }
.dashboard-v2-timeline-dot.is-red { background: #fdecec; color: #d63939; }
.dashboard-v2-timeline-dot.is-purple { background: #f2ebff; color: #7952b3; }
.dashboard-v2-timeline-dot.is-cyan { background: #e6f7fb; color: #0f8799; }

.dashboard-v2-timeline-body {
    display: grid;
    min-width: 0;
}

.dashboard-v2-timeline-body strong,
.dashboard-v2-timeline-body small,
.dashboard-v2-timeline-amount {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-v2-timeline-body small,
.dashboard-v2-timeline-amount {
    color: #64748b;
    font-size: .75rem;
}

.dashboard-v2-empty {
    align-items: center;
    color: #64748b;
    display: flex;
    justify-content: center;
    min-height: 88px;
    padding: .75rem;
    text-align: center;
}

@media (max-width: 1199.98px) {
    .dashboard-v2-command-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-v2-kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-v2-main-grid,
    .dashboard-v2-focus-grid,
    .dashboard-v2-insight-grid,
    .dashboard-v2-secondary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .dashboard-v2-shell {
        gap: .8rem;
    }

    .dashboard-v2-command-strip {
        display: grid;
        gap: .55rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 0;
        overflow: visible;
        padding: 0;
    }

    .dashboard-v2-quick-link {
        min-height: 50px;
    }

    .dashboard-v2-kpi-strip {
        grid-template-columns: 1fr;
    }

    .dashboard-v2-kpi,
    .dashboard-v2-panel {
        padding: .75rem;
    }

    .dashboard-v2-panel-header {
        align-items: flex-start;
        gap: .5rem;
    }

    .dashboard-v2-action-panel {
        order: -1;
    }

    .dashboard-v2-heatmap {
        overflow-x: visible;
    }

    .dashboard-v2-heatmap-head {
        display: none;
    }

    .dashboard-v2-heatmap-row {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .dashboard-v2-branch-label {
        min-height: 48px;
    }

    .dashboard-v2-workstream-cell,
    .dashboard-v2-action-item,
    .dashboard-v2-open-bucket,
    .dashboard-v2-branch-row,
    .dashboard-v2-timeline-item {
        min-height: 44px;
    }

    .dashboard-v2-workstream-cell {
        grid-template-columns: auto minmax(0, 1fr);
        gap: .2rem .55rem;
    }

    .dashboard-v2-workstream-cell em {
        grid-column: 1 / -1;
    }

    .dashboard-v2-cell-detail {
        grid-template-columns: 1fr;
    }

    .dashboard-v2-cell-detail .btn {
        justify-self: start;
    }

    .dashboard-v2-chart-box {
        height: 210px;
        min-height: 210px;
    }

    .dashboard-v2-cash-position-line,
    .dashboard-v2-open-bucket,
    .dashboard-v2-cashflow-legend span,
    .dashboard-v2-branch-row,
    .dashboard-v2-timeline-item {
        grid-template-columns: 1fr;
    }

    .dashboard-v2-timeline-amount {
        white-space: normal;
    }

    .dashboard-v2-crm-item {
        align-items: start;
        grid-template-columns: 1fr auto;
    }

    .dashboard-v2-crm-time {
        grid-column: 1 / -1;
    }
}

@media (max-width: 479.98px) {
    .dashboard-v2-command-strip,
    .dashboard-v2-crm-summary {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-v2-load-meta.is-loading .dashboard-v2-load-dot,
    .dashboard-v2-widget-skeleton span {
        animation: none;
    }
}

/* Today Dashboard: keep the first screen focused on decisions, with stable card heights. */
.today-dashboard-v3 {
    gap: 1.25rem;
}

.today-dashboard-v3-quick-actions,
.today-dashboard-v3-summary-section {
    display: grid;
    gap: .75rem;
    min-width: 0;
}

.today-dashboard-v3-quick-actions {
    align-items: stretch;
    grid-template-columns: minmax(10.5rem, .34fr) minmax(0, 1.66fr);
}

.today-dashboard-v3-section-heading {
    align-content: center;
    min-width: 0;
}

.today-dashboard-v3-section-heading h3,
.today-dashboard-v3-panel-description {
    color: #0f172a;
    margin: 0;
}

.today-dashboard-v3-section-heading h3 {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
}

.today-dashboard-v3-section-heading p,
.today-dashboard-v3-panel-description {
    color: #64748b;
    font-size: .75rem;
    line-height: 1.35;
    margin-top: .2rem;
}

.today-dashboard-v3 .dashboard-v2-command-strip {
    grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
    grid-auto-rows: 1fr;
}

.today-dashboard-v3 .dashboard-v2-quick-link {
    min-height: 4.75rem;
}

.today-dashboard-v3 .dashboard-v2-kpi-strip {
    grid-template-columns: repeat(auto-fit, minmax(10.75rem, 1fr));
    grid-auto-rows: 1fr;
}

.today-dashboard-v3 .dashboard-v2-kpi {
    min-block-size: 7.75rem;
}

.today-dashboard-v3-priority-grid,
.today-dashboard-v3-primary-grid,
.today-dashboard-v3-details-grid {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.today-dashboard-v3-priority-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(20rem, .9fr);
}

.today-dashboard-v3-priority-grid > .dashboard-v2-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-block-size: 27.25rem;
    overflow: hidden;
}

.today-dashboard-v3-priority-grid .dashboard-v2-action-list,
.today-dashboard-v3-priority-grid .dashboard-v2-crm-agenda {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: .15rem;
    scrollbar-color: #cbd5e1 transparent;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
}

.today-dashboard-v3-priority-grid .dashboard-v2-crm-agenda {
    max-height: none;
}

.today-dashboard-v3-priority-grid .dashboard-v2-crm-panel {
    grid-template-rows: auto auto minmax(0, 1fr);
}

.today-dashboard-v3-primary-grid {
    grid-auto-rows: 1fr;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.today-dashboard-v3-primary-grid > .dashboard-v2-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-block-size: 18.5rem;
}

.today-dashboard-v3-primary-grid .dashboard-v2-open-buckets {
    max-block-size: 15.65rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: .15rem;
    scrollbar-color: #cbd5e1 transparent;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
}

.today-dashboard-v3-details-grid {
    grid-auto-rows: 1fr;
    grid-template-columns: minmax(0, 1.12fr) minmax(18rem, .88fr) minmax(19rem, .95fr);
}

.today-dashboard-v3-details-grid > .dashboard-v2-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-block-size: 23rem;
}

.today-dashboard-v3-details-grid .dashboard-v2-cashflow-legend,
.today-dashboard-v3-details-grid .dashboard-v2-operation-breakdown,
.today-dashboard-v3-details-grid .dashboard-v2-timeline {
    align-content: start;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: #cbd5e1 transparent;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
}

.today-dashboard-v3-details-grid .dashboard-v2-operation-breakdown,
.today-dashboard-v3-details-grid .dashboard-v2-timeline {
    max-block-size: 19.2rem;
    padding-right: .15rem;
}

.today-dashboard-v3-branch-panel {
    min-block-size: 0;
}

.today-dashboard-v3 .dashboard-v2-heatmap {
    overflow-x: visible;
}

.today-dashboard-v3 .dashboard-v2-heatmap-row {
    grid-template-columns: minmax(8rem, 1.05fr) repeat(var(--dashboard-workstream-count), minmax(0, 1fr));
    min-width: 0;
}

@media (max-width: 1199.98px) {
    .today-dashboard-v3-quick-actions,
    .today-dashboard-v3-priority-grid,
    .today-dashboard-v3-details-grid {
        grid-template-columns: 1fr 1fr;
    }

    .today-dashboard-v3-quick-actions > .today-dashboard-v3-section-heading {
        grid-column: 1 / -1;
    }

    .today-dashboard-v3 .dashboard-v2-command-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .today-dashboard-v3-primary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .today-dashboard-v3-details-grid > :first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 991.98px) {
    .today-dashboard-v3-priority-grid,
    .today-dashboard-v3-primary-grid,
    .today-dashboard-v3-details-grid {
        grid-template-columns: 1fr;
    }

    .today-dashboard-v3-priority-grid > .dashboard-v2-panel,
    .today-dashboard-v3-primary-grid > .dashboard-v2-panel,
    .today-dashboard-v3-details-grid > .dashboard-v2-panel {
        min-block-size: 0;
    }

    .today-dashboard-v3-priority-grid .dashboard-v2-action-list,
    .today-dashboard-v3-priority-grid .dashboard-v2-crm-agenda,
    .today-dashboard-v3-primary-grid .dashboard-v2-open-buckets,
    .today-dashboard-v3-details-grid .dashboard-v2-operation-breakdown,
    .today-dashboard-v3-details-grid .dashboard-v2-timeline {
        max-block-size: 22rem;
    }

    .today-dashboard-v3 .dashboard-v2-heatmap-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .today-dashboard-v3 {
        gap: 1rem;
    }

    .today-dashboard-v3-quick-actions,
    .today-dashboard-v3-priority-grid,
    .today-dashboard-v3-primary-grid,
    .today-dashboard-v3-details-grid {
        grid-template-columns: 1fr;
    }

    .today-dashboard-v3 .dashboard-v2-command-strip,
    .today-dashboard-v3 .dashboard-v2-kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .today-dashboard-v3 .dashboard-v2-quick-link,
    .today-dashboard-v3 .dashboard-v2-kpi {
        min-block-size: 0;
    }
}

@media (max-width: 479.98px) {
    .today-dashboard-v3 .dashboard-v2-command-strip,
    .today-dashboard-v3 .dashboard-v2-kpi-strip {
        grid-template-columns: 1fr;
    }
}

.dashboard-v2-operation-breakdown,
.dashboard-staff-shell {
    display: grid;
    gap: .75rem;
    min-width: 0;
}

.dashboard-v2-operation-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .45rem .75rem;
    padding: .75rem .85rem;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #fff;
    min-width: 0;
    overflow: hidden;
    position: relative;
}

.dashboard-v2-operation-row span,
.dashboard-v2-operation-row strong,
.dashboard-v2-operation-row small,
.dashboard-v2-operation-row em {
    min-width: 0;
    overflow-wrap: anywhere;
}

.dashboard-v2-operation-row strong {
    display: block;
    color: #0f172a;
    font-size: .92rem;
}

.dashboard-v2-operation-row small,
.dashboard-v2-operation-row em {
    color: #64748b;
    font-size: .78rem;
    font-style: normal;
}

.dashboard-v2-operation-row i {
    grid-column: 1 / -1;
    display: block;
    height: 4px;
    border-radius: 999px;
    background: #206bc4;
}

.dashboard-v2-operation-row.tone-green i { background: #2fb344; }
.dashboard-v2-operation-row.tone-orange i { background: #fd7e14; }
.dashboard-v2-operation-row.tone-red i { background: #d63939; }
.dashboard-v2-operation-row.tone-purple i { background: #7952b3; }
.dashboard-v2-operation-row.tone-cyan i { background: #17a2b8; }
.dashboard-v2-operation-row.tone-teal i { background: #0ca678; }

.dashboard-staff-command,
.dashboard-staff-panel,
.dashboard-staff-queue-card,
.dashboard-staff-quick-link {
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .045);
}

.dashboard-staff-command {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    align-items: flex-start;
}

.dashboard-staff-eyebrow,
.dashboard-staff-panel-header span {
    color: #64748b;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dashboard-staff-command h3,
.dashboard-staff-panel-header h4 {
    margin: .15rem 0;
    color: #0f172a;
    line-height: 1.2;
}

.dashboard-staff-command p,
.dashboard-staff-command span,
.dashboard-staff-quick-link small,
.dashboard-staff-quick-link em,
.dashboard-staff-queue-body small,
.dashboard-staff-queue-body em,
.dashboard-staff-task-row small,
.dashboard-staff-task-row em,
.dashboard-staff-activity-row small,
.dashboard-staff-activity-row em {
    color: #64748b;
    font-size: .78rem;
    font-style: normal;
    line-height: 1.35;
}

.dashboard-staff-quick-links {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .75rem;
}

.dashboard-staff-quick-link,
.dashboard-staff-queue-card,
.dashboard-staff-task-row,
.dashboard-staff-activity-row {
    appearance: none;
    border-radius: 8px;
    cursor: pointer;
    min-width: 0;
    text-align: left;
}

.dashboard-staff-quick-link {
    display: grid;
    gap: .25rem;
    padding: .75rem;
    min-height: 96px;
}

.dashboard-staff-quick-link span,
.dashboard-staff-queue-icon,
.dashboard-staff-task-icon,
.dashboard-staff-activity-dot {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaf2ff;
    color: #206bc4;
}

.dashboard-staff-quick-link strong,
.dashboard-staff-queue-body strong,
.dashboard-staff-task-row strong,
.dashboard-staff-activity-row strong {
    color: #0f172a;
    overflow-wrap: anywhere;
}

.dashboard-staff-quick-link.is-green span,
.dashboard-staff-queue-card.tone-green .dashboard-staff-queue-icon { background: #e8f8ee; color: #2fb344; }
.dashboard-staff-quick-link.is-red span,
.dashboard-staff-queue-card.tone-red .dashboard-staff-queue-icon,
.dashboard-staff-task-row.is-danger .dashboard-staff-task-icon { background: #fdecec; color: #d63939; }
.dashboard-staff-quick-link.is-orange span,
.dashboard-staff-queue-card.tone-orange .dashboard-staff-queue-icon,
.dashboard-staff-task-row.is-warning .dashboard-staff-task-icon { background: #fff1e8; color: #d65f00; }
.dashboard-staff-quick-link.is-purple span,
.dashboard-staff-queue-card.tone-purple .dashboard-staff-queue-icon { background: #f2ebff; color: #7952b3; }
.dashboard-staff-quick-link.is-cyan span,
.dashboard-staff-queue-card.tone-cyan .dashboard-staff-queue-icon { background: #e7f8fb; color: #0c8599; }

.dashboard-staff-queue-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.dashboard-staff-queue-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .75rem;
    align-items: center;
    padding: .85rem;
    border: 1px solid #dbe4ef;
    min-height: 112px;
}

.dashboard-staff-queue-card.is-danger { border-left: 4px solid #d63939; }
.dashboard-staff-queue-card.is-warning { border-left: 4px solid #f59f00; }
.dashboard-staff-queue-card.is-normal { border-left: 4px solid #206bc4; }

.dashboard-staff-queue-body {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.dashboard-staff-queue-body strong {
    font-size: 1.55rem;
    line-height: 1;
}

.dashboard-staff-queue-amount {
    color: #334155;
    font-weight: 800;
    white-space: nowrap;
}

.dashboard-staff-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: .75rem;
    min-width: 0;
}

.dashboard-staff-panel {
    padding: .9rem;
    min-width: 0;
}

.dashboard-staff-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
}

.dashboard-staff-task-list,
.dashboard-staff-activity-list {
    display: grid;
    gap: .55rem;
    max-height: min(26rem, 58vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: .25rem;
    scrollbar-color: #cbd5e1 transparent;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
}

.dashboard-staff-task-list::-webkit-scrollbar,
.dashboard-staff-activity-list::-webkit-scrollbar {
    width: .55rem;
}

.dashboard-staff-task-list::-webkit-scrollbar-thumb,
.dashboard-staff-activity-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

.dashboard-staff-task-row,
.dashboard-staff-activity-row {
    border: 1px solid #dbe4ef;
    background: #fff;
    display: grid;
    gap: .75rem;
    align-items: center;
    padding: .75rem;
    min-height: 72px;
}

.dashboard-staff-task-row {
    grid-template-columns: auto minmax(0, 1fr) minmax(120px, auto);
}

.dashboard-staff-task-row.is-danger { border-left: 4px solid #d63939; }
.dashboard-staff-task-row.is-warning { border-left: 4px solid #f59f00; }

.dashboard-staff-task-main,
.dashboard-staff-task-meta,
.dashboard-staff-activity-row span {
    display: grid;
    gap: .12rem;
    min-width: 0;
}

.dashboard-staff-task-meta {
    text-align: right;
}

.dashboard-staff-task-meta b {
    color: #0f172a;
    font-size: .82rem;
}

.dashboard-staff-activity-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.dashboard-staff-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    padding: 1rem;
    text-align: center;
}

.dashboard-staff-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .36);
    z-index: 1040;
}

.dashboard-staff-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(520px, calc(100vw - 20px));
    background: #f8fafc;
    border-left: 1px solid #dbe4ef;
    box-shadow: -18px 0 38px rgba(15, 23, 42, .18);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    transform: translateX(105%);
    transition: transform .2s ease;
    z-index: 1050;
}

.dashboard-staff-drawer.open {
    transform: translateX(0);
}

.dashboard-staff-drawer-header,
.dashboard-staff-drawer-footer {
    background: #fff;
    padding: 1rem;
}

.dashboard-staff-drawer-header {
    border-bottom: 1px solid #dbe4ef;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-staff-drawer-footer {
    border-top: 1px solid #dbe4ef;
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
}

.dashboard-staff-drawer-kicker {
    color: #206bc4;
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-staff-drawer.is-danger .dashboard-staff-drawer-kicker { color: #d63939; }
.dashboard-staff-drawer.is-warning .dashboard-staff-drawer-kicker { color: #b77900; }

.dashboard-staff-drawer-header h3 {
    margin: .15rem 0;
    color: #0f172a;
}

.dashboard-staff-drawer-header p,
.dashboard-staff-drawer-header small {
    color: #64748b;
    display: block;
    margin: 0;
}

.dashboard-staff-drawer-body {
    display: grid;
    align-content: start;
    gap: .75rem;
    min-height: 0;
    overflow: auto;
    padding: 1rem;
}

.dashboard-staff-drawer-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
}

.dashboard-staff-drawer-summary-row,
.dashboard-staff-drawer-item,
.dashboard-staff-drawer-empty {
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #fff;
}

.dashboard-staff-drawer-summary-row {
    display: grid;
    gap: .15rem;
    padding: .7rem;
}

.dashboard-staff-drawer-summary-row span,
.dashboard-staff-drawer-summary-row small,
.dashboard-staff-drawer-meta,
.dashboard-staff-drawer-item small {
    color: #64748b;
    font-size: .76rem;
}

.dashboard-staff-drawer-summary-row strong {
    color: #0f172a;
    font-size: 1.1rem;
}

.dashboard-staff-drawer-summary-row.tone-red { border-left: 4px solid #d63939; }
.dashboard-staff-drawer-summary-row.tone-amber,
.dashboard-staff-drawer-summary-row.tone-warning { border-left: 4px solid #f59f00; }
.dashboard-staff-drawer-summary-row.tone-green { border-left: 4px solid #2fb344; }
.dashboard-staff-drawer-summary-row.tone-blue { border-left: 4px solid #206bc4; }
.dashboard-staff-drawer-summary-row.tone-cyan { border-left: 4px solid #17a2b8; }

.dashboard-staff-drawer-list {
    display: grid;
    gap: .65rem;
}

.dashboard-staff-drawer-empty {
    color: #64748b;
    padding: 1rem;
    text-align: center;
}

.dashboard-staff-drawer-item {
    display: grid;
    gap: .65rem;
    padding: .85rem;
}

.dashboard-staff-drawer-item.is-danger { border-left: 4px solid #d63939; }
.dashboard-staff-drawer-item.is-warning { border-left: 4px solid #f59f00; }

.dashboard-staff-drawer-item-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
}

.dashboard-staff-drawer-item-head > div,
.dashboard-staff-drawer-problem {
    display: grid;
    gap: .12rem;
    min-width: 0;
}

.dashboard-staff-drawer-item-head strong,
.dashboard-staff-drawer-problem strong {
    color: #0f172a;
    overflow-wrap: anywhere;
}

.dashboard-staff-drawer-item-head em {
    color: #334155;
    font-style: normal;
    font-weight: 800;
    white-space: nowrap;
}

.dashboard-staff-drawer-problem {
    background: #f8fafc;
    border-radius: 8px;
    padding: .65rem;
}

.dashboard-staff-drawer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.dashboard-staff-drawer-meta span {
    border: 1px solid #dbe4ef;
    border-radius: 999px;
    padding: .2rem .5rem;
}

@media (max-width: 991.98px) {
    .dashboard-staff-command,
    .dashboard-staff-main-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-staff-command {
        display: grid;
    }

    .dashboard-staff-quick-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-staff-queue-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-staff-task-list,
    .dashboard-staff-activity-list {
        max-height: min(22rem, 52vh);
    }

    .dashboard-staff-task-row,
    .dashboard-staff-activity-row {
        grid-template-columns: auto minmax(0, 1fr);
        min-height: 44px;
    }

    .dashboard-staff-task-meta,
    .dashboard-staff-activity-row > em {
        grid-column: 2;
        text-align: left;
    }
}

@media (max-width: 575.98px) {
    .dashboard-staff-quick-links {
        grid-template-columns: 1fr;
    }

    .dashboard-staff-drawer {
        width: calc(100vw - 10px);
    }

    .dashboard-staff-drawer-summary {
        grid-template-columns: 1fr;
    }

    .dashboard-staff-drawer-header,
    .dashboard-staff-drawer-body,
    .dashboard-staff-drawer-footer {
        padding: .85rem;
    }

    .dashboard-staff-drawer-footer {
        display: grid;
    }

    .dashboard-staff-drawer-footer .btn {
        min-height: 44px;
    }
}

/* Monthly vehicle sales dashboard */
.monthly-vehicle-sales-dashboard {
  gap: 1rem;
}

.monthly-vehicle-sales-status-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1.4fr);
  gap: .75rem;
}

.monthly-vehicle-sales-status-strip > div {
  min-width: 0;
  padding: .75rem .9rem;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .045);
}

.monthly-vehicle-sales-status-strip span,
.monthly-vehicle-sales-panel-title p,
.monthly-vehicle-sales-month-card span,
.monthly-vehicle-sales-action-card small,
.monthly-vehicle-sales-action-card em,
.monthly-vehicle-sales-branch-scope span {
  color: #64748b;
  font-size: .78rem;
}

.monthly-vehicle-sales-status-strip strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #0f172a;
  line-height: 1.35;
}

.monthly-vehicle-sales-takeaway strong {
  color: #92400e;
}

.monthly-vehicle-sales-kpi-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.monthly-vehicle-sales-kpi-strip .vehicle-movement-kpi {
  min-width: 0;
}

.monthly-vehicle-sales-kpi-strip .vehicle-movement-kpi strong {
  overflow-wrap: anywhere;
  font-size: clamp(1.15rem, 1.45vw, 1.7rem);
}

.monthly-vehicle-sales-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, .75fr);
  gap: 1rem;
  min-width: 0;
}

.monthly-vehicle-sales-main-panel,
.monthly-vehicle-sales-driver-panel,
.monthly-vehicle-sales-detail-panel {
  display: grid;
  gap: 1rem;
}

.monthly-vehicle-sales-panel-title {
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0;
}

.monthly-vehicle-sales-panel-title > div {
  min-width: 0;
}

.monthly-vehicle-sales-panel-title p {
  margin: .2rem 0 0;
  line-height: 1.35;
}

.monthly-vehicle-sales-panel-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .4rem;
}

.monthly-vehicle-sales-panel-badges span {
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  color: #334155;
  font-size: .76rem;
  font-weight: 700;
  padding: .25rem .55rem;
  white-space: nowrap;
}

.monthly-vehicle-sales-chart-box {
  min-height: 320px;
  height: 320px;
}

.monthly-vehicle-sales-chart-box canvas {
  max-width: 100%;
}

.monthly-vehicle-sales-chart-fallback {
  align-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: absolute;
  text-align: center;
}

.monthly-vehicle-sales-month-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .65rem;
  margin-bottom: 0;
}

.monthly-vehicle-sales-month-card {
  display: grid;
  gap: .55rem;
  min-height: 164px;
  min-width: 0;
  padding: .75rem;
  border: 1px solid #dbe7f3;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .045);
}

.monthly-vehicle-sales-month-card.is-best {
  border-left-color: #0f766e;
  background: #f0fdfa;
}

.monthly-vehicle-sales-month-card.is-loss {
  border-left-color: #dc2626;
  background: #fff7f7;
}

.monthly-vehicle-sales-month-card.is-pending:not(.is-loss) {
  border-left-color: #d97706;
  background: #fffbeb;
}

.monthly-vehicle-sales-month-top,
.monthly-vehicle-sales-month-money,
.monthly-vehicle-sales-month-meta {
  min-width: 0;
}

.monthly-vehicle-sales-month-card strong {
  display: block;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 1.04rem;
  line-height: 1.22;
}

.monthly-vehicle-sales-month-money strong {
  color: #0f766e;
}

.monthly-vehicle-sales-month-card.is-loss .monthly-vehicle-sales-month-money strong {
  color: #b91c1c;
}

.monthly-vehicle-sales-month-meta {
  display: grid;
  gap: .2rem;
}

.monthly-vehicle-sales-month-growth {
  display: grid;
  gap: .12rem;
  min-width: 0;
  padding-top: .42rem;
  border-top: 1px solid rgba(148, 163, 184, .32);
}

.monthly-vehicle-sales-month-growth span,
.monthly-vehicle-sales-month-growth strong {
  min-width: 0;
}

.monthly-vehicle-sales-month-growth strong {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: .18rem;
  font-size: .78rem;
  line-height: 1.3;
  text-align: left;
}

.monthly-vehicle-sales-month-growth.is-up strong {
  color: #047857;
}

.monthly-vehicle-sales-month-growth.is-down strong {
  color: #b91c1c;
}

.monthly-vehicle-sales-month-growth.is-flat strong {
  color: #475569;
}

.monthly-vehicle-sales-month-growth.is-new strong {
  color: #1d4ed8;
}

.monthly-vehicle-sales-month-growth.is-upcoming strong {
  color: #64748b;
}

.monthly-vehicle-sales-action-list {
  display: grid;
  gap: .65rem;
}

.monthly-vehicle-sales-action-card {
  display: grid;
  gap: .24rem;
  min-height: 68px;
  min-width: 0;
  width: 100%;
  padding: .7rem .8rem;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #d97706;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  text-align: left;
}

.monthly-vehicle-sales-action-card.is-danger {
  border-left-color: #dc2626;
  background: #fff7f7;
}

.monthly-vehicle-sales-action-card.is-warning {
  background: #fffbeb;
}

.monthly-vehicle-sales-action-card span {
  color: #92400e;
  font-size: .72rem;
  font-weight: 800;
}

.monthly-vehicle-sales-action-card.is-danger span {
  color: #b91c1c;
}

.monthly-vehicle-sales-action-card strong,
.monthly-vehicle-sales-action-card small,
.monthly-vehicle-sales-action-card em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.monthly-vehicle-sales-action-card em {
  font-style: normal;
}

.monthly-vehicle-sales-driver-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr);
  gap: 1rem;
  min-width: 0;
}

.monthly-vehicle-sales-driver-side {
  display: grid;
  gap: .75rem;
  align-content: start;
  min-width: 0;
}

.monthly-vehicle-sales-dimension-chart-box {
  min-height: 360px;
  height: 360px;
}

.monthly-vehicle-sales-branch-list {
  grid-template-columns: minmax(0, 1fr);
  gap: .85rem;
}

.monthly-vehicle-sales-branch-health-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .75rem;
}

.monthly-vehicle-sales-month-summary {
  min-width: 0;
}

.monthly-vehicle-sales-summary-eyebrow {
  color: #2563eb;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.monthly-vehicle-sales-branch-scope {
  display: grid;
  gap: .25rem;
  padding: .9rem 1rem;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}

.monthly-vehicle-sales-branch-scope strong {
  color: #0f172a;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  line-height: 1.3;
}

.monthly-vehicle-sales-health-tile {
  --monthly-vehicle-sales-health-accent: #2563eb;
  display: grid;
  gap: .35rem;
  min-width: 0;
  min-height: 122px;
  padding: .85rem;
  border: 1px solid #dbe7f3;
  border-top: 4px solid var(--monthly-vehicle-sales-health-accent);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.monthly-vehicle-sales-health-tile.is-sale {
  --monthly-vehicle-sales-health-accent: #4f46e5;
  background: #eef2ff;
}

.monthly-vehicle-sales-health-tile.is-profit,
.monthly-vehicle-sales-health-tile.is-margin {
  --monthly-vehicle-sales-health-accent: #0f766e;
  background: #f0fdfa;
}

.monthly-vehicle-sales-health-tile.is-loss {
  --monthly-vehicle-sales-health-accent: #dc2626;
  background: #fff7f7;
}

.monthly-vehicle-sales-health-tile.is-pending {
  --monthly-vehicle-sales-health-accent: #d97706;
  background: #fffbeb;
}

.monthly-vehicle-sales-health-tile > span {
  color: #475569;
  font-size: .78rem;
  font-weight: 700;
}

.monthly-vehicle-sales-health-tile strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: clamp(1.08rem, 1.4vw, 1.5rem);
  line-height: 1.18;
}

.monthly-vehicle-sales-health-tile small {
  align-self: end;
  color: #64748b;
  font-size: .72rem;
  line-height: 1.35;
}

.monthly-vehicle-sales-month-tabs-shell {
  max-width: 100%;
  padding: .15rem 0 .35rem;
}

.monthly-vehicle-sales-month-tabs {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: .5rem;
  width: 100%;
  min-width: 0;
}

.monthly-vehicle-sales-month-tab {
  display: grid;
  gap: .14rem;
  min-width: 0;
  min-height: 76px;
  padding: .55rem .5rem;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #334155;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.monthly-vehicle-sales-month-tab:hover,
.monthly-vehicle-sales-month-tab:focus-visible {
  border-color: #60a5fa;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.monthly-vehicle-sales-month-tab.is-active {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .2);
}

.monthly-vehicle-sales-month-tab span {
  font-size: .82rem;
  font-weight: 700;
}

.monthly-vehicle-sales-month-tab strong {
  font-size: .72rem;
  font-weight: 700;
  color: #1d4ed8;
}

.monthly-vehicle-sales-month-tab-profit {
  min-width: 0;
  overflow: hidden;
  color: #2563eb;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-vehicle-sales-month-tab-profit.is-loss {
  color: #b91c1c;
}

.monthly-vehicle-sales-month-tab.is-active strong,
.monthly-vehicle-sales-month-tab.is-active .monthly-vehicle-sales-month-tab-profit {
  color: #fff;
}

.monthly-vehicle-sales-month-summary {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #f8fafc;
}

.monthly-vehicle-sales-month-headline {
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(0, 1.6fr);
  gap: 1rem;
  align-items: stretch;
}

.monthly-vehicle-sales-month-headline-copy {
  display: grid;
  align-content: center;
  gap: .2rem;
  padding: .85rem 1rem;
  border-left: 4px solid #2563eb;
  border-radius: 9px;
  background: #fff;
}

.monthly-vehicle-sales-month-headline-copy h4,
.monthly-vehicle-sales-breakdown-heading h4 {
  margin: 0;
  color: #0f172a;
}

.monthly-vehicle-sales-month-headline-copy h4 {
  font-size: clamp(1.2rem, 1.6vw, 1.55rem);
}

.monthly-vehicle-sales-month-headline-copy p,
.monthly-vehicle-sales-breakdown-heading p {
  margin: 0;
  color: #64748b;
  font-size: .75rem;
  line-height: 1.35;
}

.monthly-vehicle-sales-month-headline-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
}

.monthly-vehicle-sales-month-headline-kpi {
  display: grid;
  align-content: center;
  gap: .25rem;
  min-width: 0;
  padding: .75rem;
  border: 1px solid #dbe7f3;
  border-radius: 9px;
  background: #fff;
}

.monthly-vehicle-sales-month-headline-kpi span {
  color: #64748b;
  font-size: .72rem;
  font-weight: 700;
}

.monthly-vehicle-sales-month-headline-kpi strong {
  overflow-wrap: anywhere;
  color: #1e3a8a;
  font-size: clamp(.98rem, 1.15vw, 1.2rem);
  line-height: 1.25;
}

.monthly-vehicle-sales-month-headline-kpi.is-profit strong {
  color: #0f766e;
}

.monthly-vehicle-sales-month-headline-kpi.is-loss strong {
  color: #b91c1c;
}

.monthly-vehicle-sales-month-breakdowns {
  display: grid;
  gap: 1rem;
}

.monthly-vehicle-sales-breakdown-section {
  --monthly-vehicle-sales-breakdown-accent: #2563eb;
  --monthly-vehicle-sales-breakdown-border: #bfdbfe;
  --monthly-vehicle-sales-breakdown-surface: #eff6ff;
  display: grid;
  gap: .65rem;
  min-width: 0;
  padding: .9rem;
  border: 1px solid var(--monthly-vehicle-sales-breakdown-border);
  border-radius: 11px;
  background: var(--monthly-vehicle-sales-breakdown-surface);
}

.monthly-vehicle-sales-breakdown-section.is-channel {
  --monthly-vehicle-sales-breakdown-accent: #0f766e;
  --monthly-vehicle-sales-breakdown-border: #99f6e4;
  --monthly-vehicle-sales-breakdown-surface: #f0fdfa;
}

.monthly-vehicle-sales-breakdown-heading {
  display: flex;
  gap: .65rem;
  align-items: center;
}

.monthly-vehicle-sales-breakdown-heading > div {
  display: grid;
  gap: .15rem;
  min-width: 0;
}

.monthly-vehicle-sales-breakdown-icon {
  display: grid;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--monthly-vehicle-sales-breakdown-accent);
  color: #fff;
  font-size: 1rem;
  place-items: center;
}

.monthly-vehicle-sales-breakdown-heading h4 {
  font-size: .92rem;
}

.monthly-vehicle-sales-sale-type-summary,
.monthly-vehicle-sales-channel-summary {
  display: grid;
  gap: .65rem;
}

.monthly-vehicle-sales-sale-type-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.monthly-vehicle-sales-channel-summary {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.monthly-vehicle-sales-summary-card {
  display: grid;
  gap: .65rem;
  min-width: 0;
  padding: .8rem;
  border: 1px solid #dbe7f3;
  border-left: 4px solid var(--monthly-vehicle-sales-breakdown-accent);
  border-radius: 9px;
  background: #fff;
}

.monthly-vehicle-sales-summary-card.is-loss {
  border-left-color: #dc2626;
  background: #fff7f7;
}

.monthly-vehicle-sales-summary-card-top {
  display: flex;
  justify-content: space-between;
  gap: .65rem;
  align-items: flex-start;
}

.monthly-vehicle-sales-summary-card-top > div {
  display: grid;
  gap: .05rem;
  min-width: 0;
}

.monthly-vehicle-sales-summary-card-top span {
  color: #64748b;
  font-size: .68rem;
  font-weight: 700;
}

.monthly-vehicle-sales-summary-card-top strong {
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: .95rem;
}

.monthly-vehicle-sales-summary-card-top b {
  flex: 0 0 auto;
  color: var(--monthly-vehicle-sales-breakdown-accent);
  font-size: .82rem;
}

.monthly-vehicle-sales-summary-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin: 0;
}

.monthly-vehicle-sales-summary-card dl > div {
  display: grid;
  gap: .05rem;
  min-width: 0;
}

.monthly-vehicle-sales-summary-card dt {
  color: #64748b;
  font-size: .68rem;
  font-weight: 600;
}

.monthly-vehicle-sales-summary-card dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: .85rem;
  font-weight: 700;
}

.monthly-vehicle-sales-summary-card.is-loss dd:last-child {
  color: #b91c1c;
}

.monthly-vehicle-sales-summary-empty,
.monthly-vehicle-sales-month-empty {
  margin: 0;
  padding: .85rem;
  border: 1px dashed #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #64748b;
  text-align: center;
}

.monthly-vehicle-sales-month-empty {
  color: #475569;
  font-weight: 700;
}

.monthly-vehicle-sales-toolbar-stack {
  display: grid;
  gap: .65rem;
  width: 100%;
  min-width: 0;
}

.monthly-vehicle-sales-toolbar-group {
  --monthly-vehicle-sales-control-accent: #2563eb;
  --monthly-vehicle-sales-control-border: #93c5fd;
  --monthly-vehicle-sales-control-surface: #eff6ff;
  --monthly-vehicle-sales-control-heading: #1e3a8a;
  display: grid;
  gap: .5rem;
  min-width: 0;
  padding: .65rem;
  border: 1px solid var(--monthly-vehicle-sales-control-border);
  border-radius: 10px;
  background: var(--monthly-vehicle-sales-control-surface);
}

.monthly-vehicle-sales-toolbar-group.is-dimension {
  --monthly-vehicle-sales-control-accent: #2563eb;
  --monthly-vehicle-sales-control-border: #93c5fd;
  --monthly-vehicle-sales-control-surface: #eff6ff;
  --monthly-vehicle-sales-control-heading: #1e3a8a;
}

.monthly-vehicle-sales-toolbar-group.is-metric {
  --monthly-vehicle-sales-control-accent: #7c3aed;
  --monthly-vehicle-sales-control-border: #c4b5fd;
  --monthly-vehicle-sales-control-surface: #f5f3ff;
  --monthly-vehicle-sales-control-heading: #5b21b6;
}

.monthly-vehicle-sales-toolbar-group-header {
  display: flex;
  gap: .55rem;
  align-items: center;
  min-width: 0;
}

.monthly-vehicle-sales-toolbar-copy {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  align-items: baseline;
  min-width: 0;
}

.monthly-vehicle-sales-toolbar-group-header strong,
.monthly-vehicle-sales-toolbar-group-header small {
  overflow-wrap: anywhere;
}

.monthly-vehicle-sales-toolbar-group-header strong {
  color: var(--monthly-vehicle-sales-control-heading);
  font-size: .82rem;
}

.monthly-vehicle-sales-toolbar-group-header small {
  color: #64748b;
  font-size: .72rem;
}

.monthly-vehicle-sales-toolbar-step {
  display: grid;
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: var(--monthly-vehicle-sales-control-accent);
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  place-items: center;
}

.monthly-vehicle-sales-dimension-toolbar,
.monthly-vehicle-sales-metric-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: flex-end;
}

.monthly-vehicle-sales-dimension-toolbar .btn,
.monthly-vehicle-sales-metric-toolbar .btn {
  min-height: 36px;
}

.monthly-vehicle-sales-toolbar-group .btn-primary,
.monthly-vehicle-sales-toolbar-group .btn-primary:hover,
.monthly-vehicle-sales-toolbar-group .btn-primary:focus {
  border-color: var(--monthly-vehicle-sales-control-accent);
  background: var(--monthly-vehicle-sales-control-accent);
  color: #fff;
}

.monthly-vehicle-sales-toolbar-group .btn-outline-primary {
  border-color: var(--monthly-vehicle-sales-control-accent);
  background: #fff;
  color: var(--monthly-vehicle-sales-control-accent);
}

.monthly-vehicle-sales-toolbar-group .btn-outline-primary:hover,
.monthly-vehicle-sales-toolbar-group .btn-outline-primary:focus {
  border-color: var(--monthly-vehicle-sales-control-accent);
  background: var(--monthly-vehicle-sales-control-accent);
  color: #fff;
}

.monthly-vehicle-sales-driver-list {
  align-content: start;
}

.monthly-vehicle-sales-rank-item {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .65rem;
  align-items: start;
  min-width: 0;
  padding: .65rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.monthly-vehicle-sales-rank-item.is-warning {
  background: #fffbeb;
  border-color: rgba(217, 119, 6, .28);
}

.monthly-vehicle-sales-rank-item.is-danger {
  background: #fff7f7;
  border-color: rgba(220, 38, 38, .25);
}

.vehicle-movement-rank-number {
  display: grid;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 800;
  place-items: center;
}

.vehicle-movement-rank-content,
.vehicle-movement-rank-title {
  min-width: 0;
}

.vehicle-movement-rank-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
  align-items: start;
}

.vehicle-movement-rank-title span,
.vehicle-movement-rank-title strong,
.vehicle-movement-rank-sub {
  overflow-wrap: anywhere;
}

.vehicle-movement-rank-title span {
  color: #0f172a;
  font-weight: 700;
}

.vehicle-movement-rank-title strong {
  color: #0f172a;
  white-space: nowrap;
}

.vehicle-movement-rank-sub {
  color: #64748b;
  font-size: .76rem;
  margin-top: .18rem;
}

.vehicle-movement-rank-bar {
  margin-top: .45rem;
}

.vehicle-movement-rank-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

.monthly-vehicle-sales-rank-item.is-warning .vehicle-movement-rank-bar span {
  background: #d97706;
}

.monthly-vehicle-sales-rank-item.is-danger .vehicle-movement-rank-bar span {
  background: #dc2626;
}

.monthly-vehicle-sales-empty-note {
  padding: .9rem;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.monthly-vehicle-sales-empty-note {
  color: #64748b;
  text-align: center;
}

.monthly-report-focus-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
  padding: .85rem 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
}

.monthly-report-focus-banner > div {
  display: grid;
  gap: .15rem;
  min-width: 0;
}

.monthly-report-focus-banner span,
.monthly-report-focus-banner small {
  color: #475569;
  font-size: .8rem;
}

.monthly-report-focus-banner strong {
  font-size: .95rem;
  line-height: 1.35;
}

.monthly-vehicle-sales-table-shell {
  max-width: 100%;
  overflow-x: auto;
}

.monthly-vehicle-sales-priority-table,
.monthly-vehicle-sales-detail-table {
  min-width: 840px;
}

.monthly-vehicle-sales-priority-table .is-loss-row td {
  background: #fff7f7;
}

.monthly-vehicle-sales-cell-main,
.monthly-vehicle-sales-cell-sub {
  overflow-wrap: anywhere;
}

.monthly-vehicle-sales-drawer .registration-drawer-item.is-danger strong {
  color: #b91c1c;
}

.monthly-vehicle-sales-drawer .registration-drawer-item.is-warning strong {
  color: #92400e;
}

@media (max-width: 1199.98px) {
  .monthly-vehicle-sales-status-strip,
  .monthly-vehicle-sales-main-grid,
  .monthly-vehicle-sales-driver-grid {
    grid-template-columns: 1fr;
  }

  .monthly-vehicle-sales-month-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .monthly-vehicle-sales-branch-health-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .monthly-vehicle-sales-month-headline {
    grid-template-columns: 1fr;
  }

  .monthly-vehicle-sales-month-tabs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .monthly-vehicle-sales-toolbar-stack {
    width: 100%;
  }

  .monthly-vehicle-sales-driver-panel .monthly-vehicle-sales-panel-title {
    display: grid;
  }

  .monthly-vehicle-sales-dimension-toolbar,
  .monthly-vehicle-sales-metric-toolbar {
    justify-content: flex-start;
  }
}

@media (max-width: 767.98px) {
  .monthly-vehicle-sales-command {
    position: static;
  }

  .monthly-vehicle-sales-filter-grid,
  .monthly-vehicle-sales-status-strip,
  .monthly-vehicle-sales-kpi-strip,
  .monthly-vehicle-sales-month-grid {
    grid-template-columns: 1fr;
  }

  .monthly-vehicle-sales-status-strip {
    order: 0;
  }

  .monthly-vehicle-sales-kpi-strip {
    order: 1;
  }

  .monthly-vehicle-sales-main-grid {
    order: 2;
  }

  .monthly-vehicle-sales-action-panel {
    order: -1;
  }

  .monthly-vehicle-sales-chart-box {
    min-height: 250px;
    height: 250px;
  }

  .monthly-vehicle-sales-branch-list {
    grid-template-columns: 1fr;
  }

  .monthly-vehicle-sales-branch-health-grid,
  .monthly-vehicle-sales-month-headline-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monthly-vehicle-sales-sale-type-summary {
    grid-template-columns: 1fr;
  }

  .monthly-vehicle-sales-month-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .monthly-vehicle-sales-panel-title {
    display: grid;
  }

  .monthly-vehicle-sales-panel-badges {
    justify-content: flex-start;
  }

  .monthly-vehicle-sales-dimension-toolbar .btn,
  .monthly-vehicle-sales-metric-toolbar .btn {
    flex: 1 1 calc(50% - .4rem);
    min-height: 44px;
  }

  .monthly-vehicle-sales-action-card,
  .monthly-vehicle-sales-month-card,
  .monthly-vehicle-sales-rank-item {
    min-height: 44px;
  }

  .monthly-report-focus-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .monthly-report-focus-banner .btn {
    min-height: 44px;
  }

  .monthly-vehicle-sales-priority-table,
  .monthly-vehicle-sales-detail-table {
    min-width: 0;
  }

  .monthly-vehicle-sales-priority-table td,
  .monthly-vehicle-sales-detail-table td {
    display: grid;
    grid-template-columns: minmax(7rem, .42fr) minmax(0, 1fr);
    gap: .65rem;
    align-items: start;
  }

  .monthly-vehicle-sales-priority-table td::before,
  .monthly-vehicle-sales-detail-table td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: .76rem;
    font-weight: 700;
  }

  .monthly-vehicle-sales-priority-table td.text-end,
  .monthly-vehicle-sales-detail-table td.text-end,
  .monthly-vehicle-sales-detail-table td.text-center {
    text-align: left !important;
  }
}

@media (max-width: 479.98px) {
  .monthly-vehicle-sales-branch-health-grid,
  .monthly-vehicle-sales-month-headline-kpis,
  .monthly-vehicle-sales-channel-summary {
    grid-template-columns: 1fr;
  }

  .monthly-vehicle-sales-month-summary {
    padding: .75rem;
  }

  .monthly-vehicle-sales-month-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monthly-vehicle-sales-drawer-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .monthly-vehicle-sales-transfer-status {
    align-self: flex-start;
  }

  .monthly-vehicle-sales-drawer-section .registration-drawer-grid {
    grid-template-columns: 1fr;
  }
}

/* Monthly Dashboard */
.monthly-dashboard-page {
  display: grid;
  gap: 1rem;
}

.monthly-dashboard-header .action-toolbar {
  flex-wrap: wrap;
}

.monthly-dashboard-command-bar,
.monthly-dashboard-panel,
.monthly-dashboard-kpi-card,
.monthly-dashboard-action-card,
.monthly-dashboard-workstream-card,
.monthly-dashboard-driver-group,
.monthly-dashboard-cash-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.monthly-dashboard-command-bar {
  display: grid;
  gap: .85rem;
  padding: 1rem;
}

.monthly-dashboard-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
  align-items: end;
}

.monthly-dashboard-scope-chip {
  display: flex;
  min-height: 38px;
  gap: .5rem;
  align-items: center;
  overflow-wrap: anywhere;
}

.monthly-dashboard-scope-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  color: #475569;
  font-size: .86rem;
}

.monthly-dashboard-scope-strip > span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: .25rem .6rem;
  border-radius: 8px;
  background: #f8fafc;
}

.monthly-dashboard-source-warning {
  color: #92400e;
  background: #fffbeb !important;
}

.monthly-dashboard-results {
  display: grid;
  gap: 1rem;
}

.monthly-dashboard-kpi-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: .75rem;
}

.monthly-dashboard-kpi-card,
.monthly-dashboard-action-card,
.monthly-dashboard-workstream-card,
.monthly-dashboard-driver-item,
.monthly-dashboard-branch-row,
.monthly-dashboard-quick-link,
.monthly-dashboard-month-chip {
  color: inherit;
  text-decoration: none;
}

button.monthly-dashboard-kpi-card,
button.monthly-dashboard-action-card,
button.monthly-dashboard-workstream-card,
button.monthly-dashboard-driver-item,
button.monthly-dashboard-branch-row,
button.monthly-dashboard-quick-link,
button.monthly-dashboard-month-chip {
  appearance: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

button.monthly-dashboard-kpi-card:hover,
button.monthly-dashboard-action-card:hover,
button.monthly-dashboard-workstream-card:hover,
button.monthly-dashboard-driver-item:hover,
button.monthly-dashboard-branch-row:hover,
button.monthly-dashboard-quick-link:hover,
button.monthly-dashboard-month-chip:hover {
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}

button.monthly-dashboard-kpi-card:focus-visible,
button.monthly-dashboard-action-card:focus-visible,
button.monthly-dashboard-workstream-card:focus-visible,
button.monthly-dashboard-driver-item:focus-visible,
button.monthly-dashboard-branch-row:focus-visible,
button.monthly-dashboard-quick-link:focus-visible,
button.monthly-dashboard-month-chip:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28);
  outline-offset: 2px;
}

.monthly-dashboard-kpi-card {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .65rem;
  min-height: 132px;
  padding: .8rem;
  align-items: start;
}

.monthly-dashboard-kpi-icon,
.monthly-dashboard-action-icon,
.monthly-dashboard-workstream-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  place-items: center;
  background: #e0f2fe;
  color: #075985;
  font-size: 1.1rem;
}

.monthly-dashboard-kpi-body,
.monthly-dashboard-action-body,
.monthly-dashboard-workstream-body,
.monthly-dashboard-driver-body,
.monthly-dashboard-branch-body {
  display: grid;
  gap: .18rem;
  min-width: 0;
}

.monthly-dashboard-kpi-title,
.monthly-dashboard-kpi-sub,
.monthly-dashboard-action-body span,
.monthly-dashboard-workstream-body span,
.monthly-dashboard-driver-body small,
.monthly-dashboard-branch-body span {
  color: #64748b;
  overflow-wrap: anywhere;
}

.monthly-dashboard-kpi-body strong,
.monthly-dashboard-cash-heading strong,
.monthly-dashboard-workstream-body strong,
.monthly-dashboard-driver-body strong,
.monthly-dashboard-branch-row strong {
  color: #0f172a;
  overflow-wrap: anywhere;
}

.monthly-dashboard-kpi-body strong {
  font-size: 1.02rem;
  line-height: 1.18;
}

.monthly-dashboard-delta {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 24px;
  gap: .25rem;
  align-items: center;
  margin-top: .15rem;
  padding: .1rem .45rem;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: .73rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.monthly-dashboard-delta.is-green {
  color: #166534;
  background: #dcfce7;
}

.monthly-dashboard-delta.is-red {
  color: #b91c1c;
  background: #fee2e2;
}

.monthly-dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, .34fr);
  gap: 1rem;
  align-items: start;
}

.monthly-dashboard-panel {
  min-width: 0;
  padding: 1rem;
}

.monthly-dashboard-panel-title {
  display: flex;
  gap: .85rem;
  align-items: start;
  justify-content: space-between;
  margin-bottom: .85rem;
}

.monthly-dashboard-panel-title h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
}

.monthly-dashboard-panel-title p {
  margin: .2rem 0 0;
  color: #64748b;
  font-size: .82rem;
}

.monthly-dashboard-panel-links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: flex-end;
}

.monthly-dashboard-quick-link {
  display: inline-flex;
  min-height: 34px;
  gap: .35rem;
  align-items: center;
  padding: .25rem .55rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: .78rem;
  font-weight: 700;
}

.monthly-dashboard-evidence-grid {
  display: grid;
  grid-template-columns: minmax(16rem, .36fr) minmax(0, 1fr);
  gap: .85rem;
  align-items: stretch;
}

.monthly-dashboard-cash-card {
  display: grid;
  gap: .75rem;
  padding: .85rem;
  background: #f8fafc;
}

.monthly-dashboard-cash-card.is-danger {
  background: #fff7f7;
  border-color: rgba(220, 38, 38, .25);
}

.monthly-dashboard-cash-card.is-warning {
  background: #fffbeb;
  border-color: rgba(217, 119, 6, .25);
}

.monthly-dashboard-cash-heading {
  display: grid;
  gap: .25rem;
}

.monthly-dashboard-cash-heading span,
.monthly-dashboard-cash-status {
  color: #64748b;
}

.monthly-dashboard-cash-heading strong {
  font-size: 1.55rem;
  line-height: 1.15;
}

.monthly-dashboard-cash-breakdown {
  display: grid;
  gap: .5rem;
}

.monthly-dashboard-cash-breakdown > div {
  display: flex;
  gap: .6rem;
  justify-content: space-between;
  padding-top: .45rem;
  border-top: 1px solid #e2e8f0;
}

.monthly-dashboard-cash-breakdown span {
  color: #64748b;
}

.monthly-dashboard-chart-box {
  position: relative;
  min-height: 280px;
  height: 280px;
}

.monthly-dashboard-chart-box canvas {
  width: 100% !important;
  height: 100% !important;
}

.monthly-dashboard-chart-fallback {
  display: grid;
  gap: .55rem;
  height: 100%;
  align-content: center;
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.monthly-dashboard-chart-fallback > div {
  display: flex;
  justify-content: space-between;
}

.monthly-dashboard-month-strip {
  display: grid;
  grid-template-columns: repeat(12, minmax(4.6rem, 1fr));
  gap: .45rem;
  margin-top: .85rem;
  overflow-x: auto;
  padding-bottom: .15rem;
}

.monthly-dashboard-month-chip {
  display: grid;
  min-height: 54px;
  gap: .1rem;
  align-content: center;
  padding: .45rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  text-align: left;
}

.monthly-dashboard-month-chip.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.monthly-dashboard-month-chip.is-previous {
  border-color: #0f766e;
}

.monthly-dashboard-action-list,
.monthly-dashboard-driver-list,
.monthly-dashboard-branch-list {
  display: grid;
  gap: .65rem;
}

.monthly-dashboard-action-card {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .65rem;
  min-height: 72px;
  padding: .75rem;
}

.monthly-dashboard-action-card.is-danger {
  background: #fff7f7;
  border-color: rgba(220, 38, 38, .25);
}

.monthly-dashboard-action-card.is-warning {
  background: #fffbeb;
  border-color: rgba(217, 119, 6, .25);
}

.monthly-dashboard-action-card.is-normal {
  background: #f0fdf4;
  border-color: rgba(22, 101, 52, .18);
}

.monthly-dashboard-action-module,
.monthly-dashboard-action-meta {
  font-size: .76rem;
}

.monthly-dashboard-action-body strong {
  color: #0f172a;
}

.monthly-dashboard-workstream-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .75rem;
}

.monthly-dashboard-workstream-card {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .65rem;
  min-height: 148px;
  padding: .8rem;
}

.monthly-dashboard-workstream-card.is-danger {
  background: #fff7f7;
  border-color: rgba(220, 38, 38, .25);
}

.monthly-dashboard-workstream-card.is-warning {
  background: #fffbeb;
  border-color: rgba(217, 119, 6, .25);
}

.monthly-dashboard-workstream-count {
  display: inline-flex;
  width: fit-content;
  padding: .1rem .4rem;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: .74rem;
  font-weight: 700;
}

.monthly-dashboard-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, .34fr);
  gap: 1rem;
  align-items: start;
}

.monthly-dashboard-driver-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.monthly-dashboard-driver-group {
  display: grid;
  gap: .65rem;
  padding: .85rem;
  background: #f8fafc;
}

.monthly-dashboard-driver-title {
  display: grid;
  gap: .15rem;
}

.monthly-dashboard-driver-title span,
.monthly-dashboard-empty-note {
  color: #64748b;
  font-size: .8rem;
}

.monthly-dashboard-driver-item,
.monthly-dashboard-branch-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .65rem;
  align-items: start;
  min-height: 60px;
  padding: .65rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.monthly-dashboard-rank-number {
  display: grid;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 800;
  place-items: center;
}

.monthly-dashboard-branch-row {
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  align-items: center;
}

.monthly-dashboard-branch-metrics {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: .1rem .4rem;
  color: #64748b;
  font-size: .74rem;
  text-align: right;
}

.monthly-dashboard-branch-metrics strong {
  color: #0f172a;
}

.monthly-dashboard-empty-note {
  padding: .8rem;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.monthly-dashboard-kpi-card.tone-red .monthly-dashboard-kpi-icon,
.monthly-dashboard-action-card.is-danger .monthly-dashboard-action-icon,
.monthly-dashboard-workstream-card.is-danger .monthly-dashboard-workstream-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.monthly-dashboard-kpi-card.tone-amber .monthly-dashboard-kpi-icon,
.monthly-dashboard-workstream-card.tone-amber .monthly-dashboard-workstream-icon {
  background: #fef3c7;
  color: #92400e;
}

.monthly-dashboard-kpi-card.tone-green .monthly-dashboard-kpi-icon,
.monthly-dashboard-action-card.is-normal .monthly-dashboard-action-icon {
  background: #dcfce7;
  color: #166534;
}

.monthly-dashboard-kpi-card.tone-teal .monthly-dashboard-kpi-icon,
.monthly-dashboard-workstream-card.tone-teal .monthly-dashboard-workstream-icon {
  background: #ccfbf1;
  color: #0f766e;
}

.monthly-dashboard-kpi-card.tone-purple .monthly-dashboard-kpi-icon,
.monthly-dashboard-workstream-card.tone-purple .monthly-dashboard-workstream-icon {
  background: #f3e8ff;
  color: #7e22ce;
}

.monthly-dashboard-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(15, 23, 42, .42);
}

.monthly-dashboard-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1051;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(540px, calc(100vw - 24px));
  height: 100vh;
  background: #fff;
  box-shadow: -18px 0 36px rgba(15, 23, 42, .22);
  transform: translateX(104%);
  transition: transform .22s ease;
}

.monthly-dashboard-drawer.open {
  transform: translateX(0);
}

.monthly-dashboard-drawer-header,
.monthly-dashboard-drawer-footer {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.monthly-dashboard-drawer-footer {
  align-items: center;
  border-top: 1px solid #e2e8f0;
  border-bottom: 0;
}

.monthly-dashboard-drawer-header h3 {
  margin: .15rem 0 .2rem;
  color: #0f172a;
  font-size: 1.08rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.monthly-dashboard-drawer-header p {
  margin: 0;
  color: #64748b;
  font-size: .82rem;
  overflow-wrap: anywhere;
}

.monthly-dashboard-drawer-kicker {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: .08rem .5rem;
  border-radius: 8px;
  background: #e0f2fe;
  color: #075985;
  font-size: .72rem;
  font-weight: 800;
}

.monthly-dashboard-drawer.is-danger .monthly-dashboard-drawer-kicker {
  background: #fee2e2;
  color: #b91c1c;
}

.monthly-dashboard-drawer.is-warning .monthly-dashboard-drawer-kicker {
  background: #fef3c7;
  color: #92400e;
}

.monthly-dashboard-drawer-body {
  display: grid;
  gap: .85rem;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
  background: #f8fafc;
}

.monthly-dashboard-drawer-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.monthly-dashboard-drawer-summary-row,
.monthly-dashboard-drawer-empty,
.monthly-dashboard-drawer-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.monthly-dashboard-drawer-summary-row {
  display: grid;
  gap: .15rem;
  padding: .75rem;
}

.monthly-dashboard-drawer-summary-row span,
.monthly-dashboard-drawer-summary-row small,
.monthly-dashboard-drawer-item small,
.monthly-dashboard-drawer-meta {
  color: #64748b;
}

.monthly-dashboard-drawer-summary-row strong {
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.monthly-dashboard-drawer-summary-row.tone-red {
  border-color: rgba(220, 38, 38, .24);
  background: #fff7f7;
}

.monthly-dashboard-drawer-summary-row.tone-amber,
.monthly-dashboard-drawer-summary-row.tone-warning {
  border-color: rgba(217, 119, 6, .24);
  background: #fffbeb;
}

.monthly-dashboard-drawer-summary-row.tone-green {
  border-color: rgba(22, 101, 52, .18);
  background: #f0fdf4;
}

.monthly-dashboard-drawer-summary-row.tone-purple {
  border-color: rgba(126, 34, 206, .22);
  background: #faf5ff;
}

.monthly-dashboard-drawer-list {
  display: grid;
  gap: .65rem;
}

.monthly-dashboard-drawer-empty {
  padding: 1rem;
  color: #64748b;
  text-align: center;
}

.monthly-dashboard-drawer-item {
  display: grid;
  gap: .65rem;
  padding: .85rem;
}

.monthly-dashboard-drawer-item.is-danger {
  border-color: rgba(220, 38, 38, .28);
  background: #fff7f7;
}

.monthly-dashboard-drawer-item.is-warning {
  border-color: rgba(217, 119, 6, .28);
  background: #fffbeb;
}

.monthly-dashboard-drawer-item-head {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  justify-content: space-between;
}

.monthly-dashboard-drawer-item-head > div {
  display: grid;
  gap: .1rem;
  min-width: 0;
}

.monthly-dashboard-drawer-item-head span {
  color: #64748b;
  font-size: .74rem;
}

.monthly-dashboard-drawer-item-head strong,
.monthly-dashboard-drawer-problem strong {
  color: #0f172a;
  overflow-wrap: anywhere;
}

.monthly-dashboard-drawer-item-head em {
  flex: 0 0 auto;
  color: #0f172a;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.monthly-dashboard-drawer-problem {
  display: grid;
  gap: .15rem;
  padding: .55rem .65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.monthly-dashboard-drawer-problem span {
  color: #475569;
  overflow-wrap: anywhere;
}

.monthly-dashboard-drawer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  font-size: .74rem;
}

.monthly-dashboard-drawer-meta span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: .08rem .45rem;
  border-radius: 8px;
  background: #f1f5f9;
}

.monthly-dashboard-drawer-row-link {
  width: fit-content;
  min-height: 34px;
  padding: .3rem .65rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #1d4ed8;
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 1399.98px) {
  .monthly-dashboard-kpi-strip,
  .monthly-dashboard-workstream-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1199.98px) {
  .monthly-dashboard-filter-grid,
  .monthly-dashboard-main-grid,
  .monthly-dashboard-lower-grid,
  .monthly-dashboard-evidence-grid {
    grid-template-columns: 1fr;
  }

  .monthly-dashboard-panel-links {
    justify-content: flex-start;
  }
}

@media (max-width: 767.98px) {
  .monthly-dashboard-actions {
    width: 100%;
  }

  .monthly-dashboard-actions .btn {
    min-height: 44px;
    flex: 1 1 auto;
  }

  .monthly-dashboard-command-bar {
    padding: .85rem;
  }

  .monthly-dashboard-filter-grid,
  .monthly-dashboard-kpi-strip,
  .monthly-dashboard-workstream-grid,
  .monthly-dashboard-driver-grid {
    grid-template-columns: 1fr;
  }

  .monthly-dashboard-kpi-card,
  .monthly-dashboard-action-card,
  .monthly-dashboard-workstream-card,
  .monthly-dashboard-driver-item,
  .monthly-dashboard-branch-row,
  .monthly-dashboard-month-chip,
  .monthly-dashboard-quick-link {
    min-height: 44px;
  }

  .monthly-dashboard-main-grid {
    display: flex;
    flex-direction: column;
  }

  .monthly-dashboard-action-rail {
    order: -1;
  }

  .monthly-dashboard-panel-title {
    display: grid;
  }

  .monthly-dashboard-chart-box {
    min-height: 240px;
    height: 240px;
  }

  .monthly-dashboard-month-strip {
    grid-template-columns: repeat(12, minmax(5.3rem, 1fr));
  }

  .monthly-dashboard-branch-row {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .monthly-dashboard-branch-metrics {
    grid-column: 2;
    grid-template-columns: repeat(4, auto);
    justify-content: start;
    text-align: left;
  }

  .monthly-dashboard-drawer {
    width: 100vw;
  }

  .monthly-dashboard-drawer-summary {
    grid-template-columns: 1fr;
  }

  .monthly-dashboard-drawer-header,
  .monthly-dashboard-drawer-body,
  .monthly-dashboard-drawer-footer {
    padding: .85rem;
  }

  .monthly-dashboard-drawer-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .monthly-dashboard-drawer-footer .btn {
    min-height: 44px;
    width: 100%;
  }
}

/* Monthly Dashboard readability and CRM pre-sale redesign */
.monthly-dashboard-page {
  --md-primary: #1e40af;
  --md-primary-soft: #eff6ff;
  --md-text: #0f172a;
  --md-muted: #64748b;
  --md-border: #dbe3ee;
  --md-surface-soft: #f8fafc;
  min-width: 0;
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
  overflow-x: clip;
  color: var(--md-text);
  font-variant-numeric: tabular-nums;
}

.monthly-dashboard-header-copy {
  margin-top: .35rem;
  color: var(--md-muted);
  font-size: .9rem;
}

.monthly-dashboard-command-bar,
.monthly-dashboard-panel {
  border-color: var(--md-border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

.monthly-dashboard-command-bar {
  gap: 1rem;
  padding: 1.15rem;
}

.monthly-dashboard-command-heading,
.monthly-dashboard-section-heading {
  display: flex;
  gap: 1rem;
  align-items: start;
  justify-content: space-between;
}

.monthly-dashboard-command-heading h3,
.monthly-dashboard-section-heading h3 {
  margin: 0;
  color: var(--md-text);
  font-size: 1rem;
}

.monthly-dashboard-command-heading p,
.monthly-dashboard-section-heading p {
  max-width: 42rem;
  margin: .2rem 0 0;
  color: var(--md-muted);
  font-size: .82rem;
}

.monthly-dashboard-filter-grid {
  grid-template-columns: repeat(3, minmax(12rem, 1fr));
}

.monthly-dashboard-scope-strip {
  justify-content: flex-end;
}

.monthly-dashboard-section-eyebrow {
  display: block;
  margin-bottom: .25rem;
  color: var(--md-primary);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.monthly-dashboard-kpi-section {
  display: grid;
  gap: .75rem;
}

.monthly-dashboard-kpi-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: .65rem;
}

.monthly-dashboard-primary-kpis,
.monthly-dashboard-supporting-kpis {
  display: grid;
  gap: .65rem;
}

.monthly-dashboard-primary-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.monthly-dashboard-supporting-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.monthly-dashboard-kpi-card {
  border-color: var(--md-border);
  border-radius: 10px;
}

.monthly-dashboard-kpi-card.is-primary {
  min-height: 146px;
  padding: 1rem;
}

.monthly-dashboard-kpi-card.is-primary .monthly-dashboard-kpi-body strong {
  font-size: clamp(1.18rem, 1.45vw, 1.55rem);
  line-height: 1.25;
}

.monthly-dashboard-kpi-card.is-compact {
  min-height: 102px;
  padding: .8rem;
}

.monthly-dashboard-kpi-card.is-compact .monthly-dashboard-kpi-sub {
  display: none;
}

.monthly-dashboard-kpi-card.is-compact .monthly-dashboard-delta {
  margin-top: .1rem;
}

.monthly-dashboard-kpi-body strong,
.monthly-dashboard-crm-metric strong,
.monthly-dashboard-crm-stage strong,
.monthly-dashboard-crm-breakdown-metrics b {
  overflow-wrap: normal;
  word-break: normal;
}

.monthly-dashboard-kpi-sub {
  line-height: 1.4;
}

.monthly-dashboard-delta {
  padding: .18rem .5rem;
  font-size: .7rem;
  line-height: 1.35;
}

.monthly-dashboard-main-grid {
  grid-template-columns: minmax(0, 2.15fr) minmax(19rem, .85fr);
}

.monthly-dashboard-panel {
  padding: 1.15rem;
}

.monthly-dashboard-panel-title h3 {
  font-size: 1.05rem;
}

.monthly-dashboard-action-rail {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.monthly-dashboard-crm-panel {
  border-top: 4px solid #2563eb;
  background: linear-gradient(180deg, #f8fbff 0, #fff 9rem);
}

.monthly-dashboard-crm-heading {
  align-items: center;
}

.monthly-dashboard-crm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.monthly-dashboard-crm-state {
  display: flex;
  min-height: 36px;
  gap: .45rem;
  align-items: center;
  margin: -.2rem 0 .85rem;
  padding: .5rem .7rem;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  background: #eff6ff;
  color: #1e40af;
  font-size: .78rem;
}

.monthly-dashboard-crm-state:empty {
  display: none;
}

.monthly-dashboard-crm-state.is-warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.monthly-dashboard-crm-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .65rem;
  margin-bottom: .85rem;
}

.monthly-dashboard-crm-metric,
.monthly-dashboard-crm-overdue-row,
.monthly-dashboard-crm-breakdown-row {
  appearance: none;
  width: 100%;
  border: 1px solid var(--md-border);
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.monthly-dashboard-crm-metric {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: .65rem;
  min-height: 112px;
  padding: .8rem;
  border-radius: 10px;
}

.monthly-dashboard-crm-metric > span:last-child {
  display: grid;
  gap: .15rem;
  min-width: 0;
}

.monthly-dashboard-crm-metric-icon {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 9px;
  place-items: center;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 1.12rem;
}

.monthly-dashboard-crm-metric small,
.monthly-dashboard-crm-metric em {
  color: var(--md-muted);
  font-size: .75rem;
  font-style: normal;
  line-height: 1.35;
}

.monthly-dashboard-crm-metric strong {
  color: var(--md-text);
  font-size: 1.4rem;
}

.monthly-dashboard-crm-metric.tone-red {
  border-color: #fecaca;
  background: #fffafa;
}

.monthly-dashboard-crm-metric.tone-red .monthly-dashboard-crm-metric-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.monthly-dashboard-crm-main-grid,
.monthly-dashboard-crm-breakdown-grid {
  display: grid;
  gap: .85rem;
}

.monthly-dashboard-crm-main-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(20rem, .85fr);
}

.monthly-dashboard-crm-breakdown-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: .85rem;
}

.monthly-dashboard-subpanel {
  min-width: 0;
  padding: .9rem;
  border: 1px solid var(--md-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, .92);
}

.monthly-dashboard-subpanel-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: .7rem;
}

.monthly-dashboard-subpanel-title h4 {
  margin: 0;
  color: var(--md-text);
  font-size: .92rem;
}

.monthly-dashboard-subpanel-title p {
  margin: .15rem 0 0;
  color: var(--md-muted);
  font-size: .74rem;
}

.monthly-dashboard-crm-pipeline,
.monthly-dashboard-crm-overdue-list,
.monthly-dashboard-crm-breakdown-list {
  display: grid;
  gap: .55rem;
}

.monthly-dashboard-crm-stage {
  display: grid;
  gap: .35rem;
  padding: .55rem 0;
  border-bottom: 1px solid #edf2f7;
}

.monthly-dashboard-crm-stage:last-child {
  border-bottom: 0;
}

.monthly-dashboard-crm-stage-heading {
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
}

.monthly-dashboard-crm-stage-heading span {
  display: inline-flex;
  min-width: 0;
  gap: .5rem;
  align-items: center;
  color: #334155;
  font-size: .8rem;
}

.monthly-dashboard-crm-stage-heading b {
  display: grid;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  place-items: center;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: .7rem;
}

.monthly-dashboard-crm-stage-heading strong {
  font-size: .82rem;
  white-space: nowrap;
}

.monthly-dashboard-crm-stage-track,
.monthly-dashboard-crm-breakdown-track {
  display: block;
  overflow: hidden;
  height: .45rem;
  border-radius: 999px;
  background: #e2e8f0;
}

.monthly-dashboard-crm-stage-track span,
.monthly-dashboard-crm-breakdown-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
}

.monthly-dashboard-crm-stage > small {
  color: var(--md-muted);
  font-size: .7rem;
}

.monthly-dashboard-crm-overdue-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: .6rem;
  min-height: 66px;
  align-items: center;
  padding: .6rem;
  border-color: #fee2e2;
  border-radius: 9px;
}

.monthly-dashboard-crm-overdue-avatar {
  display: grid;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  place-items: center;
  background: #fee2e2;
  color: #b91c1c;
}

.monthly-dashboard-crm-overdue-body {
  display: grid;
  min-width: 0;
}

.monthly-dashboard-crm-overdue-body strong {
  overflow: hidden;
  font-size: .82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-crm-overdue-body small,
.monthly-dashboard-crm-overdue-body em {
  overflow: hidden;
  color: var(--md-muted);
  font-size: .7rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-crm-overdue-days {
  color: #b91c1c;
  font-size: .75rem;
  font-weight: 800;
  white-space: nowrap;
}

.monthly-dashboard-crm-breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  min-height: 64px;
  align-items: center;
  padding: .6rem .7rem;
  border-radius: 9px;
}

.monthly-dashboard-crm-breakdown-copy {
  display: grid;
  min-width: 0;
  gap: .15rem;
}

.monthly-dashboard-crm-breakdown-copy strong,
.monthly-dashboard-crm-breakdown-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-dashboard-crm-breakdown-copy strong {
  font-size: .8rem;
}

.monthly-dashboard-crm-breakdown-copy small {
  color: var(--md-muted);
  font-size: .7rem;
}

.monthly-dashboard-crm-breakdown-track {
  height: .3rem;
  margin-top: .2rem;
}

.monthly-dashboard-crm-breakdown-metrics {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0 .25rem;
  align-items: baseline;
  color: var(--md-muted);
  text-align: right;
}

.monthly-dashboard-crm-breakdown-metrics b {
  color: var(--md-text);
  font-size: .95rem;
}

.monthly-dashboard-crm-breakdown-metrics small,
.monthly-dashboard-crm-breakdown-metrics em {
  font-size: .68rem;
  font-style: normal;
}

.monthly-dashboard-crm-breakdown-metrics em {
  grid-column: 1 / -1;
  color: #047857;
}

.monthly-dashboard-crm-metric:hover,
.monthly-dashboard-crm-overdue-row:hover,
.monthly-dashboard-crm-breakdown-row:hover {
  border-color: #93c5fd;
  box-shadow: 0 6px 16px rgba(30, 64, 175, .08);
}

.monthly-dashboard-crm-metric:focus-visible,
.monthly-dashboard-crm-overdue-row:focus-visible,
.monthly-dashboard-crm-breakdown-row:focus-visible,
.monthly-dashboard-drawer a:focus-visible,
.monthly-dashboard-drawer button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .3);
  outline-offset: 2px;
}

.monthly-dashboard-empty-note.is-success {
  display: flex;
  gap: .45rem;
  align-items: center;
  color: #166534;
  background: #f0fdf4;
}

.monthly-dashboard-drawer-open {
  overflow: hidden;
}

.monthly-dashboard-drawer {
  width: min(720px, 96vw);
}

.monthly-dashboard-drawer-body {
  display: grid;
  gap: 1.1rem;
}

.monthly-dashboard-drawer-actions {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: .5rem;
  flex-wrap: wrap;
}

.monthly-dashboard-drawer-action-disabled {
  display: grid;
  min-width: 0;
  gap: .15rem;
}

.monthly-dashboard-drawer-action-disabled small {
  max-width: 18rem;
  color: #64748b;
  font-size: .68rem;
  overflow-wrap: anywhere;
}

.monthly-dashboard-drawer-state {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 0;
  gap: .75rem;
  align-items: center;
  padding: .9rem;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e40af;
}

.monthly-dashboard-drawer-state.is-error {
  border-color: #fecaca;
  background: #fff7f7;
  color: #991b1b;
}

.monthly-dashboard-drawer-state > div {
  display: grid;
  min-width: 0;
  gap: .15rem;
}

.monthly-dashboard-drawer-state strong,
.monthly-dashboard-drawer-state p {
  margin: 0;
  overflow-wrap: anywhere;
}

.monthly-dashboard-drawer-state p {
  font-size: .78rem;
}

#monthlyDashboardDrawerContent {
  display: grid;
  min-width: 0;
  gap: 1.1rem;
}

.monthly-dashboard-drawer-section {
  display: grid;
  gap: .55rem;
}

.monthly-dashboard-drawer-section > h4 {
  margin: 0;
  color: var(--md-text);
  font-size: .85rem;
}

.monthly-dashboard-drawer-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.monthly-dashboard-drawer-item-head em {
  white-space: nowrap;
}

@media (max-width: 1399.98px) {
  .monthly-dashboard-primary-kpis,
  .monthly-dashboard-supporting-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monthly-dashboard-crm-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1199.98px) {
  .monthly-dashboard-main-grid,
  .monthly-dashboard-crm-main-grid,
  .monthly-dashboard-crm-breakdown-grid {
    grid-template-columns: 1fr;
  }

  .monthly-dashboard-action-rail {
    position: static;
    max-height: none;
  }
}

@media (max-width: 767.98px) {
  .monthly-dashboard-command-heading,
  .monthly-dashboard-section-heading,
  .monthly-dashboard-crm-heading {
    display: grid;
  }

  .monthly-dashboard-filter-grid,
  .monthly-dashboard-primary-kpis,
  .monthly-dashboard-supporting-kpis,
  .monthly-dashboard-crm-summary {
    grid-template-columns: 1fr;
  }

  .monthly-dashboard-scope-strip {
    justify-content: flex-start;
  }

  .monthly-dashboard-crm-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .monthly-dashboard-crm-actions .btn {
    min-height: 44px;
  }

  .monthly-dashboard-kpi-card.is-primary,
  .monthly-dashboard-kpi-card.is-compact,
  .monthly-dashboard-crm-metric {
    min-height: 96px;
  }

  .monthly-dashboard-crm-overdue-row {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .monthly-dashboard-crm-overdue-days {
    grid-column: 2;
  }

  .monthly-dashboard-drawer {
    width: 100vw;
  }

  .monthly-dashboard-drawer-summary {
    grid-template-columns: 1fr;
  }

  .monthly-dashboard-drawer-state {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .monthly-dashboard-drawer-state .btn {
    grid-column: 1 / -1;
    min-height: 44px;
    width: 100%;
  }

  .monthly-dashboard-drawer-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .monthly-dashboard-drawer-actions .btn {
    min-height: 44px;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .monthly-dashboard-drawer,
  .monthly-dashboard-kpi-card,
  .monthly-dashboard-action-card,
  .monthly-dashboard-workstream-card,
  .monthly-dashboard-crm-metric,
  .monthly-dashboard-crm-overdue-row,
  .monthly-dashboard-crm-breakdown-row {
    transition: none !important;
  }
}

/* After-sales retention monitor */
.after-sales-header .page-title {
  letter-spacing: 0;
}

.after-sales-page {
  display: grid;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
  color: #1f2937;
}

.after-sales-command {
  position: sticky;
  top: .75rem;
  z-index: 80;
  min-width: 0;
  max-width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(98, 105, 118, .16);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, .08);
  backdrop-filter: blur(10px);
}

.after-sales-command-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .85rem;
  align-items: end;
}

.after-sales-search .form-control {
  min-height: 46px;
  background: #fff;
  border-color: rgba(32, 107, 196, .32);
  box-shadow: inset 0 0 0 1px rgba(32, 107, 196, .04);
}

.after-sales-search .form-control:focus {
  border-color: #206bc4;
  box-shadow: 0 0 0 .2rem rgba(32, 107, 196, .15);
}

.after-sales-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.after-sales-actions .btn {
  min-height: 46px;
  min-width: 7rem;
}

.after-sales-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
  gap: .75rem;
  align-items: end;
  margin-top: .85rem;
}

.after-sales-filter-grid > * {
  min-width: 0;
}

.after-sales-filter-grid > :first-child {
  grid-column: span 2;
}

.after-sales-date-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}

.after-sales-filter {
  position: relative;
}

.after-sales-filter.is-open {
  z-index: 90;
}

.after-sales-filter-toggle {
  display: flex;
  align-items: center;
  min-height: 38px;
  text-align: left;
  overflow: hidden;
}

.after-sales-filter-toggle span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-sales-filter-panel {
  position: absolute;
  top: calc(100% + .4rem);
  left: 0;
  right: auto;
  z-index: 95;
  width: max(100%, 16rem);
  max-width: min(20rem, calc(100vw - 2rem));
  max-height: 19rem;
  padding: .45rem;
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(98, 105, 118, .2);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, .14);
}

.after-sales-filter-panel.is-align-end {
  left: auto;
  right: 0;
}

.after-sales-filter-panel-saleBranch,
.after-sales-filter-panel-returnBranch {
  max-width: min(22rem, calc(100vw - 2rem));
}

.after-sales-filter-panel-activity {
  width: 100%;
  max-width: min(16rem, calc(100vw - 2rem));
}

.after-sales-check {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  gap: .55rem;
  align-items: start;
  width: 100%;
  min-height: 42px;
  padding: .55rem .6rem;
  border-radius: 7px;
  cursor: pointer;
}

.after-sales-check:hover {
  background: #f6f8fb;
}

.after-sales-check input {
  margin-top: .16rem;
}

.after-sales-check strong,
.after-sales-check span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-sales-check span {
  color: #1f2937;
  font-size: .88rem;
  line-height: 1.35;
  white-space: normal;
}

.after-sales-token-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  min-height: 1.6rem;
  margin-top: .8rem;
}

.after-sales-token {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  max-width: 100%;
  padding: .3rem .55rem;
  color: #17406f;
  background: #edf4ff;
  border: 1px solid rgba(32, 107, 196, .14);
  border-radius: 999px;
  font-size: .82rem;
  line-height: 1.2;
}

.after-sales-token button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 999px;
}

.after-sales-token button:hover {
  background: rgba(32, 107, 196, .12);
}

.after-sales-warning {
  margin: .75rem 0 0;
  padding: .55rem .75rem;
}

.after-sales-empty {
  margin-top: .25rem;
}

.after-sales-results {
  display: grid;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.after-sales-answer-strip {
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1rem;
  background: #f8fafc;
  border: 1px solid rgba(98, 105, 118, .14);
  border-radius: 8px;
}

.after-sales-answer-strip strong,
.after-sales-answer-strip span {
  display: block;
}

.after-sales-answer-strip strong {
  font-size: 1.05rem;
}

.after-sales-answer-kicker {
  color: #667085;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.after-sales-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}

.after-sales-kpi,
.after-sales-panel {
  background: #fff;
  border: 1px solid rgba(98, 105, 118, .14);
  border-radius: 8px;
}

.after-sales-kpi {
  display: grid;
  gap: .25rem;
  min-height: 7rem;
  padding: .9rem;
}

button.after-sales-kpi {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  appearance: none;
}

.after-sales-kpi.is-clickable {
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.after-sales-kpi.is-clickable:hover,
.after-sales-kpi.is-clickable:focus-visible {
  border-color: rgba(32, 107, 196, .45);
  box-shadow: 0 10px 22px rgba(32, 107, 196, .12);
  outline: none;
  transform: translateY(-1px);
}

.after-sales-kpi.is-active {
  border-color: #206bc4;
  box-shadow: 0 0 0 .16rem rgba(32, 107, 196, .14);
}

.after-sales-kpi span {
  color: #667085;
  font-size: .8rem;
  font-weight: 600;
}

.after-sales-kpi strong {
  color: #111827;
  font-size: 1.45rem;
  line-height: 1.1;
}

.after-sales-kpi small {
  color: #667085;
}

.after-sales-kpi > i {
  justify-self: end;
  align-self: end;
  color: rgba(32, 107, 196, .42);
  font-size: 1.55rem;
}

.after-sales-tone-green > i {
  color: rgba(47, 179, 68, .5);
}

.after-sales-tone-orange > i {
  color: rgba(245, 159, 0, .5);
}

.after-sales-tone-red > i {
  color: rgba(214, 57, 57, .44);
}

.after-sales-tone-cyan > i,
.after-sales-tone-purple > i {
  color: rgba(32, 107, 196, .46);
}

.after-sales-kpi.is-success {
  border-color: rgba(47, 179, 68, .28);
  background: linear-gradient(180deg, #f4fbf5, #fff);
}

.after-sales-kpi.is-warning {
  border-color: rgba(245, 159, 0, .3);
  background: linear-gradient(180deg, #fff8e8, #fff);
}

.after-sales-kpi.is-danger {
  border-color: rgba(214, 57, 57, .24);
  background: linear-gradient(180deg, #fff5f5, #fff);
}

.after-sales-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 21rem;
  gap: 1rem;
  align-items: start;
}

.after-sales-panel {
  min-width: 0;
  overflow: hidden;
}

.after-sales-panel-title {
  display: flex;
  gap: .75rem;
  align-items: start;
  justify-content: space-between;
  padding: .9rem 1rem;
  border-bottom: 1px solid rgba(98, 105, 118, .12);
}

.after-sales-panel-title h3 {
  margin: 0;
  color: #111827;
  font-size: 1rem;
  font-weight: 700;
}

.after-sales-panel-title p {
  margin: .18rem 0 0;
  color: #667085;
  font-size: .82rem;
}

.after-sales-table-wrap {
  min-width: 0;
  overflow-x: visible;
}

.after-sales-table {
  margin: 0;
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.after-sales-table th,
.after-sales-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.after-sales-table th:nth-child(1) {
  width: 24%;
}

.after-sales-table th:nth-child(2) {
  width: 13%;
}

.after-sales-table th:nth-child(3) {
  width: 12%;
}

.after-sales-table th:nth-child(4) {
  width: 21%;
}

.after-sales-table th:nth-child(5) {
  width: 24%;
}

.after-sales-table th:nth-child(6) {
  width: 4rem;
}

.after-sales-entity {
  display: grid;
  gap: .1rem;
  min-width: 0;
}

.after-sales-entity strong {
  color: #111827;
}

.after-sales-entity span,
.after-sales-muted {
  color: #667085;
  font-size: .82rem;
}

.after-sales-service-line {
  display: grid;
  gap: .12rem;
}

.after-sales-card-list {
  display: none;
  padding: .75rem;
}

.after-sales-row-card {
  display: grid;
  gap: .65rem;
  width: 100%;
  padding: .85rem;
  color: inherit;
  text-align: left;
  background: #fff;
  border: 1px solid rgba(98, 105, 118, .14);
  border-radius: 8px;
}

.after-sales-row-card + .after-sales-row-card {
  margin-top: .75rem;
}

.after-sales-row-card-head {
  display: flex;
  gap: .65rem;
  align-items: start;
  justify-content: space-between;
}

.after-sales-row-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.after-sales-row-card-grid span {
  display: block;
  color: #667085;
  font-size: .76rem;
}

.after-sales-row-card-grid strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-sales-pager {
  display: flex;
  gap: .65rem;
  align-items: center;
  justify-content: flex-end;
  padding: .8rem 1rem;
  color: #667085;
  border-top: 1px solid rgba(98, 105, 118, .12);
}

.after-sales-rail {
  position: sticky;
  top: 8.5rem;
}

.after-sales-action-list,
.after-sales-summary-list,
.after-sales-trend {
  display: grid;
  gap: .65rem;
  padding: .85rem;
}

.after-sales-action-item,
.after-sales-summary-row {
  display: grid;
  gap: .4rem;
  width: 100%;
  padding: .7rem;
  color: inherit;
  text-align: left;
  background: #f8fafc;
  border: 1px solid rgba(98, 105, 118, .1);
  border-radius: 8px;
}

.after-sales-action-item:hover {
  border-color: rgba(32, 107, 196, .26);
  background: #f2f7ff;
}

.after-sales-action-item header,
.after-sales-summary-row header {
  display: flex;
  gap: .5rem;
  align-items: center;
  justify-content: space-between;
}

.after-sales-action-item strong,
.after-sales-summary-row strong {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-sales-action-item p,
.after-sales-summary-row p {
  margin: 0;
  color: #667085;
  font-size: .82rem;
}

.after-sales-action-item .btn {
  justify-self: start;
}

.after-sales-lower-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.after-sales-meter {
  height: .45rem;
  overflow: hidden;
  background: #e9edf3;
  border-radius: 999px;
}

.after-sales-meter span {
  display: block;
  height: 100%;
  background: #206bc4;
  border-radius: inherit;
}

.after-sales-trend-row {
  display: grid;
  grid-template-columns: minmax(8rem, .7fr) minmax(0, 1fr) auto auto;
  gap: .75rem;
  align-items: center;
}

.after-sales-trend-label {
  display: grid;
  gap: .08rem;
}

.after-sales-trend-label strong {
  color: #111827;
}

.after-sales-trend-label span {
  color: #667085;
  font-size: .78rem;
}

.after-sales-trend-bar {
  position: relative;
  height: .55rem;
  overflow: hidden;
  background: #e9edf3;
  border-radius: 999px;
}

.after-sales-trend-bar span,
.after-sales-trend-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2fb344, #206bc4);
  border-radius: inherit;
}

.after-sales-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(15, 23, 42, .34);
}

.after-sales-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  width: min(39rem, 100vw);
  height: 100vh;
  background: #fff;
  box-shadow: -18px 0 45px rgba(15, 23, 42, .2);
  transform: translateX(105%);
  transition: transform .2s ease;
}

.after-sales-drawer.is-open {
  transform: translateX(0);
}

.after-sales-drawer-header {
  display: flex;
  gap: .75rem;
  align-items: start;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid rgba(98, 105, 118, .14);
}

.after-sales-drawer-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.after-sales-drawer-header p {
  margin: .2rem 0 0;
  color: #667085;
}

.after-sales-drawer-kicker {
  color: #206bc4;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.after-sales-drawer-body {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  overflow: auto;
}

.after-sales-drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.after-sales-drawer-note,
.after-sales-drawer-list {
  padding: .8rem;
  background: #f8fafc;
  border: 1px solid rgba(98, 105, 118, .12);
  border-radius: 8px;
}

.after-sales-drawer-note span,
.after-sales-drawer-list span {
  display: block;
  color: #667085;
  font-size: .78rem;
}

.after-sales-drawer-note strong {
  display: block;
  color: #111827;
}

.after-sales-timeline {
  display: grid;
  gap: .65rem;
}

.after-sales-timeline-item {
  display: grid;
  gap: .25rem;
  padding: .75rem;
  border: 1px solid rgba(98, 105, 118, .12);
  border-radius: 8px;
}

.after-sales-timeline-item header {
  display: flex;
  gap: .5rem;
  align-items: start;
  justify-content: space-between;
}

.after-sales-timeline-item p {
  margin: 0;
  color: #667085;
  font-size: .82rem;
}

@media (max-width: 1199.98px) {
  .after-sales-main-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .after-sales-rail {
    position: static;
  }

  .after-sales-lower-grid,
  .after-sales-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .after-sales-command-main {
    grid-template-columns: 1fr;
  }

  .after-sales-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .after-sales-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .after-sales-filter-grid > :first-child {
    grid-column: 1 / -1;
  }

  .after-sales-table-wrap {
    display: none;
  }

  .after-sales-card-list {
    display: grid;
  }
}

@media (max-width: 767.98px) {
  .after-sales-command {
    position: static;
    padding: .85rem;
  }

  .after-sales-filter-grid,
  .after-sales-date-pair,
  .after-sales-lower-grid,
  .after-sales-kpi-grid {
    grid-template-columns: 1fr;
  }

  .after-sales-filter-panel {
    position: fixed;
    inset: auto .75rem .75rem .75rem;
    width: auto;
    max-width: none;
    max-height: 60vh;
  }

  .after-sales-answer-strip {
    display: grid;
  }

  .after-sales-row-card-grid,
  .after-sales-drawer-grid,
  .after-sales-trend-row {
    grid-template-columns: 1fr;
  }

  .after-sales-pager {
    justify-content: center;
  }

  .after-sales-drawer {
    width: 100vw;
  }
}

@media (max-width: 575.98px) {
  .after-sales-header .action-toolbar {
    width: 100%;
  }

  .after-sales-header .action-toolbar .btn,
  .after-sales-search .form-control {
    width: 100%;
  }

  .after-sales-row-card-head {
    display: grid;
  }

  .after-sales-token {
    width: 100%;
    justify-content: space-between;
    border-radius: 8px;
  }
}
/* Tax invoice workbench */
.tax-invoice-workbench {
    max-width: 100%;
    overflow-x: clip;
}

.tax-invoice-page-header {
    max-width: 100%;
}

.tax-invoice-load-warning {
    border-radius: 8px;
    margin-bottom: 0;
}

.tax-invoice-action-status {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

.tax-task-home,
.tax-flow-card,
.tax-review-panel {
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.tax-task-home,
.tax-review-panel {
    padding: 18px;
}

.tax-workspace,
.tax-wizard {
    max-width: 100%;
    min-width: 0;
}

.tax-task-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tax-task-intro h3,
.tax-workspace-header h3,
.tax-section-heading h3 {
    margin: 0;
    color: #111827;
    font-size: 1.1rem;
}

.tax-task-intro p,
.tax-workspace-header p,
.tax-section-heading p {
    margin: 4px 0 0;
    color: #667085;
}

.tax-task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 14px;
}

.tax-task-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px 14px;
    align-items: start;
    min-height: 148px;
    padding: 18px;
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    text-align: left;
}

.tax-task-card:hover,
.tax-task-card:focus {
    border-color: #206bc4;
    box-shadow: 0 0 0 0.18rem rgba(32, 107, 196, 0.12);
}

.tax-task-card strong {
    display: block;
    color: #111827;
    font-size: 1.02rem;
}

.tax-task-card span:last-child {
    grid-column: 2;
    color: #667085;
    font-size: 0.88rem;
    line-height: 1.55;
}

.tax-task-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    font-size: 1.3rem;
}

.tax-workspace-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.tax-flow-card {
    padding: 14px;
    box-shadow: none;
}

.tax-flow-filter {
    display: grid;
    gap: 12px;
    align-items: end;
}

.tax-flow-filter > *,
.tax-batch-save > *,
.tax-table-toolbar > * {
    min-width: 0;
}

.tax-flow-filter-per-car {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr));
}

.tax-flow-filter-batch {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr));
}

.tax-flow-filter-wholesale-other {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr));
}

.tax-flow-filter-review {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 142px), 1fr));
}

.tax-field-wide {
    grid-column: span 2;
    min-width: 0;
}

.tax-flow-actions,
.tax-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.tax-flow-actions {
    grid-column: span 2;
    justify-content: flex-end;
}

.tax-flow-actions .btn {
    flex: 1 1 104px;
    min-height: 40px;
    min-width: 0;
    white-space: nowrap;
}

.tax-flow-filter .form-control,
.tax-flow-filter .form-select,
.tax-line-entry .form-control,
.tax-inline-input,
.tax-batch-save .form-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #fff;
    border-color: #b8c7dc;
}

.tax-flow-filter .form-control:focus,
.tax-flow-filter .form-select:focus,
.tax-line-entry .form-control:focus,
.tax-inline-input:focus,
.tax-batch-save .form-control:focus {
    border-color: #206bc4;
    box-shadow: 0 0 0 0.2rem rgba(32, 107, 196, 0.12);
}

.tax-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tax-sale-card-list {
    display: grid;
    gap: 12px;
}

.tax-sale-card {
    max-width: 100%;
    min-width: 0;
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.tax-sale-card-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid #edf2f7;
    background: #f8fbff;
}

.tax-sale-main h4 {
    margin: 8px 0 4px;
    color: #111827;
    font-size: 1.05rem;
}

.tax-sale-main p {
    margin: 0;
    color: #667085;
}

.tax-sale-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tax-sale-meta span,
.tax-line-amount span {
    display: block;
    color: #667085;
    font-size: 0.75rem;
    font-weight: 600;
}

.tax-sale-meta strong,
.tax-line-amount strong {
    display: block;
    margin-top: 3px;
    color: #111827;
    font-size: 0.86rem;
}

.tax-sale-card-note {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 16px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.86rem;
}

.tax-sale-lines {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
}

.tax-line-entry {
    display: grid;
    grid-template-columns: minmax(150px, 1.05fr) repeat(3, minmax(0, 0.85fr)) minmax(105px, 0.65fr);
    gap: 12px;
    align-items: end;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e6edf5;
    border-radius: 8px;
    background: #fff;
}

.tax-line-entry-readonly {
    background: #f8fafc;
    border-color: #cfe0f5;
}

.tax-line-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    min-width: 0;
}

.tax-line-check strong,
.tax-line-check small {
    display: block;
}

.tax-line-check small,
.tax-line-amount small {
    color: #667085;
}

.tax-line-readonly-label {
    align-self: center;
}

.tax-line-recorded-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e7f0ff;
    color: #0b5cad;
    flex: 0 0 auto;
}

.tax-line-readonly-field {
    min-width: 0;
    align-self: center;
}

.tax-line-readonly-field span {
    display: block;
    color: #667085;
    font-size: 12px;
}

.tax-line-readonly-field strong {
    display: block;
    color: #172033;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.tax-line-readonly-action {
    align-self: center;
    display: flex;
    justify-content: flex-end;
}

.tax-recorded-invoice-cell {
    min-width: 170px;
}

.tax-line-amount {
    align-self: center;
}

.tax-sale-card-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid #edf2f7;
}

.tax-wizard-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tax-wizard-steps span {
    padding: 10px 12px;
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    background: #f8fafc;
    color: #667085;
    font-weight: 700;
    text-align: center;
}

.tax-wizard-steps span.active {
    border-color: #206bc4;
    background: #eaf3ff;
    color: #0f4c9a;
}

.tax-batch-summary,
.tax-batch-save {
    display: grid;
    gap: 12px;
    align-items: end;
}

.tax-batch-summary {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 14px;
    border: 1px solid #e6edf5;
    border-radius: 8px;
    background: #f8fafc;
}

.tax-batch-summary span {
    display: block;
    color: #667085;
}

.tax-batch-total {
    text-align: right;
}

.tax-batch-total strong {
    display: block;
    color: #111827;
    font-size: 1.25rem;
}

.tax-batch-save {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    padding: 14px;
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    background: #fff;
}

.tax-batch-save .btn {
    min-height: 40px;
    white-space: nowrap;
}

.tax-review-switch {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tax-report-kpi {
    position: relative;
    min-width: 0;
    padding: 16px;
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    text-align: left;
    overflow: hidden;
}

.tax-report-kpi span {
    display: block;
    color: #667085;
    font-weight: 600;
    font-size: 0.82rem;
}

.tax-report-kpi strong {
    display: block;
    margin-top: 6px;
    color: #111827;
    font-size: 1.45rem;
    line-height: 1.1;
}

.tax-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.tax-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    border: 1px solid #e6edf5;
    border-radius: 8px;
    background: #fff;
}

.tax-invoice-table {
    margin-bottom: 0;
    min-width: 980px;
}

.tax-batch-table {
    min-width: 900px;
}

.tax-wholesale-other-table {
    min-width: 1120px;
}

.tax-invoice-table th {
    background: #f8fafc;
    color: #526071;
    font-size: 0.78rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.tax-invoice-table td {
    vertical-align: middle;
}

.tax-check-col {
    width: 42px;
}

.tax-state-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 96px;
    padding: 18px;
    border: 1px solid #e6edf5;
    border-radius: 8px;
    background: #fff;
    text-align: left;
}

.tax-state-block > i,
.tax-state-block > .spinner-border {
    flex: 0 0 auto;
    font-size: 1.5rem;
}

.tax-state-block strong {
    display: block;
    color: #1f2937;
    font-size: 0.95rem;
}

.tax-state-block p {
    margin: 4px 0 0;
    color: #667085;
}

.tax-state-warning {
    justify-content: flex-start;
    border-color: #f5c26b;
    background: #fff8e8;
}

.tax-state-warning strong {
    color: #8a4b08;
}

.tax-state-warning p {
    color: #69410e;
    overflow-wrap: anywhere;
}

.tax-inline-input {
    min-width: 126px;
    max-width: 100%;
}

.tax-toolbar-actions {
    justify-content: flex-end;
}

.tax-toolbar-actions .btn-group {
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
}

.tax-toolbar-actions .btn-group > .btn {
    flex: 1 1 auto;
}

.tax-sale-main h4,
.tax-sale-main p,
.tax-sale-meta strong,
.tax-line-check span,
.tax-line-amount strong,
.tax-line-amount small,
.tax-table-wrap td {
    overflow-wrap: anywhere;
}

.tax-report-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.tax-invoice-drawer {
    width: min(760px, 100vw);
}

.tax-drawer-section {
    border: 1px solid #e6edf5;
    border-radius: 8px;
    padding: 14px;
    background: #fff;
}

.tax-drawer-field span {
    display: block;
    color: #667085;
    font-size: 0.78rem;
}

.tax-drawer-field strong {
    display: block;
    margin-top: 4px;
    color: #111827;
}

.tax-drawer-line,
.tax-audit-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #edf2f7;
}

.tax-drawer-line:last-child,
.tax-audit-line:last-child {
    border-bottom: 0;
}

.tax-audit-line span {
    color: #667085;
    font-size: 0.8rem;
}

@media (max-width: 1199.98px) {
    .tax-task-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tax-sale-card-header {
        grid-template-columns: 1fr;
    }

    .tax-report-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .tax-field-wide,
    .tax-flow-actions {
        grid-column: 1 / -1;
    }

    .tax-flow-actions {
        justify-content: stretch;
    }

    .tax-line-entry {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tax-line-check,
    .tax-line-amount {
        grid-column: 1 / -1;
    }

    .tax-batch-summary {
        grid-template-columns: 1fr;
    }

    .tax-batch-total {
        text-align: left;
    }
}

@media (max-width: 767.98px) {
    .tax-task-grid {
        grid-template-columns: 1fr;
    }

    .tax-workspace-header,
    .tax-table-toolbar {
        grid-template-columns: 1fr;
        display: grid;
    }

    .tax-flow-filter-per-car,
    .tax-flow-filter-batch,
    .tax-flow-filter-wholesale-other,
    .tax-flow-filter-review,
    .tax-line-entry,
    .tax-batch-save,
    .tax-batch-summary,
    .tax-sale-meta {
        grid-template-columns: 1fr;
    }

    .tax-field-wide,
    .tax-flow-actions {
        grid-column: auto;
    }

    .tax-field-wide {
        grid-column: 1 / -1;
    }

    .tax-flow-actions,
    .tax-toolbar-actions,
    .tax-sale-card-footer {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .tax-toolbar-actions .btn,
    .tax-flow-actions .btn,
    .tax-sale-card-footer .btn,
    .tax-batch-save .btn {
        width: 100%;
    }

    .tax-report-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tax-report-kpi {
        padding: 12px;
    }

    .tax-report-kpi strong {
        font-size: 1.2rem;
    }

    .tax-invoice-table {
        min-width: 760px;
    }
}

@media (max-width: 420px) {
    .tax-report-kpis {
        grid-template-columns: 1fr;
    }

    .tax-task-home,
    .tax-review-panel {
        padding: 12px;
    }
}

/* LYY Helper */
.lyy-helper {
    position: fixed;
    right: 22px;
    bottom: 24px;
    z-index: 1080;
    font-family: inherit;
}

.lyy-helper.is-hidden {
    display: none;
}

.lyy-helper.is-open {
    z-index: 20100;
}

.lyy-helper.is-custom-position {
    right: auto;
    bottom: auto;
}

.lyy-helper-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 66px;
    height: 66px;
    min-width: 66px;
    max-width: 66px;
    min-height: 66px;
    padding: 8px;
    border: 1px solid rgba(190, 18, 60, 0.2);
    border-radius: 999px;
    color: #17365d;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 52%, #fff1f2 100%);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.2);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.lyy-helper-toggle:hover,
.lyy-helper-toggle:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
}

.lyy-helper.is-dragging .lyy-helper-toggle {
    cursor: grabbing;
    transform: scale(1.02);
}

.lyy-helper-toggle img {
    position: relative;
    width: 48px;
    height: 48px;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: inset 0 0 0 2px rgba(32, 107, 196, 0.12);
}

.lyy-helper-toggle-glow {
    position: absolute;
    inset: 8px auto auto 10px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.2);
    filter: blur(8px);
}

.lyy-helper-toggle-text {
    display: none;
    font-weight: 700;
    font-size: 0.82rem;
    white-space: nowrap;
}

.lyy-helper-panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    z-index: 1;
    width: min(410px, calc(100vw - 28px));
    height: min(650px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(32, 107, 196, 0.2);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.lyy-helper-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #153a67 0%, #206bc4 72%, #d63939 100%);
}

.lyy-helper-header-robot {
    width: 44px;
    height: 44px;
    overflow: hidden;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.26);
}

.lyy-helper-header-robot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.lyy-helper-header-text {
    min-width: 0;
    flex: 1;
}

.lyy-helper-title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.1;
}

.lyy-helper-subtitle {
    font-size: 0.78rem;
    opacity: 0.9;
}

.lyy-helper-hide,
.lyy-helper-close {
    color: #ffffff;
}

.lyy-helper-reopen {
    position: fixed;
    top: 12px;
    right: 14px;
    z-index: 20120;
    width: 48px;
    height: 48px;
    padding: 5px;
    border: 1px solid rgba(32, 107, 196, 0.22);
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.24);
}

.lyy-helper-reopen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
}

.lyy-helper-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
    background: #f6f8fb;
}

.lyy-helper-message {
    display: flex;
    margin-bottom: 10px;
}

.lyy-helper-message-user {
    justify-content: flex-end;
}

.lyy-helper-bubble {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.45;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.lyy-helper-message-bot .lyy-helper-bubble {
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 5px;
}

.lyy-helper-message-user .lyy-helper-bubble {
    color: #ffffff;
    background: #206bc4;
    border-bottom-right-radius: 5px;
}

.lyy-helper-suggestions,
.lyy-helper-choice-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 12px;
}

.lyy-helper-suggestions button,
.lyy-helper-choice {
    border: 1px solid rgba(32, 107, 196, 0.18);
    border-radius: 999px;
    background: #ffffff;
    color: #17406d;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 7px 10px;
    text-align: left;
}

.lyy-helper-choice {
    display: flex;
    flex-direction: column;
    min-width: 135px;
    border-radius: 12px;
}

.lyy-helper-choice.is-active {
    color: #ffffff;
    background: #206bc4;
    border-color: #206bc4;
}

.lyy-helper-choice.is-active small {
    color: rgba(255, 255, 255, 0.82);
}

.lyy-helper-choice small {
    color: #667085;
    font-weight: 500;
}

.lyy-helper-summary,
.lyy-helper-card {
    margin: 10px 0;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-left: 5px solid #2563eb;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.lyy-helper-card-source-sale { border-left-color: #16a34a; }
.lyy-helper-card-source-repair { border-left-color: #dc2626; }
.lyy-helper-card-source-registration { border-left-color: #4f46e5; }
.lyy-helper-card-source-deposit { border-left-color: #0891b2; }
.lyy-helper-card-source-part_sale { border-left-color: #ea580c; }
.lyy-helper-card-source-part_stock { border-left-color: #0f766e; }
.lyy-helper-card-source-secondhand { border-left-color: #64748b; }
.lyy-helper-card-source-vehicle_stock { border-left-color: #ca8a04; }
.lyy-helper-card-source-vehicle_movement { border-left-color: #2563eb; }
.lyy-helper-card-source-customer { border-left-color: #0d9488; }
.lyy-helper-card-source-payments,
.lyy-helper-card-source-outstanding_customers { border-left-color: #9333ea; }

.lyy-helper-summary-title {
    color: #17365d;
    font-weight: 800;
    margin-bottom: 8px;
}

.lyy-helper-summary-desc {
    color: #667085;
    font-size: 0.82rem;
    margin-bottom: 8px;
}

.lyy-helper-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.lyy-helper-metric {
    min-width: 0;
    padding: 8px;
    border-radius: 10px;
    background: #f8fafc;
}

.lyy-helper-metric span {
    display: block;
    color: #667085;
    font-size: 0.72rem;
}

.lyy-helper-metric strong {
    display: block;
    color: #17365d;
    font-size: 0.9rem;
    word-break: break-word;
}

.lyy-helper-metric-danger strong {
    color: #c92a2a;
}

.lyy-helper-metric-success strong {
    color: #087f5b;
}

.lyy-helper-card-list {
    display: grid;
    gap: 10px;
}

.lyy-helper-grouped-results {
    display: grid;
    gap: 12px;
    margin: 10px 0;
}

.lyy-helper-source-group {
    min-width: 0;
    padding: 10px;
    border: 1px solid #dbe7f6;
    border-radius: 12px;
    background: #f8fbff;
}

.lyy-helper-source-group-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.lyy-helper-source-group-title {
    color: #17365d;
    font-size: 0.88rem;
    font-weight: 800;
}

.lyy-helper-source-group-meta {
    color: #667085;
    font-size: 0.75rem;
}

.lyy-helper-source-filter {
    flex: 0 0 auto;
    border: 1px solid rgba(32, 107, 196, 0.22);
    border-radius: 999px;
    background: #ffffff;
    color: #17406d;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 8px;
    white-space: nowrap;
}

.lyy-helper-card-head,
.lyy-helper-card-foot {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.lyy-helper-card-title {
    color: #17365d;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.lyy-helper-card-subtitle,
.lyy-helper-card-desc,
.lyy-helper-card-foot span {
    color: #667085;
    font-size: 0.78rem;
}

.lyy-helper-card-amount {
    flex: 0 0 auto;
    color: #0f766e;
    font-size: 0.88rem;
    white-space: nowrap;
}

.lyy-helper-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.lyy-helper-card-badges span {
    padding: 3px 7px;
    border-radius: 999px;
    color: #17406d;
    background: #e7f1ff;
    font-size: 0.72rem;
    font-weight: 700;
}

.lyy-helper-card-source-sale .lyy-helper-card-badges span.is-source { color: #166534; background: #dcfce7; }
.lyy-helper-card-source-repair .lyy-helper-card-badges span.is-source { color: #991b1b; background: #fee2e2; }
.lyy-helper-card-source-registration .lyy-helper-card-badges span.is-source { color: #3730a3; background: #e0e7ff; }
.lyy-helper-card-source-deposit .lyy-helper-card-badges span.is-source { color: #155e75; background: #cffafe; }
.lyy-helper-card-source-part_sale .lyy-helper-card-badges span.is-source { color: #9a3412; background: #ffedd5; }
.lyy-helper-card-source-part_stock .lyy-helper-card-badges span.is-source { color: #115e59; background: #ccfbf1; }
.lyy-helper-card-source-secondhand .lyy-helper-card-badges span.is-source { color: #334155; background: #e2e8f0; }
.lyy-helper-card-source-vehicle_stock .lyy-helper-card-badges span.is-source { color: #854d0e; background: #fef3c7; }
.lyy-helper-card-source-vehicle_movement .lyy-helper-card-badges span.is-source { color: #1d4ed8; background: #dbeafe; }
.lyy-helper-card-source-customer .lyy-helper-card-badges span.is-source { color: #115e59; background: #ccfbf1; }

.lyy-helper-card-badges span.is-rank {
    color: #5b21b6;
    background: #ede9fe;
}

.lyy-helper-card-highlights {
    margin: 8px 0 0;
    padding-left: 17px;
    color: #334155;
    font-size: 0.78rem;
}

.lyy-helper-card-foot {
    align-items: center;
    margin-top: 10px;
}

.lyy-helper-detail-modal {
    z-index: 20180;
}

.lyy-helper-detail-backdrop {
    z-index: 20170;
}

.lyy-helper-detail-modal .modal-dialog {
    max-width: min(720px, calc(100vw - 28px));
}

.lyy-helper-detail-modal .modal-content {
    border: 1px solid rgba(32, 107, 196, 0.18);
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.lyy-helper-detail-modal .modal-header {
    align-items: flex-start;
    background: #f8fbff;
    border-bottom-color: #dbe7f6;
}

.lyy-helper-detail-summary {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
}

.lyy-helper-detail-summary .lyy-helper-card-badges {
    margin-top: 0;
}

.lyy-helper-detail-summary p {
    margin: 8px 0 0;
    color: #4b5563;
    font-size: 0.88rem;
}

.lyy-helper-detail-section {
    padding: 12px 0;
    border-top: 1px solid #eef2f7;
}

.lyy-helper-detail-section:first-of-type {
    border-top: 0;
}

.lyy-helper-detail-section h6 {
    margin: 0 0 9px;
    color: #0f3b66;
    font-weight: 800;
}

.lyy-helper-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}

.lyy-helper-detail-field {
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    background: #ffffff;
}

.lyy-helper-detail-field.is-wide {
    grid-column: 1 / -1;
}

.lyy-helper-detail-field span {
    display: block;
    color: #667085;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.lyy-helper-detail-field strong {
    display: block;
    color: #111827;
    font-size: 0.9rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.lyy-helper-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.lyy-helper-form .form-control {
    min-width: 0;
    border-radius: 999px;
}

.lyy-helper-form .btn {
    flex: 0 0 auto;
    border-radius: 50%;
}

.lyy-helper-loading .lyy-helper-bubble {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.lyy-helper-loading-text {
    margin-left: 4px;
    color: #17406d;
    font-size: 0.78rem;
    font-weight: 700;
}

.lyy-helper-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #206bc4;
    animation: lyy-helper-pulse 1.1s infinite ease-in-out;
}

.lyy-helper-dot:nth-child(2) {
    animation-delay: 0.14s;
}

.lyy-helper-dot:nth-child(3) {
    animation-delay: 0.28s;
}

@keyframes lyy-helper-pulse {
    0%,
    80%,
    100% {
        opacity: 0.32;
        transform: scale(0.78);
    }

    40% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 767.98px) {
    .lyy-helper,
    .lyy-helper.is-custom-position {
        left: auto !important;
        top: auto !important;
        right: 12px !important;
        bottom: 14px !important;
    }

    .lyy-helper.is-open {
        inset: 0;
        z-index: 20100;
        pointer-events: none;
    }

    .lyy-helper-detail-grid {
        grid-template-columns: 1fr;
    }

    .lyy-helper-toggle-text {
        display: none;
    }

    .lyy-helper-toggle {
        position: absolute;
        right: 12px;
        bottom: 14px;
        pointer-events: auto;
        min-width: 62px;
        padding: 7px;
    }

    .lyy-helper-panel {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        height: min(78vh, 650px);
        border-radius: 18px;
        pointer-events: auto;
    }

    .lyy-helper-metrics {
        grid-template-columns: 1fr;
    }

    .lyy-helper-source-group-head {
        align-items: stretch;
        flex-direction: column;
    }

    .lyy-helper-source-filter {
        width: 100%;
        text-align: center;
    }
}
.manual-operation-status {
  border: 1px solid #dbe7f5;
  border-left-width: 4px;
  border-radius: 8px;
  padding: 0.75rem;
  background: #f8fbff;
  color: #1f2d3d;
}

.manual-operation-status-info {
  border-left-color: #206bc4;
  background: #f0f6ff;
}

.manual-operation-status-success {
  border-left-color: #2fb344;
  background: #effaf2;
}

.manual-operation-status-danger {
  border-left-color: #d63939;
  background: #fff1f1;
}

.tax-issue-page {
  display: grid;
  gap: 1rem;
}

.tax-issue-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(5, minmax(120px, 1fr)) auto;
  gap: 0.75rem;
  align-items: end;
  padding: 1rem;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
}

.tax-issue-keyword {
  min-width: 220px;
}

.tax-issue-actions {
  display: flex;
  justify-content: flex-end;
}

.tax-issue-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 0.75rem;
}

.tax-issue-kpi {
  min-height: 74px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tax-issue-kpi span {
  color: #667085;
  font-size: 0.78rem;
}

.tax-issue-kpi strong {
  color: #1f2937;
  font-size: 1.35rem;
  line-height: 1.2;
}

.tax-issue-kpi-money strong {
  color: #0f766e;
}

.tax-document-lifecycle-guide {
  display: grid;
  gap: 0.75rem;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  background: #f8fbff;
}

.tax-document-lifecycle-heading {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
}

.tax-document-lifecycle-heading h3 {
  margin: 0.15rem 0 0;
  color: #1e3a5f;
  font-size: 1rem;
}

.tax-document-lifecycle-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tax-document-lifecycle-steps li {
  display: flex;
  min-width: 0;
  gap: 0.55rem;
  align-items: flex-start;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 0.65rem;
  background: #fff;
}

.tax-document-lifecycle-steps li > span {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  min-width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: #e8f1ff;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 800;
}

.tax-document-lifecycle-steps strong,
.tax-document-lifecycle-steps small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.tax-document-lifecycle-steps small {
  margin-top: 0.15rem;
  color: #667085;
  font-size: 0.75rem;
  line-height: 1.35;
}

.tax-document-lifecycle-steps .is-abbreviated {
  border-color: #c7d2fe;
  background: #f5f7ff;
}

.tax-issue-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid #dbe3ef;
}

.tax-issue-tabs button {
  border: 0;
  background: transparent;
  color: #475467;
  padding: 0.65rem 0.9rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}

.tax-issue-tabs button.active {
  color: #206bc4;
  border-bottom-color: #206bc4;
}

.tax-issue-panel {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
}

.tax-issue-table-wrap {
  overflow-x: auto;
}

.tax-issue-table {
  min-width: 980px;
  margin-bottom: 0;
}

.tax-issue-table th {
  white-space: nowrap;
  color: #475467;
  font-size: 0.78rem;
}

.tax-issue-table td {
  vertical-align: middle;
}

.tax-document-next-step,
.tax-document-source-hint {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  line-height: 1.35;
}

.tax-document-next-step {
  color: #365a82;
  font-weight: 600;
}

.tax-document-source-hint {
  color: #7c5d16;
}

.tax-document-source-hint > i {
  margin-right: 0.2rem;
}

.tax-issue-table .btn-list {
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tax-table-empty-row td {
  text-align: center !important;
}

.tax-issue-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-top: 1px solid #edf1f7;
}

.tax-page-jump {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  white-space: nowrap;
}

.tax-page-jump-input {
  width: 4.5rem;
  text-align: center;
}

.tax-issue-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #475467;
}

.tax-issue-drawer {
  width: min(720px, 92vw);
}

.tax-drawer-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 0.75rem;
}

.tax-drawer-summary div {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 0.75rem;
  background: #ffffff;
}

.tax-drawer-summary span {
  display: block;
  color: #667085;
  font-size: 0.75rem;
}

.tax-drawer-summary strong {
  display: block;
  margin-top: 0.25rem;
  color: #1f2937;
}

.tax-drawer-address {
  margin-top: 0.75rem;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 0.75rem;
  color: #475467;
  background: #f8fafc;
}

.tax-manual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.tax-manual-wide {
  grid-column: 1 / -1;
}

.tax-manual-counterparty-lookup {
  position: relative;
}

.tax-manual-counterparty-results {
  position: absolute;
  z-index: 1080;
  top: calc(100% + 0.25rem);
  right: 0;
  left: 0;
  max-height: 20rem;
  overflow-y: auto;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0.75rem 2rem rgba(31, 41, 55, 0.16);
}

.tax-manual-counterparty-option {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-bottom: 1px solid #edf1f7;
  color: #1f2937;
  background: #fff;
  text-align: left;
  overflow-wrap: anywhere;
}

.tax-manual-counterparty-option:last-child {
  border-bottom: 0;
}

.tax-manual-counterparty-option:hover,
.tax-manual-counterparty-option.active {
  background: #eef6ff;
}

.tax-manual-counterparty-option-meta,
.tax-manual-counterparty-empty {
  color: #667085;
  font-size: 0.82rem;
}

.tax-manual-counterparty-empty {
  padding: 0.75rem;
}

.tax-daily-summary-shell {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.tax-daily-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.tax-daily-summary-head h3,
.tax-daily-summary-section-title h4 {
  margin: 0;
  color: #1f2937;
}

.tax-daily-summary-head p,
.tax-daily-summary-section-title span {
  margin: 0.25rem 0 0;
  color: #667085;
  font-size: 0.86rem;
}

.tax-daily-summary-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 0.75rem;
  align-items: end;
}

.tax-daily-summary-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.tax-daily-summary-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 0.75rem;
}

.tax-daily-summary-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tax-daily-source-chip {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0.5rem 0.65rem;
  font-size: 0.86rem;
}

.tax-daily-source-chip strong,
.tax-daily-source-chip em {
  font-style: normal;
  color: #1e3a8a;
}

.tax-daily-summary-section {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.tax-daily-summary-section-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #edf1f7;
  background: #f8fafc;
}

#taxCreditDebitNotesPage .tax-issue-toolbar {
  grid-template-columns: minmax(220px, 2fr) repeat(6, minmax(120px, 1fr)) auto;
}

#taxCreditDebitNotesPage .tax-issue-kpis {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.tax-adjust-source-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 0.75rem;
}

.tax-adjust-source-summary div,
.tax-adjust-modal-totals div {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.75rem;
}

.tax-adjust-source-summary span,
.tax-adjust-modal-totals span {
  display: block;
  color: #667085;
  font-size: 0.75rem;
}

.tax-adjust-source-summary strong,
.tax-adjust-modal-totals strong {
  display: block;
  margin-top: 0.25rem;
  color: #1f2937;
}

.tax-adjust-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.tax-adjust-form-wide {
  grid-column: 1 / -1;
}

.tax-adjust-line-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tax-adjust-line-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
  max-height: 360px;
  overflow: auto;
}

.tax-adjust-line-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 0.75rem;
  background: #ffffff;
}

.tax-adjust-line-row .form-check {
  margin-bottom: 0;
}

.tax-adjust-line-row .form-check-label strong,
.tax-adjust-line-row .form-check-label span {
  display: block;
}

.tax-adjust-line-row .form-check-label span {
  margin-top: 0.2rem;
  color: #667085;
  font-size: 0.78rem;
}

.tax-adjust-modal-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

@media (max-width: 1100px) {
  .tax-issue-toolbar,
  #taxCreditDebitNotesPage .tax-issue-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tax-daily-summary-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tax-issue-actions {
    justify-content: stretch;
  }

  .tax-issue-actions .btn,
  .tax-daily-summary-actions .btn {
    width: 100%;
  }

  .tax-issue-kpis,
  #taxCreditDebitNotesPage .tax-issue-kpis,
  .tax-daily-summary-kpis,
  .tax-adjust-source-summary,
  .tax-adjust-form-grid,
  .tax-adjust-modal-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tax-document-lifecycle-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .tax-issue-toolbar,
  .tax-manual-grid,
  .tax-drawer-summary,
  .tax-daily-summary-controls,
  .tax-daily-summary-kpis,
  .tax-adjust-source-summary,
  .tax-adjust-form-grid,
  .tax-adjust-modal-totals,
  .tax-adjust-line-row {
    grid-template-columns: 1fr;
  }

  .tax-issue-kpis {
    grid-template-columns: 1fr;
  }

  .tax-document-lifecycle-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .tax-document-lifecycle-steps {
    grid-template-columns: 1fr;
  }

  .tax-daily-summary-head,
  .tax-daily-summary-actions,
  .tax-daily-summary-section-title {
    flex-direction: column;
  }

  .tax-manual-counterparty-results {
    position: static;
    max-height: 14rem;
    margin-top: 0.25rem;
  }

  .tax-daily-source-chip {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .tax-issue-panel .tax-issue-table-wrap {
    overflow-x: visible;
  }

  .tax-issue-table {
    min-width: 0;
  }

  .tax-issue-table thead {
    display: none;
  }

  .tax-issue-table,
  .tax-issue-table tbody,
  .tax-issue-table tr,
  .tax-issue-table td {
    display: block;
    width: 100%;
  }

  .tax-issue-table tr {
    margin: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
  }

  .tax-issue-table td {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0;
    border: 0;
    text-align: right !important;
  }

  .tax-issue-table td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    color: #667085;
    font-weight: 700;
    text-align: left;
  }

  .tax-issue-table td > div,
  .tax-issue-table td > span {
    min-width: 0;
  }

  .tax-issue-table .btn-list {
    justify-content: flex-end;
  }

  .tax-table-empty-row {
    margin: 0;
  }

  .tax-table-empty-row td {
    display: block;
    text-align: center !important;
  }

  .tax-table-empty-row td::before {
    content: none;
  }
}

.tax-vat-dashboard-toolbar,
.tax-vat-dashboard-panel {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 1rem;
}

.tax-vat-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.tax-vat-dashboard-kpi {
  display: flex;
  min-height: 128px;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.45rem;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 1rem;
  background: #ffffff;
  color: #172033;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tax-vat-dashboard-kpi:hover {
  border-color: #3b82f6;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.tax-vat-dashboard-kpi strong {
  font-size: 1.45rem;
  line-height: 1.1;
}

.tax-vat-dashboard-kpi span:last-child,
.tax-vat-dashboard-kpi-label {
  color: #667085;
  font-size: 0.82rem;
}

.tax-vat-dashboard-kpi-warning {
  border-color: #f59e0b;
}

.tax-vat-dashboard-panel-title {
  margin: 0;
  font-size: 1.05rem;
}

.tax-vat-dashboard-exception-summary,
.tax-vat-dashboard-summary-pill {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tax-vat-dashboard-exception-summary span,
.tax-vat-dashboard-summary-pill {
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
}

.tax-vat-dashboard-exception-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.tax-vat-dashboard-exception-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 0.9fr) minmax(120px, 0.6fr) auto;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid #dbe3ef;
  border-left: 4px solid #94a3b8;
  border-radius: 8px;
  padding: 0.85rem;
  background: #ffffff;
}

.tax-vat-severity-critical {
  border-left-color: #dc2626;
}

.tax-vat-severity-warning {
  border-left-color: #f59e0b;
}

.tax-vat-exception-main,
.tax-vat-exception-doc,
.tax-vat-exception-amount {
  display: grid;
  gap: 0.2rem;
}

.tax-vat-exception-main span,
.tax-vat-exception-doc small,
.tax-vat-exception-amount small {
  color: #667085;
}

.tax-vat-severity-badge {
  width: fit-content;
  border-radius: 999px;
  background: #fef2f2;
  color: #b91c1c;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.tax-vat-exception-actions {
  display: flex;
  gap: 0.45rem;
  justify-content: flex-end;
}

.tax-vat-dashboard-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 1.25rem;
  color: #667085;
  text-align: center;
}

.tax-vat-dashboard-drawer {
  margin-top: 1rem;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 1rem;
}

.tax-vat-dashboard-drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.tax-vat-dashboard-drawer-grid {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 0.5rem 1rem;
  margin: 0.85rem 0 0;
}

.tax-vat-dashboard-drawer-grid dt {
  color: #667085;
  font-weight: 600;
}

.tax-vat-dashboard-drawer-grid dd {
  margin: 0;
}

.tax-vat-dashboard-pager {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

.input-vat-table td {
  vertical-align: top;
}

.input-vat-table [data-supplier-profile-id],
.input-vat-table [data-ap-summary-id] {
  white-space: normal;
  max-width: 18rem;
}

.tax-period-close-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.tax-period-close-status {
  border-color: #94a3b8;
}

.tax-period-close-table {
  min-width: 640px;
}

.tax-period-close-table th {
  color: #475569;
  font-size: 0.78rem;
  white-space: nowrap;
}

.tax-period-close-table td {
  vertical-align: middle;
}

@media (max-width: 920px) {
  .tax-period-close-grid {
    grid-template-columns: 1fr;
  }

  .tax-vat-dashboard-exception-row {
    grid-template-columns: 1fr;
  }

  .tax-vat-exception-actions {
    justify-content: stretch;
  }

  .tax-vat-exception-actions .btn {
    width: 100%;
  }

  .tax-vat-dashboard-drawer-grid {
    grid-template-columns: 1fr;
  }

  .input-vat-table th:nth-child(3),
  .input-vat-table td:nth-child(3),
  .input-vat-table th:nth-child(4),
  .input-vat-table td:nth-child(4),
  .input-vat-table th:nth-child(7),
  .input-vat-table td:nth-child(7) {
    display: none;
  }
}

@media (max-width: 680px) {
  .input-vat-table {
    min-width: 0;
  }

  .input-vat-table thead {
    display: none;
  }

  .input-vat-table,
  .input-vat-table tbody,
  .input-vat-table tr,
  .input-vat-table td,
  .input-vat-table th:nth-child(3),
  .input-vat-table td:nth-child(3),
  .input-vat-table th:nth-child(4),
  .input-vat-table td:nth-child(4),
  .input-vat-table th:nth-child(7),
  .input-vat-table td:nth-child(7) {
    display: block;
    width: 100%;
  }

  .input-vat-table tr {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
  }

  .input-vat-table td {
    display: flex !important;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0;
    border: 0;
    text-align: right !important;
  }

  .input-vat-table td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    color: #667085;
    font-weight: 700;
    text-align: left;
  }

  .input-vat-table .btn-list {
    justify-content: flex-end;
  }

  .tax-period-close-table {
    min-width: 0;
  }

  .tax-period-close-table thead {
    display: none;
  }

  .tax-period-close-table,
  .tax-period-close-table tbody,
  .tax-period-close-table tr,
  .tax-period-close-table td {
    display: block;
    width: 100%;
  }

  .tax-period-close-table tr {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
  }

  .tax-period-close-table td {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0;
    border: 0;
    text-align: right !important;
  }

  .tax-period-close-table td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    color: #667085;
    font-weight: 700;
    text-align: left;
  }
}

.tax-workflow-context {
  border: 1px solid #cbdcf5;
  border-radius: 8px;
  padding: 1rem;
  background: #f8fbff;
}

.tax-workflow-context-heading,
.tax-workflow-current-task,
.tax-action-feedback,
.tax-vat-priority-panel,
.tax-period-close-scope,
.tax-period-close-checklist-heading,
.tax-settings-unsaved-bar,
.tax-reference-only-notice {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.tax-workflow-context-heading h3,
.tax-vat-priority-panel h3 {
  margin: 0.2rem 0 0;
  font-size: 1rem;
}

.tax-workflow-kicker {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
}

.tax-workflow-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
  padding-bottom: 0.2rem;
}

.tax-workflow-stage {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.4rem;
  align-items: center;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  padding: 0.45rem 0.65rem;
  background: #fff;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.tax-workflow-stage-number {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #e8f1ff;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 800;
}

.tax-workflow-stage:hover,
.tax-workflow-stage:focus-visible {
  border-color: #206bc4;
  color: #1d4ed8;
}

.tax-workflow-stage.is-current {
  border-color: #206bc4;
  background: #206bc4;
  color: #fff;
}

.tax-workflow-stage.is-current .tax-workflow-stage-number {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.tax-workflow-current-task {
  justify-content: flex-start;
  margin-top: 0.85rem;
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  background: rgba(255, 255, 255, 0.74);
  color: #334155;
}

.tax-workflow-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.tax-workflow-scope span {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  min-height: 2rem;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  background: #fff;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
}

.tax-workflow-current-task > i {
  color: #206bc4;
  font-size: 1.15rem;
}

.tax-workflow-current-task div {
  display: grid;
  gap: 0.15rem;
}

.tax-workflow-current-task span {
  color: #667085;
  font-size: 0.84rem;
}

.tax-action-feedback {
  margin-top: 1rem;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 0.8rem 0.9rem;
  background: #fff7f7;
  color: #7f1d1d;
}

.tax-action-feedback-success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.tax-action-feedback-warning {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.tax-action-feedback-icon {
  font-size: 1.35rem;
}

.tax-action-feedback-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 0.15rem;
}

.tax-action-feedback-copy span {
  font-size: 0.84rem;
}

.tax-action-feedback-label {
  color: currentColor;
  font-size: 0.72rem !important;
  font-weight: 700;
  opacity: 0.76;
}

.tax-action-feedback-actions,
.tax-vat-priority-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tax-vat-priority-panel {
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  background: #fffdf5;
}

.tax-vat-priority-panel p {
  color: #667085;
  font-size: 0.88rem;
}

.tax-period-close-scope {
  justify-content: flex-start;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  background: #f0f7ff;
  color: #1e3a5f;
  font-size: 0.88rem;
}

.tax-period-close-scope.is-company-wide {
  border-color: #fbbf24;
  background: #fff9e6;
  color: #78350f;
}

.tax-period-close-scope > i {
  font-size: 1.1rem;
}

.tax-period-close-blocker-checklist {
  margin-bottom: 0.9rem;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 0.8rem;
  background: #fffafa;
}

.tax-period-close-checklist-heading strong {
  color: #991b1b;
}

.tax-period-close-blocker-checklist ul {
  display: grid;
  gap: 0.4rem;
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
}

.tax-period-close-blocker-checklist li,
.tax-period-close-ready {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  font-size: 0.86rem;
}

.tax-period-close-blocker-checklist li > i {
  color: #dc2626;
  margin-top: 0.1rem;
}

.tax-period-close-ready {
  color: #166534;
}

.tax-period-close-ready > i {
  font-size: 1.1rem;
}

.tax-report-source-chip.is-live {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.tax-report-source-chip.is-final {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.tax-settings-unsaved-bar {
  position: sticky;
  z-index: 10;
  bottom: 0.75rem;
  margin-top: 1rem;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  background: #fffbeb;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.tax-settings-unsaved-bar > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: center;
}

.tax-settings-unsaved-bar > div > i {
  color: #b45309;
}

.tax-settings-unsaved-bar span {
  color: #78350f;
  font-size: 0.84rem;
}

.tax-settings-branch-readonly .card-header {
  align-items: flex-start;
}

.tax-reference-only-notice {
  align-items: flex-start;
}

.tax-reference-only-notice > div {
  display: grid;
  gap: 0.2rem;
}

.tax-reference-only-notice span {
  font-size: 0.88rem;
}

@media (max-width: 680px) {
  .tax-workflow-context-heading,
  .tax-action-feedback,
  .tax-vat-priority-panel,
  .tax-period-close-checklist-heading,
  .tax-settings-unsaved-bar,
  .tax-reference-only-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .tax-workflow-context-heading > .btn,
  .tax-action-feedback-actions .btn,
  .tax-vat-priority-actions .btn,
  .tax-settings-unsaved-bar .btn,
  .tax-reference-only-notice .btn {
    width: 100%;
  }

  .tax-workflow-current-task {
    align-items: flex-start;
  }
}

.staff-notification-toggle {
  position: relative;
}

.staff-notification-toggle.is-loading .ti-bell {
  opacity: 0;
}

.staff-notification-toggle.has-notifications {
  color: #1d4ed8;
}

.staff-notification-spinner,
.staff-notification-inline-spinner {
  display: inline-block;
  border-radius: 999px;
  border: 2px solid rgba(32, 107, 196, 0.18);
  border-top-color: #206bc4;
  animation: staff-notification-spin 0.75s linear infinite;
}

.staff-notification-spinner {
  position: absolute;
  width: 1rem;
  height: 1rem;
  inset: 50% auto auto 50%;
  margin: -0.5rem 0 0 -0.5rem;
}

.staff-notification-inline-spinner {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.staff-notification-loading-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #475569;
  font-weight: 600;
}

@keyframes staff-notification-spin {
  to {
    transform: rotate(360deg);
  }
}

.staff-notification-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

.staff-notification-drawer.offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  width: min(28rem, 100vw);
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  background: #fff;
  box-shadow: -1rem 0 2.5rem rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  visibility: hidden;
}

.staff-notification-drawer.offcanvas.show,
.staff-notification-drawer.offcanvas.showing {
  transform: none;
  visibility: visible;
}

.staff-notification-drawer.offcanvas.hiding {
  transform: translateX(100%);
  visibility: visible;
}

.staff-notification-drawer .offcanvas-header {
  flex: 0 0 auto;
  border-bottom: 1px solid #dbe3ef;
}

.staff-notification-drawer .offcanvas-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.staff-notification-filter {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.staff-notification-filter .form-label {
  margin-bottom: -0.25rem;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
}

.staff-notification-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.staff-notification-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.875rem;
}

.staff-notification-groups {
  display: flex;
  gap: 0.45rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  overflow-x: auto;
}

.staff-notification-group {
  --notification-tone: #2563eb;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.15rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
}

.staff-notification-group strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--notification-tone) 12%, #fff);
  color: var(--notification-tone);
}

.staff-notification-group.is-active {
  border-color: var(--notification-tone);
  background: color-mix(in srgb, var(--notification-tone) 10%, #fff);
  color: var(--notification-tone);
}

.staff-notification-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.staff-notification-pill.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.staff-notification-pill.warning {
  background: #fef3c7;
  color: #92400e;
}

.staff-notification-list {
  display: grid;
  gap: 0.75rem;
}

.staff-notification-state {
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  text-align: center;
}

.staff-notification-state-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.5rem;
  font-weight: 600;
}

.staff-notification-skeleton {
  height: 8.75rem;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent),
    linear-gradient(#e2e8f0 0 0) 1rem 1rem / 5rem 0.9rem no-repeat,
    linear-gradient(#cbd5e1 0 0) 1rem 2.6rem / 65% 1rem no-repeat,
    linear-gradient(#e2e8f0 0 0) 1rem 4.25rem / 82% 0.8rem no-repeat,
    linear-gradient(#e2e8f0 0 0) 1rem 5.55rem / 55% 0.8rem no-repeat,
    #fff;
  background-size: 8rem 100%, 5rem 0.9rem, 65% 1rem, 82% 0.8rem, 55% 0.8rem, auto;
  animation: staff-notification-skeleton 1.2s ease-in-out infinite;
}

@keyframes staff-notification-skeleton {
  0% {
    background-position: -8rem 0, 1rem 1rem, 1rem 2.6rem, 1rem 4.25rem, 1rem 5.55rem, 0 0;
  }

  100% {
    background-position: calc(100% + 8rem) 0, 1rem 1rem, 1rem 2.6rem, 1rem 4.25rem, 1rem 5.55rem, 0 0;
  }
}

.staff-notification-item {
  --notification-tone: #2563eb;
  border: 1px solid #dbe3ef;
  border-left: 4px solid var(--notification-tone);
  border-radius: 8px;
  padding: 0.85rem;
  background: #fff;
}

.staff-notification-item-header,
.staff-notification-meta,
.staff-notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.staff-notification-item-header {
  margin-bottom: 0.35rem;
}

.staff-notification-group-chip {
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  background: color-mix(in srgb, var(--notification-tone) 12%, #fff);
  color: var(--notification-tone);
  font-size: 0.72rem;
  font-weight: 800;
}

.staff-notification-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  line-height: 1.35;
}

.staff-notification-item p {
  margin: 0 0 0.6rem;
  color: #475569;
}

.staff-notification-severity,
.staff-notification-new {
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.staff-notification-severity {
  background: #e0f2fe;
  color: #075985;
}

.staff-notification-new {
  background: #dcfce7;
  color: #166534;
}

.staff-notification-contact {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.55rem 0.65rem;
  margin: 0.6rem 0;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.82rem;
}

.staff-notification-contact i {
  margin-top: 0.1rem;
  color: var(--notification-tone);
}

.staff-notification-contact span,
.staff-notification-contact strong,
.staff-notification-contact a {
  display: inline-block;
  margin-right: 0.35rem;
}

.staff-notification-contact span {
  color: #64748b;
}

.staff-notification-contact.is-empty {
  color: #94a3b8;
}

.staff-notification-meta {
  margin-bottom: 0.75rem;
  color: #64748b;
  font-size: 0.78rem;
}

.staff-notification-actions {
  align-items: center;
}

.staff-notification-action-reason {
  flex: 1 1 100%;
  color: #b45309;
  font-size: 0.75rem;
}

.staff-notification-group.tone-blue,
.staff-notification-item.tone-blue,
.staff-notification-group-chip.tone-blue {
  --notification-tone: #2563eb;
}

.staff-notification-group.tone-red,
.staff-notification-item.tone-red,
.staff-notification-group-chip.tone-red {
  --notification-tone: #dc2626;
}

.staff-notification-group.tone-orange,
.staff-notification-item.tone-orange,
.staff-notification-group-chip.tone-orange {
  --notification-tone: #ea580c;
}

.staff-notification-group.tone-amber,
.staff-notification-item.tone-amber,
.staff-notification-group-chip.tone-amber {
  --notification-tone: #d97706;
}

.staff-notification-group.tone-green,
.staff-notification-item.tone-green,
.staff-notification-group-chip.tone-green {
  --notification-tone: #16a34a;
}

.staff-notification-group.tone-teal,
.staff-notification-item.tone-teal,
.staff-notification-group-chip.tone-teal {
  --notification-tone: #0d9488;
}

.staff-notification-group.tone-purple,
.staff-notification-item.tone-purple,
.staff-notification-group-chip.tone-purple {
  --notification-tone: #9333ea;
}

.staff-notification-group.tone-indigo,
.staff-notification-item.tone-indigo,
.staff-notification-group-chip.tone-indigo {
  --notification-tone: #4f46e5;
}

.staff-access-policy-page .card-header-tabs {
  margin-bottom: -1px;
}

.staff-access-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.staff-access-table {
  min-width: 760px;
}

.staff-access-table th {
  color: #475569;
  font-size: 0.78rem;
  white-space: nowrap;
}

.staff-access-state {
  min-height: 1.5rem;
  margin-bottom: 0.5rem;
  color: #64748b;
  font-size: 0.875rem;
}

@media (max-width: 767.98px) {
  .staff-notification-drawer.offcanvas {
    width: 100vw;
  }

  .staff-notification-actions .btn {
    flex: 1 1 auto;
  }

  .staff-notification-filter-row {
    grid-template-columns: 1fr;
  }
}

.guided-workflow-panel {
  border: 1px solid #cbdcf7;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.guided-workflow-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #dbe7fb;
}

.guided-workflow-heading {
  min-width: 0;
}

.guided-workflow-kicker {
  color: #3157a4;
  font-size: 0.75rem;
  font-weight: 700;
}

.guided-workflow-heading h3 {
  margin: 0.15rem 0;
  color: #0f172a;
  font-size: 1.05rem;
}

.guided-workflow-heading p {
  margin: 0;
  color: #64748b;
  font-size: 0.875rem;
}

.guided-workflow-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.guided-workflow-body {
  padding: 1rem 1.25rem 1.25rem;
}

.guided-workflow-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.6fr);
  gap: 1rem;
}

.guided-workflow-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guided-workflow-step {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem;
  border: 1px solid #d7e2f2;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
}

.guided-workflow-step:hover:not(:disabled),
.guided-workflow-step.is-active {
  border-color: #3157a4;
  box-shadow: 0 0 0 2px rgba(49, 87, 164, 0.12);
}

.guided-workflow-step:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.guided-workflow-step-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eff6ff;
  color: #3157a4;
  font-size: 1.25rem;
}

.guided-workflow-step-copy {
  min-width: 0;
}

.guided-workflow-step-copy strong,
.guided-workflow-step-copy small {
  display: block;
  overflow-wrap: anywhere;
}

.guided-workflow-step-copy small {
  color: #64748b;
  font-size: 0.75rem;
}

.guided-workflow-step.is-complete .guided-workflow-step-icon {
  background: #eaf8ef;
  color: #15803d;
}

.guided-workflow-step.is-warning .guided-workflow-step-icon {
  background: #fff7ed;
  color: #c2410c;
}

.guided-workflow-step.is-locked .guided-workflow-step-icon {
  background: #f1f5f9;
  color: #64748b;
}

.guided-workflow-detail {
  min-height: 100%;
  border: 1px solid #d7e2f2;
  border-radius: 8px;
  padding: 1rem;
  background: #ffffff;
}

.guided-workflow-empty {
  color: #64748b;
  font-size: 0.875rem;
}

.guided-workflow-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.guided-workflow-detail-header h4 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
}

.guided-workflow-status {
  flex: 0 0 auto;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #3157a4;
  font-size: 0.75rem;
  font-weight: 700;
}

.guided-workflow-status.is-complete {
  background: #eaf8ef;
  color: #15803d;
}

.guided-workflow-status.is-warning {
  background: #fff7ed;
  color: #c2410c;
}

.guided-workflow-status.is-locked {
  background: #f1f5f9;
  color: #475569;
}

.guided-workflow-help {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.guided-workflow-help div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 0.75rem;
}

.guided-workflow-help dt {
  color: #3157a4;
  font-weight: 700;
}

.guided-workflow-help dd {
  margin: 0;
  color: #334155;
  overflow-wrap: anywhere;
}

.guided-workflow-role-note {
  margin-top: 0.85rem;
  padding: 0.75rem;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
}

.guided-workflow-role-note-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.guided-workflow-role-note-body {
  color: #1f3f75;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.guided-workflow-locked-reason {
  margin-top: 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.guided-workflow-validation-hint,
.guided-workflow-field-hint {
  margin-top: 0.75rem;
  color: #c2410c;
  font-size: 0.875rem;
}

.guided-workflow-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.guided-workflow-focus-pulse {
  box-shadow: 0 0 0 0.2rem rgba(49, 87, 164, 0.22) !important;
  transition: box-shadow 0.18s ease;
}

@media (max-width: 767.98px) {
  .guided-workflow-header,
  .guided-workflow-detail-header,
  .guided-workflow-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .guided-workflow-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .guided-workflow-help div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }

  .guided-workflow-toggle,
  .guided-workflow-detail-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

.page-navigation-loader {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 2050;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}

body.is-page-loading .page-navigation-loader {
  opacity: 1;
}

.page-navigation-loader-bar {
  height: 3px;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #206bc4 0%, #22c55e 52%, #f59f00 100%);
  animation: page-navigation-progress 1.15s ease-in-out infinite;
}

.page-navigation-loader-pill {
  position: fixed;
  top: 0.75rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  max-width: min(360px, calc(100% - 2rem));
  min-height: 38px;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(32, 107, 196, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #1f2937;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  font-weight: 600;
}

.page-navigation-loader-pill span:last-child {
  overflow-wrap: anywhere;
}

@keyframes page-navigation-progress {
  0% {
    transform: scaleX(0.18);
  }

  45% {
    transform: scaleX(0.72);
  }

  100% {
    transform: scaleX(1);
  }
}

.receipt-print-options-modal .modal-content {
  border: 1px solid rgba(32, 107, 196, 0.18);
  border-radius: 10px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.2);
}

.receipt-print-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.receipt-print-option-card,
.receipt-print-copy-card {
  display: flex;
  width: 100%;
  min-height: 132px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.45rem;
  border: 1px solid #d7e1ee;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  padding: 0.9rem;
  text-align: left;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.receipt-print-option-card:hover,
.receipt-print-copy-card:hover {
  border-color: #8ab4e6;
  box-shadow: 0 10px 24px rgba(32, 107, 196, 0.1);
}

.receipt-print-option-card.is-selected,
.receipt-print-copy-card.is-selected {
  border-color: #206bc4;
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px rgba(32, 107, 196, 0.18);
}

.receipt-print-option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #e7f1ff;
  color: #155dae;
  font-size: 1.35rem;
}

.receipt-print-option-title,
.receipt-print-copy-title {
  font-weight: 700;
  color: #102a43;
}

.receipt-print-option-description,
.receipt-print-copy-description {
  color: #5d6b82;
  font-size: 0.9rem;
  line-height: 1.4;
}

.receipt-print-copy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.receipt-print-copy-card {
  min-height: 84px;
  padding: 0.75rem 0.85rem;
}

@media (max-width: 575.98px) {
  .page-navigation-loader-pill {
    inset: 0.65rem 0.75rem auto 0.75rem;
    justify-content: center;
  }

  .receipt-print-option-grid,
  .receipt-print-copy-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Shared master-data list filters */
.master-list-card .card-header {
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}

.master-list-filter-panel {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(4, 32, 69, 0.08);
}

.master-list-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.master-list-filter-field {
  min-width: 0;
}

.master-list-filter-keyword {
  min-width: min(100%, 17rem);
}

.master-list-filter-field .form-label {
  margin-bottom: 0.35rem;
  color: var(--tblr-secondary-color, #667382);
  font-size: 0.8125rem;
  font-weight: 700;
}

.master-list-filter-field .form-control,
.master-list-filter-field .form-select {
  min-height: 2.75rem;
}

.master-list-filter-page-size {
  max-width: 10rem;
}

@media (max-width: 991.98px) {
  .master-list-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .master-list-filter-keyword {
    grid-column: 1 / -1;
  }
}

@media (max-width: 575.98px) {
  .master-list-filter-panel {
    padding: 0.875rem;
  }

  .master-list-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .master-list-filter-keyword {
    grid-column: auto;
  }

  .master-list-filter-page-size {
    max-width: none;
  }
}

/* Payroll rule settings: compact filters and readable grouped tables. */
.payroll-rule-list-header {
  display: grid;
  grid-template-columns: minmax(15rem, 0.7fr) minmax(0, 2.3fr);
  align-items: end;
  gap: 0.75rem 1.25rem;
  padding: 0.9rem 1.25rem;
}

.payroll-rule-list-header > .card-title {
  align-self: center;
  line-height: 1.35;
}

.payroll-rule-filter-grid {
  display: grid;
  grid-template-columns: minmax(11rem, 1.25fr) minmax(8rem, 0.85fr) minmax(9.5rem, 0.95fr) auto;
  align-items: end;
  gap: 0.55rem;
  min-width: 0;
}

.payroll-rule-filter-grid-commission {
  grid-template-columns: minmax(10rem, 1.15fr) minmax(10rem, 1.1fr) minmax(7.75rem, 0.8fr) minmax(9.5rem, 0.95fr) auto;
}

.payroll-rule-filter-field,
.payroll-rule-filter-action {
  min-width: 0;
}

.payroll-rule-filter-field .form-label {
  margin-bottom: 0.3rem;
  color: #52627a;
  font-size: 0.8rem;
  font-weight: 600;
}

.payroll-rule-filter-action .btn {
  min-height: 38px;
  white-space: nowrap;
}

.payroll-rule-grid {
  min-width: 0;
}

.payroll-rule-grid .gridjs-head {
  padding: 0.75rem 1rem 0.5rem;
}

.payroll-rule-grid .gridjs-search {
  float: none;
  width: min(100%, 22rem);
}

.payroll-rule-grid .gridjs-search-input {
  width: 100%;
}

.payroll-rule-grid .gridjs-wrapper {
  overflow-x: auto;
}

.payroll-rule-grid .payroll-rule-table {
  width: 100%;
  min-width: 780px;
  table-layout: fixed;
}

.payroll-rule-grid .payroll-rule-table .gridjs-th,
.payroll-rule-grid .payroll-rule-table .gridjs-td {
  padding: 0.7rem 0.8rem;
  vertical-align: top;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.payroll-rule-grid .payroll-rule-table .gridjs-th {
  vertical-align: middle;
}

.payroll-rule-grid .payroll-rule-table .gridjs-th-content {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.payroll-rule-cell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  line-height: 1.45;
}

.payroll-rule-cell-title {
  color: #102a43;
  font-size: 0.96rem;
  font-weight: 700;
}

.payroll-rule-cell-title-sm {
  font-size: 0.9rem;
}

.payroll-rule-cell-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #68778c;
  font-size: 0.82rem;
}

.payroll-rule-cell-detail {
  color: #334861;
  font-size: 0.86rem;
  line-height: 1.5;
}

.payroll-rule-tier-summary {
  font-variant-numeric: tabular-nums;
}

.payroll-rule-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.payroll-rule-actions {
  justify-content: flex-end;
  gap: 0.35rem;
}

.payroll-rule-grid .gridjs-footer {
  padding: 0.7rem 1rem;
}

@media (max-width: 1199.98px) {
  .payroll-rule-list-header {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .payroll-rule-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .payroll-rule-filter-grid-commission {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .payroll-rule-list-header {
    padding: 0.85rem 1rem;
  }

  .payroll-rule-filter-grid,
  .payroll-rule-filter-grid-commission {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payroll-rule-filter-grid-commission .payroll-rule-filter-action {
    grid-column: 1 / -1;
  }

  .payroll-rule-grid .gridjs-head {
    padding: 0.75rem;
  }

  .payroll-rule-grid .gridjs-wrapper {
    overflow: visible;
    padding: 0 0.75rem 0.25rem;
  }

  .payroll-rule-grid .payroll-rule-table,
  .payroll-rule-grid .payroll-rule-table tbody,
  .payroll-rule-grid .payroll-rule-table .gridjs-tr,
  .payroll-rule-grid .payroll-rule-table .gridjs-td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .payroll-rule-grid .payroll-rule-table {
    border: 0;
  }

  .payroll-rule-grid .payroll-rule-table thead {
    display: none;
  }

  .payroll-rule-grid .payroll-rule-table .gridjs-tr {
    margin-bottom: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(4, 32, 69, 0.12);
    border-radius: 0.4rem;
    background: #fff;
  }

  .payroll-rule-grid .payroll-rule-table .gridjs-td {
    padding: 0.55rem 0.75rem;
    border: 0;
    border-bottom: 1px solid rgba(4, 32, 69, 0.07);
  }

  .payroll-rule-grid .payroll-rule-table .gridjs-td:last-child {
    border-bottom: 0;
  }

  .payroll-rule-grid .gridjs-footer {
    padding: 0.75rem;
  }
}

@media (max-width: 575.98px) {
  .payroll-rule-filter-grid,
  .payroll-rule-filter-grid-commission {
    grid-template-columns: minmax(0, 1fr);
  }

  .payroll-rule-filter-grid-commission .payroll-rule-filter-action {
    grid-column: auto;
  }
}
