@font-face {
  font-family: "Glacial Indifference";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/glacial-indifference-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Glacial Indifference";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/glacial-indifference-bold.woff2") format("woff2");
}
:root {
  color-scheme: dark;
  --gold: #c3b327;
  --gold-light: #e2d66c;
  --ink: #e8e4d2;
  --muted: #aaa78f;
  --surface: #10110f;
  --panel: #191a16;
  --line: #c3b32724;
  --danger: #e4a294;
  font-family: "Glacial Indifference", Arial, sans-serif;
  font-size: 15px;
  font-synthesis: none;
  color: var(--ink);
  background: var(--surface);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--surface);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 5px;
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  background: #11120f;
  border: 1px solid #64613a;
  border-radius: 6px;
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px #c3b32716;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
input[type="date"] {
  min-height: 46px;
}
label {
  display: block;
  font-size: 13px;
  color: var(--ink);
}
label > input,
label > select,
label > textarea {
  margin-top: 9px;
}
label + label {
  margin-top: 22px;
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 400;
  color: var(--gold);
}
h1 {
  font-size: 38px;
  letter-spacing: -1px;
  line-height: 1.2;
}
h2 {
  font-size: 21px;
  line-height: 1.35;
}
h3 {
  font-size: 18px;
  line-height: 1.4;
}
p {
  line-height: 1.7;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 2.3px;
  color: var(--gold);
  margin-bottom: 13px;
}
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 13px;
  min-height: 45px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button > .icon {
  width: 17px;
  height: 17px;
}
.button.primary {
  background: var(--gold);
  color: #10110f;
  font-weight: 700;
}
.button.primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}
.button.secondary {
  background: transparent;
  color: var(--gold);
  border-color: #70672c;
}
.button.secondary:hover {
  background: #c3b3270e;
  border-color: var(--gold);
}
.button.full {
  width: 100%;
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 4px 0;
  background: none;
  color: var(--gold);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}
.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-button > .icon {
  width: 15px;
  height: 15px;
}
.text-button.subtle {
  color: var(--muted);
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  background: none;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  padding: 7px;
}
.icon-button:hover {
  background: #c3b32712;
  color: var(--gold);
}
.icon-button .icon {
  width: 19px;
  height: 19px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.nowrap {
  white-space: nowrap;
}
.initial-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--gold);
}
/* Brand and top navigation */
.brand {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}
.brand-logo {
  display: block;
  width: 155px;
  height: 68px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-name {
  color: var(--gold);
  font-size: 17px;
  line-height: 1.45;
  max-width: 245px;
  padding-left: 22px;
  border-left: 1px solid #c3b32745;
}
.brand-large {
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}
.brand-large .brand-logo {
  width: 330px;
  height: 139px;
  max-width: 100%;
  object-position: left center;
}
.brand-large .brand-name {
  max-width: 360px;
  padding: 0;
  border: 0;
  font-size: 18px;
  line-height: 1.5;
}
.site-header {
  background: #11120feb;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 5;
}
.header-inner {
  max-width: 1540px;
  min-height: 124px;
  padding: 19px 42px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.top-navigation {
  display: flex;
  gap: 5px;
  margin-left: auto;
  align-items: center;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  background: none;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  font-size: 13px;
  padding: 13px 10px;
  min-height: 44px;
}
.nav-item > .icon {
  width: 15px;
  height: 15px;
}
.nav-item:hover {
  color: var(--gold);
  background: #c3b32709;
}
.nav-item.active {
  color: var(--gold);
}
.nav-item.active:after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 10px;
  right: 10px;
  height: 1px;
  background: var(--gold);
}
.nav-count {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  background: #c3b32720;
  color: var(--gold);
  border-radius: 50%;
  font-size: 10px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 6px;
}
.avatar {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #756c2f;
  color: var(--gold);
  background: #c3b3270c;
  border-radius: 50%;
  font-size: 12px;
  flex-shrink: 0;
}
.profile-button {
  cursor: pointer;
}
.demo-pill {
  color: var(--muted);
  font-size: 10px;
  border: 1px solid #59532b;
  border-radius: 4px;
  padding: 4px 7px;
}
.main-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 124px);
}
#main-content {
  width: 100%;
  max-width: 1440px;
  padding: 48px 42px 65px;
  margin: 0 auto;
  outline: none;
  flex: 1;
}
.app-footer {
  width: calc(100% - 84px);
  max-width: 1356px;
  margin: auto auto 0;
  padding: 23px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.app-footer > span:first-child {
  color: var(--gold);
}
.app-footer > span:last-child {
  display: flex;
  gap: 7px;
  align-items: center;
}
.app-footer .icon {
  width: 12px;
  height: 12px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 34px;
}
.page-heading p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
}
.page-heading .eyebrow {
  font-size: 10px;
}
.page-heading > .button {
  font-size: 13px;
}
/* Customer balance */
.customer-workspace #main-content {
  padding-top: 30px;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
}
.customer-overview {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 255px);
  text-align: center;
}
.balance-greeting {
  font-size: 14px;
  color: var(--muted);
  margin: 14px 0;
}
.balance-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 55px 0 75px;
  position: relative;
  isolation: isolate;
}
.balance-hero:before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 5% 15%;
  background: radial-gradient(ellipse, #c3b32706, transparent 68%);
  pointer-events: none;
}
.balance-rule {
  width: 38px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 32px;
}
.balance-hero h1 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 3.5px;
  line-height: 1.5;
  color: var(--gold);
  margin-bottom: 22px;
}
.balance-value {
  font-size: clamp(64px, 12vw, 164px);
  font-weight: 400;
  letter-spacing: -6px;
  line-height: 1.05;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  max-width: 100%;
}
.balance-value.long-amount {
  font-size: clamp(40px, 8vw, 116px);
}
.balance-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 24px;
}
.balance-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}
.balance-actions .button {
  min-height: 49px;
  padding: 13px 24px;
}
.balance-actions .text-button {
  font-size: 13px;
}
.balance-bottom-note {
  font-size: 11px;
  color: var(--muted);
  padding: 18px 0;
}
/* Sign in */
.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-story {
  display: flex;
  flex-direction: column;
  padding: 54px 8vw 33px;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 5% 85%, #c3b3270b, transparent 65%), #11120f;
}
.login-story:after {
  content: "";
  position: absolute;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  border: 1px solid #c3b32710;
  left: -330px;
  bottom: -470px;
  pointer-events: none;
}
.login-brand {
  position: relative;
  z-index: 1;
}
.story-content {
  margin: auto 0;
  padding: 70px 0;
  position: relative;
  z-index: 1;
}
.story-content h1 {
  font-size: clamp(40px, 4.3vw, 65px);
  line-height: 1.12;
  letter-spacing: -1.6px;
  margin-top: 23px;
}
.story-content > p {
  font-size: 16px;
  line-height: 1.9;
  margin-top: 27px;
  color: var(--muted);
  max-width: 440px;
}
.story-features {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 41px;
  color: var(--gold);
  font-size: 13px;
}
.story-features > span {
  display: flex;
  gap: 12px;
  align-items: center;
}
.story-features .icon {
  width: 17px;
  height: 17px;
  color: var(--gold);
}
.story-footer {
  font-size: 11px;
  color: var(--muted);
  position: relative;
  z-index: 1;
}
.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 45px 28px;
  background: #151610;
}
.login-form-wrap {
  width: 100%;
  max-width: 350px;
  margin: auto;
}
.login-form-wrap > .eyebrow {
  font-size: 10px;
}
.login-form-wrap h2 {
  font-size: 43px;
  letter-spacing: -1px;
}
.login-subtitle {
  font-size: 14px;
  margin-top: 12px;
  margin-bottom: 35px;
}
.login-form-wrap label {
  font-size: 13px;
}
.login-form-wrap input {
  padding: 14px;
}
.login-form-wrap .button.full {
  justify-content: space-between;
  min-height: 47px;
}
.form-error {
  font-size: 13px;
  color: var(--danger);
  line-height: 1.6;
  margin: 14px 0;
}
.form-error:empty {
  margin: 20px 0 0;
}
.login-help {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  text-align: center;
  margin: 24px 0;
}
.demo-box {
  border: 1px solid #544e28;
  background: #c3b32706;
  border-radius: 7px;
  padding: 20px;
  margin-top: 31px;
}
.demo-box .eyebrow {
  font-size: 9px;
  letter-spacing: 1.7px;
  margin-bottom: 9px;
}
.demo-box p {
  font-size: 12px;
  color: var(--muted);
}
.demo-buttons {
  display: flex;
  gap: 10px;
  margin-top: 17px;
}
.demo-buttons .button {
  flex: 1;
  font-size: 12px;
  gap: 7px;
  padding: 10px;
  min-height: 41px;
}
.demo-buttons .icon {
  width: 15px;
  height: 15px;
}
.secure-note {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  margin-top: 27px;
}
.secure-note .icon {
  width: 13px;
  height: 13px;
}
.login-bottom {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  margin-top: 35px;
}
/* Administrator and invoice lists */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 23px;
}
.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.stat-icon {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  color: var(--gold);
  background: #c3b3270e;
  border-radius: 7px;
  flex-shrink: 0;
}
.stat-icon .icon {
  width: 17px;
  height: 17px;
}
.stat-card > strong {
  display: block;
  color: var(--gold);
  font-size: 34px;
  letter-spacing: -1px;
  font-weight: 400;
  margin-top: 20px;
  line-height: 1.3;
}
.stat-note {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 9px;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 24px;
}
.overview-aside {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  min-width: 0;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 24px;
}
.panel-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
}
.panel-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.panel-heading.compact {
  padding: 0;
}
.count-label {
  font-size: 11px;
  color: var(--gold);
  border: 1px solid #655d28;
  border-radius: 4px;
  padding: 2px 6px;
}
.table-scroll {
  position: relative;
  overflow-x: auto;
  width: 100%;
  scrollbar-color: #756b2b #191a16;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
th {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  background: #14150f;
  border-block: 1px solid var(--line);
  padding: 15px 20px;
  white-space: nowrap;
}
td {
  padding: 22px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #c3b32703;
}
.invoice-table th:first-child,
.invoice-table td:first-child {
  padding-left: 24px;
}
.invoice-table th:last-child,
.invoice-table td:last-child {
  padding-left: 2px;
  padding-right: 13px;
}
.invoice-link {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  min-width: 170px;
}
.invoice-link strong {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--gold);
}
.invoice-link small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 8px;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.invoice-link:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.document-icon {
  width: 32px;
  height: 38px;
  border: 1px solid #655e2b;
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--gold);
}
.document-icon > .icon {
  width: 17px;
  height: 17px;
}
.amount-cell {
  white-space: nowrap;
  color: var(--gold);
  font-size: 14px;
}
.amount-cell strong {
  font-weight: 400;
}
.amount-cell small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 7px;
}
.customer-cell {
  white-space: nowrap;
  font-size: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  line-height: 1.5;
  border-radius: 4px;
  padding: 4px 7px;
  white-space: nowrap;
  color: var(--gold);
  background: #c3b32714;
  border: 1px solid #c3b32722;
}
.status-dot {
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}
.badge.overdue,
.badge.declined {
  color: var(--danger);
  background: #e0a18d0b;
  border-color: #e0a18d25;
}
.badge.paid,
.badge.approved {
  color: var(--success, #b6c99a);
  background: #b6c99a0b;
  border-color: #b6c99a25;
}
.badge.partial {
  color: var(--gold);
  background: #d7c7820b;
  border-color: #d7c78225;
}
.badge.pending {
  color: var(--pending, #c4b9d4);
  background: #c4b9d40b;
  border-color: #c4b9d425;
}
.side-panel {
  padding: 25px;
}
.side-panel .panel-heading > .icon {
  color: var(--gold);
  width: 19px;
  height: 19px;
}
.request-number {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 62px;
  line-height: 1;
  color: var(--gold);
  margin: 30px 0;
}
.request-number > span {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 90px;
}
.side-copy {
  font-size: 13px;
}
.side-panel .button {
  font-size: 12px;
  justify-content: space-between;
  margin-top: 24px;
  padding: 10px 12px;
}
.help-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 25px;
  background: #c3b32706;
}
.help-card h3 {
  font-size: 20px;
  line-height: 1.5;
}
.help-card p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 14px;
}
.help-card .text-button {
  margin-top: 22px;
}
.invoice-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
}
.tabs {
  display: flex;
  gap: 8px;
}
.tab {
  border: 0;
  background: none;
  border-radius: 4px;
  font-size: 12px;
  padding: 9px 12px;
  color: var(--muted);
  white-space: nowrap;
}
.tab:hover {
  background: #c3b32708;
}
.tab.active {
  color: var(--gold);
  background: #c3b32713;
}
.search-box {
  position: relative;
  width: 240px;
  max-width: 100%;
}
.search-box > .icon {
  position: absolute;
  width: 15px;
  height: 15px;
  left: 12px;
  top: 13px;
  color: var(--muted);
}
.search-box input {
  margin: 0;
  padding: 11px 11px 11px 36px;
  font-size: 12px;
  border-color: #58532e;
}
.table-footnote {
  font-size: 12px;
  color: var(--muted);
  margin-top: 18px;
}
.empty-state {
  padding: 65px 25px;
  text-align: center;
}
.empty-state > .icon {
  width: 35px;
  height: 35px;
  color: var(--gold);
  margin-bottom: 22px;
}
.empty-state h3 {
  font-size: 23px;
}
.empty-state p {
  color: var(--muted);
  font-size: 14px;
  margin: 14px auto 25px;
  max-width: 420px;
}
.info-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 24px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.info-note > .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}
.customer-identity {
  display: flex;
  align-items: center;
  gap: 13px;
}
.customer-identity strong {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--gold);
}
.customer-identity small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}
.customer-avatar {
  width: 36px;
  height: 36px;
}
.plan-list {
  display: grid;
  gap: 22px;
}
.plan-card {
  padding: 28px;
}
.plan-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.plan-card-title {
  display: flex;
  align-items: center;
  gap: 16px;
}
.plan-card-title h2 {
  margin-bottom: 6px;
}
.plan-card-title .stat-icon {
  width: 40px;
  height: 45px;
}
.plan-values {
  display: flex;
  gap: 65px;
  margin-top: 32px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}
.plan-values > div > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 13px;
}
.plan-values strong {
  font-size: 29px;
  letter-spacing: -0.6px;
  font-weight: 400;
  color: var(--gold);
}
.plan-values small {
  font-size: 12px;
  letter-spacing: 0;
  color: var(--muted);
  font-weight: 400;
}
.plan-values .date-value {
  font-size: 17px;
  letter-spacing: 0;
}
blockquote {
  margin: 22px 0;
  border-left: 2px solid #8b7f32;
  background: #c3b32706;
  border-radius: 0 6px 6px 0;
  padding: 17px 20px;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.8;
}
.admin-response {
  padding: 18px 0;
}
.admin-response strong {
  font-size: 12px;
  font-weight: 400;
  color: var(--gold);
}
.admin-response p {
  margin-top: 9px;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.plan-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
}
.plan-card-footer > span {
  font-size: 12px;
  color: var(--muted);
}
.plan-card-footer .button {
  font-size: 13px;
}
.account-panel {
  padding: 32px;
  max-width: 800px;
}
.profile-large {
  display: flex;
  align-items: center;
  gap: 20px;
}
.profile-large .avatar {
  width: 56px;
  height: 56px;
  font-size: 18px;
}
.profile-large h2 {
  font-size: 24px;
}
.profile-large p {
  font-size: 14px;
  margin-top: 7px;
}
.account-details {
  display: grid;
  gap: 26px;
  margin: 36px 0;
}
.account-details > div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 15px;
}
.account-details dt {
  font-size: 13px;
  color: var(--muted);
}
.account-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.account-security {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.account-security h3 {
  font-size: 19px;
}
.account-security p {
  font-size: 12px;
  margin-top: 9px;
}
.account-signout {
  border-top: 1px solid var(--line);
  margin-top: 27px;
  padding-top: 22px;
}
/* Dialogs */
dialog {
  width: 540px;
  max-width: calc(100% - 28px);
  max-height: 90vh;
  margin: auto;
  padding: 0;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid #6c622c;
  border-radius: 9px;
  box-shadow: 0 25px 100px #0008;
}
dialog.wide {
  width: 790px;
}
dialog::backdrop {
  background: #050603b8;
  backdrop-filter: blur(5px);
}
.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 26px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.modal-header h2 {
  font-size: 23px;
}
.modal-form {
  padding: 25px 27px;
}
.modal-form > .muted {
  font-size: 14px;
  margin-bottom: 26px;
}
.modal-form > label {
  margin-top: 22px;
}
.modal-form input,
.modal-form select,
.modal-form textarea {
  font-size: 14px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-grid > label {
  margin-top: 0;
}
.optional {
  font-size: 11px;
  color: var(--muted);
}
.field-hint {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 14px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 23px;
}
.line-items-editor {
  margin-top: 26px;
}
.line-items-labels,
.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 65px 110px 26px;
  gap: 10px;
  align-items: center;
}
.line-items-labels {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.item-row {
  margin-bottom: 12px;
  position: relative;
}
.item-row > label {
  margin: 0;
}
.item-row input {
  margin: 0;
}
.line-items-editor > .text-button {
  margin-top: 6px;
}
.invoice-form-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border-block: 1px solid var(--line);
  padding: 20px 0;
  margin: 25px 0;
  font-size: 14px;
}
.invoice-form-total strong {
  color: var(--gold);
  font-size: 28px;
  font-weight: 400;
}
.form-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px;
  border: 1px solid #675e2b;
  border-radius: 6px;
  background: #c3b32707;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 26px;
}
.form-balance strong {
  font-size: 27px;
  font-weight: 400;
  color: var(--gold);
}
.invoice-detail {
  padding: 29px 33px;
}
.invoice-paper-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.paper-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
  font-size: 13px;
  color: var(--gold);
  max-width: 320px;
  line-height: 1.5;
}
.invoice-logo {
  display: block;
  width: 180px;
  height: 75px;
  object-fit: contain;
}
.invoice-paper-header h3 {
  font-size: 32px;
  letter-spacing: -0.6px;
  margin: 27px 0 10px;
}
.invoice-paper-header p {
  font-size: 14px;
  color: var(--muted);
}
.invoice-paper-header > .badge {
  margin-top: 9px;
}
.invoice-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 25px;
  border-bottom: 1px solid var(--line);
  margin: 27px 0 10px;
  padding-bottom: 25px;
}
.invoice-meta > div > span {
  display: block;
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--muted);
  margin-bottom: 11px;
}
.invoice-meta strong {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--gold);
}
.invoice-meta p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
  overflow-wrap: anywhere;
}
.invoice-meta .due-label {
  margin-top: 19px;
}
.line-table th {
  background: transparent;
  border-top: 0;
  padding: 17px 6px;
  font-size: 12px;
}
.line-table td {
  font-size: 14px;
  line-height: 1.6;
  padding: 21px 6px;
}
.line-table th:first-child {
  width: 50%;
}
.line-table th:last-child,
.line-table td:last-child {
  text-align: right;
  color: var(--gold);
}
.invoice-totals {
  max-width: 305px;
  margin: 26px 0 28px auto;
}
.invoice-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
}
.invoice-totals strong {
  font-weight: 400;
  color: var(--gold);
}
.invoice-totals > .total-due {
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 13px;
  padding-top: 20px;
  color: var(--gold);
  font-size: 15px;
}
.total-due strong {
  font-size: 31px;
  color: var(--gold);
  letter-spacing: -0.5px;
}
.invoice-notes {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #c3b32705;
}
.invoice-notes strong {
  font-weight: 400;
  font-size: 13px;
  color: var(--gold);
}
.invoice-notes p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin-top: 9px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-section {
  margin-top: 28px;
}
.detail-section h3 {
  font-size: 17px;
  margin-bottom: 13px;
}
.payment-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.payment-check {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #c3b32712;
  color: var(--gold);
}
.payment-check > .icon {
  width: 14px;
  height: 14px;
}
.payment-row strong {
  display: block;
  font-size: 13px;
  font-weight: 400;
}
.payment-row small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
}
.payment-row b {
  font-weight: 400;
  color: var(--gold);
  font-size: 15px;
  margin-left: auto;
}
.invoice-plan-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 26px;
  padding: 20px;
  border-radius: 6px;
  background: #c3b3270a;
  color: var(--gold);
}
.invoice-plan-note strong {
  font-size: 14px;
  font-weight: 400;
}
.invoice-plan-note > .icon {
  width: 18px;
  height: 18px;
}
.invoice-plan-note p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.invoice-dialog-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 27px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.invoice-dialog-footer .button {
  font-size: 13px;
}
.paid-message {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--success, #becb9f);
}
.paid-message > .icon {
  width: 17px;
  height: 17px;
}
.password-required,
.startup-error {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 35px 25px;
}
.password-brand {
  max-width: 440px;
  width: 100%;
}
.password-brand .brand-large {
  align-items: center;
  text-align: center;
}
.password-brand .brand-logo {
  object-position: center;
}
.password-required > .panel,
.startup-error > .panel {
  width: 100%;
  max-width: 470px;
  padding: 32px;
}
.password-required h1,
.startup-error h1 {
  font-size: 29px;
  margin-bottom: 22px;
}
.password-required form > .muted {
  font-size: 14px;
  margin-bottom: 26px;
}
.password-required > .panel > .text-button {
  margin-top: 25px;
}
.startup-error p {
  margin-bottom: 25px;
  color: var(--muted);
}
#toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 25px;
  transform: translate(-50%, 16px);
  width: max-content;
  max-width: calc(100% - 32px);
  border: 1px solid #8c7f2d;
  border-radius: 7px;
  background: #252518;
  color: var(--gold);
  padding: 16px 22px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 10px 40px #0005;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
/* Discounts and payment instructions */
.invoice-discount {
  margin-top: 27px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}
.discount-row,
.discount-row strong {
  color: var(--gold) !important;
}
.invoice-customer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.invoice-dialog-footer {
  flex-wrap: wrap;
}
.payment-record-extras {
  margin-top: 22px;
}
.payment-settings-panel {
  margin-top: 25px;
}
.payment-settings-panel > .muted {
  margin: 15px 0 24px;
  max-width: 600px;
  font-size: 14px;
}
.payment-flow {
  padding: 27px 30px;
}
.payment-flow > .muted {
  font-size: 13px;
  margin-bottom: 24px;
}
.checkout-amounts {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #c3b32705;
}
.checkout-amounts > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 7px 0;
  font-size: 13px;
  color: var(--muted);
}
.checkout-amounts strong {
  font-weight: 400;
  color: var(--gold);
}
.checkout-amounts > .checkout-total {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 19px;
  font-size: 15px;
  color: var(--gold);
}
.checkout-total strong {
  font-size: 31px;
  letter-spacing: -0.5px;
}
.tip-section,
.payment-method-section {
  margin-top: 28px;
}
.tip-section h3,
.payment-method-section h3 {
  font-size: 19px;
  margin-bottom: 16px;
}
.tip-presets {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 17px;
}
.tip-preset,
.payment-method {
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid #70672c;
  background: transparent;
  border-radius: 5px;
  color: var(--muted);
  font-size: 13px;
}
.tip-preset.active,
.payment-method.active {
  background: var(--gold);
  color: #10110f;
  border-color: var(--gold);
}
.tip-preset:hover,
.payment-method:hover {
  border-color: var(--gold-light);
}
.tip-custom {
  max-width: 220px;
  font-size: 12px;
}
.payment-method-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.payment-method {
  flex: 1;
  font-size: 15px;
}
.payment-instruction-card {
  border: 1px solid #665e2b;
  border-radius: 7px;
  padding: 24px;
  background: #c3b32707;
}
.payment-instruction-card h3 {
  font-size: 27px;
  letter-spacing: -0.4px;
}
.payment-instruction-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.payment-reference strong {
  font-weight: 400;
  color: var(--gold);
}
.electronic-payment {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  gap: 25px;
}
.payment-qr-wrap {
  min-width: 0;
}
.payment-qr {
  display: block;
  width: 210px;
  height: 210px;
  max-width: 100%;
  object-fit: contain;
  background: #fff;
  padding: 10px;
  border-radius: 6px;
}
.qr-placeholder {
  width: 210px;
  min-height: 165px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 15px;
  padding: 20px;
  border: 1px dashed #71662c;
  border-radius: 6px;
  background: #12130f;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.qr-placeholder > .icon {
  color: var(--gold);
  width: 26px;
  height: 26px;
}
.recipient-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 19px;
}
.payment-instruction-card .payment-recipient {
  font-size: 19px;
  color: var(--gold);
  margin-top: 7px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.payment-setup-section {
  padding-top: 25px;
  margin-top: 27px;
  border-top: 1px solid var(--line);
}
.payment-report-action {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
}
.payment-report-action p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.payment-pending-content {
  padding: 32px 28px 26px;
  text-align: center;
}
.payment-pending-symbol {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  background: #c3b32712;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
}
.payment-pending-symbol .icon {
  width: 30px;
  height: 30px;
}
.payment-pending-content h3 {
  font-size: 29px;
  line-height: 1.3;
  margin: 18px 0 14px;
}
.payment-pending-summary {
  border-block: 1px solid var(--line);
  margin: 24px 0;
  padding: 22px 0;
}
.payment-pending-summary > span,
.payment-pending-summary > small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.payment-pending-summary > strong {
  display: block;
  font-size: clamp(30px, 8vw, 42px);
  color: var(--gold);
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.payment-pending-summary p {
  margin-block: 8px;
  overflow-wrap: anywhere;
}
.payment-pending-summary .pending-reference {
  font-size: 13px;
  color: var(--muted);
}
.payment-pending-content .modal-actions {
  justify-content: center;
}
.payment-pending-content .modal-actions .button {
  white-space: normal;
}
.pending-payment-list {
  width: 100%;
  max-width: 680px;
  margin: 0 auto 25px;
}
.pending-payment-list .info-note {
  flex-wrap: wrap;
  justify-content: center;
}
.payment-setup-section h3 {
  font-size: 24px;
  margin-bottom: 18px;
}
.payment-setup-section label {
  margin-top: 20px;
}
.settings-qr-preview {
  margin-top: 22px;
}
.settings-qr-preview .payment-qr {
  width: 175px;
  height: 175px;
}
.settings-qr-preview .qr-placeholder {
  width: 175px;
  min-height: 130px;
  font-size: 11px;
}
input[type="file"] {
  font-size: 12px;
  padding: 10px;
}
input::file-selector-button {
  background: #c3b32715;
  border: 1px solid #756a2c;
  border-radius: 4px;
  padding: 8px 10px;
  margin-right: 10px;
  color: var(--gold);
  font: inherit;
  cursor: pointer;
}
@media (max-width: 760px) {
  .payment-flow {
    padding: 23px;
  }
  .electronic-payment {
    grid-template-columns: 165px minmax(0, 1fr);
    gap: 20px;
  }
  .payment-qr {
    width: 165px;
    height: 165px;
  }
  .payment-instruction-card {
    padding: 20px;
  }
  .payment-instruction-card h3 {
    font-size: 25px;
  }
  .payment-instruction-card .payment-recipient {
    font-size: 17px;
  }
  .invoice-customer-actions .button {
    font-size: 12px;
  }
  .checkout-amounts {
    padding: 18px;
  }
}
@media (max-width: 450px) {
  .payment-flow {
    padding: 21px 17px;
  }
  .electronic-payment {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }
  .payment-qr-wrap {
    display: flex;
    justify-content: center;
  }
  .payment-qr {
    width: 190px;
    height: 190px;
  }
  .payment-instruction-card h3 {
    font-size: 25px;
  }
  .payment-method-tabs {
    gap: 8px;
  }
  .payment-method {
    padding: 10px;
    font-size: 14px;
  }
  .tip-presets {
    gap: 7px;
  }
  .tip-preset {
    padding: 10px 13px;
    font-size: 12px;
    flex: 1;
  }
  .tip-custom {
    max-width: 100%;
  }
  .checkout-total strong {
    font-size: 28px;
  }
  .invoice-customer-actions {
    width: 100%;
    justify-content: stretch;
  }
  .invoice-customer-actions .button {
    flex: 1;
    padding: 10px;
    font-size: 11px;
  }
  .payment-record-extras {
    margin-top: 23px;
  }
}
/* Responsive layouts */
@media (max-width: 1280px) {
  .header-inner {
    gap: 20px;
    padding: 17px 30px;
    flex-wrap: wrap;
    min-height: 130px;
  }
  .brand-logo {
    width: 135px;
    height: 57px;
  }
  .brand-name {
    font-size: 16px;
    max-width: 230px;
    padding-left: 18px;
  }
  .brand {
    gap: 18px;
  }
  .header-actions {
    margin-left: auto;
  }
  .top-navigation {
    order: 3;
    width: 100%;
    margin: 0;
    justify-content: center;
    border-top: 1px solid #c3b32714;
    padding-top: 9px;
    gap: 22px;
  }
  .nav-item {
    padding: 9px 12px;
  }
  .main-shell {
    min-height: calc(100vh - 151px);
  }
  #main-content {
    padding: 38px 30px 55px;
  }
  .app-footer {
    width: calc(100% - 60px);
  }
  .stat-card {
    padding: 20px;
  }
  .stat-card > strong {
    font-size: 30px;
  }
  .stat-top {
    font-size: 12px;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 20px;
  }
  .invoice-link {
    min-width: 135px;
    gap: 9px;
  }
  .recent-panel .document-icon {
    display: none;
  }
  .recent-panel td,
  .recent-panel th {
    padding-inline: 14px;
  }
  .recent-panel .invoice-link small {
    max-width: 175px;
  }
  .login-story {
    padding-inline: 7vw;
  }
  .brand-large .brand-logo {
    width: 300px;
    height: 126px;
  }
  .brand-large .brand-name {
    font-size: 17px;
    max-width: 330px;
    padding: 0;
  }
  .story-content h1 {
    font-size: 52px;
  }
  .story-content > p {
    font-size: 15px;
  }
  .login-panel {
    padding-inline: 40px;
  }
  .login-form-wrap {
    max-width: 330px;
  }
  .customer-overview {
    min-height: calc(100vh - 280px);
  }
}
@media (max-width: 1000px) {
  .overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .overview-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .stats-grid {
    gap: 14px;
  }
  .stat-card {
    padding: 18px 16px;
  }
  .stat-card > strong {
    font-size: 27px;
  }
  .stat-top {
    font-size: 11px;
    gap: 5px;
  }
  .stat-icon {
    width: 27px;
    height: 27px;
  }
  .stat-note {
    font-size: 10px;
  }
  .login-story {
    padding: 40px 40px 27px;
  }
  .story-content h1 {
    font-size: 44px;
  }
  .story-content > p {
    font-size: 14px;
  }
  .brand-large .brand-logo {
    width: 270px;
    height: 115px;
  }
  .brand-large .brand-name {
    font-size: 15px;
    max-width: 300px;
  }
  .login-panel {
    padding: 45px 30px 25px;
  }
  .demo-buttons {
    flex-direction: column;
  }
  .desktop-only {
    display: none;
  }
  .balance-hero {
    padding-block: 55px;
  }
  .balance-value {
    font-size: clamp(64px, 13vw, 125px);
    letter-spacing: -4px;
  }
  .plan-values {
    gap: 45px;
  }
  .account-panel {
    max-width: none;
  }
}
@media (max-width: 760px) {
  h1 {
    font-size: 32px;
  }
  .header-inner {
    padding: 16px 20px 7px;
    gap: 15px;
  }
  .brand {
    gap: 12px;
    max-width: calc(100% - 110px);
  }
  .brand-logo {
    width: 110px;
    height: 47px;
  }
  .brand-name {
    font-size: 13px;
    max-width: 210px;
    padding-left: 12px;
    line-height: 1.4;
  }
  .header-actions {
    gap: 6px;
    margin-left: auto;
  }
  .header-actions .demo-pill {
    display: none;
  }
  .avatar {
    width: 32px;
    height: 32px;
    font-size: 10px;
  }
  .signout-button {
    min-width: 30px;
    padding: 5px;
  }
  .signout-button > .icon {
    width: 17px;
    height: 17px;
  }
  .top-navigation {
    gap: 5px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-top: 6px;
    scrollbar-width: none;
  }
  .top-navigation::-webkit-scrollbar {
    display: none;
  }
  .nav-item {
    font-size: 12px;
    gap: 7px;
    padding: 10px;
    min-height: 42px;
    flex-shrink: 0;
  }
  .nav-item > .icon {
    width: 14px;
    height: 14px;
  }
  .main-shell {
    min-height: calc(100vh - 130px);
  }
  #main-content {
    padding: 32px 20px 45px;
  }
  .page-heading {
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 28px;
  }
  .page-heading p {
    font-size: 13px;
    max-width: 380px;
  }
  .page-heading > .button {
    font-size: 12px;
    padding: 10px 13px;
    min-height: 41px;
    margin-top: 26px;
  }
  .page-heading .eyebrow {
    font-size: 9px;
  }
  .app-footer {
    width: calc(100% - 40px);
    padding: 20px 0;
    gap: 15px;
    font-size: 10px;
  }
  .app-footer > span:first-child {
    max-width: 230px;
  }
  .app-footer > span:last-child {
    max-width: 150px;
    align-items: flex-start;
  }
  .app-footer .icon {
    margin-top: 3px;
  }
  .customer-workspace #main-content {
    padding: 25px 20px 15px;
  }
  .customer-overview {
    min-height: calc(100svh - 255px);
  }
  .balance-greeting {
    font-size: 12px;
    margin: 13px 0;
  }
  .balance-rule {
    width: 30px;
    margin-bottom: 25px;
  }
  .balance-hero {
    padding-block: 50px;
  }
  .balance-hero h1 {
    font-size: 12px;
    letter-spacing: 2.5px;
    margin-bottom: 20px;
  }
  .balance-value {
    font-size: clamp(60px, 12.5vw, 96px);
    letter-spacing: -3px;
  }
  .balance-note {
    font-size: 12px;
    margin-top: 21px;
  }
  .balance-actions {
    flex-direction: column;
    gap: 18px;
    margin-top: 32px;
  }
  .balance-actions .button {
    font-size: 13px;
    min-height: 46px;
    padding: 12px 22px;
  }
  .balance-actions .text-button {
    font-size: 12px;
  }
  .balance-bottom-note {
    font-size: 10px;
    padding: 10px 0;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 22px;
  }
  .stat-card {
    padding: 20px;
  }
  .stat-top {
    font-size: 12px;
  }
  .stat-card > strong {
    font-size: 33px;
    margin-top: 16px;
  }
  .stat-note {
    font-size: 11px;
  }
  .overview-aside {
    gap: 16px;
  }
  .panel-heading {
    padding: 21px;
  }
  .panel-heading h2 {
    font-size: 19px;
  }
  .panel-heading p {
    font-size: 11px;
  }
  .invoice-table {
    min-width: 610px;
  }
  .recent-panel .invoice-table {
    min-width: 680px;
  }
  td {
    font-size: 12px;
    padding: 20px 17px;
  }
  th {
    font-size: 11px;
    padding: 14px 17px;
  }
  .invoice-link strong {
    font-size: 12px;
  }
  .invoice-link small {
    font-size: 11px;
  }
  .amount-cell {
    font-size: 13px;
  }
  .side-panel,
  .help-card {
    padding: 23px;
  }
  .help-card h3 {
    font-size: 19px;
  }
  .request-number {
    font-size: 54px;
    margin: 24px 0;
  }
  .request-number > span {
    font-size: 12px;
  }
  .invoice-toolbar {
    flex-wrap: wrap;
    gap: 17px;
    padding: 17px 20px;
  }
  .search-box {
    width: 100%;
    max-width: none;
  }
  .tabs {
    gap: 5px;
  }
  .tab {
    font-size: 12px;
    padding: 8px 11px;
  }
  .table-footnote,
  .info-note {
    font-size: 11px;
  }
  .plan-card {
    padding: 23px;
  }
  .plan-card-title h2 {
    font-size: 20px;
  }
  .plan-card-title .stat-icon {
    width: 32px;
    height: 36px;
  }
  .plan-card-title .text-button {
    font-size: 12px;
  }
  .plan-values {
    gap: 35px;
    flex-wrap: wrap;
    margin-top: 26px;
  }
  .plan-values > div:first-child {
    width: 100%;
  }
  .plan-values strong {
    font-size: 30px;
  }
  .plan-values .date-value {
    font-size: 16px;
  }
  .plan-values > div > span {
    font-size: 11px;
  }
  .plan-card-footer {
    align-items: flex-start;
    gap: 20px;
  }
  .plan-card-footer > span {
    font-size: 11px;
  }
  .plan-card-footer .button {
    font-size: 12px;
    padding: 10px 13px;
  }
  .account-panel {
    padding: 25px;
  }
  .account-details > div {
    grid-template-columns: 130px 1fr;
    gap: 12px;
  }
  .account-details dt {
    font-size: 12px;
  }
  .account-details dd {
    font-size: 13px;
  }
  .account-security {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .profile-large h2 {
    font-size: 23px;
  }
  .profile-large p {
    font-size: 14px;
  }
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 30px 25px 32px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .login-brand .brand-large {
    flex-direction: row;
    gap: 22px;
    align-items: center;
    max-width: none;
  }
  .login-brand .brand-logo {
    width: 175px;
    height: 73px;
    object-position: center;
  }
  .login-brand .brand-name {
    font-size: 15px;
    max-width: 220px;
    padding-left: 22px;
    border-left: 1px solid #c3b32745;
  }
  .story-content {
    padding: 35px 0 0;
  }
  .story-content .eyebrow {
    font-size: 9px;
  }
  .story-content h1 {
    font-size: 37px;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-top: 14px;
  }
  .story-content h1 br {
    display: none;
  }
  .story-content > p {
    font-size: 14px;
    margin-top: 18px;
    max-width: 430px;
  }
  .story-features,
  .story-footer {
    display: none;
  }
  .login-panel {
    padding: 36px 25px 24px;
  }
  .login-form-wrap {
    max-width: 430px;
  }
  .login-form-wrap > .eyebrow {
    font-size: 9px;
  }
  .login-form-wrap h2 {
    font-size: 35px;
  }
  .login-subtitle {
    font-size: 14px;
    margin: 10px 0 28px;
  }
  .demo-buttons {
    flex-direction: row;
  }
  .secure-note {
    font-size: 10px;
  }
  .login-bottom {
    font-size: 10px;
    margin-top: 27px;
  }
  .modal-header {
    padding: 18px 21px;
  }
  .modal-header h2 {
    font-size: 21px;
  }
  .modal-form {
    padding: 23px 21px;
  }
  .form-grid {
    gap: 16px;
  }
  .modal-form input,
  .modal-form select,
  .modal-form textarea {
    font-size: 13px;
  }
  .field-hint {
    font-size: 11px;
  }
  .invoice-detail {
    padding: 24px;
  }
  .invoice-paper-header h3 {
    font-size: 28px;
  }
  .invoice-paper-header p {
    font-size: 13px;
  }
  .invoice-logo {
    width: 150px;
    height: 62px;
  }
  .paper-brand {
    font-size: 11px;
    max-width: 260px;
    gap: 10px;
  }
  .invoice-meta > div > span {
    font-size: 9px;
  }
  .invoice-meta strong {
    font-size: 13px;
  }
  .invoice-meta p {
    font-size: 11px;
  }
  .line-table td {
    font-size: 12px;
  }
  .line-table th {
    font-size: 11px;
  }
  .invoice-totals {
    max-width: 280px;
  }
  .invoice-dialog-footer {
    padding: 19px 21px;
    gap: 12px;
  }
  .invoice-dialog-footer .button {
    font-size: 12px;
    padding: 11px 14px;
  }
  .line-items-labels,
  .item-row {
    grid-template-columns: minmax(0, 1fr) 50px 84px 23px;
    gap: 7px;
  }
  .line-items-labels {
    font-size: 11px;
  }
  .item-row input {
    padding: 11px 8px;
    font-size: 12px;
  }
  .modal-actions .button {
    font-size: 13px;
  }
  .password-brand .brand {
    max-width: none;
  }
  .password-brand .brand-logo {
    width: 240px;
    height: 100px;
  }
  .password-brand .brand-name {
    max-width: 330px;
    font-size: 16px;
  }
  .password-required > .panel {
    padding: 27px;
  }
}
@media (max-width: 450px) {
  .header-inner {
    padding-inline: 16px;
    gap: 11px;
  }
  .brand {
    max-width: calc(100% - 85px);
    gap: 10px;
  }
  .brand-logo {
    width: 87px;
    height: 39px;
  }
  .brand-name {
    font-size: 11px;
    max-width: 160px;
    padding-left: 10px;
  }
  .header-actions {
    gap: 3px;
  }
  .header-actions .avatar {
    width: 29px;
    height: 29px;
    font-size: 10px;
  }
  .signout-button {
    min-width: 26px;
    min-height: 30px;
    padding: 4px;
  }
  .top-navigation {
    gap: 1px;
  }
  .nav-item {
    font-size: 11px;
    padding: 9px 8px;
    gap: 5px;
  }
  .nav-item > .icon {
    width: 12px;
    height: 12px;
  }
  .nav-count {
    width: 14px;
    height: 14px;
    font-size: 9px;
  }
  #main-content {
    padding-inline: 16px;
  }
  .customer-workspace #main-content {
    padding-inline: 16px;
  }
  .page-heading {
    flex-direction: column;
    gap: 18px;
  }
  .page-heading > .button {
    margin-top: 0;
  }
  .page-heading h1 {
    font-size: 30px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .stats-grid {
    gap: 11px;
  }
  .stat-card {
    padding: 16px;
  }
  .stat-top {
    font-size: 11px;
  }
  .stat-icon {
    width: 25px;
    height: 25px;
  }
  .stat-card > strong {
    font-size: 28px;
  }
  .stat-note {
    font-size: 10px;
  }
  .overview-aside {
    grid-template-columns: 1fr;
  }
  .app-footer {
    width: calc(100% - 32px);
    font-size: 9px;
    gap: 20px;
  }
  .app-footer > span:first-child {
    max-width: 190px;
  }
  .app-footer > span:last-child {
    max-width: 120px;
  }
  .balance-value {
    font-size: clamp(56px, 16.5vw, 74px);
    letter-spacing: -2px;
  }
  .balance-value.long-amount {
    font-size: clamp(37px, 11vw, 48px);
    letter-spacing: -1px;
  }
  .balance-hero {
    padding-block: 45px;
  }
  .balance-note {
    font-size: 11px;
  }
  .balance-greeting {
    font-size: 12px;
  }
  .balance-bottom-note {
    font-size: 9px;
  }
  .login-story {
    padding: 25px 22px;
  }
  .login-brand .brand-large {
    gap: 16px;
  }
  .login-brand .brand-logo {
    width: 145px;
    height: 61px;
  }
  .login-brand .brand-name {
    font-size: 13px;
    padding-left: 16px;
    max-width: 170px;
  }
  .story-content {
    padding-top: 30px;
  }
  .story-content h1 {
    font-size: 31px;
  }
  .story-content > p {
    font-size: 13px;
    line-height: 1.8;
  }
  .story-content .eyebrow {
    font-size: 8px;
    letter-spacing: 1.8px;
  }
  .login-panel {
    padding: 30px 23px 22px;
  }
  .login-form-wrap h2 {
    font-size: 33px;
  }
  .login-bottom {
    font-size: 9px;
  }
  .demo-box {
    padding: 18px;
  }
  .demo-buttons {
    gap: 8px;
  }
  .demo-buttons .button {
    font-size: 11px;
    padding: 10px 8px;
    gap: 6px;
  }
  .demo-buttons .icon {
    width: 13px;
    height: 13px;
  }
  .plan-card {
    padding: 20px;
  }
  .plan-card-title {
    gap: 10px;
  }
  .plan-card-title .stat-icon {
    display: none;
  }
  .plan-card-title h2 {
    font-size: 20px;
  }
  .plan-card-title .text-button {
    font-size: 11px;
  }
  .plan-card-header {
    gap: 10px;
    align-items: flex-start;
  }
  .plan-card-footer {
    flex-direction: column;
    gap: 17px;
  }
  .plan-values {
    gap: 28px;
  }
  .plan-values .date-value {
    font-size: 15px;
  }
  .account-details > div {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .account-panel {
    padding: 22px;
  }
  .profile-large {
    gap: 14px;
  }
  .profile-large .avatar {
    width: 45px;
    height: 45px;
    font-size: 14px;
  }
  .profile-large p {
    font-size: 12px;
  }
  .modal-header {
    padding: 16px 18px;
  }
  .modal-header h2 {
    font-size: 20px;
  }
  .modal-form {
    padding: 21px 17px;
  }
  .modal-form > .muted {
    font-size: 13px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .form-grid > label + label {
    margin-top: 0;
  }
  .modal-form label {
    font-size: 12px;
  }
  .line-items-labels,
  .item-row {
    grid-template-columns: minmax(0, 1fr) 42px 72px 20px;
    gap: 5px;
  }
  .line-items-labels {
    font-size: 10px;
  }
  .item-row input {
    padding: 11px 6px;
    font-size: 11px;
  }
  .invoice-detail {
    padding: 20px;
  }
  .invoice-logo {
    width: 130px;
    height: 54px;
  }
  .paper-brand {
    font-size: 10px;
    max-width: 210px;
  }
  .invoice-paper-header h3 {
    font-size: 25px;
  }
  .invoice-paper-header p {
    font-size: 12px;
  }
  .invoice-meta {
    gap: 17px;
  }
  .invoice-meta p {
    font-size: 10px;
  }
  .invoice-meta strong {
    font-size: 12px;
  }
  .line-table th {
    font-size: 10px;
  }
  .line-table td {
    font-size: 12px;
  }
  .line-table th:first-child {
    width: 43%;
  }
  .invoice-totals {
    max-width: 255px;
  }
  .invoice-notes p,
  .invoice-plan-note p {
    font-size: 12px;
  }
  .invoice-dialog-footer {
    padding: 17px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .invoice-dialog-footer > .button {
    flex: 1;
    font-size: 11px;
    padding: 10px 12px;
  }
  .form-balance {
    font-size: 12px;
    padding: 16px;
  }
  .form-balance strong {
    font-size: 25px;
  }
  .modal-actions {
    gap: 10px;
  }
  .modal-actions .button {
    font-size: 12px;
    padding: 11px 14px;
  }
  .password-required,
  .startup-error {
    padding: 25px 18px;
  }
  .password-required > .panel {
    padding: 24px;
  }
  .password-required h1 {
    font-size: 27px;
  }
  .password-brand .brand-logo {
    width: 220px;
    height: 92px;
  }
  .password-brand .brand-name {
    font-size: 15px;
    max-width: 300px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .button:hover {
    transform: none;
  }
}

/* Comfortable reading: warm surfaces, quieter accents, and no motion or glow. */
:root:not([data-display="dark"]) {
  color-scheme: light;
  --gold: #6b5c24;
  --gold-light: #ded4a9;
  --ink: #35372f;
  --muted: #66665a;
  --surface: #eeeae1;
  --panel: #f6f3eb;
  --line: #d6d0be;
  --danger: #914235;
  --success: #44613c;
  --pending: #685376;
  font-size: 16px;
}
:root:not([data-display="dark"]) *,
:root:not([data-display="dark"]) *::before,
:root:not([data-display="dark"]) *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
  text-shadow: none !important;
}
:root:not([data-display="dark"]) input,
:root:not([data-display="dark"]) textarea,
:root:not([data-display="dark"]) select {
  background: #f9f6ef;
  border-color: #aaa48e;
}
:root:not([data-display="dark"]) .site-header,
:root:not([data-display="dark"]) .login-story,
:root:not([data-display="dark"]) .login-panel,
:root:not([data-display="dark"]) .qr-placeholder {
  background: var(--panel);
}
:root:not([data-display="dark"]) .login-story::after,
:root:not([data-display="dark"]) .balance-hero::before {
  display: none;
}
:root:not([data-display="dark"]) .brand-logo,
:root:not([data-display="dark"]) .invoice-logo {
  filter: brightness(0.65);
}
:root:not([data-display="dark"]) .button.primary,
:root:not([data-display="dark"]) .tip-preset.active,
:root:not([data-display="dark"]) .payment-method.active {
  background: #ded4a9;
  border-color: #b2a574;
  color: #3e391f;
  transform: none;
}
:root:not([data-display="dark"]) th {
  background: #e9e4d8;
}
:root:not([data-display="dark"]) #toast {
  background: #e4ddc6;
  box-shadow: none;
}
:root:not([data-display="dark"]) dialog::backdrop {
  background: #34372f66;
  backdrop-filter: none;
}
:root:not([data-display="dark"]) dialog {
  box-shadow: none;
}
.display-toggle {
  position: fixed;
  z-index: 10;
  bottom: 14px;
  right: 16px;
  padding: 10px 14px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  min-height: 42px;
}
.app-footer,
.login-bottom {
  padding-bottom: 65px;
}
.check-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.6;
}
.check-label input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin: 2px 0 0;
  accent-color: var(--gold);
}
.plan-breakdown {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #c3b32708;
  min-width: 0;
  max-width: 100%;
}
.invoice-plan-note > div {
  min-width: 0;
  flex: 1;
}
.plan-breakdown th,
.plan-breakdown td {
  padding: 12px;
  white-space: nowrap;
}
.plan-breakdown p + p {
  margin-top: 8px;
}
.plan-breakdown .table-scroll {
  margin-top: 16px;
}
.receipt-card {
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.receipt-card p {
  overflow-wrap: anywhere;
}
.receipt-paper > h2 {
  margin-top: 28px;
}
.payment-flow > label {
  margin-bottom: 10px;
}
.payment-flow > .field-hint {
  margin-bottom: 20px;
}
.header-inner {
  flex-wrap: wrap;
}
.top-navigation {
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .receipt-card {
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
  }
  .check-label {
    font-size: 14px;
  }
  .display-toggle {
    right: 10px;
    bottom: 10px;
  }
}

@media print {
  .display-toggle {
    display: none !important;
  }
  :root {
    color-scheme: light;
  }
  body {
    background: #fff;
  }
  body:has(dialog[open]) #app,
  body:has(dialog[open]) #toast {
    display: none;
  }
  dialog[open] {
    display: block;
    position: static;
    width: 100%;
    max-width: none;
    max-height: none;
    border: 0;
    box-shadow: none;
    background: #fff;
    color: #181a13;
    border-radius: 0;
    overflow: visible;
    padding: 0;
    margin: 0;
  }
  .modal-header,
  .invoice-dialog-footer {
    display: none;
  }
  .invoice-detail {
    padding: 0;
  }
  .invoice-detail h2,
  .invoice-detail h3,
  .paper-brand,
  .invoice-meta strong,
  .total-due strong,
  .invoice-totals > .total-due,
  .line-table th:last-child,
  .line-table td:last-child {
    color: #756619;
  }
  .invoice-detail p,
  .invoice-detail td,
  .invoice-detail th,
  .invoice-totals > div,
  .invoice-totals strong,
  .invoice-meta > div > span,
  .payment-row,
  .payment-row b,
  .invoice-notes strong,
  .detail-section h3 {
    color: #343727;
  }
  .invoice-detail th,
  .invoice-detail td,
  .invoice-meta,
  .invoice-totals > .total-due,
  .payment-row {
    border-color: #dedbcb;
  }
  .invoice-notes,
  .invoice-plan-note {
    background: #f7f6ed;
    border-color: #dedbcb;
    break-inside: avoid;
  }
  .line-table tr {
    break-inside: avoid;
  }
  .badge {
    color: #665b21;
    border-color: #d9d0a1;
    background: #f7f4e5;
  }
  * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  @page {
    margin: 18mm;
  }
}
