:root {
  --navy: #14283e;
  --ink: #1b2f45;
  --muted: #718093;
  --blue: #2563eb;
  --line: #e5eaf0;
  --bg: #f4f6fa;
  --green: #16785a;
  --amber: #a96714;
  --bs-body-font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.015em;
}
a {
  color: var(--blue);
  text-decoration: none;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #8db2fc;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 1.9rem;
  font-weight: 650;
  letter-spacing: -0.055em;
}
h2 {
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1rem;
  font-weight: 650;
}
small,
.small {
  font-size: 0.875rem;
}
.text-secondary,
.muted {
  color: var(--muted) !important;
}
.sidebar {
  width: 246px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--navy);
  color: white;
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 27px 23px 24px;
  color: white;
}
.brandmark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #718294;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -2px;
  flex-shrink: 0;
}
.brandname {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.03em;
}
.brandname small {
  display: block;
  font-size: 10px;
  letter-spacing: 2.1px;
  color: #afc1d5;
  margin-top: 5px;
}
.navscroll {
  overflow-y: auto;
  padding: 0 12px 18px;
  scrollbar-width: thin;
  scrollbar-color: #4b5d71 transparent;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.6px;
  font-weight: 700;
  color: #90a3b9;
  padding: 18px 13px 7px;
}
.navlink {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #bdcbda;
  padding: 10px 13px;
  border-radius: 7px;
  font-size: 14px;
  margin: 2px 0;
}
.navlink:hover {
  background: #20394f;
  color: white;
}
.navlink.active {
  background: #2c4662;
  color: white;
  box-shadow: inset 3px 0 #87b4fd;
}
.navlink svg {
  width: 18px;
  height: 18px;
  opacity: 0.85;
}
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid #314357;
  padding: 16px 23px;
  color: #abbdd0;
  font-size: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.sidebar-footer span {
  font-size: 17px;
  color: #a4b9cd;
}
.main {
  margin-left: 246px;
  min-height: 100vh;
}
.topbar {
  height: 78px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  gap: 16px;
}
.crumb {
  font-size: 14px;
  color: var(--muted);
}
.crumb strong {
  color: var(--ink);
  font-weight: 500;
}
.top-right {
  display: flex;
  gap: 22px;
  align-items: center;
}
.demo-label {
  font-size: 11px;
  letter-spacing: 0.5px;
  border: 1px solid #d6e1ee;
  padding: 5px 9px;
  border-radius: 5px;
  color: #64758a;
  background: #f7f9fc;
}
.avatar {
  border: 0;
  background: #eaf0f8;
  border-radius: 50%;
  width: 37px;
  height: 37px;
  font-size: 12px;
  font-weight: 700;
  color: #344a63;
  display: grid;
  place-items: center;
}
.user-link {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 13px;
}
.user-link small {
  font-size: 11px;
  display: block;
  color: var(--muted);
}
.content {
  max-width: 1660px;
  margin: auto;
  padding: 31px 34px 36px;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}
.pagehead p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.eyebrow {
  color: #6e8095;
  font-size: 11px;
  letter-spacing: 1.8px;
  font-weight: 650;
  margin-bottom: 7px;
}
.btn {
  font-size: 14px;
  font-weight: 550;
  padding: 10px 15px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 41px;
  white-space: nowrap;
}
.btn-primary {
  --bs-btn-bg: #2563eb;
  --bs-btn-border-color: #2563eb;
  --bs-btn-hover-bg: #1b51c7;
  --bs-btn-hover-border-color: #1b51c7;
  box-shadow: 0 3px 5px #2563eb15;
}
.btn-light,
.btn-outline-secondary {
  background: white;
  border: 1px solid #dce3ed;
  color: #40516a;
}
.btn-sm {
  padding: 6px 10px;
  min-height: 33px;
  font-size: 13px;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.action-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.surface {
  border: 1px solid var(--line);
  background: white;
  border-radius: 11px;
  box-shadow: 0 3px 7px #152d441f0;
  overflow: hidden;
}
/* Lookup panels are absolutely positioned; let them escape the rounded surface. */
.surface:has(.remote-field) {
  overflow: visible;
}
.surface-head {
  padding: 22px 24px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.surface-head h2 {
  margin: 0;
}
.surface-head p {
  font-size: 13px;
  color: var(--muted);
  margin: 5px 0 0;
}
.surface-body {
  padding: 24px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  padding: 20px 22px;
  position: relative;
  min-height: 143px;
}
.stat-name {
  font-size: 13px;
  color: #697a8d;
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 9px;
}
.stat-name svg {
  width: 17px;
  height: 17px;
}
.stat-value {
  font-size: 1.8rem;
  font-weight: 650;
  letter-spacing: -0.065em;
  line-height: 1.3;
  margin: 13px 0 7px;
  font-variant-numeric: tabular-nums;
}
.stat-foot {
  font-size: 12px;
  color: var(--muted);
}
.stat-foot a {
  color: inherit;
}
.stat.emphasis {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.stat.emphasis .stat-name,
.stat.emphasis .stat-foot {
  color: #b8c7d9;
}
.stat .stat-arrow {
  position: absolute;
  right: 21px;
  bottom: 23px;
  color: #91a1b2;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(280px, 1fr);
  gap: 23px;
  margin-bottom: 23px;
}
.legend {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #708197;
}
.legend span:before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #2563eb;
  margin-right: 6px;
}
.legend span + span:before {
  background: #c3d4ea;
}
.chart {
  height: 230px;
  padding: 6px 23px 10px;
  display: flex;
  gap: 12px;
}
.chart-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 10px;
  color: #8b97a6;
  padding-bottom: 24px;
  width: 31px;
}
.bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 10px;
  position: relative;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  background: repeating-linear-gradient(
    to top,
    transparent 0,
    transparent calc(25% - 1px),
    #edf1f6 calc(25% - 1px),
    #edf1f6 25%
  );
}
.bar-group {
  height: 100%;
  display: flex;
  gap: 5px;
  align-items: flex-end;
  position: relative;
  justify-content: center;
  flex: 1;
}
.bar {
  width: 22px;
  max-width: 36%;
  min-height: 2px;
  background: #2563eb;
  border-radius: 4px 4px 0 0;
  position: relative;
  z-index: 1;
}
.bar.buy {
  background: #c3d4ea;
}
.bar-month {
  position: absolute;
  bottom: -24px;
  font-size: 11px;
  color: #718093;
}
.chart-summary {
  display: flex;
  gap: 35px;
  padding: 0 25px 21px;
}
.chart-summary span {
  display: block;
  color: #7a8899;
  font-size: 11px;
  margin-bottom: 5px;
}
.chart-summary strong {
  font-size: 17px;
  font-weight: 650;
}
.stockitem {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 24px;
  padding: 14px 0;
  border-top: 1px solid #edf0f5;
}
.stock-icon {
  background: #fff4df;
  color: #a96c15;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  flex-shrink: 0;
}
.stockitem h3 {
  font-size: 13px;
  margin: 0 0 5px;
}
.stockitem p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.stockitem .qty {
  margin-left: auto;
  color: #b16b16;
  font-size: 13px;
  text-align: right;
  font-weight: 650;
}
.qty small {
  font-weight: 400;
  font-size: 11px;
  display: block;
}
.panel-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.table {
  margin: 0;
  font-size: 14px;
  --bs-table-bg: white;
  vertical-align: middle;
}
.table th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.35px;
  color: #8390a0;
  background: #f9fafc;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 16px 22px;
  border-color: #edf0f5;
  color: #44556a;
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.table td strong {
  color: var(--ink);
  font-weight: 550;
}
.table td small {
  display: block;
  color: #8a97a6;
  font-size: 11px;
  margin-top: 4px;
}
.table-responsive {
  scrollbar-width: thin;
}
.badge-status {
  display: inline-block;
  padding: 5px 9px;
  background: #edf7f2;
  color: #227456;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
}
.badge-status.amber {
  background: #fff4e2;
  color: #a86b19;
}
.badge-status.gray {
  background: #edf0f5;
  color: #7a8797;
}
.badge-status.blue {
  background: #eef3ff;
  color: #416bc0;
}
.badge-status.red {
  background: #fff0ee;
  color: #b55751;
}
.table-action {
  font-size: 13px;
  white-space: nowrap;
}
.table-action a {
  margin-right: 9px;
}
.filterbar {
  padding: 17px 21px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.search-wrap {
  position: relative;
  max-width: 370px;
  flex: 1;
}
.search-wrap svg {
  position: absolute;
  left: 13px;
  top: 12px;
  color: #96a1ae;
  width: 16px;
}
.search-wrap input {
  padding-left: 39px !important;
}
.form-control,
.form-select {
  font-size: 14px;
  min-height: 43px;
  background-color: white;
  border-color: #dce3eb;
  border-radius: 7px;
  padding: 10px 12px;
  color: #314760;
}
.form-control:focus,
.form-select:focus {
  border-color: #80a4ef;
  box-shadow: 0 0 0 3px #2563eb14;
}
.form-label {
  font-size: 13px;
  color: #617187;
  font-weight: 550;
  margin-bottom: 8px;
}
.form-text {
  font-size: 12px;
  color: #8b97a7;
}
.form-section {
  margin-bottom: 22px;
}
.form-section .surface-head {
  border-bottom: 1px solid var(--line);
  padding: 20px 24px;
}
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 24px;
  align-items: start;
}
.sticky-summary {
  position: sticky;
  top: 24px;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 14px;
  padding: 9px 0;
  color: #778496;
}
.summary-line strong {
  color: #233a51;
  font-weight: 550;
}
.summary-line.total {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.notice {
  background: #eff4fb;
  border: 1px solid #e0e9f7;
  color: #5d7796;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.notice svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 3px;
}
.notice.amber {
  color: #927030;
  background: #fff8e9;
  border-color: #f3e6c4;
}
.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 19px 24px;
  background: #fbfcfe;
  border-top: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
}
.line-card {
  padding: 19px 23px;
  border-bottom: 1px solid var(--line);
}
.line-fields {
  display: grid;
  grid-template-columns: 2fr 75px 75px 105px 85px 32px;
  gap: 10px;
  align-items: end;
}
.line-fields .form-label {
  font-size: 11px;
}
.line-fields .form-control,
.line-fields .form-select {
  padding: 9px 10px;
}
.remove-line {
  border: 0;
  background: #fff2f0;
  color: #b85c52;
  border-radius: 6px;
  height: 40px;
  font-size: 20px;
}
.line-subfields {
  display: grid;
  grid-template-columns: 120px 100px 1fr;
  gap: 12px;
  margin-top: 12px;
  align-items: center;
}
.line-subfields .form-control {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}
.line-total {
  text-align: right;
  font-size: 13px;
  color: #6e8197;
}
.line-total strong {
  color: #213b55;
  margin-left: 12px;
}
.empty {
  text-align: center;
  padding: 55px 22px;
  color: #7a8b9c;
}
.empty h3 {
  color: #28415b;
  margin-top: 12px;
}
.pagefoot {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: #95a1af;
  font-size: 11px;
  padding-top: 24px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: #7b8ca0;
  margin-bottom: 12px;
}
.back svg {
  width: 14px;
}
.compact-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 24px;
  gap: 16px;
}
.compact-stats .stat {
  min-height: 117px;
}
.compact-stats .stat-value {
  font-size: 1.55rem;
}
.party-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.party-card {
  padding: 22px;
}
.initials {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #ecf2fb;
  color: #5276a7;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 650;
}
.party-card h2 {
  font-size: 15px;
  margin: 17px 0 8px;
}
.party-card p {
  font-size: 12px;
  color: #7e8e9f;
  margin-bottom: 16px;
  min-height: 30px;
}
.party-card .party-bottom {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}
.party-bottom span {
  font-size: 11px;
  color: #8a98a8;
}
.party-bottom strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
  color: #29415b;
}
.master-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.master-tabs a {
  padding: 9px 15px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
  color: #718198;
}
.master-tabs .selected {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.detail-grid label {
  display: block;
  font-size: 12px;
  color: #8a97a7;
  margin-bottom: 7px;
}
.detail-grid p {
  font-size: 14px;
  margin: 0;
}
.invoice-paper {
  background: white;
  max-width: 900px;
  margin: auto;
  border: 1px solid var(--line);
  padding: 38px 42px;
  box-shadow: 0 10px 35px #20334b08;
}
.invoice-top {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 25px;
}
.invoice-top h2 {
  font-size: 19px;
  margin: 15px 0 8px;
  letter-spacing: -0.04em;
}
.invoice-top p {
  font-size: 11px;
  line-height: 1.8;
  color: #66788e;
  margin: 0;
}
.invoice-title {
  text-align: right;
}
.invoice-title h2 {
  font-size: 24px;
  color: #2e4d71;
  margin-top: 0;
}
.invoice-title p {
  margin: 4px 0;
}
.invoice-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  border-block: 1px solid var(--line);
  padding: 20px 0;
  margin-bottom: 22px;
}
.invoice-parties label {
  font-size: 10px;
  letter-spacing: 1px;
  color: #8a99ac;
}
.invoice-parties h3 {
  font-size: 13px;
  margin: 8px 0;
}
.invoice-parties p {
  font-size: 11px;
  color: #6c7e93;
  line-height: 1.7;
  white-space: pre-line;
  margin: 0;
}
.invoice-paper .table {
  font-size: 11px;
}
.invoice-paper .table td,
.invoice-paper .table th {
  padding: 12px 7px;
}
.invoice-sums {
  width: 260px;
  margin: 15px 0 20px auto;
}
.invoice-sums .summary-line {
  font-size: 12px;
  padding: 5px 0;
}
.invoice-sums .total {
  font-size: 17px;
  margin-top: 10px;
  padding-top: 12px;
}
.invoice-note {
  font-size: 10px;
  color: #7f8c9d;
  line-height: 1.7;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.invoice-bank {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 10px;
  line-height: 1.8;
  color: #6d7e92;
}
.invoice-bank strong {
  color: #344f6c;
}
.toast-message {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 15px 22px;
  background: #1a354b;
  color: white;
  border-radius: 9px;
  box-shadow: 0 6px 30px #14283e35;
  z-index: 80;
  max-width: calc(100vw - 40px);
  font-size: 14px;
}
.toast-message.error {
  background: #a4473f;
}
.error-box {
  color: #a3453e;
  background: #fff0ed;
  border: 1px solid #f3cfca;
  border-radius: 7px;
  padding: 12px 15px;
  margin-bottom: 18px;
  font-size: 14px;
}
.menu-btn {
  display: none;
  border: 0;
  background: transparent;
  padding: 7px;
}
.menu-btn svg {
  width: 22px;
  height: 22px;
}
.scrim {
  display: none;
}
.auth-shell {
  max-width: 460px;
  margin: 60px auto;
}
.auth-shell .surface-body {
  padding: 35px;
}
.auth-shell .brandmark {
  background: var(--navy);
  color: white;
  border: 0;
  margin-bottom: 24px;
}
.auth-shell h1 {
  font-size: 26px;
}
.rank-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.rank-row:last-child {
  border: 0;
}
.rank-row .rank {
  color: #a5b1bf;
  font-size: 12px;
}
.rank-row .rank-name {
  flex: 1;
  font-size: 13px;
}
.rank-row strong {
  font-size: 13px;
  font-weight: 600;
}
.rank-row small {
  display: block;
  color: #8997a8;
  font-size: 11px;
  margin-top: 4px;
}
.filterbar .form-select {
  max-width: 170px;
}
.table-count {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: #96a2b0;
}
.section-link {
  font-size: 12px;
  white-space: nowrap;
}
.money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mobile-only {
  display: none;
}
@media (min-width: 1500px) {
  .stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .stat {
    padding: 21px 17px;
  }
  .stat-value {
    font-size: 1.55rem;
  }
}
@media (max-width: 1199px) {
  .sidebar {
    width: 220px;
  }
  .main {
    margin-left: 220px;
  }
  .content {
    padding: 25px;
  }
  .topbar {
    padding-inline: 25px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  }
  .party-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-layout {
    grid-template-columns: 1fr;
  }
  .sticky-summary {
    position: static;
  }
  .line-fields {
    grid-template-columns: minmax(150px, 2fr) 65px 65px 95px 75px 32px;
  }
}
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 260px;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main {
    margin-left: 0;
  }
  .menu-btn {
    display: block;
  }
  .crumb {
    margin-right: auto;
  }
  .scrim.open {
    display: block;
    position: fixed;
    inset: 0;
    background: #10223875;
    z-index: 35;
  }
  .topbar {
    height: 67px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  }
}
@media (max-width: 700px) {
  .topbar {
    padding: 0 15px;
    gap: 10px;
  }
  .top-right {
    gap: 10px;
  }
  .user-link .user-text {
    display: none;
  }
  .demo-label {
    font-size: 9px;
    padding: 4px 6px;
  }
  .crumb {
    font-size: 12px;
  }
  .content {
    padding: 23px 16px;
  }
  .pagehead {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 21px;
  }
  .pagehead .action-row {
    width: 100%;
  }
  h1 {
    font-size: 1.65rem;
  }
  .eyebrow {
    font-size: 10px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 17px;
  }
  .stat {
    padding: 16px;
    min-height: 133px;
  }
  .stat-name {
    font-size: 11px;
    gap: 6px;
  }
  .stat-name svg {
    width: 14px;
  }
  .stat-value {
    font-size: 1.47rem;
    margin-top: 15px;
  }
  .stat-foot {
    font-size: 10px;
  }
  .stat-arrow {
    display: none;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 17px;
    margin-bottom: 17px;
  }
  .surface-head {
    padding: 20px 18px 17px;
  }
  .surface-head h2 {
    font-size: 1rem;
  }
  .surface-body {
    padding: 20px 18px;
  }
  .chart {
    height: 210px;
    padding-inline: 16px;
  }
  .chart-summary {
    gap: 30px;
    padding-inline: 20px;
  }
  .stockitem {
    margin-inline: 18px;
  }
  .party-cards {
    grid-template-columns: 1fr;
  }
  .line-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr)) 30px;
  }
  .line-fields .line-desc {
    grid-column: 1/-1;
  }
  .line-card {
    padding: 18px;
  }
  .line-subfields {
    grid-template-columns: 85px 70px 1fr;
    gap: 8px;
  }
  .line-total {
    font-size: 11px;
  }
  .line-total strong {
    display: block;
    margin: 2px 0 0;
  }
  .compact-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .compact-stats .stat {
    min-height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .compact-stats .stat-value {
    margin: 0;
  }
  .filterbar {
    padding: 14px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .search-wrap {
    min-width: 170px;
    max-width: none;
  }
  .filterbar .form-select {
    max-width: 140px;
  }
  .detail-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .form-footer {
    padding: 16px;
  }
  .invoice-paper {
    padding: 24px 18px;
  }
  .invoice-top {
    flex-direction: column;
  }
  .invoice-title {
    text-align: left;
  }
  .invoice-parties {
    gap: 15px;
  }
  .invoice-paper .table {
    min-width: 590px;
  }
  .invoice-bank {
    gap: 20px;
  }
  .pagefoot {
    font-size: 10px;
    flex-direction: column;
    gap: 5px;
  }
  .desktop-only {
    display: none;
  }
  .mobile-only {
    display: block;
  }
  .legend {
    font-size: 10px;
    gap: 8px;
  }
  .table td,
  .table th {
    padding: 14px 17px;
  }
  .table {
    min-width: 650px;
  }
  .invoice-sums {
    width: 100%;
  }
  .form-section .surface-head {
    padding: 18px;
  }
  .auth-shell {
    margin: 20px auto;
  }
  .auth-shell .surface-body {
    padding: 26px;
  }
  .back {
    margin-bottom: 8px;
  }
  .chart-axis {
    font-size: 9px;
  }
  .bar {
    width: 17px;
  }
}
@media print {
  body {
    background: white !important;
  }
  .sidebar,
  .topbar,
  .pagehead,
  .pagefoot,
  .no-print,
  .scrim,
  .toast-message {
    display: none !important;
  }
  .main {
    margin: 0 !important;
  }
  .content {
    padding: 0 !important;
    max-width: none !important;
  }
  .invoice-paper {
    border: 0;
    box-shadow: none;
    max-width: none;
    padding: 0;
  }
  .surface {
    box-shadow: none;
  }
  .table {
    min-width: 0 !important;
    font-size: 10px;
  }
  .table td,
  .table th {
    padding: 8px;
  }
  .table-responsive {
    overflow: visible;
  }
  .invoice-top {
    flex-direction: row;
  }
  .invoice-title {
    text-align: right;
  }
  .invoice-sums {
    width: 260px;
  }
  .invoice-paper .table {
    min-width: 0;
  }
  .invoice-bank {
    break-inside: avoid;
  }
  .badge-status {
    border: 1px solid #ddd;
  }
  thead {
    display: table-header-group;
  }
  tr {
    break-inside: avoid;
  }
  .compact-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  @page {
    size: A4;
    margin: 13mm;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.rank-row > svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  color: #6b85a4;
}
.stock-icon svg {
  width: 18px;
  height: 18px;
}
.surface {
  box-shadow: 0 3px 7px #152d4403;
}
.brandmark {
  letter-spacing: -1px;
}
/* Supplied Grand Boilers identity */
.brand {
  justify-content: center;
  padding: 23px 17px;
}
.company-logo {
  display: block;
  width: 184px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}
.brand-logo-panel {
  display: block;
  background: #fff;
  padding: 8px 9px;
  border-radius: 8px;
  max-width: 100%;
}
.invoice-logo {
  width: 174px;
  height: auto;
  display: block;
  margin-bottom: 15px;
}
.auth-logo {
  width: 200px;
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 26px;
}
.mobile-records {
  display: none;
}
@media screen and (max-width: 767px) {
  .table-responsive.card-table {
    display: none !important;
  }
  .mobile-records {
    display: grid;
    gap: 13px;
    padding: 15px;
    background: #f6f8fb;
  }
  .record-card {
    background: white;
    border: 1px solid #e0e7f0;
    border-radius: 10px;
    padding: 17px;
    min-width: 0;
    box-shadow: 0 2px 5px #132e4810;
  }
  .record-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 13px;
  }
  .record-card-title {
    font-size: 16px;
    line-height: 1.5;
    font-weight: 600;
    min-width: 0;
    overflow-wrap: anywhere;
    color: #203b56;
  }
  .record-card-title > a {
    display: block;
    color: inherit;
  }
  .record-card-title strong {
    font-weight: 600;
  }
  .record-card-title small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #77899d;
    margin-top: 5px;
  }
  .record-card-status {
    flex-shrink: 0;
    padding-top: 2px;
  }
  .record-card-status .badge-status {
    font-size: 12px;
    padding: 6px 8px;
  }
  .record-card-details {
    display: grid;
    gap: 0;
    margin: 0;
    border-top: 1px solid #edf1f6;
    padding-top: 6px;
  }
  .record-card-field {
    display: grid;
    grid-template-columns: minmax(88px, 0.85fr) minmax(0, 1.4fr);
    gap: 12px;
    align-items: baseline;
    padding: 8px 0;
  }
  .record-card-field dt {
    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
    color: #718398;
    text-transform: capitalize;
    overflow-wrap: anywhere;
  }
  .record-card-field dd {
    margin: 0;
    text-align: right;
    font-size: 14px;
    line-height: 1.5;
    color: #29445e;
    overflow-wrap: anywhere;
    min-width: 0;
  }
  .record-card-field dd small {
    display: block;
    font-size: 12px;
    color: #8190a2;
    margin-top: 3px;
  }
  .record-card-key dd {
    font-size: 16px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  .record-card-actions {
    display: flex;
    gap: 10px;
    border-top: 1px solid #edf1f6;
    margin-top: 8px;
    padding-top: 13px;
    flex-wrap: wrap;
  }
  .record-card-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    border: 1px solid #dce5f3;
    background: #f7faff;
    color: #3263b0;
    padding: 9px 17px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 550;
    flex: 1;
  }
  .record-card-actions a:first-child {
    background: #edf3ff;
    border-color: #e1eafa;
  }
  .invoice-paper .mobile-records {
    padding: 0;
    background: transparent;
    margin: 17px 0;
  }
  .invoice-paper .record-card {
    box-shadow: none;
    background: #fbfcfe;
  }
  .invoice-paper .record-card-title {
    font-size: 15px;
  }
  .invoice-paper .record-card-field dd {
    font-size: 14px;
  }
  .invoice-paper .invoice-parties {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .record-card .empty {
    padding: 22px 0;
    font-size: 14px;
  }
  .record-card .empty h3 {
    font-size: 16px;
  }
}
@media print {
  .mobile-records {
    display: none !important;
  }
  .table-responsive.card-table {
    display: block !important;
  }
  .invoice-logo {
    width: 145px;
    margin-bottom: 10px;
  }
}
.mobile-brand,
.statement-letterhead {
  display: none;
}
@media screen and (max-width: 767px) {
  .mobile-brand {
    display: block;
    flex-shrink: 0;
    margin-right: auto;
  }
  .mobile-brand img {
    display: block;
    width: 110px;
    height: auto;
    max-width: 100%;
  }
  .topbar .crumb {
    display: none;
  }
  .topbar {
    gap: 10px;
  }
}
@media print {
  .statement-letterhead {
    display: block;
    margin-bottom: 25px;
    font-size: 12px;
  }
  .statement-letterhead p {
    font-size: 10px;
    margin-top: 6px;
  }
}
