:root {
  --ink: #17201d;
  --ink-soft: #59635f;
  --ink-muted: #8a938f;
  --paper: #f3f1eb;
  --surface: #ffffff;
  --surface-soft: #f8f7f3;
  --line: #e7e4dc;
  --lime: #d7ff68;
  --lime-deep: #bddd47;
  --teal: #267a68;
  --teal-soft: #e8f4f0;
  --coral: #e97956;
  --coral-soft: #fff0ea;
  --blue: #5c78c7;
  --blue-soft: #edf1fc;
  --amber: #bd8528;
  --amber-soft: #fff6df;
  --danger: #bf4f4f;
  --danger-soft: #fdeeee;
  --shadow: 0 16px 45px rgba(30, 43, 39, 0.07);
  --radius-lg: 24px;
  --radius-md: 17px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 252px;
  flex-direction: column;
  padding: 27px 18px 20px;
  color: #f7faf8;
  background: var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 28px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
}

.brand-mark svg path:first-child {
  fill: var(--lime);
}

.brand-mark-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font: 800 19px/1.15 "Manrope", sans-serif;
  letter-spacing: -0.5px;
}

.brand small {
  margin-top: 3px;
  color: #9eaaa5;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.nav-list {
  display: grid;
  gap: 5px;
}

.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  border-radius: 13px;
  color: #9faaa6;
  background: transparent;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
}

.nav-item.active {
  color: var(--ink);
  background: var(--lime);
}

.nav-icon,
.nav-item [data-icon] {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.sidebar-bottom {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.storage-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 7px 3px;
  padding: 13px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #d7dfdc;
  background: rgba(255, 255, 255, 0.04);
}

.storage-note strong,
.storage-note small {
  display: block;
}

.storage-note strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.storage-note small {
  color: #84918c;
  font-size: 10px;
  line-height: 1.35;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 4px;
  border-radius: 99px;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(215, 255, 104, 0.1);
}

.storage-note.syncing .status-dot {
  background: #f3c85b;
  box-shadow: 0 0 0 4px rgba(243, 200, 91, 0.12);
  animation: syncPulse 1.15s ease-in-out infinite;
}

.storage-note.offline .status-dot,
.storage-note.error .status-dot {
  background: #ef8065;
  box-shadow: 0 0 0 4px rgba(239, 128, 101, 0.12);
}

@keyframes syncPulse {
  50% { opacity: .45; transform: scale(.82); }
}

.main {
  min-height: 100vh;
  margin-left: 252px;
  padding: 0 34px 48px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  min-height: 100px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 21px 0 17px;
  background: rgba(243, 241, 235, 0.9);
  backdrop-filter: blur(16px);
}

.topbar h1 {
  margin: 3px 0 0;
  font: 800 27px/1.15 "Manrope", sans-serif;
  letter-spacing: -0.9px;
}

.eyebrow {
  margin: 0;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fiscal-year-control {
  display: grid;
  min-width: 132px;
  gap: 2px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.fiscal-year-control > span {
  color: var(--teal);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.fiscal-year-control > span.closed {
  color: var(--coral);
}

.fiscal-year-control select {
  min-width: 0;
  padding: 0 20px 0 0;
  border: 0;
  color: var(--ink);
  outline: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.fiscal-year-notice {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: -4px 0 14px;
  padding: 11px 14px;
  border: 1px solid #f1d3c8;
  border-radius: 14px;
  color: #9b4f39;
  background: #fff3ee;
}

.fiscal-year-notice[hidden] {
  display: none;
}

.fiscal-year-notice > [data-icon] {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
}

.fiscal-year-notice strong,
.fiscal-year-notice small {
  display: block;
}

.fiscal-year-notice strong {
  font-size: 11px;
}

.fiscal-year-notice small {
  margin-top: 2px;
  font-size: 9px;
}

.icon-button,
.profile-button,
.primary-button,
.secondary-button,
.light-button,
.text-button {
  border: 0;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.icon-button:hover,
.primary-button:hover,
.secondary-button:hover,
.light-button:hover {
  transform: translateY(-1px);
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.icon-button [data-icon],
.icon-button > svg {
  width: 19px;
  height: 19px;
}

.primary-button,
.secondary-button,
.light-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border-radius: 13px;
  font-weight: 700;
}

.primary-button {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 18px rgba(23, 32, 29, 0.13);
}

.primary-button:hover {
  background: #24302c;
  box-shadow: 0 10px 22px rgba(23, 32, 29, 0.18);
}

.secondary-button {
  color: var(--ink);
  background: var(--lime);
}

.light-button {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}

.primary-button [data-icon],
.secondary-button [data-icon],
.light-button [data-icon] {
  width: 18px;
  height: 18px;
}

button:disabled {
  transform: none !important;
  opacity: .46;
  box-shadow: none !important;
  cursor: not-allowed;
}

.profile-button {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 4px 9px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.profile-button > [data-icon] {
  width: 16px;
  height: 16px;
  color: var(--ink-muted);
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  color: var(--ink);
  background: #e2efbb;
  font-size: 12px;
  font-weight: 800;
}

.profile-copy {
  min-width: 96px;
  text-align: left;
}

.profile-copy strong,
.profile-copy small {
  display: block;
}

.profile-copy strong {
  font-size: 12px;
}

.profile-copy small {
  margin-top: 1px;
  color: var(--ink-muted);
  font-size: 10px;
}

.view {
  display: none;
  animation: view-in 220ms ease;
}

.view.active {
  display: block;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome-strip {
  position: relative;
  display: flex;
  min-height: 184px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 30px 34px;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(circle at 80% 12%, rgba(215, 255, 104, 0.2), transparent 31%),
    linear-gradient(120deg, #18221f, #273e36);
  box-shadow: var(--shadow);
}

.welcome-strip::after {
  position: absolute;
  width: 200px;
  height: 200px;
  right: -80px;
  bottom: -100px;
  border: 1px solid rgba(215, 255, 104, 0.2);
  border-radius: 50%;
  content: "";
}

.welcome-strip .eyebrow {
  color: var(--lime);
}

.welcome-strip h2,
.report-hero h2 {
  max-width: 660px;
  margin: 8px 0 10px;
  font: 700 clamp(24px, 3vw, 34px)/1.16 "Manrope", sans-serif;
  letter-spacing: -1.3px;
}

.welcome-strip p:not(.eyebrow),
.report-hero p:not(.eyebrow) {
  max-width: 650px;
  margin: 0;
  color: #aebbb6;
  line-height: 1.55;
}

.welcome-actions {
  display: flex;
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  gap: 9px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(36, 48, 44, 0.05);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(30, 43, 39, 0.035);
}

.metric-card::after {
  position: absolute;
  width: 70px;
  height: 70px;
  right: -28px;
  bottom: -32px;
  border-radius: 50%;
  background: var(--metric-color, var(--lime));
  opacity: 0.11;
  content: "";
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: var(--metric-ink, var(--teal));
  background: var(--metric-bg, var(--teal-soft));
}

.metric-icon svg {
  width: 19px;
  height: 19px;
}

.metric-label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.metric-value {
  display: block;
  margin-top: 16px;
  font: 800 clamp(21px, 2.5vw, 27px)/1 "Manrope", sans-serif;
  letter-spacing: -1px;
}

.metric-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--ink-muted);
  font-size: 11px;
}

.flow-summary-metric {
  grid-column: 1 / -1;
  padding: 20px 22px 22px;
  overflow: visible;
}

.flow-summary-metric::after {
  display: none;
}

.flow-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.flow-summary-head > div:first-child {
  display: grid;
  gap: 4px;
}

.flow-summary-head > div:first-child > strong {
  font: 800 17px/1.2 "Manrope", sans-serif;
}

.flow-summary-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 700;
}

.flow-summary-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.flow-summary-legend i {
  width: 7px;
  height: 7px;
  border-radius: 99px;
}

.flow-summary-legend i.sales {
  background: var(--blue);
}

.flow-summary-legend i.collections {
  background: var(--teal);
}

.flow-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid #eeece6;
  border-radius: 14px;
  background: #faf9f6;
}

.flow-summary-item {
  min-width: 0;
  padding: 14px 15px;
  border-left: 1px solid #e8e6df;
}

.flow-summary-item:first-child {
  border-left: 0;
}

.flow-summary-item > span,
.flow-summary-item > strong,
.flow-summary-item > small {
  display: block;
}

.flow-summary-item > span {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 700;
}

.flow-summary-item > strong {
  overflow: hidden;
  margin-top: 7px;
  font: 800 clamp(13px, 1.25vw, 17px)/1.05 "Manrope", sans-serif;
  letter-spacing: -0.45px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-breakdown-block {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ebe9e3;
}

.sales-breakdown-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.sales-breakdown-title > div {
  display: grid;
  gap: 4px;
}

.sales-breakdown-title strong {
  font: 800 14px/1.2 "Manrope", sans-serif;
}

.sales-breakdown-title > small,
.sales-breakdown-period {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: capitalize;
}

.sales-breakdown-panel {
  margin-bottom: 14px;
}

.sales-breakdown-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.sales-breakdown-summary > div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #eceae4;
  border-radius: 12px;
  background: #faf9f6;
}

.sales-breakdown-summary span,
.sales-breakdown-summary strong,
.sales-breakdown-summary small {
  display: block;
}

.sales-breakdown-summary span {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
}

.sales-breakdown-summary strong {
  overflow: hidden;
  margin-top: 7px;
  font: 800 clamp(13px, 1.2vw, 16px)/1.1 "Manrope", sans-serif;
  letter-spacing: -0.35px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-breakdown-summary small {
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 8px;
  text-transform: capitalize;
}

.sales-breakdown-summary .invoiced strong,
.sales-breakdown-table .invoiced {
  color: var(--blue);
}

.sales-breakdown-summary .unofficial strong,
.sales-breakdown-table .unofficial {
  color: var(--amber);
}

.sales-breakdown-table-wrap {
  overflow-x: auto;
  border: 1px solid #ebe9e3;
  border-radius: 12px;
  background: var(--surface);
}

.sales-breakdown-table {
  width: 100%;
  min-width: 610px;
  border-collapse: collapse;
  font-size: 10px;
}

.sales-breakdown-table th,
.sales-breakdown-table td {
  padding: 10px 13px;
  border-bottom: 1px solid #efede7;
  text-align: right;
  white-space: nowrap;
}

.sales-breakdown-table th:first-child,
.sales-breakdown-table td:first-child {
  text-align: left;
}

.sales-breakdown-table thead th {
  color: var(--ink-muted);
  background: #faf9f6;
  font-size: 8px;
  letter-spacing: .25px;
  text-transform: uppercase;
}

.sales-breakdown-table tbody th {
  color: var(--ink-soft);
  font-weight: 700;
  text-transform: capitalize;
}

.sales-breakdown-table tbody td {
  font-weight: 700;
}

.sales-breakdown-table tfoot th,
.sales-breakdown-table tfoot td {
  border-bottom: 0;
  color: var(--ink);
  background: #f4f2ec;
  font-weight: 800;
}

.sales-breakdown-table tfoot .invoiced {
  color: var(--blue);
}

.sales-breakdown-table tfoot .unofficial {
  color: var(--amber);
}

.flow-summary-item.sales > strong {
  color: var(--blue);
}

.flow-summary-item.collections > strong {
  color: var(--teal);
}

.flow-summary-item > small {
  overflow: hidden;
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}

.trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--teal);
  font-weight: 700;
}

.trend.warn {
  color: var(--coral);
}

.dashboard-grid,
.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.85fr);
  gap: 14px;
  margin-bottom: 14px;
}

.panel {
  overflow: hidden;
  margin-bottom: 14px;
  padding: 22px;
  border: 1px solid rgba(36, 48, 44, 0.055);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(30, 43, 39, 0.035);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 21px;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel h3 {
  margin: 5px 0 0;
  font: 700 17px/1.25 "Manrope", sans-serif;
  letter-spacing: -0.35px;
}

.legend {
  display: flex;
  gap: 13px;
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 600;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 99px;
}

.legend-dot.income {
  background: var(--teal);
}

.legend-dot.expense {
  background: #e4a77e;
}

.legend-dot.sales {
  background: var(--blue);
}

.legend-dot.purchase {
  background: var(--amber);
}

.legend-dot.payment {
  background: var(--coral);
}

.panel-note {
  max-width: 680px;
  margin: 7px 0 0;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.chart-area {
  min-height: 212px;
}

.bar-chart {
  display: grid;
  height: 190px;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: clamp(12px, 3vw, 28px);
  padding: 14px 2px 0;
  background-image: repeating-linear-gradient(to bottom, transparent, transparent 46px, #f0eee8 47px);
}

.bar-group {
  display: grid;
  height: 176px;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 4px;
}

.bar {
  position: relative;
  min-height: 3px;
  border-radius: 7px 7px 3px 3px;
  transform-origin: bottom;
  animation: bar-grow 650ms cubic-bezier(.2,.9,.3,1) both;
}

@keyframes bar-grow {
  from { transform: scaleY(0); }
}

.bar.income {
  background: var(--teal);
}

.bar.expense {
  background: #e9b18d;
}

.bar-label {
  grid-column: 1 / -1;
  padding-top: 8px;
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.quick-card {
  display: grid;
  min-height: 112px;
  align-content: center;
  justify-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: var(--surface-soft);
  text-align: left;
  cursor: pointer;
  transition: 150ms ease;
}

.quick-card:hover {
  border-color: #d7d4cc;
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(23, 32, 29, 0.06);
}

.quick-card strong {
  margin-top: 9px;
  font-size: 12px;
}

.quick-card small {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 10px;
}

.quick-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
}

.quick-icon svg {
  width: 16px;
  height: 16px;
}

.quick-card.collect .quick-icon { color: var(--teal); background: var(--teal-soft); }
.quick-card.pay .quick-icon { color: var(--coral); background: var(--coral-soft); }
.quick-card.sale .quick-icon { color: var(--blue); background: var(--blue-soft); }
.quick-card.contact .quick-icon { color: var(--amber); background: var(--amber-soft); }

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 0;
  color: var(--teal);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.text-button [data-icon] {
  width: 14px;
  height: 14px;
}

.pending-jobs-panel {
  padding-bottom: 12px;
}

.pending-job-list {
  display: grid;
}

.pending-job-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 3px;
  border-top: 1px solid #efede7;
}

.pending-job-row:first-child {
  border-top: 0;
}

.pending-job-main {
  min-width: 0;
}

.pending-job-main strong,
.pending-job-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-job-main strong {
  font-size: 12px;
}

.pending-job-main small {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 10px;
}

.pending-job-amount {
  font: 700 12px/1 "Manrope", sans-serif;
}

.completion-toggle {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
  border: 1px solid #dcd9d0;
  border-radius: 10px;
  color: transparent;
  background: var(--surface-soft);
  cursor: pointer;
  transition: 150ms ease;
}

.completion-toggle:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.completion-toggle.done {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}

.completion-toggle svg {
  width: 15px;
  height: 15px;
}

.compact-empty {
  min-height: 120px;
  padding-block: 10px;
}

.transaction-list {
  display: grid;
}

.transaction-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(120px, 0.8fr) minmax(120px, 0.7fr) minmax(115px, 0.55fr);
  align-items: center;
  gap: 16px;
  padding: 13px 4px;
  border-top: 1px solid #f0eee8;
}

.transaction-row.has-actions {
  grid-template-columns: minmax(220px, 1.5fr) minmax(120px, 0.8fr) minmax(120px, 0.7fr) minmax(115px, 0.55fr) auto;
}

.transaction-row:first-child {
  border-top: 0;
}

.transaction-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.type-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 12px;
}

.type-icon svg {
  width: 18px;
  height: 18px;
}

.type-icon.sale,
.type-icon.payment { color: var(--blue); background: var(--blue-soft); }
.type-icon.collection { color: var(--teal); background: var(--teal-soft); }
.type-icon.purchase { color: var(--coral); background: var(--coral-soft); }
.type-icon.check-in { color: #7356a6; background: #f0ebf8; }
.type-icon.check-out { color: #9a6728; background: #fff3df; }
.type-icon.check-transfer { color: #4f688e; background: #eaf0f8; }

.transaction-main strong,
.transaction-main small,
.cell-stack strong,
.cell-stack small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-main strong,
.cell-stack strong {
  font-size: 12px;
}

.transaction-main small,
.cell-stack small {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 10px;
}

.transaction-amount {
  font: 700 13px/1 "Manrope", sans-serif;
  text-align: right;
}

.transaction-amount.income {
  color: var(--teal);
}

.transaction-amount.expense {
  color: var(--coral);
}

.amount-cell {
  display: grid;
  justify-items: end;
  gap: 5px;
  text-align: right;
}

.amount-cell small {
  color: var(--ink-muted);
  font-size: 9px;
  white-space: nowrap;
}

.record-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.record-action-button {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: var(--surface);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.record-action-button:hover {
  border-color: #cfd7d3;
  color: var(--teal);
  background: var(--teal-soft);
}

.record-action-button.delete:hover {
  border-color: #f0c8c8;
  color: var(--danger);
  background: var(--danger-soft);
}

.record-action-button svg {
  width: 14px;
  height: 14px;
}

.action-cell {
  width: 78px;
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.badge::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.badge.sale,
.badge.payment {
  color: var(--blue);
  background: var(--blue-soft);
}

.badge.collection {
  color: var(--teal);
  background: var(--teal-soft);
}

.badge.purchase,
.badge.overdue {
  color: var(--coral);
  background: var(--coral-soft);
}

.badge.check-in {
  color: #7356a6;
  background: #f0ebf8;
}

.badge.check-out {
  color: #9a6728;
  background: #fff3df;
}

.badge.check-transfer {
  color: #4f688e;
  background: #eaf0f8;
}

.badge.neutral {
  color: var(--ink-soft);
  background: #efeee9;
}

.empty-state {
  display: grid;
  min-height: 240px;
  place-items: center;
  align-content: center;
  padding: 30px;
  color: var(--ink-muted);
  text-align: center;
}

.empty-state span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 15px;
  color: var(--ink-soft);
  background: var(--surface-soft);
}

.empty-state svg {
  width: 22px;
  height: 22px;
}

.empty-state strong {
  color: var(--ink);
}

.empty-state p {
  max-width: 330px;
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.toolbar-actions {
  display: flex;
  gap: 9px;
}

.search-field,
.mobile-search {
  display: flex;
  width: min(420px, 100%);
  height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.search-field [data-icon],
.mobile-search [data-icon] {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: var(--ink-muted);
}

.search-field input,
.mobile-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.select-control {
  min-height: 44px;
  padding: 0 34px 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink-soft);
  outline: 0;
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
}

.summary-line {
  margin: 0 2px 12px;
  color: var(--ink-muted);
  font-size: 11px;
}

.table-panel {
  padding: 10px 20px;
}

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

.data-table th {
  padding: 13px 10px;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
}

.data-table td {
  padding: 14px 10px;
  border-top: 1px solid #efede7;
  font-size: 12px;
}

.data-table tbody tr {
  cursor: pointer;
  transition: background 120ms ease;
}

.data-table tbody tr:hover {
  background: #faf9f6;
}

.contact-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-avatar {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  place-items: center;
  border-radius: 12px;
  color: var(--avatar-ink);
  background: var(--avatar-bg);
  font-size: 11px;
  font-weight: 800;
}

.balance {
  font: 700 12px/1.2 "Manrope", sans-serif;
}

.balance.receivable { color: var(--teal); }
.balance.payable { color: var(--coral); }
.balance.zero { color: var(--ink-muted); }

.mobile-card-list {
  display: none;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.account-card {
  position: relative;
  overflow: hidden;
  min-height: 175px;
  padding: 22px;
  border-radius: var(--radius-lg);
  color: #fff;
  background: var(--account-bg);
  box-shadow: var(--shadow);
}

.account-card::after {
  position: absolute;
  width: 160px;
  height: 160px;
  right: -70px;
  bottom: -80px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  content: "";
}

.account-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.account-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,.14);
}

.account-icon svg {
  width: 19px;
  height: 19px;
}

.account-name {
  color: rgba(255,255,255,.67);
  font-size: 11px;
  font-weight: 600;
}

.account-value {
  display: block;
  margin-top: 25px;
  font: 800 25px/1 "Manrope", sans-serif;
  letter-spacing: -0.8px;
}

.account-foot {
  display: block;
  margin-top: 10px;
  color: rgba(255,255,255,.58);
  font-size: 10px;
}

.report-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 14px;
  padding: 28px 30px;
  border-radius: var(--radius-lg);
  background: #e6f0c8;
}

.report-hero p:not(.eyebrow) {
  color: #5d695f;
}

.report-hero h2 {
  margin-top: 6px;
  font-size: clamp(23px, 3vw, 31px);
}

.report-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.62);
}

.report-switch-button {
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--ink-soft);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.report-switch-button:hover {
  background: rgba(255, 255, 255, 0.74);
}

.report-switch-button.active {
  border-color: rgba(38, 122, 104, 0.13);
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 7px 22px rgba(30, 43, 39, 0.07);
}

.report-switch-button > [data-icon] {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  padding: 10px;
  border-radius: 12px;
  color: var(--teal);
  background: var(--teal-soft);
}

.report-switch-button:nth-child(2) > [data-icon] {
  color: var(--coral);
  background: var(--coral-soft);
}

.report-switch-button small,
.report-switch-button strong {
  display: block;
}

.report-switch-button small {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 700;
}

.report-switch-button strong {
  margin-top: 5px;
  font: 800 17px/1 "Manrope", sans-serif;
}

.report-party-panel {
  min-height: 220px;
}

.report-count {
  padding: 6px 10px;
  border-radius: 99px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 700;
}

.report-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.detail-export-toggle {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.detail-export-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--teal);
}

.compact-button {
  min-height: 38px;
  padding-inline: 13px;
  font-size: 11px;
}

.party-report-row {
  cursor: pointer;
}

.insights-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 14px;
  padding: 29px 31px;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(circle at 82% 15%, rgba(215, 255, 104, 0.18), transparent 28%),
    linear-gradient(120deg, #1b2924, #25443a);
}

.insights-hero h2 {
  margin: 7px 0 9px;
  font: 700 clamp(24px, 3vw, 32px)/1.16 "Manrope", sans-serif;
  letter-spacing: -1px;
}

.insights-hero p:not(.eyebrow) {
  margin: 0;
  color: #aebcb7;
}

.insights-hero .eyebrow {
  color: var(--lime);
}

.month-chip {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 99px;
  color: #e9f0ed;
  background: rgba(255,255,255,.07);
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.tax-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.tax-overview-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 21px;
  border: 1px solid rgba(36, 48, 44, 0.055);
  border-radius: 19px;
  color: var(--ink);
  background:
    radial-gradient(circle at 96% 5%, var(--tax-glow), transparent 30%),
    var(--surface);
  box-shadow: 0 8px 28px rgba(30, 43, 39, 0.04);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.tax-overview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 13px 34px rgba(30, 43, 39, 0.08);
}

.tax-overview-card.vat-card {
  --tax-ink: var(--blue);
  --tax-soft: var(--blue-soft);
  --tax-glow: rgba(92, 120, 199, 0.13);
}

.tax-overview-card.corporate-card {
  --tax-ink: #7356a6;
  --tax-soft: #f1ebf7;
  --tax-glow: rgba(115, 86, 166, 0.13);
}

.tax-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.tax-card-head > div {
  display: grid;
  gap: 5px;
}

.tax-card-head span {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 700;
}

.tax-card-head strong {
  font: 800 14px/1.2 "Manrope", sans-serif;
  text-transform: capitalize;
}

.tax-card-head i {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  padding: 10px;
  border-radius: 12px;
  color: var(--tax-ink);
  background: var(--tax-soft);
}

.tax-card-value {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.tax-card-value > strong {
  font: 800 clamp(23px, 2.4vw, 30px)/1 "Manrope", sans-serif;
  letter-spacing: -1px;
}

.tax-card-value > span {
  padding: 6px 9px;
  border-radius: 99px;
  font-size: 8px;
  font-weight: 800;
  text-align: center;
}

.tax-card-value > span.payable,
.tax-period-result.payable {
  color: #c75b3b;
  background: var(--coral-soft);
}

.tax-card-value > span.carry,
.tax-period-result.carry {
  color: var(--teal);
  background: var(--teal-soft);
}

.tax-card-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 17px;
  overflow: hidden;
  border: 1px solid #ebe9e3;
  border-radius: 13px;
  background: #ebe9e3;
}

.tax-card-breakdown > span {
  min-width: 0;
  padding: 11px;
  background: #faf9f6;
}

.tax-card-breakdown small,
.tax-card-breakdown strong {
  display: block;
}

.tax-card-breakdown small {
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 700;
}

.tax-card-breakdown strong {
  overflow: hidden;
  margin-top: 6px;
  color: var(--tax-ink);
  font: 800 11px/1.1 "Manrope", sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tax-card-foot {
  display: block;
  margin-top: 11px;
  color: var(--ink-muted);
  font-size: 9px;
}

.insight-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.insight-card {
  width: 100%;
  padding: 18px;
  border: 1px solid rgba(36, 48, 44, 0.055);
  border-radius: 17px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(30, 43, 39, 0.035);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.insight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(30, 43, 39, 0.075);
}

.insight-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.insight-card-top i {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 8px;
  border-radius: 10px;
  color: var(--card-ink, var(--teal));
  background: var(--card-bg, var(--teal-soft));
}

.insight-card.green { --card-ink: var(--teal); --card-bg: var(--teal-soft); }
.insight-card.coral { --card-ink: var(--coral); --card-bg: var(--coral-soft); }
.insight-card.blue { --card-ink: var(--blue); --card-bg: var(--blue-soft); }
.insight-card.amber { --card-ink: var(--amber); --card-bg: var(--amber-soft); }

.insight-card > strong {
  display: block;
  margin-top: 15px;
  font: 800 21px/1 "Manrope", sans-serif;
  letter-spacing: -0.6px;
}

.insight-card-foot {
  display: block;
  margin-top: 10px;
  color: var(--ink-muted);
  font-size: 10px;
}

.insight-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #eceae4;
  border-radius: 12px;
  background: #eceae4;
}

.insight-card-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 13px;
}

.insight-card-breakdown > span {
  min-width: 0;
  padding: 9px 10px;
  border-radius: 11px;
  background: var(--card-bg, var(--teal-soft));
}

.insight-card-breakdown small,
.insight-card-breakdown strong {
  display: block;
}

.insight-card-breakdown small {
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 700;
}

.insight-card-breakdown strong {
  overflow: hidden;
  margin-top: 5px;
  color: var(--card-ink, var(--ink));
  font: 800 11px/1.1 "Manrope", sans-serif;
  letter-spacing: -0.25px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-card-stats > span {
  min-width: 0;
  padding: 9px 10px;
  background: #faf9f6;
}

.insight-card-stats small,
.insight-card-stats strong {
  display: block;
}

.insight-card-stats small {
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 700;
}

.insight-card-stats strong {
  overflow: hidden;
  margin-top: 5px;
  color: var(--card-ink, var(--ink));
  font: 800 11px/1.1 "Manrope", sans-serif;
  letter-spacing: -0.25px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr);
  gap: 14px;
}

.volume-chart {
  display: grid;
  height: 235px;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: clamp(9px, 2vw, 20px);
}

.volume-column {
  display: grid;
  height: 220px;
  grid-template-rows: 36px 1fr 20px;
  align-items: end;
  gap: 6px;
  text-align: center;
}

.volume-values {
  display: grid;
  align-self: stretch;
  align-content: center;
  justify-items: center;
  gap: 2px;
}

.volume-values span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 8px;
  white-space: nowrap;
}

.volume-values i {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
}

.volume-values .sales i {
  background: var(--blue);
}

.volume-values .collections i {
  background: var(--teal);
}

.volume-values .purchases i {
  background: var(--amber);
}

.volume-values .payments i {
  background: var(--coral);
}

.volume-values strong {
  font: 800 8.5px/1 "Manrope", sans-serif;
  letter-spacing: -0.2px;
}

.dashboard-volume-chart {
  height: 205px;
}

.dashboard-volume-chart .volume-column {
  height: 194px;
}

.volume-bar-track {
  position: relative;
  width: min(38px, 65%);
  height: 100%;
  justify-self: center;
  overflow: hidden;
  border-radius: 10px;
  background: #f0eee8;
}

.volume-bar {
  position: absolute;
  inset: auto 0 0;
  border-radius: inherit;
  background: linear-gradient(180deg, #73a18f, var(--teal));
  transform-origin: bottom;
  animation: bar-grow 650ms cubic-bezier(.2,.9,.3,1) both;
}

.dual-volume-track {
  display: flex;
  width: min(54px, 82%);
  height: 100%;
  align-items: end;
  justify-self: center;
  gap: 5px;
  padding: 0 5px;
  border-radius: 10px;
  background: #f0eee8;
}

.dual-volume-bar {
  width: 50%;
  border-radius: 7px 7px 3px 3px;
  transform-origin: bottom;
  animation: bar-grow 650ms cubic-bezier(.2,.9,.3,1) both;
}

.dual-volume-bar.sales {
  background: var(--blue);
}

.dual-volume-bar.income {
  background: var(--teal);
}

.dual-volume-bar.purchase {
  background: var(--amber);
}

.dual-volume-bar.payment {
  background: var(--coral);
}

.volume-column > span {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 700;
}

.distribution-list {
  display: grid;
  gap: 19px;
}

.distribution-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 7px;
}

.distribution-row span {
  color: var(--ink-soft);
  font-size: 11px;
}

.distribution-row strong {
  font: 700 11px/1 "Manrope", sans-serif;
}

.monthly-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.monthly-summary-grid > div {
  padding: 4px 20px;
  border-left: 1px solid var(--line);
}

.monthly-summary-grid > div:first-child {
  border-left: 0;
}

.monthly-summary-grid span,
.monthly-summary-grid strong,
.monthly-summary-grid small {
  display: block;
}

.monthly-summary-grid span {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 700;
}

.monthly-summary-grid strong {
  margin-top: 10px;
  font: 800 18px/1 "Manrope", sans-serif;
}

.monthly-summary-grid small {
  margin-top: 7px;
  color: var(--ink-muted);
  font-size: 9px;
}

.tracking-hero {
  display: flex;
  min-height: 165px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 14px;
  padding: 28px 31px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tracking-hero.jobs-hero {
  background: linear-gradient(120deg, #e4f1de, #eef5d4);
}

.tracking-hero.quotes-hero {
  background: linear-gradient(120deg, #e9e9f8, #f2eaf7);
}

.tracking-hero h2 {
  max-width: 720px;
  margin: 7px 0 9px;
  font: 700 clamp(23px, 3vw, 31px)/1.18 "Manrope", sans-serif;
  letter-spacing: -1px;
}

.tracking-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

.tracking-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.tracking-summary-card {
  display: flex;
  min-height: 86px;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border: 1px solid rgba(36, 48, 44, 0.055);
  border-radius: 16px;
  background: var(--surface);
}

.tracking-summary-card > [data-icon] {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 9px;
  border-radius: 11px;
  color: var(--teal);
  background: var(--teal-soft);
}

.tracking-summary-card small,
.tracking-summary-card strong {
  display: block;
}

.tracking-summary-card small {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 700;
}

.tracking-summary-card strong {
  margin-top: 6px;
  font: 800 16px/1 "Manrope", sans-serif;
}

.tracking-table td:first-child,
.tracking-table th:first-child {
  width: 54px;
  text-align: center;
}

.completed-row {
  opacity: .58;
}

.completed-row .cell-stack > strong {
  text-decoration: line-through;
  text-decoration-color: rgba(23,32,29,.35);
}

.mobile-tracking-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 8px;
  border-bottom: 1px solid #efede7;
}

.mobile-tracking-card > div {
  min-width: 0;
}

.mobile-tracking-card > div strong,
.mobile-tracking-card > div small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-tracking-card > div strong {
  font-size: 11px;
}

.mobile-tracking-card > div small {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 9px;
}

.mobile-tracking-card > strong {
  font: 700 10px/1 "Manrope", sans-serif;
}

.mobile-tracking-side {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.mobile-tracking-side > strong {
  font: 700 10px/1 "Manrope", sans-serif;
}

.mobile-tracking-side .record-action-button {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

.history-list {
  display: grid;
  gap: 1px;
  padding: 18px 24px 24px;
}

.history-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 20px 24px 0;
}

.history-summary-grid > div {
  padding: 15px;
  border: 1px solid #eae8e1;
  border-radius: 14px;
  background: #faf9f6;
}

.history-summary-grid span,
.history-summary-grid strong,
.history-summary-grid small {
  display: block;
}

.history-summary-grid span {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 700;
}

.history-summary-grid strong {
  margin-top: 7px;
  font: 800 17px/1 "Manrope", sans-serif;
}

.history-summary-grid small {
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 8px;
  text-transform: capitalize;
}

.history-row {
  display: grid;
  grid-template-columns: 145px minmax(90px, 1fr) 115px;
  align-items: center;
  gap: 13px;
  padding: 12px 3px;
  border-bottom: 1px solid #efede7;
}

.history-row > div:first-child strong,
.history-row > div:first-child small {
  display: block;
}

.history-row > div:first-child strong {
  font-size: 11px;
  text-transform: capitalize;
}

.history-row > div:first-child small {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 9px;
}

.history-row > strong {
  font: 700 11px/1 "Manrope", sans-serif;
  text-align: right;
}

.history-bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #efeee9;
}

.history-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--history-color);
}

.tax-modal-content {
  padding: 20px 24px 25px;
}

.tax-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid #f0dfbd;
  border-radius: 14px;
  color: #735a26;
  background: #fff9eb;
}

.tax-disclaimer > [data-icon] {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.tax-disclaimer strong,
.tax-disclaimer small {
  display: block;
}

.tax-disclaimer strong {
  font-size: 10px;
}

.tax-disclaimer small {
  margin-top: 4px;
  font-size: 8.5px;
  line-height: 1.5;
}

.tax-modal-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 12px;
  padding: 16px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(120deg, #1d2c27, #2d5145);
}

.tax-modal-current span,
.tax-modal-current strong {
  display: block;
}

.tax-modal-current span {
  color: #afc0ba;
  font-size: 8px;
  font-weight: 700;
}

.tax-modal-current > div > strong {
  margin-top: 4px;
  font-size: 11px;
}

.tax-modal-current > strong {
  font: 800 20px/1 "Manrope", sans-serif;
}

.tax-detail-stack,
.tax-quarter-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.tax-month-card,
.tax-quarter-card {
  overflow: hidden;
  border: 1px solid #ebe9e3;
  border-radius: 15px;
  background: #fff;
}

.tax-period-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 15px;
}

.tax-period-head > div:first-child strong,
.tax-period-head > div:first-child small {
  display: block;
}

.tax-period-head > div:first-child strong {
  font-size: 11px;
  text-transform: capitalize;
}

.tax-period-head > div:first-child small {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 8px;
}

.tax-period-result {
  min-width: 115px;
  padding: 7px 9px;
  border-radius: 10px;
  text-align: right;
}

.tax-period-result span,
.tax-period-result strong {
  display: block;
}

.tax-period-result span {
  font-size: 7px;
  font-weight: 700;
}

.tax-period-result strong {
  margin-top: 3px;
  font: 800 11px/1 "Manrope", sans-serif;
}

.tax-values-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid #ebe9e3;
  background: #ebe9e3;
}

.tax-values-grid > span {
  min-width: 0;
  padding: 10px 12px;
  background: #faf9f6;
}

.tax-values-grid small,
.tax-values-grid strong {
  display: block;
}

.tax-values-grid small {
  color: var(--ink-muted);
  font-size: 7.5px;
  font-weight: 700;
}

.tax-values-grid strong {
  overflow: hidden;
  margin-top: 5px;
  font: 800 10px/1.1 "Manrope", sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tax-quarter-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px;
  list-style: none;
  cursor: pointer;
}

.tax-quarter-card summary::-webkit-details-marker {
  display: none;
}

.tax-quarter-card summary > div:first-child span,
.tax-quarter-card summary > div:first-child strong,
.tax-quarter-card summary > div:first-child small {
  display: block;
}

.tax-quarter-card summary > div:first-child span {
  color: #7356a6;
  font-size: 8px;
  font-weight: 800;
}

.tax-quarter-card summary > div:first-child strong {
  margin-top: 4px;
  font-size: 11px;
  text-transform: capitalize;
}

.tax-quarter-card summary > div:first-child small {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 8px;
}

.tax-quarter-result {
  min-width: 135px;
  text-align: right;
}

.tax-quarter-result span,
.tax-quarter-result strong {
  display: block;
}

.tax-quarter-result span {
  color: var(--ink-muted);
  font-size: 7px;
  font-weight: 700;
}

.tax-quarter-result strong {
  margin-top: 4px;
  color: #7356a6;
  font: 800 13px/1 "Manrope", sans-serif;
}

.tax-quarter-body {
  padding: 0 14px 14px;
}

.tax-quarter-body .tax-values-grid {
  overflow: hidden;
  border: 1px solid #ebe9e3;
  border-radius: 12px;
}

.tax-quarter-own {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 9px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #f5f1f9;
}

.tax-quarter-own span {
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 700;
}

.tax-quarter-own strong {
  color: #7356a6;
  font: 800 11px/1 "Manrope", sans-serif;
}

.tax-month-table {
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid #ebe9e3;
  border-radius: 12px;
}

.tax-month-table-head,
.tax-month-table-row {
  display: grid;
  grid-template-columns: 1fr repeat(3, 1.35fr);
  gap: 8px;
  align-items: center;
  padding: 9px 11px;
}

.tax-month-table-head {
  color: var(--ink-muted);
  background: #f3f1ec;
  font-size: 7px;
  font-weight: 800;
}

.tax-month-table-row {
  border-top: 1px solid #efede7;
  font-size: 8px;
}

.tax-month-table-row strong {
  text-transform: capitalize;
}

.tax-month-table-row span {
  text-align: right;
}

.report-panel-body {
  display: grid;
  gap: 14px;
}

.report-kpi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid #efede7;
}

.report-kpi:first-child {
  border-top: 0;
}

.report-kpi span {
  color: var(--ink-soft);
  font-size: 12px;
}

.report-kpi strong {
  font: 700 14px/1 "Manrope", sans-serif;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  margin-top: 7px;
  border-radius: 99px;
  background: #efeee9;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--bar-color, var(--teal));
}

.section-description {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.mobile-search {
  display: none;
  margin-bottom: 12px;
}

.mobile-search.open {
  display: flex;
  width: min(520px, 100%);
}

.mobile-nav {
  display: none;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 78% 18%, rgba(215,255,104,.17), transparent 26%),
    linear-gradient(135deg, #111b18, #20382f);
}

.login-gate[hidden] {
  display: none;
}

body.auth-locked {
  overflow: hidden;
}

body.auth-locked .app-shell {
  user-select: none;
  filter: blur(4px);
  pointer-events: none;
}

.login-card {
  width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 35px 100px rgba(0,0,0,.32);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 25px 18px;
  color: #fff;
  background: var(--ink);
}

.login-brand .brand-mark {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  background: var(--lime);
}

.login-brand .brand-mark span {
  display: block;
  width: 18px;
  height: 3px;
  margin: 2px auto;
  border-radius: 99px;
  background: var(--ink);
}

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

.login-brand strong {
  font: 800 18px/1.1 "Manrope", sans-serif;
}

.login-brand small {
  margin-top: 3px;
  color: #96a39e;
  font-size: 10px;
}

.login-form {
  display: grid;
  gap: 15px;
  padding: 25px;
}

.login-form h1 {
  margin: 6px 0 7px;
  font: 800 25px/1.17 "Manrope", sans-serif;
  letter-spacing: -.8px;
}

.login-form > div:first-child > p:not(.eyebrow) {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.login-remember {
  margin-top: -2px;
}

.login-submit {
  width: 100%;
}

.login-reset {
  justify-self: center;
  color: var(--ink-muted);
  font-size: 10px;
}

.login-security-note {
  color: var(--ink-muted);
  font-size: 8.5px;
  line-height: 1.45;
  text-align: center;
}

.modal-backdrop,
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(18, 25, 23, 0.47);
  backdrop-filter: blur(5px);
}

.modal-backdrop[hidden],
.drawer-backdrop[hidden] {
  display: none;
}

.modal-backdrop {
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  width: min(570px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  border-radius: 25px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(16, 23, 20, 0.25);
  animation: modal-in 180ms ease;
}

.modal.wide-modal {
  width: min(1120px, 100%);
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(.98) translateY(8px); }
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 25px 17px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(12px);
}

.modal-header h2 {
  margin: 5px 0 0;
  font: 800 21px/1.2 "Manrope", sans-serif;
  letter-spacing: -0.5px;
}

.form {
  display: grid;
  gap: 17px;
  padding: 23px 25px 25px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.contact-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.quick-contact-toggle {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 13px;
  border: 1px solid #cdd9d4;
  border-radius: 12px;
  color: var(--teal);
  background: var(--teal-soft);
  font: 700 10px/1 "Manrope", sans-serif;
  white-space: nowrap;
  cursor: pointer;
}

.quick-contact-toggle:hover {
  border-color: #a9c7bd;
  background: #dceee8;
}

.quick-contact-toggle [data-icon] {
  width: 16px;
  height: 16px;
}

.quick-contact-panel {
  display: grid;
  gap: 12px;
  margin-top: 5px;
  padding: 15px;
  border: 1px solid #dce5e1;
  border-radius: 15px;
  background: #f5f9f7;
}

.quick-contact-panel[hidden] {
  display: none;
}

.quick-contact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.quick-contact-head strong,
.quick-contact-head small {
  display: block;
}

.quick-contact-head strong {
  color: var(--ink);
  font: 700 12px/1.25 "Manrope", sans-serif;
}

.quick-contact-head small {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.4;
}

.compact-icon-button {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
}

.quick-contact-save {
  min-height: 40px;
  justify-self: end;
}

.form-field label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.field-hint {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.4;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  outline: none;
  background: var(--surface-soft);
  font-size: 12px;
  transition: border 130ms ease, box-shadow 130ms ease;
}

.form-field textarea {
  min-height: 82px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(38, 122, 104, 0.09);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  border-radius: 13px;
  background: #eeece6;
}

.segmented label {
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: grid;
  min-height: 38px;
  place-items: center;
  border-radius: 9px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 700;
}

.segmented input:checked + span {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px 10px rgba(25,34,31,.07);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 3px;
}

.form-info {
  padding: 13px 14px;
  border: 1px solid #dfe7e3;
  border-radius: 13px;
  background: var(--teal-soft);
}

.form-info strong {
  font-size: 11px;
}

.form-info p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.account-balance-fields {
  display: grid;
  gap: 12px;
}

.split-actions {
  align-items: center;
  justify-content: space-between;
}

.split-actions > div {
  display: flex;
  gap: 9px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.form-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--teal);
}

.invoice-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--line);
}

.invoice-summary > div {
  padding: 12px;
  background: var(--surface-soft);
}

.invoice-summary span,
.invoice-summary strong {
  display: block;
}

.invoice-summary span {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 600;
}

.invoice-summary strong {
  margin-top: 6px;
  font: 700 12px/1 "Manrope", sans-serif;
}

.invoice-summary .invoice-total {
  color: var(--ink);
  background: #eef6da;
}

.check-fields {
  display: grid;
  gap: 17px;
  padding: 16px;
  border: 1px solid #e4dded;
  border-radius: 15px;
  background: #faf8fc;
}

.check-summary-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.check-summary-card > div {
  padding: 13px;
  background: var(--surface-soft);
}

.check-summary-card span,
.check-summary-card strong {
  display: block;
}

.more-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 22px;
}

.more-menu-grid button {
  display: grid;
  min-height: 120px;
  align-content: center;
  justify-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: var(--surface-soft);
  text-align: left;
  cursor: pointer;
}

.more-menu-grid button:hover {
  background: #fff;
  box-shadow: 0 8px 20px rgba(23,32,29,.06);
}

.more-menu-grid button > [data-icon] {
  width: 29px;
  height: 29px;
  padding: 7px;
  border-radius: 9px;
  color: var(--teal);
  background: var(--teal-soft);
}

.more-menu-grid strong,
.more-menu-grid small {
  display: block;
}

.more-menu-grid strong {
  margin-top: 10px;
  font-size: 11px;
}

.more-menu-grid small {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 9px;
}

.check-summary-card span {
  color: var(--ink-muted);
  font-size: 9px;
}

.check-summary-card strong {
  margin-top: 6px;
  font: 700 11px/1.3 "Manrope", sans-serif;
}

.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  font-weight: 700;
  cursor: pointer;
}

.ghost-button svg,
.danger-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.danger-button {
  border-color: #f3cece;
  color: var(--danger);
  background: var(--danger-soft);
}

.drawer-backdrop {
  display: flex;
  justify-content: flex-end;
}

.drawer {
  width: min(1080px, 100%);
  height: 100%;
  overflow: hidden;
  background: var(--surface);
  box-shadow: -20px 0 60px rgba(13, 22, 18, 0.18);
  animation: drawer-in 220ms ease;
}

#drawerContent {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

@keyframes drawer-in {
  from { transform: translateX(100%); }
}

.drawer-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(285px, 330px);
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
  color: #fff;
  background: var(--ink);
}

.drawer-head .icon-button {
  position: absolute;
  top: 20px;
  right: 20px;
  border-color: rgba(255,255,255,.15);
  color: #fff;
  background: rgba(255,255,255,.08);
}

.drawer-contact {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-right: 52px;
}

.drawer-contact .contact-avatar {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  font-size: 13px;
}

.drawer-contact h2 {
  margin: 0 0 4px;
  font: 700 17px/1.2 "Manrope", sans-serif;
}

.drawer-contact p {
  margin: 0;
  color: #9faaa6;
  font-size: 11px;
}

.drawer-balance {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-right: 52px;
}

.drawer-stat {
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.055);
}

.drawer-stat small,
.drawer-stat strong {
  display: block;
}

.drawer-stat small {
  color: #899791;
}

.drawer-stat strong {
  margin-top: 5px;
  font: 700 14px/1 "Manrope", sans-serif;
}

.drawer-body {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(230px, 260px) minmax(0, 1fr);
  gap: 20px;
  overflow: hidden;
  padding: 18px 22px;
}

.drawer-sidebar {
  min-width: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.drawer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.drawer-actions button,
.drawer-record-actions button {
  min-height: 39px;
  padding-inline: 10px;
  font-size: 10px;
}

.drawer-export-button {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.drawer-export-button [data-icon] {
  width: 16px;
  height: 16px;
}

.drawer-record-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.drawer-record-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.drawer-record-actions [data-icon] {
  width: 14px;
  height: 14px;
}

.drawer-details summary {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 13px;
  border-radius: 15px;
  background: var(--surface-soft);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 11px;
}

.detail-row span {
  color: var(--ink-muted);
}

.detail-row strong {
  max-width: 160px;
  overflow-wrap: anywhere;
  text-align: right;
}

.drawer-movements-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

.drawer-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 4px 10px;
  border-bottom: 1px solid #efede7;
}

.drawer-section-head .eyebrow {
  margin-bottom: 4px;
}

.drawer-section-title {
  margin: 0;
  font: 700 14px/1.2 "Manrope", sans-serif;
}

.drawer-movement-count {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 700;
}

.drawer-transaction-scroll {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.drawer .transaction-row {
  grid-template-columns: minmax(0, 1fr) minmax(90px, .52fr) minmax(126px, .62fr);
  gap: 10px;
  padding: 11px 4px;
}

.drawer .transaction-row.has-actions {
  grid-template-columns: minmax(0, 1fr) minmax(90px, .52fr) minmax(126px, .62fr) 61px;
  gap: 9px;
}

.drawer .transaction-row > .badge {
  display: none;
}

.drawer .type-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 10px;
}

.drawer .transaction-main > div,
.drawer .cell-stack,
.drawer .amount-cell,
.drawer .record-actions {
  min-width: 0;
}

.drawer .transaction-main strong,
.drawer .cell-stack strong,
.drawer .transaction-amount {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer .transaction-main small {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.3;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.drawer .cell-stack small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer .amount-cell small {
  max-width: 100%;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.drawer .record-actions {
  width: 61px;
  justify-content: flex-end;
}

.drawer .transaction-main strong,
.drawer .cell-stack strong {
  font-size: 10px;
}

.drawer .transaction-main small,
.drawer .cell-stack small {
  font-size: 8px;
}

.drawer .transaction-amount {
  font-size: 10px;
}

.drawer .record-action-button {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

@media (min-width: 721px) and (max-width: 960px) {
  .drawer-head {
    grid-template-columns: minmax(0, 1fr) minmax(270px, 310px);
    gap: 16px;
    padding-inline: 16px;
  }

  .drawer-body {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 16px;
    padding-inline: 16px;
  }

  .drawer-contact {
    padding-right: 44px;
  }
}

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 300;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  min-width: 280px;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 14px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 18px 40px rgba(16,25,21,.22);
  animation: toast-in 200ms ease;
}

.toast span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  color: var(--ink);
  background: var(--lime);
}

.toast svg {
  width: 14px;
  height: 14px;
}

.toast p {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

.settings-stack {
  display: grid;
  gap: 11px;
  padding: 23px 25px 25px;
}

.settings-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.settings-card strong,
.settings-card small {
  display: block;
}

.settings-card strong {
  font-size: 12px;
}

.settings-card small {
  max-width: 310px;
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.4;
}

.file-input {
  display: none;
}

@media (max-width: 1180px) {
  .sidebar { width: 222px; }
  .main { margin-left: 222px; padding-inline: 24px; }
  .profile-copy { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card.net-metric { grid-column: 1 / -1; }
  .flow-summary-metric { grid-column: 1 / -1; }
  .flow-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flow-summary-item:nth-child(4) {
    border-left: 0;
  }
  .flow-summary-item:nth-child(n+4) {
    border-top: 1px solid #e8e6df;
  }
  .sales-breakdown-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .quick-card { min-height: 105px; }
  .insight-layout { grid-template-columns: 1fr; }
  .tracking-summary-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .sidebar { display: none; }
  .main {
    margin-left: 0;
    padding: 0 17px 102px;
  }
  .topbar {
    min-height: 82px;
    padding-block: 15px 12px;
  }
  .topbar h1 { font-size: 22px; }
  .topbar .primary-button,
  .profile-button { display: none; }
  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    display: grid;
    min-height: 74px;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    padding: 8px max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.95);
    box-shadow: 0 -12px 40px rgba(23,32,29,.08);
    backdrop-filter: blur(16px);
  }
  .mobile-nav-item {
    display: grid;
    min-height: 50px;
    place-items: center;
    align-content: center;
    gap: 4px;
    border: 0;
    color: var(--ink-muted);
    background: transparent;
  }
  .mobile-nav-item > [data-icon] {
    width: 20px;
    height: 20px;
  }
  .mobile-nav-item small {
    font-size: 9px;
    font-weight: 700;
  }
  .mobile-nav-item.active {
    color: var(--teal);
  }
  .mobile-add {
    display: grid;
    width: 52px;
    height: 52px;
    place-self: start center;
    place-items: center;
    margin-top: -17px;
    border: 5px solid var(--paper);
    border-radius: 17px;
    color: var(--ink);
    background: var(--lime);
    box-shadow: 0 8px 22px rgba(23,32,29,.18);
  }
  .mobile-add [data-icon] {
    width: 21px;
    height: 21px;
  }
  .welcome-strip {
    align-items: flex-start;
    flex-direction: column;
    padding: 27px 25px;
  }
  .welcome-actions { width: 100%; }
  .welcome-actions button { flex: 1; }
  .report-grid { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr 1fr; }
  .account-card:last-child { grid-column: 1 / -1; }
  .insight-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tracking-hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .main { padding-inline: 12px; }
  .topbar { padding-inline: 2px; }
  .topbar-actions { gap: 6px; }
  .fiscal-year-control {
    min-width: 105px;
    padding: 7px 8px;
  }
  .fiscal-year-control > span { display: none; }
  .fiscal-year-control select { font-size: 9.5px; }
  .fiscal-year-notice {
    align-items: flex-start;
    margin-top: 0;
  }
  .icon-button { width: 41px; height: 41px; }
  .mobile-search.open { display: flex; width: 100%; }
  .welcome-strip {
    min-height: 0;
    margin-bottom: 11px;
    padding: 24px 20px;
    border-radius: 20px;
  }
  .welcome-strip h2,
  .report-hero h2 {
    font-size: 24px;
  }
  .welcome-strip p:not(.eyebrow) {
    font-size: 12px;
  }
  .welcome-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .welcome-actions button {
    min-width: 0;
    padding-inline: 10px;
    font-size: 11px;
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-bottom: 9px;
  }
  .metric-card {
    padding: 15px;
    border-radius: 15px;
  }
  .metric-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .metric-icon svg { width: 16px; height: 16px; }
  .metric-label { font-size: 10px; }
  .metric-value {
    margin-top: 14px;
    font-size: 18px;
  }
  .metric-footer { font-size: 9px; }
  .flow-summary-metric { padding: 16px; }
  .flow-summary-head {
    align-items: flex-start;
    margin-bottom: 12px;
  }
  .flow-summary-head > div:first-child > strong { font-size: 15px; }
  .flow-summary-grid { grid-template-columns: 1fr 1fr; }
  .flow-summary-item {
    padding: 11px 10px;
    border-top: 1px solid #e8e6df;
  }
  .flow-summary-item:nth-child(-n+2) { border-top: 0; }
  .flow-summary-item:nth-child(odd) { border-left: 0; }
  .flow-summary-item:nth-child(even) { border-left: 1px solid #e8e6df; }
  .flow-summary-item > strong { font-size: 13px; }
  .flow-summary-legend {
    align-items: flex-end;
    flex-direction: column;
    gap: 4px;
    font-size: 8px;
  }
  .sales-breakdown-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .sales-breakdown-summary {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .sales-breakdown-summary > div { padding: 11px 10px; }
  .sales-breakdown-table th,
  .sales-breakdown-table td { padding: 9px 10px; }
  .sales-breakdown-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }
  .sales-breakdown-table {
    min-width: 0;
  }
  .sales-breakdown-table thead {
    display: none;
  }
  .sales-breakdown-table tbody,
  .sales-breakdown-table tfoot {
    display: grid;
    gap: 7px;
  }
  .sales-breakdown-table tfoot {
    margin-top: 7px;
  }
  .sales-breakdown-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border: 1px solid #ebe9e3;
    border-radius: 11px;
    background: var(--surface);
  }
  .sales-breakdown-table th,
  .sales-breakdown-table td {
    display: grid;
    align-content: center;
    min-width: 0;
    min-height: 42px;
    padding: 8px 10px;
    border: 0;
    text-align: right;
  }
  .sales-breakdown-table th:first-child {
    grid-column: 1 / -1;
    min-height: 34px;
    border-bottom: 1px solid #efede7;
    background: #faf9f6;
    text-align: left;
  }
  .sales-breakdown-table td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--ink-muted);
    content: attr(data-label);
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
  }
  .sales-breakdown-table td:nth-of-type(3) {
    grid-column: 1 / -1;
    border-top: 1px solid #efede7;
    background: #faf9f6;
  }
  .sales-breakdown-table tfoot th,
  .sales-breakdown-table tfoot td {
    background: #f4f2ec;
  }
  .dashboard-grid { gap: 9px; margin-bottom: 9px; }
  .panel {
    margin-bottom: 9px;
    padding: 17px;
    border-radius: 18px;
  }
  .panel-header {
    align-items: flex-start;
    margin-bottom: 16px;
  }
  .panel-header-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
  }
  .legend {
    flex-direction: column;
    gap: 5px;
  }
  .bar-chart { gap: 9px; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .quick-card { min-height: 104px; }
  .transaction-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
  }
  .transaction-row > :nth-child(2),
  .transaction-row > :nth-child(3) {
    display: none;
  }
.amount-cell small {
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .section-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }
  .toolbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .select-control {
    width: 100%;
    min-width: 0;
  }
  .toolbar-actions .primary-button {
    padding-inline: 14px;
    font-size: 11px;
  }
  .table-panel { padding: 8px; }
  .data-table { display: none; }
  .mobile-card-list {
    display: grid;
    gap: 1px;
  }
  .mobile-data-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 13px 8px;
    border-bottom: 1px solid #efede7;
    cursor: pointer;
  }
  .mobile-data-card:last-child { border-bottom: 0; }
  .mobile-data-card .contact-cell { min-width: 0; }
  .mobile-card-meta {
    display: grid;
    justify-items: end;
    gap: 5px;
  }
  .account-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .account-card,
  .account-card:last-child {
    min-height: 145px;
    grid-column: auto;
  }
  .report-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 23px 20px;
  }
  .report-hero .secondary-button { width: 100%; }
  .report-header-actions {
    align-items: flex-end;
    flex-direction: column;
  }
  .compact-button {
    min-height: 34px;
    padding-inline: 10px;
    font-size: 10px;
  }
  .report-switch { gap: 6px; padding: 5px; }
  .report-switch-button {
    min-height: 72px;
    gap: 8px;
    padding: 10px;
  }
  .report-switch-button > [data-icon] {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    padding: 8px;
  }
  .report-switch-button strong { font-size: 14px; }
  .report-switch-button small { font-size: 9px; }
  .insights-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 20px;
  }
  .insights-hero h2 { font-size: 24px; }
  .insights-hero p:not(.eyebrow) { font-size: 12px; line-height: 1.5; }
  .tax-overview-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 9px;
  }
  .tax-overview-card { padding: 16px; }
  .tax-card-head strong { font-size: 12px; }
  .tax-card-value {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
  }
  .tax-card-value > strong { font-size: 24px; }
  .tax-card-breakdown { margin-top: 13px; }
  .tax-card-breakdown > span { padding: 9px 8px; }
  .tax-card-breakdown strong { font-size: 9px; }
  .insight-metric-grid { gap: 8px; }
  .insight-card { padding: 14px; }
  .insight-card-top { font-size: 9px; }
  .insight-card > strong { font-size: 16px; }
  .insight-card-stats {
    grid-template-columns: 1fr;
    margin-top: 11px;
  }
  .insight-card-stats > span { padding: 8px; }
  .insight-card-stats strong { font-size: 10px; }
  .insight-card-breakdown {
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-top: 10px;
  }
  .insight-card-breakdown > span { padding: 8px; }
  .insight-card-breakdown strong { font-size: 9px; }
  .volume-chart,
  .dashboard-volume-chart {
    height: auto;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 9px;
  }
  .volume-column,
  .dashboard-volume-chart .volume-column {
    height: 155px;
    grid-template-rows: 34px 1fr 18px;
  }
  .volume-values {
    gap: 3px;
  }
  .volume-values span {
    gap: 2px;
  }
  .volume-values i {
    width: 4px;
    height: 4px;
    flex-basis: 4px;
  }
  .volume-values strong {
    font-size: 8.5px;
    letter-spacing: -0.2px;
  }
  .monthly-summary-grid { grid-template-columns: 1fr 1fr; gap: 18px 0; }
  .monthly-summary-grid > div:nth-child(3) { border-left: 0; }
  .tracking-hero {
    padding: 23px 20px;
  }
  .tracking-hero h2 { font-size: 23px; }
  .tracking-hero p:not(.eyebrow) { font-size: 12px; }
  .tracking-hero .secondary-button { width: 100%; }
  .tracking-summary-grid { gap: 8px; }
  .tracking-summary-card { min-height: 78px; padding: 12px; }
  .tracking-summary-card strong { font-size: 13px; }
  .history-list { padding: 14px 18px 20px; }
  .history-summary-grid {
    gap: 8px;
    padding: 16px 18px 0;
  }
  .history-summary-grid > div { padding: 12px; }
  .history-summary-grid strong { font-size: 14px; }
  .tax-modal-content { padding: 16px 18px 20px; }
  .tax-modal-current { padding: 13px; }
  .tax-modal-current > strong { font-size: 17px; }
  .tax-values-grid { grid-template-columns: 1fr 1fr; }
  .tax-values-grid > span:nth-child(n+3) { border-top: 1px solid #ebe9e3; }
  .tax-period-head,
  .tax-quarter-card summary {
    align-items: flex-start;
  }
  .tax-period-result { min-width: 103px; }
  .tax-quarter-result { min-width: 112px; }
  .tax-quarter-result strong { font-size: 11px; }
  .tax-quarter-body { padding-inline: 10px; }
  .tax-month-table {
    overflow-x: auto;
  }
  .tax-month-table-head,
  .tax-month-table-row {
    min-width: 520px;
  }
  .history-row {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .history-bar-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .form-row { grid-template-columns: 1fr; }
  .split-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .split-actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .invoice-summary { grid-template-columns: 1fr 1fr; }
  .invoice-summary .invoice-total { grid-column: 1 / -1; }
  .form { padding: 20px 18px 21px; }
  .modal-header { padding: 19px 18px 15px; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 23px 23px 0 0;
  }
  .drawer-head,
  .drawer-body { padding-inline: 19px; }
  .toast-region {
    right: 12px;
    bottom: 90px;
    left: 12px;
  }
  .toast { min-width: 0; }
  .login-gate {
    align-items: end;
    padding: 0;
  }
  .login-card {
    max-height: 94vh;
    overflow: auto;
    border-radius: 24px 24px 0 0;
  }
  .login-form {
    padding: 22px 19px 24px;
  }
  .login-form h1 {
    font-size: 22px;
  }
  .settings-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .settings-card button,
  .settings-card label { width: 100%; }
  .more-menu-grid { padding: 18px; }
  .more-menu-grid button { min-height: 108px; }
}

.inline-action {
  padding: 4px 8px;
  border: 1px solid #d8cdea;
  border-radius: 8px;
  color: #674b98;
  background: #f5f1fa;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.inline-action:hover {
  background: #ece4f6;
}

.check-status {
  color: #7356a6 !important;
  font-weight: 700;
}

@media (max-width: 720px) {
  .drawer {
    width: 100%;
  }
  .drawer-head {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 14px 16px;
  }
  .drawer-head .icon-button {
    top: 14px;
    right: 14px;
  }
  .drawer-contact {
    padding-right: 48px;
  }
  .drawer-contact .contact-avatar {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
  .drawer-contact h2 {
    font-size: 15px;
  }
  .drawer-balance {
    gap: 7px;
    margin: 0;
  }
  .drawer-stat {
    padding: 9px 10px;
  }
  .drawer-stat strong {
    font-size: 12px;
  }
  .drawer-body {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-content: start;
    gap: 13px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px 14px 24px;
  }
  .drawer-sidebar {
    overflow: visible;
  }
  .drawer-actions,
  .drawer-record-actions {
    margin-bottom: 8px;
  }
  .drawer-details:not([open]) {
    padding: 2px 0;
  }
  .drawer-movements-panel {
    min-height: 300px;
  }
  .drawer-transaction-scroll {
    overflow: visible;
    padding-right: 0;
  }
  .drawer .transaction-row.has-actions {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 7px;
  }
  .drawer .transaction-row > :nth-child(2),
  .drawer .transaction-row > :nth-child(3) {
    display: none;
  }
  .drawer .amount-cell small {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 640px) {
  .transaction-row.has-actions {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
}

.invoice-hero {
  background:
    radial-gradient(circle at 92% 12%, rgba(200, 255, 77, 0.24), transparent 28%),
    linear-gradient(135deg, #17201d, #294638);
}

.e-archive-table {
  min-width: 1080px;
}

.badge.danger {
  color: #a13f31;
  background: #fde9e5;
}

.e-archive-warning,
.e-archive-ready {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 12px;
}

.e-archive-warning {
  color: #8f3e2f;
  background: #fff0ec;
  border: 1px solid #f6cfc6;
}

.e-archive-warning[hidden] {
  display: none;
}

.e-archive-warning .text-button {
  justify-self: start;
  padding: 0;
}

.e-archive-ready {
  grid-template-columns: 20px 1fr;
  align-items: center;
  color: #296555;
  background: #eaf6f1;
  border: 1px solid #c9e7dc;
}

.e-archive-ready svg {
  width: 18px;
  height: 18px;
}

.manager-toolbar,
.invoice-section-title,
.gib-action-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.manager-toolbar p {
  margin: 0;
  color: var(--muted);
}

.manager-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.manager-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfbf8;
}

.manager-card.inactive {
  opacity: 0.68;
}

.manager-card > div:first-child {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.manager-card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.manager-card small,
.manager-card span,
.manager-card code {
  overflow-wrap: anywhere;
}

.manager-card code {
  color: #34534a;
  font-family: inherit;
  font-weight: 700;
}

.form-row.three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.e-archive-form {
  gap: 18px;
}

.invoice-form-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  color: #ecf4ef;
  background: #17201d;
}

.invoice-form-banner > div {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px 10px;
}

.invoice-form-banner small {
  grid-column: 1 / -1;
  color: #b9c8c0;
}

.invoice-form-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.invoice-section-title h3,
.invoice-section-title p {
  margin: 0;
}

.invoice-recipient-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #f6f7f2;
}

.invoice-recipient-card > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.invoice-recipient-card small,
.invoice-line-total span,
.amount-in-words span {
  color: var(--muted);
  font-size: 11px;
}

.invoice-recipient-card strong {
  overflow-wrap: anywhere;
}

.invoice-recipient-card .recipient-address {
  grid-column: 1 / -1;
}

.invoice-items {
  display: grid;
  gap: 12px;
}

.invoice-item-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dde2da;
  border-radius: 16px;
  background: #fafbf7;
}

.invoice-item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.invoice-item-grid {
  display: grid;
  grid-template-columns: minmax(220px, 2.2fr) repeat(4, minmax(86px, 0.72fr)) minmax(116px, 0.85fr);
  align-items: end;
  gap: 10px;
}

.invoice-description-field textarea {
  min-height: 74px;
}

.invoice-line-total {
  display: grid;
  gap: 7px;
  align-content: center;
  min-height: 74px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #173b31;
  background: #edf5ef;
}

.invoice-line-total strong {
  font-size: 13px;
}

.e-archive-totals {
  margin-top: 2px;
}

.amount-in-words {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  border-radius: 14px;
  background: #f4f6ed;
}

.gib-action-note {
  padding: 15px 16px;
  border: 1px solid #d8e5d0;
  border-radius: 16px;
  background: #f2f8ed;
}

.gib-action-note > div {
  display: grid;
  gap: 4px;
}

.gib-action-note small {
  color: var(--muted);
  line-height: 1.45;
}

.e-archive-mobile-card {
  cursor: pointer;
}

@media (max-width: 1100px) {
  .invoice-item-grid {
    grid-template-columns: repeat(4, minmax(90px, 1fr));
  }

  .invoice-description-field {
    grid-column: 1 / -1;
  }

  .invoice-line-total {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .e-archive-toolbar,
  .manager-toolbar,
  .invoice-section-title,
  .gib-action-note {
    align-items: stretch;
    flex-direction: column;
  }

  .form-row.three-column,
  .invoice-recipient-card,
  .invoice-item-grid {
    grid-template-columns: 1fr;
  }

  .invoice-form-section {
    padding: 14px;
  }

  .invoice-form-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .manager-card {
    align-items: flex-start;
  }

  .invoice-description-field {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
