:root {
  --bg: #f3f5f9;
  --panel: #ffffff;
  --panel-soft: #f8f9fb;
  --border: #e6e8ee;
  --text: #101828;
  --muted: #667085;
  --sidebar: #111827;
  --sidebar-soft: #172134;
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --green: #56b260;
  --green-soft: #e7f6ea;
  --mint: #2fa870;
  --mint-soft: #eaf8f0;
  --blue: #2672eb;
  --blue-soft: #edf4ff;
  --gold: #e0a200;
  --gold-soft: #fff7de;
  --purple: #8b5cf6;
  --purple-soft: #f2ebff;
  --red: #d14343;
  --red-soft: #fceaea;
  --shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(86, 178, 96, 0.18), transparent 28%),
    linear-gradient(180deg, #eef3ea 0%, #f4f6fb 42%, #f7f8fb 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
}

.sidebar {
  background: linear-gradient(180deg, #0e1624 0%, #111827 100%);
  color: #f5f7fa;
  padding: 18px 12px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.03);
}

.sidebar__brand {
  padding: 8px 2px 14px;
  overflow: hidden;
}

.sidebar__brand-lockup {
  max-width: 212px;
}

.sidebar__brand-strip {
  display: block;
  width: 100%;
  max-width: 212px;
  height: auto;
}

.sidebar__nav {
  display: grid;
  gap: 7px;
  padding-top: 4px;
}

.sidebar__nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 12px;
  color: rgba(245, 247, 250, 0.84);
  transition: background-color 160ms ease, color 160ms ease;
  font-weight: 500;
  font-size: 0.885rem;
}

.sidebar__nav a:hover,
.sidebar__nav a.is-active {
  background: rgba(63, 116, 71, 0.34);
  color: #8edb96;
}

.nav-icon {
  width: 18px;
  text-align: center;
  opacity: 0.95;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg,
.header-date__icon svg,
.metric-badge svg,
.statement-list__icon svg,
.overview-list__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.sidebar__user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 4px 6px;
  border-top: 1px solid var(--sidebar-border);
}

.sidebar__avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8edb96 0%, #4ca55a 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f1b10;
  font-weight: 700;
}

.sidebar__user strong {
  display: block;
  font-size: 0.98rem;
}

.sidebar__user p {
  margin: 4px 0 0;
  color: rgba(245, 247, 250, 0.68);
  font-size: 0.83rem;
}

.content {
  padding: 0;
  background: #f7f8fb;
}

.content__header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.content__header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.content__subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.content__header-left,
.content__header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ghost-icon {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.96rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.header-date {
  color: #344054;
  font-size: 0.94rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header-date__icon {
  width: 16px;
  height: 16px;
  color: #4b5563;
}

.header-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #101828;
  font-size: 0.94rem;
}

.header-user__details {
  display: grid;
  gap: 2px;
}

.header-user strong {
  font-size: 0.94rem;
}

.header-user__avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #dff4e2 0%, #9fd7a7 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1f3b20;
  font-weight: 700;
}

.header-user__details span {
  color: var(--muted);
  font-size: 0.78rem;
}

.user-action {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #f5f7fa;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.user-action:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.page-section {
  padding: 22px 24px 24px;
}

.metrics-grid,
.dashboard-grid {
  display: grid;
  gap: 12px;
}

.metrics-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 18px 28px 0;
}

.dashboard-grid {
  grid-template-columns: 1fr 1fr;
  padding: 12px 28px 0;
}

.dashboard-grid--bottom {
  padding-top: 3px;
  padding-bottom: 6px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 15px 17px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 24px rgba(16, 24, 40, 0.04);
}

.dashboard-grid--bottom .panel {
  min-height: 264px;
}

.panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.panel__header h3 {
  margin: 0;
  font-size: 0.96rem;
}

.panel__header--compact {
  margin-bottom: 8px;
}

.metric-panel {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-height: 110px;
  gap: 17px;
}

.metric-panel__label {
  margin: 0 0 7px;
  color: #344054;
  font-size: 0.74rem;
  line-height: 1.14;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.metric-panel h3 {
  margin: 0 0 7px;
  font-size: 1.07rem;
  color: #101828;
  line-height: 1.08;
}

.metric-panel h3.is-danger,
.danger-text {
  color: var(--red);
}

.metric-panel h3.is-success {
  color: var(--green);
}

.metric-panel__note {
  color: var(--muted);
  font-size: 0.68rem;
  display: inline-block;
  max-width: 160px;
  line-height: 1.15;
}

.metric-badge {
  width: 55px;
  height: 55px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.metric-badge svg {
  width: 22px;
  height: 22px;
}

.metric-badge--green {
  background: var(--green-soft);
  color: var(--green);
}

.metric-badge--mint {
  background: var(--mint-soft);
  color: var(--mint);
}

.metric-badge--blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.metric-badge--gold {
  background: var(--gold-soft);
  color: var(--gold);
}

.metric-badge--purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.metric-badge--red {
  background: var(--red-soft);
  color: var(--red);
}

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

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

table th,
table td {
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 0.79rem;
  line-height: 1.28;
}

table th {
  color: var(--muted);
  font-weight: 500;
  background: transparent;
  font-size: 0.77rem;
}

.dashboard-table td:nth-child(2),
.dashboard-table th:nth-child(2),
.dashboard-table td:nth-child(3),
.dashboard-table th:nth-child(3) {
  text-align: right;
}

.dashboard-table td:first-child a {
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.005em;
  font-size: 0.78rem;
}

.dashboard-table tbody td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.panel__footer {
  padding-top: 11px;
}

.panel__cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  color: #344054;
  font-weight: 500;
  background: #fcfcfd;
  font-size: 0.82rem;
}

.share-meter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 117px;
  justify-content: flex-end;
}

.share-meter strong {
  min-width: 48px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #344054;
}

.share-meter__bar {
  width: 68px;
  height: 15px;
  border-radius: 999px;
  background: #eef8ef;
  padding: 3px;
  display: inline-flex;
  align-items: center;
}

.share-meter__bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #d2f1d6 0%, #9dddac 100%);
}

.aging-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 0 6px;
}

.donut-wrap {
  display: grid;
  place-items: center;
  min-width: 170px;
}

.donut-chart {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  position: relative;
}

.donut-chart__hole {
  position: absolute;
  inset: 49px;
  border-radius: 50%;
  background: #ffffff;
}

.aging-legend {
  flex: 1;
}

.aging-legend__header,
.aging-legend__row,
.overview-list__row,
.statement-list__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.aging-legend__header,
.overview-list__row,
.statement-list__row {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.aging-legend__header {
  padding-top: 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.aging-legend__row {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.aging-legend__label,
.statement-list__main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.aging-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.statement-list__icon {
  width: 20px;
  text-align: center;
  color: #667085;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.statement-list__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.statement-list__row {
  display: grid;
  grid-template-columns: minmax(148px, 0.92fr) minmax(0, 1.36fr) auto;
  gap: 10px;
  padding-top: 11px;
  padding-bottom: 11px;
}

.statement-list__main--statement {
  min-width: 0;
  align-items: flex-start;
}

.statement-list__main--statement strong {
  letter-spacing: 0.01em;
  font-size: 0.73rem;
  white-space: nowrap;
  font-weight: 500;
}

.statement-list__customer {
  font-size: 0.71rem;
  color: #101828;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 0;
}

.statement-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  background: #eef8ef;
  color: #418252;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 84px;
  justify-content: center;
  border: 1px solid #dcefdc;
}

.statement-chip--status {
  min-width: 0;
  padding: 3px 7px;
  background: #ecf9ee;
  color: #3f8a53;
  border-color: #d6edd9;
  font-size: 0.67rem;
}

.statement-list strong {
  font-size: 0.84rem;
  font-weight: 500;
}

.statement-list__meta span:first-child {
  font-size: 0.69rem;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 11px;
}

.insight-card {
  border: 1px solid #e8edf2;
  border-radius: 10px;
  background: #ffffff;
  padding: 8px 9px 8px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 5px;
  min-height: 70px;
}

.insight-card__icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.insight-card__icon svg {
  width: 11px;
  height: 11px;
}

.insight-card__icon--green {
  background: var(--green-soft);
  color: var(--green);
}

.insight-card__icon--blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.insight-card__icon--gold {
  background: var(--gold-soft);
  color: var(--gold);
}

.insight-card p,
.insight-card span,
.insight-card strong {
  margin: 0;
}

.insight-card > div:last-child {
  min-width: 0;
  flex: 1;
}

.insight-card__label {
  font-size: 0.5rem;
  color: #344054;
  line-height: 1.04;
  letter-spacing: 0.004em;
  max-width: 70px;
  min-height: 2.08em;
  font-weight: 500;
}

.insight-card__value {
  display: block;
  margin: 3px 0 2px;
  font-size: 0.8rem;
  line-height: 1.04;
}

.insight-card__note {
  color: var(--muted);
  font-size: 0.49rem;
  line-height: 1.02;
  letter-spacing: -0.005em;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-table-shell {
  margin-top: 0;
}

.dashboard-table--mini td,
.dashboard-table--mini th {
  padding-top: 3px;
  padding-bottom: 3px;
  font-size: 0.77rem;
}

.dashboard-table--mini tbody td {
  padding-top: 4px;
  padding-bottom: 4px;
}

.dashboard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 30px 22px;
  color: #667085;
  font-size: 0.8rem;
}

.overview-list__row,
.overview-list__row span,
.overview-list__row strong {
  font-size: 0.82rem;
}

.overview-list__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.overview-list__icon {
  width: 16px;
  text-align: center;
  color: #667085;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.overview-list__row span,
.statement-list__meta span:first-child {
  color: var(--muted);
}

.placeholder-card {
  margin: 24px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
}

.placeholder-card__icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #eef2f7;
  color: #344054;
  font-size: 2rem;
  font-weight: 700;
}

.muted,
.warning-item p {
  color: var(--muted);
}

.warnings-list {
  display: grid;
  gap: 14px;
}

.warning-item {
  padding: 16px 18px;
  border-radius: 16px;
  background: #f9fbfd;
  border: 1px solid var(--border);
}

.warning-item__top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status--high {
  background: #fae4e4;
  color: var(--red);
}

.status--medium {
  background: #fff2dc;
  color: #d18b1f;
}

.status--low,
.status--neutral {
  background: #e0f4ef;
  color: #1b8f7a;
}

.error-box {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  background: #13263a;
  color: #f6f8fb;
  overflow-x: auto;
}

.customers-reference-page {
  padding: 18px 20px 22px;
  display: grid;
  gap: 14px;
}

.customers-reference-header,
.customers-reference-title,
.customers-summary-card,
.customers-reference-searchbox,
.customers-reference-actions,
.customers-reference-footer,
.customers-reference-pagination {
  display: flex;
  align-items: center;
}

.customers-reference-header,
.customers-reference-footer {
  justify-content: space-between;
  gap: 16px;
}

.customers-reference-title {
  gap: 12px;
}

.customers-reference-title h3 {
  margin: 0 0 2px;
  font-size: 1.45rem;
  line-height: 1.15;
}

.customers-reference-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.customers-reference-icon {
  width: 34px;
  height: 34px;
  color: #6b7280;
}

.customers-reference-icon svg {
  width: 100%;
  height: 100%;
}

.customers-reference-add {
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #35b14f 0%, #269a40 100%);
  color: #ffffff;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 1;
  box-shadow: 0 2px 8px rgba(46, 170, 79, 0.18);
}

.customers-reference-add[disabled] {
  cursor: default;
}

.customers-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.customers-summary-card {
  gap: 14px;
  padding: 18px 16px;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.035);
}

.customers-summary-card__badge {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.customers-summary-card__badge svg {
  width: 26px;
  height: 26px;
}

.customers-summary-card__badge--green {
  background: #eaf8ec;
  color: #34a853;
}

.customers-summary-card__badge--blue {
  background: #e9f0ff;
  color: #2b6fd6;
}

.customers-summary-card__badge--amber {
  background: #fff7df;
  color: #f4a700;
}

.customers-summary-card__badge--mint {
  background: #ebf9ef;
  color: #24a148;
}

.customers-summary-card p,
.customers-summary-card span {
  margin: 0;
}

.customers-summary-card p {
  font-size: 0.8rem;
  color: #101828;
}

.customers-summary-card strong {
  display: block;
  margin: 5px 0 8px;
  font-size: 0.94rem;
  line-height: 1.2;
}

.customers-summary-card span {
  color: var(--muted);
  font-size: 0.76rem;
}

.customers-table-shell {
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.035);
  overflow: hidden;
}

.customers-reference-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) repeat(3, minmax(150px, 0.9fr)) auto;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #edf1f5;
}

.customers-reference-field {
  display: grid;
  gap: 8px;
}

.customers-reference-field span {
  font-size: 0.82rem;
  font-weight: 600;
  color: #344054;
}

.customers-reference-searchbox,
.customers-reference-field select {
  min-height: 36px;
  border: 1px solid #dbe2ea;
  border-radius: 7px;
  background: #ffffff;
}

.customers-reference-searchbox {
  gap: 10px;
  padding: 0 11px;
  color: #667085;
}

.customers-reference-searchbox svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.customers-reference-searchbox input,
.customers-reference-field select {
  width: 100%;
  font: inherit;
}

.customers-reference-searchbox input {
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.95rem;
}

.customers-reference-field select {
  padding: 0 12px;
  color: var(--text);
  font-size: 0.95rem;
}

.customers-reference-actions {
  gap: 10px;
  align-self: end;
}

.customers-reference-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid #dbe2ea;
  background: #ffffff;
  color: #344054;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.customers-reference-button--primary {
  background: linear-gradient(180deg, #2ea44f 0%, #248a41 100%);
  border-color: #2b9848;
  color: #ffffff;
}

.customers-reference-table th,
.customers-reference-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf1f5;
  font-size: 0.85rem;
}

.customers-reference-table th {
  color: #1f2937;
  font-weight: 600;
  white-space: nowrap;
  background: #ffffff;
  font-size: 0.8rem;
}

.customers-reference-table td {
  color: #111827;
  vertical-align: top;
}

.customers-reference-table td:nth-child(1) {
  width: 86px;
}

.customers-reference-table td:nth-child(2),
.customers-reference-table th:nth-child(2) {
  width: 230px;
}

.customers-reference-table td:nth-child(3),
.customers-reference-table th:nth-child(3) {
  width: 84px;
}

.customers-reference-table td:nth-child(4),
.customers-reference-table th:nth-child(4) {
  width: 88px;
}

.customers-reference-table td:nth-child(5),
.customers-reference-table th:nth-child(5) {
  width: 116px;
}

.customers-reference-table td:nth-child(6),
.customers-reference-table th:nth-child(6) {
  width: 94px;
}

.customers-reference-table td:nth-child(7),
.customers-reference-table th:nth-child(7) {
  width: 120px;
}

.customers-reference-table td:nth-child(8),
.customers-reference-table th:nth-child(8) {
  width: 84px;
}

.customers-reference-table td:nth-child(9),
.customers-reference-table th:nth-child(9) {
  width: 64px;
  text-align: center;
}

.customers-reference-code {
  color: #2b6fd6;
  font-weight: 500;
}

.customers-reference-name {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customers-reference-name strong {
  display: inline-block;
  max-width: 220px;
  line-height: 1.18;
}

.customers-reference-balance.is-negative {
  color: #b42318;
  font-weight: 500;
}

.customers-reference-muted-cell {
  color: #667085;
}

.customers-reference-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 6px;
  background: #ecfdf3;
  color: #2e8b57;
  font-size: 0.82rem;
  white-space: nowrap;
}

.customers-reference-view {
  width: 34px;
  height: 30px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: #475467;
}

.customers-reference-view svg {
  width: 18px;
  height: 18px;
}

.customers-reference-empty {
  text-align: center;
  color: var(--muted);
}

.customers-reference-footer {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.customers-reference-pagination {
  gap: 10px;
}

.customers-reference-pagination button {
  width: 32px;
  height: 32px;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  background: #ffffff;
  color: #667085;
  font: inherit;
}

.customers-reference-pagination button.is-active {
  background: #28a745;
  border-color: #28a745;
  color: #ffffff;
}

.statements-reference-page {
  padding: 18px 20px 22px;
  display: grid;
  gap: 14px;
}

.statements-reference-header,
.statements-reference-title,
.statements-summary-card,
.statements-reference-searchbox,
.statements-reference-actions,
.statements-reference-footer,
.statements-reference-pagination,
.statements-reference-actions-cell {
  display: flex;
  align-items: center;
}

.statements-reference-header,
.statements-reference-footer {
  justify-content: space-between;
  gap: 16px;
}

.statements-reference-title h3 {
  margin: 0 0 2px;
  font-size: 1.45rem;
  line-height: 1.15;
}

.statements-reference-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.statements-reference-add {
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #35b14f 0%, #269a40 100%);
  color: #ffffff;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(46, 170, 79, 0.18);
}

.statements-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.statements-summary-card {
  gap: 14px;
  padding: 18px 16px;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.035);
}

.statements-summary-card__badge {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.statements-summary-card__badge svg {
  width: 25px;
  height: 25px;
}

.statements-summary-card__badge--blue {
  background: #eaf2ff;
  color: #2b6fd6;
}

.statements-summary-card__badge--green {
  background: #eaf8ec;
  color: #34a853;
}

.statements-summary-card__badge--purple {
  background: #f4ebff;
  color: #9333ea;
}

.statements-summary-card__badge--amber {
  background: #fff7df;
  color: #f4a700;
}

.statements-summary-card__badge--indigo {
  background: #edf4ff;
  color: #315baf;
}

.statements-summary-card p,
.statements-summary-card span {
  margin: 0;
}

.statements-summary-card p {
  font-size: 0.8rem;
  color: #101828;
}

.statements-summary-card strong {
  display: block;
  margin: 5px 0 8px;
  font-size: 0.94rem;
  line-height: 1.2;
}

.statements-summary-card span {
  color: var(--muted);
  font-size: 0.76rem;
}

.statements-table-shell {
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.035);
  overflow: hidden;
}

.statements-reference-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) repeat(4, minmax(130px, 0.8fr)) auto;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #edf1f5;
}

.statements-reference-field {
  display: grid;
  gap: 8px;
}

.statements-reference-field span {
  font-size: 0.82rem;
  font-weight: 600;
  color: #344054;
}

.statements-reference-searchbox,
.statements-reference-field select {
  min-height: 36px;
  border: 1px solid #dbe2ea;
  border-radius: 7px;
  background: #ffffff;
}

.statements-reference-searchbox {
  gap: 10px;
  padding: 0 11px;
  color: #667085;
}

.statements-reference-searchbox svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.statements-reference-searchbox input,
.statements-reference-field select {
  width: 100%;
  font: inherit;
}

.statements-reference-searchbox input {
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.95rem;
}

.statements-reference-field select {
  padding: 0 12px;
  color: var(--text);
  font-size: 0.95rem;
}

.statements-reference-actions {
  gap: 10px;
  align-self: end;
}

.statements-reference-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid #dbe2ea;
  background: #ffffff;
  color: #344054;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.statements-reference-table th,
.statements-reference-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf1f5;
  font-size: 0.85rem;
}

.statements-reference-table th {
  color: #1f2937;
  font-weight: 600;
  white-space: nowrap;
  background: #ffffff;
  font-size: 0.8rem;
}

.statements-reference-table td {
  color: #111827;
  vertical-align: top;
}

.statements-reference-table td:nth-child(1),
.statements-reference-table th:nth-child(1) {
  width: 156px;
}

.statements-reference-table td:nth-child(2),
.statements-reference-table th:nth-child(2) {
  width: 290px;
}

.statements-reference-table td:nth-child(7),
.statements-reference-table th:nth-child(7),
.statements-reference-table td:nth-child(8),
.statements-reference-table th:nth-child(8) {
  white-space: nowrap;
}

.statements-reference-table td:nth-child(9),
.statements-reference-table th:nth-child(9) {
  width: 118px;
  text-align: center;
}

.statements-reference-code {
  color: #2b6fd6;
  font-weight: 500;
}

.statements-reference-customer {
  font-weight: 500;
}

.statements-reference-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 0.78rem;
  white-space: nowrap;
  font-weight: 600;
}

.statements-reference-status.is-final {
  background: #ecfdf3;
  color: #2e8b57;
}

.statements-reference-status.is-pending {
  background: #fff4db;
  color: #d38a1f;
}

.statements-reference-status.is-draft {
  background: #eaf0ff;
  color: #4671d5;
}

.statements-reference-money {
  font-weight: 600;
}

.statements-reference-age {
  color: #344054;
}

.statements-reference-age.is-overdue {
  color: #b42318;
  font-weight: 600;
}

.statements-reference-actions-cell {
  justify-content: center;
  gap: 8px;
}

.statements-reference-action {
  width: 34px;
  height: 30px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: #475467;
  background: #ffffff;
}

.statements-reference-action svg {
  width: 18px;
  height: 18px;
}

.statements-reference-empty {
  text-align: center;
  color: var(--muted);
}

.statements-reference-footer {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.statements-reference-pagination {
  gap: 10px;
}

.statements-reference-page-control {
  width: 32px;
  height: 32px;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  background: #ffffff;
  color: #667085;
  font: inherit;
  display: inline-grid;
  place-items: center;
}

.statements-reference-page-control.is-active {
  background: #28a745;
  border-color: #28a745;
  color: #ffffff;
}

.statements-reference-page-control.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.invoices-reference-page {
  padding: 18px 20px 22px;
  display: grid;
  gap: 14px;
}

.invoices-reference-header,
.invoices-reference-title,
.invoices-summary-card,
.invoices-reference-searchbox,
.invoices-search-group,
.invoices-reference-actions,
.invoices-reference-footer,
.invoices-reference-pagination {
  display: flex;
  align-items: center;
}

.invoices-reference-header,
.invoices-reference-footer {
  justify-content: space-between;
  gap: 16px;
}

.invoices-reference-title {
  gap: 12px;
}

.invoices-reference-title h3 {
  margin: 0 0 2px;
  font-size: 1.45rem;
  line-height: 1.15;
}

.invoices-reference-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.invoices-reference-icon {
  width: 34px;
  height: 34px;
  color: #6b7280;
}

.invoices-reference-icon svg {
  width: 100%;
  height: 100%;
}

.invoices-reference-add {
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #35b14f 0%, #269a40 100%);
  color: #ffffff;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(46, 170, 79, 0.18);
}

.invoices-reference-add[disabled] {
  cursor: default;
}

.invoices-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.invoices-summary-card {
  gap: 14px;
  padding: 18px 16px;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.035);
}

.invoices-summary-card__badge {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.invoices-summary-card__badge svg {
  width: 26px;
  height: 26px;
}

.invoices-summary-card__badge--blue {
  background: #edf4ff;
  color: #2b6fd6;
}

.invoices-summary-card__badge--green {
  background: #ecfbf1;
  color: #34a853;
}

.invoices-summary-card__badge--amber {
  background: #fff7df;
  color: #f4a700;
}

.invoices-summary-card__badge--purple {
  background: #f2ebff;
  color: #8b5cf6;
}

.invoices-summary-card__badge--blue-soft {
  background: #edf4ff;
  color: #2672eb;
}

.invoices-summary-card p,
.invoices-summary-card span {
  margin: 0;
}

.invoices-summary-card p {
  font-size: 0.8rem;
  color: #101828;
}

.invoices-summary-card strong {
  display: block;
  margin: 5px 0 8px;
  font-size: 0.94rem;
  line-height: 1.2;
}

.invoices-summary-card span {
  color: var(--muted);
  font-size: 0.76rem;
}

.invoices-table-shell {
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.035);
  overflow: hidden;
}

.invoices-reference-filters {
  display: grid;
  grid-template-columns: minmax(250px, 1.45fr) repeat(3, minmax(130px, 0.78fr)) minmax(214px, 0.9fr);
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #edf1f5;
}

.invoices-search-group {
  gap: 8px;
  align-self: end;
}

.invoices-reference-field {
  display: grid;
  gap: 8px;
}

.invoices-reference-field span {
  font-size: 0.82rem;
  font-weight: 600;
  color: #344054;
}

.invoices-reference-searchbox,
.invoices-reference-field select,
.invoices-reference-icon-button {
  min-height: 36px;
  border: 1px solid #dbe2ea;
  border-radius: 7px;
  background: #ffffff;
}

.invoices-reference-searchbox {
  gap: 10px;
  padding: 0 11px;
  color: #667085;
}

.invoices-reference-searchbox svg,
.invoices-reference-icon-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.invoices-reference-searchbox input,
.invoices-reference-field select {
  width: 100%;
  font: inherit;
}

.invoices-reference-searchbox input {
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.95rem;
}

.invoices-reference-field select {
  padding: 0 12px;
  color: var(--text);
  font-size: 0.95rem;
}

.invoices-reference-icon-button {
  width: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  color: #475467;
}

.invoices-reference-actions {
  gap: 10px;
  align-self: end;
  justify-content: flex-end;
  min-width: 0;
}

.invoices-reference-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid #dbe2ea;
  background: #ffffff;
  color: #344054;
  font: inherit;
  font-weight: 600;
  font-size: 0.93rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.invoices-reference-button--secondary {
  background: #ffffff;
}

.invoices-reference-button--ghost {
  background: #ffffff;
}

.invoices-reference-table th,
.invoices-reference-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf1f5;
  font-size: 0.85rem;
}

.invoices-reference-table th {
  color: #1f2937;
  font-weight: 600;
  white-space: nowrap;
  background: #ffffff;
  font-size: 0.8rem;
}

.invoices-reference-table td {
  color: #111827;
  vertical-align: middle;
}

.invoices-reference-table td:nth-child(1),
.invoices-reference-table th:nth-child(1) {
  width: 118px;
}

.invoices-reference-table td:nth-child(2),
.invoices-reference-table th:nth-child(2) {
  width: 266px;
}

.invoices-reference-table td:nth-child(3),
.invoices-reference-table th:nth-child(3),
.invoices-reference-table td:nth-child(4),
.invoices-reference-table th:nth-child(4) {
  width: 108px;
}

.invoices-reference-table td:nth-child(5),
.invoices-reference-table th:nth-child(5) {
  width: 82px;
}

.invoices-reference-table td:nth-child(6),
.invoices-reference-table th:nth-child(6) {
  width: 94px;
}

.invoices-reference-table td:nth-child(7),
.invoices-reference-table th:nth-child(7),
.invoices-reference-table td:nth-child(8),
.invoices-reference-table th:nth-child(8),
.invoices-reference-table td:nth-child(9),
.invoices-reference-table th:nth-child(9) {
  width: 112px;
  text-align: right;
}

.invoices-reference-table td:nth-child(10),
.invoices-reference-table th:nth-child(10) {
  width: 64px;
  text-align: center;
}

.invoices-reference-code {
  color: #2b6fd6;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.invoices-reference-customer {
  text-transform: uppercase;
}

.invoices-reference-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.invoices-reference-status.is-open {
  background: #fff8e1;
  color: #d29b00;
}

.invoices-reference-status.is-overdue {
  background: #fdecea;
  color: #c0362c;
}

.invoices-reference-status.is-paid {
  background: #ecfdf3;
  color: #2e8b57;
}

.invoices-reference-status.is-credit {
  background: #eef4ff;
  color: #356ae6;
}

.invoices-reference-money.is-negative {
  color: #b42318;
  font-weight: 600;
}

.invoices-reference-view {
  width: 34px;
  height: 30px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: #475467;
}

.invoices-reference-view svg {
  width: 18px;
  height: 18px;
}

.invoices-reference-empty {
  text-align: center;
  color: var(--muted);
}

.invoices-reference-footer {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.invoices-reference-pagination {
  gap: 10px;
}

.invoices-reference-page-control {
  width: 32px;
  height: 32px;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  background: #ffffff;
  color: #667085;
  font: inherit;
  display: inline-grid;
  place-items: center;
}

.invoices-reference-page-control.is-active {
  background: #28a745;
  border-color: #28a745;
  color: #ffffff;
}

.invoices-reference-page-control.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.customers-page {
  padding: 22px 24px 24px;
  display: grid;
  gap: 18px;
}

.customers-hero,
.customers-layout {
  display: grid;
  gap: 18px;
}

.customers-hero {
  grid-template-columns: minmax(0, 2.1fr) minmax(320px, 1fr);
}

.customers-hero__intro {
  padding: 18px 18px 16px;
  background:
    radial-gradient(circle at top right, rgba(86, 178, 96, 0.18), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fbf7 100%);
}

.customers-hero__eyebrow {
  margin: 0 0 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2f7d39;
}

.customers-hero__headline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.customers-hero__headline h3 {
  margin: 0 0 10px;
  font-size: 1.45rem;
}

.customers-hero__copy,
.customers-hero__date {
  color: var(--muted);
}

.customers-hero__copy {
  margin: 0;
  max-width: 54ch;
  line-height: 1.55;
}

.customers-hero__meta {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.customers-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.customers-metric {
  padding: 16px 18px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.customers-metric__label {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.customers-metric strong {
  font-size: 1.3rem;
  line-height: 1.1;
}

.customers-metric span {
  color: var(--muted);
  font-size: 0.8rem;
}

.customers-toolbar {
  padding: 16px 18px;
}

.customers-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(180px, 0.8fr)) auto;
  gap: 14px;
  align-items: end;
}

.customers-field {
  display: grid;
  gap: 8px;
}

.customers-field span {
  color: #344054;
  font-size: 0.8rem;
  font-weight: 600;
}

.customers-field input,
.customers-field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.customers-filters__actions {
  display: flex;
  gap: 10px;
}

.customers-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  border-radius: 10px;
  padding: 0 16px;
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}

.customers-button--primary {
  background: #183d21;
  color: #ffffff;
}

.customers-button--ghost {
  background: #f8fafc;
  border-color: var(--border);
  color: #344054;
}

.customers-layout {
  grid-template-columns: minmax(0, 2.1fr) minmax(280px, 0.95fr);
  align-items: start;
}

.customers-directory {
  padding: 16px 18px;
}

.customers-directory__header {
  margin-bottom: 10px;
}

.customers-empty {
  padding: 28px 6px 12px;
}

.customers-table th,
.customers-table td {
  padding-top: 14px;
  padding-bottom: 14px;
}

.customer-cell {
  display: flex;
  gap: 12px;
  min-width: 240px;
}

.customer-cell__avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d7f4dc 0%, #eff9f0 100%);
  color: #245730;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.customer-cell__body {
  display: grid;
  gap: 6px;
}

.customer-cell__name {
  font-size: 0.92rem;
  font-weight: 700;
}

.customer-cell__meta,
.customer-stack {
  display: grid;
  gap: 6px;
}

.customer-cell__meta span,
.customer-stack__text,
.customer-statline,
.balance-cell span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.customer-statline strong,
.customer-stack__text strong {
  color: var(--text);
}

.balance-cell {
  display: grid;
  gap: 6px;
  min-width: 144px;
}

.balance-cell strong {
  font-size: 0.96rem;
}

.balance-cell__link {
  color: #245730;
  font-weight: 600;
  font-size: 0.8rem;
}

.customers-sidebar {
  display: grid;
  gap: 18px;
}

.customers-sidebar__panel {
  padding: 16px 18px;
}

.customers-sidebar-list,
.customers-balance-list,
.terms-list {
  display: grid;
  gap: 10px;
}

.customers-sidebar-item,
.customers-balance-item {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfcfe;
}

.customers-sidebar-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.customers-balance-item {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.customers-sidebar-item p,
.customers-balance-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.customers-sidebar-item__meta {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.customers-balance-item__rank {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eef5ef;
  color: #2b6b37;
  font-size: 0.8rem;
  font-weight: 700;
}

.terms-list__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.payments-reference-page {
  padding: 18px 20px 22px;
  display: grid;
  gap: 14px;
}

.payments-reference-header,
.payments-reference-title,
.payments-summary-card,
.payments-reference-searchbox,
.payments-reference-actions,
.payments-reference-footer,
.payments-reference-pagination {
  display: flex;
  align-items: center;
}

.payments-reference-header,
.payments-reference-footer {
  justify-content: space-between;
  gap: 16px;
}

.payments-reference-title h3 {
  margin: 0 0 4px;
  font-size: 1.45rem;
  line-height: 1.15;
}

.payments-reference-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.payments-reference-add {
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #35b14f 0%, #269a40 100%);
  color: #ffffff;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(46, 170, 79, 0.18);
}

.payments-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.payments-summary-card {
  gap: 14px;
  padding: 18px 16px;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.035);
}

.payments-summary-card__badge {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.payments-summary-card__badge svg {
  width: 26px;
  height: 26px;
}

.payments-summary-card__badge--green {
  background: #ecfbf1;
  color: #2fa870;
}

.payments-summary-card__badge--blue {
  background: #edf4ff;
  color: #2672eb;
}

.payments-summary-card__badge--amber {
  background: #fff7df;
  color: #e0a200;
}

.payments-summary-card__badge--purple {
  background: #f2ebff;
  color: #8b5cf6;
}

.payments-summary-card__badge--rose {
  background: #fdecef;
  color: #d14343;
}

.payments-summary-card p,
.payments-summary-card span {
  margin: 0;
}

.payments-summary-card p {
  font-size: 0.8rem;
  color: #101828;
}

.payments-summary-card strong {
  display: block;
  margin: 5px 0 8px;
  font-size: 0.94rem;
  line-height: 1.2;
}

.payments-summary-card span {
  color: var(--muted);
  font-size: 0.76rem;
}

.payments-table-shell {
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.035);
  overflow: hidden;
}

.payments-reference-filters {
  display: grid;
  grid-template-columns: minmax(280px, 1.55fr) repeat(4, minmax(120px, 0.72fr)) minmax(180px, 0.78fr);
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #edf1f5;
}

.payments-reference-field {
  display: grid;
  gap: 8px;
}

.payments-reference-field span {
  font-size: 0.82rem;
  font-weight: 600;
  color: #344054;
}

.payments-reference-searchbox,
.payments-reference-field select {
  min-height: 36px;
  border: 1px solid #dbe2ea;
  border-radius: 7px;
  background: #ffffff;
}

.payments-reference-searchbox {
  gap: 10px;
  padding: 0 11px;
  color: #667085;
}

.payments-reference-searchbox svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.payments-reference-searchbox input,
.payments-reference-field select {
  width: 100%;
  font: inherit;
}

.payments-reference-searchbox input {
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.95rem;
}

.payments-reference-field select {
  padding: 0 12px;
  color: var(--text);
  font-size: 0.95rem;
}

.payments-reference-actions {
  gap: 10px;
  align-self: end;
}

.payments-reference-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid #dbe2ea;
  background: #ffffff;
  color: #344054;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.payments-reference-button--secondary {
  background: #ffffff;
}

.payments-reference-table th,
.payments-reference-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf1f5;
  font-size: 0.85rem;
}

.payments-reference-table th {
  color: #1f2937;
  font-weight: 600;
  white-space: nowrap;
  background: #ffffff;
  font-size: 0.8rem;
}

.payments-reference-table td {
  color: #111827;
  vertical-align: middle;
}

.payments-reference-table td:nth-child(1),
.payments-reference-table th:nth-child(1) {
  width: 108px;
}

.payments-reference-table td:nth-child(2),
.payments-reference-table th:nth-child(2) {
  width: 94px;
}

.payments-reference-table td:nth-child(3),
.payments-reference-table th:nth-child(3) {
  width: 126px;
}

.payments-reference-table td:nth-child(4),
.payments-reference-table th:nth-child(4) {
  width: 252px;
}

.payments-reference-table td:nth-child(5),
.payments-reference-table th:nth-child(5) {
  min-width: 230px;
}

.payments-reference-table td:nth-child(6),
.payments-reference-table th:nth-child(6),
.payments-reference-table td:nth-child(7),
.payments-reference-table th:nth-child(7),
.payments-reference-table td:nth-child(8),
.payments-reference-table th:nth-child(8) {
  width: 108px;
  text-align: right;
}

.payments-reference-table td:nth-child(9),
.payments-reference-table th:nth-child(9) {
  width: 106px;
}

.payments-reference-table td:nth-child(10),
.payments-reference-table th:nth-child(10) {
  width: 64px;
  text-align: center;
}

.payments-reference-type,
.payments-reference-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.payments-reference-type--payment,
.payments-reference-status--applied {
  background: #ecfdf3;
  color: #2e8b57;
}

.payments-reference-type--credit {
  background: #f2ebff;
  color: #7c3aed;
}

.payments-reference-status--partial {
  background: #fff7df;
  color: #c28700;
}

.payments-reference-status--unapplied {
  background: #fff3d6;
  color: #d18b1f;
}

.payments-reference-code {
  color: #2b6fd6;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.payments-reference-customer {
  text-transform: uppercase;
}

.payments-reference-description {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.payments-reference-description strong,
.payments-reference-description span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payments-reference-description strong {
  font-size: 0.84rem;
  font-weight: 500;
}

.payments-reference-description span {
  color: var(--muted);
  font-size: 0.76rem;
}

.payments-reference-money {
  font-variant-numeric: tabular-nums;
}

.payments-reference-view {
  width: 34px;
  height: 30px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: #475467;
}

.payments-reference-view svg {
  width: 18px;
  height: 18px;
}

.payments-reference-empty {
  text-align: center;
  color: var(--muted);
}

.payments-reference-footer {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.payments-reference-pagination {
  gap: 10px;
}

.payments-reference-page-control {
  width: 32px;
  height: 32px;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  background: #ffffff;
  color: #667085;
  font: inherit;
  display: inline-grid;
  place-items: center;
}

.payments-reference-page-control.is-active {
  background: #28a745;
  border-color: #28a745;
  color: #ffffff;
}

.payments-reference-page-control.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

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

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

  .aging-card {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .invoices-summary-grid,
  .customers-summary-grid,
  .statements-summary-grid,
  .payments-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoices-reference-filters,
  .statements-reference-filters,
  .payments-reference-filters {
    grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(120px, 0.8fr)) auto;
  }

  .customers-reference-filters {
    grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(120px, 0.8fr)) auto;
  }

  .invoices-reference-field:last-of-type,
  .statements-reference-field:nth-of-type(5),
  .customers-reference-field:last-of-type,
  .payments-reference-field:nth-of-type(5) {
    display: none;
  }

  .customers-hero,
  .customers-layout,
  .customers-filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .metrics-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .content {
    min-height: auto;
  }

  .content__header,
  .metrics-grid,
  .dashboard-grid,
  .dashboard-grid--bottom,
  .invoices-reference-page,
  .statements-reference-page,
  .customers-reference-page,
  .payments-reference-page,
  .customers-page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .statement-list__row,
  .overview-list__row,
  .aging-legend__row {
    align-items: flex-start;
    gap: 12px;
  }

  .statement-list__row {
    grid-template-columns: 1fr;
  }

  .statement-list__meta {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

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

  .dashboard-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .customers-metrics {
    grid-template-columns: 1fr;
  }

  .invoices-reference-header,
  .invoices-reference-footer,
  .statements-reference-header,
  .statements-reference-footer,
  .customers-reference-header,
  .customers-reference-footer,
  .payments-reference-header,
  .payments-reference-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .invoices-summary-grid,
  .invoices-reference-filters,
  .statements-summary-grid,
  .statements-reference-filters,
  .customers-summary-grid,
  .customers-reference-filters,
  .payments-summary-grid,
  .payments-reference-filters {
    grid-template-columns: 1fr;
  }

  .invoices-search-group {
    display: grid;
    grid-template-columns: 1fr 38px;
  }

  .invoices-reference-actions,
  .statements-reference-actions,
  .customers-reference-actions,
  .payments-reference-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .invoices-reference-button,
  .statements-reference-button,
  .customers-reference-button,
  .payments-reference-button {
    width: 100%;
  }

  .invoices-reference-table thead,
  .statements-reference-table thead,
  .customers-reference-table thead,
  .payments-reference-table thead {
    display: none;
  }

  .invoices-reference-table,
  .invoices-reference-table tbody,
  .invoices-reference-table tr,
  .invoices-reference-table td,
  .statements-reference-table,
  .statements-reference-table tbody,
  .statements-reference-table tr,
  .statements-reference-table td,
  .customers-reference-table,
  .customers-reference-table tbody,
  .customers-reference-table tr,
  .customers-reference-table td,
  .payments-reference-table,
  .payments-reference-table tbody,
  .payments-reference-table tr,
  .payments-reference-table td {
    display: block;
    width: 100%;
  }

  .invoices-reference-table tr,
  .statements-reference-table tr,
  .customers-reference-table tr,
  .payments-reference-table tr {
    padding: 12px 18px;
    border-bottom: 1px solid #edf1f5;
  }

  .invoices-reference-table td,
  .statements-reference-table td,
  .customers-reference-table td,
  .payments-reference-table td {
    padding: 8px 0;
    border-bottom: 0;
    text-align: left;
  }

  .invoices-reference-table td::before,
  .statements-reference-table td::before,
  .customers-reference-table td::before,
  .payments-reference-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #475467;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .customers-hero__headline,
  .customers-filters__actions,
  .customers-balance-item {
    grid-template-columns: 1fr;
    display: grid;
  }

  .customers-hero__meta,
  .customers-sidebar-item__meta {
    justify-items: start;
  }

  .customers-sidebar-item {
    grid-template-columns: 1fr;
  }

  .customers-table thead {
    display: none;
  }

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

  .customers-table tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .customers-table td {
    border-bottom: 0;
    padding: 10px 0;
  }

  .customers-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 8px;
    color: #344054;
    font-size: 0.77rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  .customer-cell,
  .balance-cell {
    min-width: 0;
  }
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.login-card {
  width: min(100%, 440px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(16, 24, 40, 0.08);
  box-shadow: 0 30px 80px rgba(20, 30, 50, 0.12);
  border-radius: 24px;
  padding: 32px;
}

.login-card__eyebrow {
  margin: 0 0 10px;
  color: #2f6f38;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
}

.login-card h1 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.15;
}

.login-card__copy {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.login-form {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}

.login-form__field {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
}

.login-form__field span {
  color: #344054;
}

.login-form__field input {
  border: 1px solid #d0d5dd;
  border-radius: 14px;
  background: #ffffff;
  min-height: 48px;
  padding: 0 14px;
  font: inherit;
}

.login-form__field input:focus {
  outline: 2px solid rgba(79, 151, 89, 0.22);
  outline-offset: 0;
  border-color: #5da368;
}

.login-form__error {
  margin: 0;
  border-radius: 14px;
  background: #fff1f1;
  color: #b42318;
  padding: 12px 14px;
  font-size: 0.9rem;
}

.login-form__submit {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #4d9757 0%, #2d6d36 100%);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(45, 109, 54, 0.18);
}

.login-form__submit:hover {
  filter: brightness(1.04);
}

.inventory-reference-page {
  padding: 18px 20px 22px;
  display: grid;
  gap: 14px;
}

.inventory-reference-header,
.inventory-reference-title,
.inventory-summary-card,
.inventory-reference-searchbox,
.inventory-reference-actions,
.inventory-reference-footer,
.inventory-reference-pagination,
.inventory-reference-row-actions {
  display: flex;
  align-items: center;
}

.inventory-reference-header,
.inventory-reference-footer {
  justify-content: space-between;
  gap: 16px;
}

.inventory-reference-title {
  gap: 12px;
}

.inventory-reference-title h3 {
  margin: 0 0 2px;
  font-size: 1.45rem;
  line-height: 1.15;
}

.inventory-reference-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.inventory-reference-icon {
  width: 34px;
  height: 34px;
  color: #6b7280;
}

.inventory-reference-icon svg {
  width: 100%;
  height: 100%;
}

.inventory-reference-add {
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #35b14f 0%, #269a40 100%);
  color: #ffffff;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 1;
  box-shadow: 0 2px 8px rgba(46, 170, 79, 0.18);
}

.inventory-reference-add[disabled] {
  cursor: default;
}

.inventory-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.inventory-summary-card {
  gap: 14px;
  padding: 18px 16px;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.035);
}

.inventory-summary-card__badge {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.inventory-summary-card__badge svg {
  width: 26px;
  height: 26px;
}

.inventory-summary-card__badge--green {
  background: #e9f7ed;
  color: #3d9d51;
}

.inventory-summary-card__badge--blue {
  background: #edf4ff;
  color: #2672eb;
}

.inventory-summary-card__badge--gold {
  background: #fff7de;
  color: #d4921a;
}

.inventory-summary-card__badge--purple {
  background: #f4ebff;
  color: #8b5cf6;
}

.inventory-summary-card__badge--red {
  background: #fdecec;
  color: #d14343;
}

.inventory-summary-card p,
.inventory-summary-card span {
  margin: 0;
}

.inventory-summary-card p {
  font-size: 0.86rem;
  color: #344054;
  font-weight: 600;
}

.inventory-summary-card strong {
  display: block;
  margin-top: 3px;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.inventory-summary-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.inventory-table-shell {
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.035);
  overflow: hidden;
}

.inventory-reference-filters {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(250px, 1.5fr) repeat(4, minmax(130px, 0.8fr)) auto;
  gap: 12px;
  border-bottom: 1px solid #edf1f5;
}

.inventory-reference-field {
  display: grid;
  gap: 6px;
}

.inventory-reference-field span {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475467;
}

.inventory-reference-searchbox,
.inventory-reference-field select {
  min-height: 44px;
  border: 1px solid #d9dfe7;
  border-radius: 10px;
  background: #ffffff;
}

.inventory-reference-searchbox {
  gap: 10px;
  padding: 0 14px;
}

.inventory-reference-searchbox svg {
  width: 18px;
  height: 18px;
  color: #667085;
  flex: 0 0 auto;
}

.inventory-reference-searchbox input,
.inventory-reference-field select {
  width: 100%;
  font: inherit;
  color: #101828;
}

.inventory-reference-searchbox input {
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0;
}

.inventory-reference-field select {
  padding: 0 12px;
}

.inventory-reference-actions {
  gap: 10px;
  justify-content: flex-end;
}

.inventory-reference-button {
  min-height: 44px;
  padding: 0 15px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border: 1px solid transparent;
}

.inventory-reference-button--primary {
  background: #1d4ed8;
  color: #ffffff;
}

.inventory-reference-button--secondary {
  background: #ffffff;
  color: #344054;
  border-color: #d0d5dd;
}

.inventory-reference-table th,
.inventory-reference-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf1f5;
  font-size: 0.92rem;
  vertical-align: middle;
}

.inventory-reference-table th {
  color: #475467;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: left;
  background: #fcfcfd;
}

.inventory-reference-table td {
  color: #101828;
}

.inventory-reference-code,
.inventory-reference-name {
  display: grid;
  gap: 4px;
}

.inventory-reference-code strong,
.inventory-reference-name strong {
  font-weight: 700;
}

.inventory-reference-code span,
.inventory-reference-name span {
  color: var(--muted);
  font-size: 0.82rem;
}

.inventory-reference-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.inventory-reference-status.is-active {
  background: #e8f7ec;
  color: #2b8a4b;
}

.inventory-reference-status.is-inactive {
  background: #fdecec;
  color: #c53b3b;
}

.inventory-reference-stock.is-low {
  color: #c2410c;
  font-weight: 700;
}

.inventory-reference-row-actions {
  gap: 8px;
}

.inventory-reference-row-actions button {
  width: 34px;
  height: 34px;
  border: 1px solid #d9dfe7;
  border-radius: 9px;
  background: #ffffff;
  color: #475467;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.inventory-reference-row-actions button svg {
  width: 16px;
  height: 16px;
}

.inventory-reference-empty {
  text-align: center;
  color: var(--muted);
}

.inventory-reference-footer {
  padding: 14px 16px 16px;
}

.inventory-reference-footer span {
  color: #475467;
  font-size: 0.9rem;
}

.inventory-reference-pagination {
  gap: 8px;
}

.inventory-reference-page-control {
  min-width: 36px;
  min-height: 36px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #ffffff;
  color: #344054;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.inventory-reference-page-control.is-active {
  border-color: #33a64f;
  background: #33a64f;
  color: #ffffff;
}

.inventory-reference-page-control.is-disabled {
  color: #98a2b3;
}

@media (max-width: 1260px) {
  .inventory-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .inventory-reference-filters {
    grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(120px, 0.75fr));
  }

  .inventory-reference-field:last-of-type,
  .inventory-reference-actions {
    grid-column: span 2;
  }
}

@media (max-width: 840px) {
  .inventory-reference-page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .inventory-reference-header,
  .inventory-reference-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .inventory-summary-grid,
  .inventory-reference-filters {
    grid-template-columns: 1fr;
  }

  .inventory-reference-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .inventory-reference-button {
    width: 100%;
  }

  .inventory-reference-table thead {
    display: none;
  }

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

  .inventory-reference-table tr {
    padding: 12px 18px;
    border-bottom: 1px solid #edf1f5;
  }

  .inventory-reference-table td {
    padding: 8px 0;
    border-bottom: 0;
    text-align: left;
  }

  .inventory-reference-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #475467;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
}

.sales-reference-page {
  padding: 18px 20px 22px;
  display: grid;
  gap: 14px;
}

.sales-reference-header,
.sales-reference-title,
.sales-summary-card,
.sales-reference-searchbox,
.sales-reference-actions,
.sales-reference-footer,
.sales-reference-pagination {
  display: flex;
  align-items: center;
}

.sales-reference-header,
.sales-reference-footer {
  justify-content: space-between;
  gap: 16px;
}

.sales-reference-title {
  gap: 12px;
}

.sales-reference-title h3 {
  margin: 0 0 2px;
  font-size: 1.45rem;
  line-height: 1.15;
}

.sales-reference-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.sales-reference-icon {
  width: 34px;
  height: 34px;
  color: #6b7280;
}

.sales-reference-icon svg {
  width: 100%;
  height: 100%;
}

.sales-reference-add {
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #35b14f 0%, #269a40 100%);
  color: #ffffff;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(46, 170, 79, 0.18);
}

.sales-reference-add[disabled] {
  cursor: default;
}

.sales-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.sales-summary-card {
  gap: 14px;
  padding: 18px 16px;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.035);
}

.sales-summary-card__badge {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.sales-summary-card__badge svg {
  width: 26px;
  height: 26px;
}

.sales-summary-card__badge--green {
  background: #e9f7ed;
  color: #3d9d51;
}

.sales-summary-card__badge--blue {
  background: #edf4ff;
  color: #2672eb;
}

.sales-summary-card__badge--gold {
  background: #fff7de;
  color: #d4921a;
}

.sales-summary-card__badge--purple {
  background: #f4ebff;
  color: #8b5cf6;
}

.sales-summary-card__badge--red {
  background: #fdecec;
  color: #d14343;
}

.sales-summary-card p,
.sales-summary-card span {
  margin: 0;
}

.sales-summary-card p {
  font-size: 0.86rem;
  color: #344054;
  font-weight: 600;
}

.sales-summary-card strong {
  display: block;
  margin-top: 3px;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.sales-summary-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.sales-table-shell {
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.035);
  overflow: hidden;
}

.sales-reference-filters {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) repeat(4, minmax(130px, 0.8fr)) auto;
  gap: 12px;
  border-bottom: 1px solid #edf1f5;
}

.sales-reference-field {
  display: grid;
  gap: 6px;
}

.sales-reference-field span {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475467;
}

.sales-reference-searchbox,
.sales-reference-field select {
  min-height: 44px;
  border: 1px solid #d9dfe7;
  border-radius: 10px;
  background: #ffffff;
}

.sales-reference-searchbox {
  gap: 10px;
  padding: 0 14px;
}

.sales-reference-searchbox svg {
  width: 18px;
  height: 18px;
  color: #667085;
  flex: 0 0 auto;
}

.sales-reference-searchbox input,
.sales-reference-field select {
  width: 100%;
  font: inherit;
  color: #101828;
}

.sales-reference-searchbox input {
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0;
}

.sales-reference-field select {
  padding: 0 12px;
}

.sales-reference-actions {
  gap: 10px;
  justify-content: flex-end;
}

.sales-reference-button {
  min-height: 44px;
  padding: 0 15px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border: 1px solid transparent;
}

.sales-reference-button--secondary {
  background: #ffffff;
  color: #344054;
  border-color: #d0d5dd;
}

.sales-reference-button--ghost {
  background: #f8fafc;
  color: #344054;
  border-color: #e2e8f0;
}

.sales-reference-table th,
.sales-reference-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf1f5;
  font-size: 0.92rem;
  vertical-align: middle;
}

.sales-reference-table th {
  color: #475467;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: left;
  background: #fcfcfd;
}

.sales-reference-table td {
  color: #101828;
}

.sales-reference-customer {
  min-width: 190px;
}

.sales-reference-code,
.sales-reference-product {
  display: grid;
  gap: 4px;
}

.sales-reference-code strong,
.sales-reference-product strong {
  font-weight: 700;
}

.sales-reference-code span,
.sales-reference-product span {
  color: var(--muted);
  font-size: 0.82rem;
}

.sales-reference-type,
.sales-reference-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.sales-reference-type.is-product {
  background: #eaf2ff;
  color: #265fb8;
}

.sales-reference-type.is-service {
  background: #fff4df;
  color: #b66b14;
}

.sales-reference-source.is-trf {
  background: #e8f7ec;
  color: #2b8a4b;
}

.sales-reference-source.is-legacy {
  background: #edf4ff;
  color: #2f63bf;
}

.sales-reference-number,
.sales-reference-money {
  white-space: nowrap;
}

.sales-reference-money {
  font-variant-numeric: tabular-nums;
}

.sales-reference-invoice {
  font-weight: 700;
  color: #1d4ed8;
}

.sales-reference-empty {
  text-align: center;
  color: var(--muted);
}

.sales-reference-footer {
  padding: 14px 16px 16px;
}

.sales-reference-footer span {
  color: #475467;
  font-size: 0.9rem;
}

.sales-reference-pagination {
  gap: 8px;
}

.sales-reference-page-control {
  min-width: 36px;
  min-height: 36px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #ffffff;
  color: #344054;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.sales-reference-page-control.is-active {
  border-color: #33a64f;
  background: #33a64f;
  color: #ffffff;
}

.sales-reference-page-control.is-disabled {
  color: #98a2b3;
}

@media (max-width: 1260px) {
  .sales-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sales-reference-filters {
    grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(120px, 0.8fr));
  }

  .sales-reference-field:last-of-type,
  .sales-reference-actions {
    grid-column: span 2;
  }
}

@media (max-width: 840px) {
  .sales-reference-page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .sales-reference-header,
  .sales-reference-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .sales-summary-grid,
  .sales-reference-filters {
    grid-template-columns: 1fr;
  }

  .sales-reference-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .sales-reference-button {
    width: 100%;
  }

  .sales-reference-table thead {
    display: none;
  }

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

  .sales-reference-table tr {
    padding: 12px 18px;
    border-bottom: 1px solid #edf1f5;
  }

  .sales-reference-table td {
    padding: 8px 0;
    border-bottom: 0;
    text-align: left;
  }

  .sales-reference-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #475467;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
}
