/* ==========================================================================
   Invoicer — a calm workspace for billing
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Regular.3875f8357497.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Medium.7b7f3cfa2944.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-SemiBold.b72fa2728a8e.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Bold.66894432e7ff.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Display";
  src: url("../fonts/InterDisplay-SemiBold.21835ce27dd9.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Display";
  src: url("../fonts/InterDisplay-Bold.baf0f7874fdd.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #20231f;
  --ink-soft: #3d423b;
  --muted: #74786f;
  --muted-light: #93968e;
  --paper: #f4f1e9;
  --paper-deep: #ede8dd;
  --surface: #fdfcf8;
  --surface-soft: #f8f5ee;
  --forest: #173d34;
  --forest-mid: #245246;
  --forest-light: #376c5c;
  --sage: #e4ebe0;
  --sage-deep: #d2dfd0;
  --copper: #b7623e;
  --copper-soft: #f3e4dc;
  --danger: #a23f2b;
  --danger-soft: #f6e3de;
  --warning: #956522;
  --warning-soft: #f7edd8;
  --line: #e2ddd2;
  --line-strong: #d1c9ba;
  --white: #fffefa;
  --radius: 17px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(32, 35, 31, 0.03), 0 14px 38px -22px rgba(23, 61, 52, 0.16);
  --font: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Inter Display", "Inter", ui-sans-serif, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 8%, rgba(214, 226, 210, 0.55), transparent 27rem),
    radial-gradient(circle at 8% 94%, rgba(232, 220, 202, 0.5), transparent 30rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
figure {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.18;
}

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

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

button {
  cursor: pointer;
}

img,
svg {
  display: block;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--sage-deep);
  color: var(--forest);
}

:focus-visible {
  outline: 2px solid var(--forest-light);
  outline-offset: 3px;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

/* ==========================================================================
   Shell / sidebar
   ========================================================================== */

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: 270px;
  padding: 28px 22px 20px;
  color: #e7eee7;
  background:
    radial-gradient(circle at 0% 0%, rgba(90, 138, 112, 0.35), transparent 26rem),
    linear-gradient(165deg, #1d4a3f 0%, #163a31 54%, #123129 100%);
  overflow-y: auto;
}

.sidebar-close {
  display: none;
  position: absolute;
  top: 24px;
  right: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 26px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--forest);
  color: var(--white);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.055em;
  flex: 0 0 auto;
}

.sidebar .brand-mark {
  background: #dbe6d8;
  color: var(--forest);
}

.brand-mark-sm {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 10px;
}

.brand-mark-light {
  background: var(--sage);
  color: var(--forest);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.22;
}

.brand-name {
  font-family: var(--display);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  margin-top: 3px;
  color: rgba(231, 238, 231, 0.54);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-label {
  margin: 8px 12px 8px;
  color: rgba(231, 238, 231, 0.4);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-label-spaced {
  margin-top: 25px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(231, 238, 231, 0.76);
  font-size: 12.5px;
  font-weight: 500;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-link .icon {
  width: 17px;
  height: 17px;
  opacity: 0.7;
}

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

.nav-link.is-active {
  background: #e5eee1;
  color: var(--forest);
  font-weight: 600;
  box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.55);
}

.nav-link.is-active .icon {
  opacity: 1;
}

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: auto;
  padding-top: 28px;
}

.sidebar-quote {
  position: relative;
  padding: 14px 14px 14px 17px;
  border-left: 1px solid rgba(231, 238, 231, 0.18);
}

.sidebar-quote-mark {
  position: absolute;
  top: 4px;
  left: 8px;
  color: var(--copper);
  font-family: Georgia, serif;
  font-size: 28px;
  line-height: 1;
  opacity: 0.9;
}

.sidebar-quote p {
  color: rgba(231, 238, 231, 0.58);
  font-size: 10.5px;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 16px;
  border-top: 1px solid rgba(231, 238, 231, 0.12);
}

.user-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.user-name {
  max-width: 100px;
  overflow: hidden;
  color: #f2f6ef;
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta {
  margin-top: 2px;
  color: rgba(231, 238, 231, 0.42);
  font-size: 9.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.logout-form {
  margin-left: auto;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  color: var(--ink-soft);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--forest);
}

.icon-button-light {
  border-color: rgba(231, 238, 231, 0.13);
  background: transparent;
  color: rgba(231, 238, 231, 0.6);
}

.icon-button-light:hover {
  border-color: rgba(231, 238, 231, 0.25);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.icon-button-subtle {
  width: 28px;
  height: 28px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.icon-button-subtle:hover {
  border-color: var(--line);
  background: var(--surface-soft);
}

.main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  margin-left: 270px;
}

.content {
  width: 100%;
  max-width: 1300px;
  flex: 1;
  margin: 0 auto;
  padding: 42px 48px 20px;
}

.mobile-bar {
  display: none;
}

.sidebar-scrim {
  display: none;
}

/* ==========================================================================
   Typography / page header
   ========================================================================== */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.page-head-copy {
  min-width: 0;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--copper);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: #b9d0b5;
}

.page-head h1 {
  max-width: 860px;
  font-family: var(--display);
  font-size: clamp(30px, 3.6vw, 43px);
  font-weight: 600;
  letter-spacing: -0.038em;
  line-height: 1.03;
}

.lede {
  max-width: 700px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  flex: 0 0 auto;
}

.page-actions form {
  display: flex;
}

.breadcrumb {
  margin-bottom: 20px;
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  transition: color 160ms ease;
}

.breadcrumb a:hover {
  color: var(--forest);
}

.breadcrumb .icon {
  width: 14px;
  height: 14px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--forest);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.text-link .icon {
  width: 14px;
  height: 14px;
  transition: transform 160ms ease;
}

.text-link:hover .icon {
  transform: translateX(2px);
}

.subtle-link {
  color: var(--ink-soft);
  font-weight: 500;
}

.subtle-link:hover {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.small-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  word-break: break-word;
}

.pre-line {
  white-space: pre-line;
}

.muted {
  color: var(--muted);
}

.accent {
  color: var(--copper) !important;
}

.danger-text {
  color: var(--danger) !important;
}

.money-strong {
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.align-right {
  text-align: right !important;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  white-space: nowrap;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--forest);
  color: #fff;
  box-shadow: 0 8px 22px -14px rgba(23, 61, 52, 0.7);
}

.btn-primary:hover {
  background: var(--forest-mid);
  box-shadow: 0 12px 25px -14px rgba(23, 61, 52, 0.8);
}

.btn-secondary {
  border-color: var(--line-strong);
  background: var(--white);
  color: var(--ink-soft);
}

.btn-secondary:hover {
  border-color: #bfb6a5;
  background: #fff;
  color: var(--ink);
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
}

.btn-ghost:hover {
  background: rgba(32, 35, 31, 0.055);
}

.btn-light {
  background: #e7eee3;
  color: var(--forest);
}

.btn-light:hover {
  background: #f2f7ef;
}

.btn-danger,
.btn.danger {
  color: var(--danger);
}

.btn-sm {
  height: 33px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 10.5px;
}

.btn-sm .icon {
  width: 14px;
  height: 14px;
}

.btn-xs {
  height: 27px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 10px;
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.icon-link .icon {
  width: 15px;
  height: 15px;
}

.icon-link:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--forest);
}

.icon-link.danger:hover {
  border-color: #eccdc5;
  background: var(--danger-soft);
  color: var(--danger);
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.row-actions form {
  display: inline-flex;
}

/* ==========================================================================
   Cards / stats
   ========================================================================== */

.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card + .card {
  margin-top: 16px;
}

.card-flush {
  padding: 0;
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.card-head h2 {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: -0.018em;
}

.card-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.card-foot-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 16px -8px -8px;
  padding: 11px 8px 6px;
  border-top: 1px solid var(--line);
  color: var(--forest);
  font-size: 10.5px;
  font-weight: 600;
}

.card-foot-link .icon {
  width: 14px;
  height: 14px;
}

.card-alert {
  border-color: #e9d3c6;
  background: #fdf7f1;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}

.stat-card {
  position: relative;
  padding: 19px 19px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 15px;
  border-radius: 9px;
  background: var(--sage);
  color: var(--forest);
}

.stat-icon .icon {
  width: 15px;
  height: 15px;
}

.stat-label {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-value {
  margin-top: 4px;
  font-family: var(--display);
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 600;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.stat-note {
  margin-top: 7px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.stat-card-warn {
  border-color: #e7cfc4;
  background: linear-gradient(145deg, #fdf7f1, #fbf1ea);
}

.stat-card-warn .stat-icon {
  background: var(--copper-soft);
  color: var(--copper);
}

.stat-card-warn .stat-value {
  color: var(--copper);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.82fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.dashboard-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-side .card + .card,
.detail-side .card + .card {
  margin-top: 0;
}

/* ==========================================================================
   Dashboard pieces
   ========================================================================== */

.invoice-stack {
  display: flex;
  flex-direction: column;
}

.next-invoice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.next-invoice:first-child {
  border-top: 0;
  padding-top: 3px;
}

.next-invoice:last-child {
  padding-bottom: 0;
}

.next-invoice .avatar {
  width: 40px;
  height: 40px;
}

.next-invoice-main {
  min-width: 0;
  flex: 1;
}

.next-invoice-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.next-invoice-title a {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.next-invoice-title a:hover {
  color: var(--forest);
}

.next-invoice-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.dot-sep {
  padding: 0 2px;
  color: var(--line-strong);
}

.next-invoice-money {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 122px;
  text-align: right;
}

.next-invoice-money strong {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.next-invoice-money span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
}

.next-invoice-action {
  min-width: 69px;
  text-align: right;
}

.next-invoice-action form {
  display: inline-flex;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e7ede1, #d8e4d5);
  color: var(--forest);
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 9px;
}

.avatar-lg {
  width: 58px;
  height: 58px;
  font-size: 15px;
}

.queue-list {
  display: flex;
  flex-direction: column;
}

.queue-list li {
  border-top: 1px solid var(--line);
}

.queue-list li:first-child {
  border-top: 0;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
}

.queue-item:hover .queue-title {
  color: var(--forest);
}

.queue-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--copper);
  flex: 0 0 auto;
}

.queue-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.queue-title {
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 150ms ease;
}

.queue-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.queue-amount {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.queue-list-side .queue-item {
  padding: 9px 0;
}

.queue-row {
  display: flex;
  align-items: center;
  gap: 4px;
  border-top: 1px solid var(--line);
}

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

.queue-row .queue-item {
  flex: 1;
  min-width: 0;
}

.overdue-list li {
  border-top: 1px solid #eadbd2;
}

.overdue-list li:first-child {
  border-top: 0;
}

.overdue-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.overdue-list a:hover strong {
  color: var(--copper);
}

.overdue-list span:first-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.overdue-list strong {
  font-size: 11.5px;
  font-weight: 600;
  transition: color 150ms ease;
}

.overdue-list small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  height: 23px;
  padding: 0 7px;
  border-radius: 99px;
  background: var(--copper-soft);
  color: var(--copper);
  font-size: 10px;
  font-weight: 700;
}

/* ==========================================================================
   Tables / chips
   ========================================================================== */

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.data-table th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table th:first-child,
.data-table td:first-child {
  padding-left: 24px;
}

.data-table th:last-child,
.data-table td:last-child {
  padding-right: 24px;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background 140ms ease;
}

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

.row-link {
  cursor: pointer;
}

.data-table tfoot td {
  padding: 12px 14px;
  border-top: 1px solid var(--line-strong);
  font-size: 10.5px;
  font-weight: 600;
}

.data-table tfoot td:first-child {
  padding-left: 24px;
  color: var(--muted);
  text-align: right;
}

.data-table tfoot td:last-child {
  padding-right: 24px;
  font-size: 13px;
}

.table-primary {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
}

.table-primary:hover {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.table-primary.plain {
  text-decoration: none;
}

.cell-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 400;
}

.person {
  display: flex;
  align-items: center;
  gap: 11px;
}

.person-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.person-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.rhythm {
  font-size: 11.5px;
  font-weight: 500;
}

.due-overdue {
  color: var(--danger);
  font-weight: 600;
}

.status,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.2;
  white-space: nowrap;
}

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

.status-draft {
  background: #efebe2;
  color: #6d6657;
}

.status-sent {
  background: #e5edf4;
  color: #3d617c;
}

.status-paid {
  background: #e3efe2;
  color: #2d6a45;
}

.status-void {
  background: #f1e4e0;
  color: #914f3d;
}

.chip {
  border: 1px solid transparent;
}

.chip-active {
  background: var(--sage);
  color: var(--forest);
}

.chip-ready {
  background: #f4e9dd;
  color: #8b5733;
}

.chip-draft {
  background: #efebe2;
  color: #716853;
}

.chip-muted {
  background: #eeebe4;
  color: #827c6e;
}

.chip-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.chip-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

/* ==========================================================================
   Toolbars / mini stats
   ========================================================================== */

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

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(253, 252, 248, 0.62);
}

.segment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.segment span {
  min-width: 15px;
  padding: 1px 4px;
  border-radius: 99px;
  background: rgba(32, 35, 31, 0.055);
  font-size: 8.5px;
  font-weight: 600;
  text-align: center;
}

.segment:hover {
  color: var(--ink);
}

.segment.is-active {
  background: var(--white);
  color: var(--forest);
  box-shadow: 0 2px 8px rgba(23, 61, 52, 0.08);
  font-weight: 600;
}

.segment.is-active span {
  background: var(--sage);
  color: var(--forest);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(270px, 100%);
}

.search > .icon {
  position: absolute;
  left: 11px;
  width: 14px;
  height: 14px;
  color: var(--muted-light);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 37px;
  padding: 0 32px 0 33px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: var(--white);
  color: var(--ink);
  font-size: 11.5px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.search input::placeholder {
  color: var(--muted-light);
}

.search input:focus {
  border-color: var(--forest-light);
  box-shadow: 0 0 0 3px rgba(55, 108, 92, 0.1);
}

.search-clear {
  position: absolute;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: var(--muted);
}

.search-clear:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.search-clear .icon {
  width: 12px;
  height: 12px;
}

.mini-stats {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 22px 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(253, 252, 248, 0.62);
  overflow: hidden;
}

.mini-stat {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  padding: 16px 20px;
  border-left: 1px solid var(--line);
}

.mini-stat:first-child {
  border-left: 0;
}

.mini-stat-value {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.mini-stat-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-page {
  max-width: 1020px;
}

.form-card {
  margin-bottom: 16px;
}

.form-card .card-head {
  margin-bottom: 22px;
}

.form-card .card-head > div {
  position: relative;
  padding-left: 0;
}

.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-bottom: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 20px;
}

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

.field-span-2 {
  grid-column: span 2;
}

.form-grid-3 .field-span-2 {
  grid-column: span 2;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.field > label {
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.required {
  margin-left: 3px;
  color: var(--copper);
}

.field input:not([type="checkbox"]):not([type="hidden"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 41px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  background: var(--white);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.4;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.field textarea {
  resize: vertical;
}

.field select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2374786f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 11px center;
  background-repeat: no-repeat;
  background-size: 13px;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #bdb4a4;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--forest-light);
  box-shadow: 0 0 0 3px rgba(55, 108, 92, 0.1);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-light);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #c97662;
  background: #fffafa;
}

.field .help {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}

.field .error {
  color: var(--danger);
  font-size: 9.5px;
  line-height: 1.4;
}

.field input[type="date"] {
  min-height: 41px;
}

.field-static {
  justify-content: flex-end;
}

.field-static-value {
  padding: 9px 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.field-static-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.field-static-inline .paper-label {
  margin: 0;
}

.field-static-inline strong {
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--sage);
  color: var(--forest);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.field-static-inline span:last-child {
  color: var(--muted);
  font-size: 9.5px;
}

.field-check {
  gap: 0;
}

.check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  cursor: pointer;
  user-select: none;
}

.check input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.check-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--white);
  transition: background 140ms ease, border-color 140ms ease;
  flex: 0 0 auto;
}

.check input:checked + .check-box {
  border-color: var(--forest);
  background: var(--forest);
}

.check input:checked + .check-box::after {
  width: 7px;
  height: 4px;
  border-bottom: 1.8px solid #fff;
  border-left: 1.8px solid #fff;
  content: "";
  transform: translateY(-1px) rotate(-45deg);
}

.check input:focus-visible + .check-box {
  outline: 2px solid var(--forest-light);
  outline-offset: 2px;
}

.check-label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 500;
}

.check-compact .check-label {
  font-size: 10px;
}

.check-danger .check-label {
  color: var(--danger);
}

.check-danger input:checked + .check-box {
  border-color: var(--danger);
  background: var(--danger);
}

.field-check .help {
  margin-top: 5px;
  margin-left: 25px;
}

.field-check .error {
  margin-top: 5px;
}

.toggle-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 21px;
  padding: 16px 18px;
  border: 1px solid var(--sage-deep);
  border-radius: 12px;
  background: #f4f7f1;
}

.panel-label {
  color: var(--forest);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 8px 0 24px;
}

.form-actions-inside {
  margin-top: 22px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}

.form-section-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 27px 0 17px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.form-card .form-section-head:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.form-section-head .step {
  margin-bottom: 0;
}

.form-section-head h2 {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: -0.015em;
}

.form-section-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 13px 14px;
  border: 1px solid #eccdc3;
  border-radius: 10px;
  background: #fdf4f1;
  color: #7d3e2d;
  font-size: 11px;
  line-height: 1.5;
}

.form-alert .icon {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.form-alert p + p {
  margin-top: 3px;
}

.form-alert-muted {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

.form-alert-muted a {
  color: var(--forest);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-split {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.form-aside {
  position: sticky;
  top: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.narrow-form {
  max-width: 680px;
}

/* Formset */

.charge-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.charge-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  transition: opacity 150ms ease, background 150ms ease;
}

.charge-row.is-removed {
  opacity: 0.42;
}

.charge-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  flex: 1;
}

.charge-controls {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 10px;
}

.charge-amount {
  min-width: 0;
}

.charge-empty {
  margin-top: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  background: transparent;
}

.inline-line-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 135px auto;
  align-items: end;
  gap: 12px;
}

.line-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.line-preview strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Tips / notes */

.tip-card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--forest);
  color: #e7eee7;
  box-shadow: var(--shadow);
}

.tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  border-radius: 9px;
  background: rgba(231, 238, 231, 0.14);
  color: #dce8d8;
}

.tip-icon .icon {
  width: 15px;
  height: 15px;
}

.tip-card h2 {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: -0.01em;
}

.tip-card > p {
  margin-top: 9px;
  color: rgba(231, 238, 231, 0.68);
  font-size: 10.5px;
  line-height: 1.6;
}

.tip-card .text-link {
  margin-top: 13px;
  color: #dce8d8;
}

.tip-card-muted {
  border: 1px solid var(--line);
  background: rgba(253, 252, 248, 0.66);
  color: var(--ink);
  box-shadow: none;
}

.tip-card-muted h2 {
  color: var(--ink);
}

.tip-card-muted p {
  color: var(--muted);
}

.tip-card-muted .text-link {
  color: var(--forest);
}

.tip-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.tip-list li {
  display: flex;
  gap: 10px;
  color: rgba(231, 238, 231, 0.72);
  font-size: 10.5px;
  line-height: 1.5;
}

.tip-list li span {
  color: #a9c4a9;
  font-family: var(--mono, "Inter");
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding-top: 2px;
}

.client-mini {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.client-mini a {
  font-size: 12px;
  font-weight: 600;
}

.client-mini a:hover {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.client-mini p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.client-mini-block {
  margin-bottom: 8px;
}

/* ==========================================================================
   Client detail
   ========================================================================== */

.client-head {
  align-items: center;
}

.client-identity {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.client-identity h1 {
  font-size: clamp(29px, 3.3vw, 38px);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.detail-main,
.detail-side {
  min-width: 0;
}

.detail-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-main > .card + .card,
.detail-main > .card + section,
.detail-main > section + .card {
  margin-top: 0;
}

.detail-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr 0.8fr;
  gap: 24px;
}

.info-block {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.65;
}

.info-block a:hover {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.info-label,
.paper-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.info-strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.notes-block {
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.6;
}

.next-bill-card {
  position: relative;
  padding: 25px;
  border: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(112, 157, 124, 0.36), transparent 17rem),
    linear-gradient(150deg, #1e4d41 0%, #173d34 60%, #13342c 100%);
  color: #eef4eb;
  overflow: hidden;
}

.next-bill-card::after {
  position: absolute;
  right: -35px;
  bottom: -55px;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(231, 238, 231, 0.12);
  border-radius: 50%;
  content: "";
}

.next-bill-card .eyebrow {
  margin-bottom: 13px;
}

.next-bill-card h2 {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -0.03em;
}

.next-bill-card h2 span {
  color: rgba(231, 238, 231, 0.55);
  font-weight: 400;
}

.next-bill-rhythm {
  margin-top: 5px;
  color: rgba(231, 238, 231, 0.58);
  font-size: 10px;
}

.mini-ledger {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 20px 0 15px;
  padding: 15px 0;
  border-top: 1px solid rgba(231, 238, 231, 0.14);
  border-bottom: 1px solid rgba(231, 238, 231, 0.14);
}

.mini-ledger div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mini-ledger dt {
  color: rgba(231, 238, 231, 0.6);
  font-size: 10px;
}

.mini-ledger dd {
  font-size: 10.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.next-bill-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.next-bill-total span {
  color: rgba(231, 238, 231, 0.6);
  font-size: 10px;
}

.next-bill-total strong {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.next-bill-card .btn-block {
  position: relative;
  z-index: 1;
}

.archived-note {
  margin-top: 8px;
  color: rgba(231, 238, 231, 0.58);
  font-size: 10px;
  text-align: center;
}

.settings-list {
  display: flex;
  flex-direction: column;
}

.settings-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.settings-list div:first-child {
  padding-top: 0;
  border-top: 0;
}

.settings-list dt {
  color: var(--muted);
  font-size: 10.5px;
}

.settings-list dd {
  font-size: 10.5px;
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.settings-list .settings-total {
  margin-top: 3px;
  padding-top: 12px;
  border-top-color: var(--line-strong);
}

.settings-list .settings-total dt {
  color: var(--ink);
  font-weight: 600;
}

.settings-list .settings-total dd {
  font-size: 14px;
  font-weight: 600;
}

.archive-form {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   Invoice paper
   ========================================================================== */

.invoice-head {
  align-items: flex-end;
}

.invoice-head h1 {
  font-size: clamp(28px, 3vw, 37px);
}

.invoice-detail-grid {
  grid-template-columns: minmax(0, 1.58fr) minmax(270px, 0.66fr);
}

.invoice-paper {
  position: relative;
  padding: 34px 36px 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 24px 60px -40px rgba(23, 61, 52, 0.38);
}

.invoice-paper::before {
  position: absolute;
  top: 0;
  right: 36px;
  left: 36px;
  height: 3px;
  background: linear-gradient(90deg, var(--forest), var(--sage-deep) 45%, transparent);
  content: "";
}

.paper-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.paper-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.paper-business {
  font-family: var(--display);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.paper-business-meta {
  max-width: 250px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.4;
}

.paper-heading {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 3px;
  text-align: right;
}

.paper-kicker {
  color: var(--copper);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.paper-number {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.paper-meta {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr;
  gap: 24px;
  padding: 21px 0;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.paper-meta > div {
  min-width: 0;
}

.paper-strong {
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
}

.paper-details dl {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.paper-details dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.paper-details dt {
  color: var(--muted);
}

.paper-details dd {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.paper-period {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 9px 12px;
  border-radius: 7px;
  background: var(--sage);
  color: var(--forest);
  font-size: 9.5px;
}

.paper-period span {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.66;
}

.paper-period strong {
  font-size: 10.5px;
  font-weight: 600;
}

.paper-lines {
  margin-top: 18px;
}

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

.paper-lines th {
  padding: 9px 10px;
  background: var(--forest);
  color: rgba(255, 255, 255, 0.76);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-align: left;
  text-transform: uppercase;
}

.paper-lines th:first-child {
  border-radius: 6px 0 0 6px;
}

.paper-lines th:last-child {
  border-radius: 0 6px 6px 0;
}

.paper-lines td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.paper-lines tbody tr:last-child td {
  border-bottom: 0;
}

.paper-line-title {
  display: inline;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 500;
}

.paper-line-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.paper-empty {
  padding: 25px 10px !important;
  color: var(--muted) !important;
  text-align: center;
}

.paper-action {
  width: 55px;
}

.paper-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  opacity: 0;
  transition: opacity 140ms ease;
}

.paper-lines tr:hover .paper-row-actions {
  opacity: 1;
}

.paper-row-actions a,
.paper-row-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
}

.paper-row-actions a:hover,
.paper-row-actions button:hover {
  background: var(--surface-soft);
  color: var(--forest);
}

.paper-row-actions .icon {
  width: 12px;
  height: 12px;
}

.paper-totals {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.paper-summary {
  width: 270px;
}

.paper-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 5px 0;
  color: var(--muted);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.paper-summary .paper-total {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 7px;
  background: var(--forest);
  color: #fff;
}

.paper-total span:first-child {
  color: rgba(255, 255, 255, 0.7);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.paper-total span:last-child {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
}

.paper-foot {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
}

.paper-foot .muted {
  margin-top: 6px;
}

.paper-foot p + p {
  margin-top: 5px;
}

.draft-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
}

.draft-note .icon {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  color: var(--copper);
}

.action-card .card-head {
  margin-bottom: 14px;
}

.action-stack {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.action-stack form {
  display: flex;
}

.danger-zone {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.danger-zone form {
  display: flex;
}

/* ==========================================================================
   Settings preview
   ========================================================================== */

.preview-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.preview-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
}

.preview-brand strong {
  display: block;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
}

.preview-brand span:not(.brand-mark) {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.preview-rule {
  height: 1px;
  margin: 16px 0;
  background: var(--line);
}

.preview-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 9.5px;
}

.preview-lines div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.preview-lines strong {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.preview-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 10px 11px;
  border-radius: 7px;
  background: var(--forest);
  color: #fff;
}

.preview-total span {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  opacity: 0.7;
}

.preview-total strong {
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.preview-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.45;
}

/* ==========================================================================
   Messages
   ========================================================================== */

.messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.45;
  box-shadow: 0 8px 20px -18px rgba(23, 61, 52, 0.3);
  animation: message-in 220ms ease both;
}

.message.is-leaving {
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 200ms ease, transform 200ms ease;
}

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

.message-success {
  border-color: #cbdac8;
  background: #f2f7ef;
  color: #2f5f3f;
}

.message-error {
  border-color: #eccdc3;
  background: #fdf4f1;
  color: #7d3e2d;
}

.message-warning {
  border-color: #eadbb9;
  background: #fdf8ec;
  color: #76551e;
}

.message-info {
  border-color: #d4dfe6;
  background: #f4f8fa;
  color: #3d5e73;
}

.message-icon {
  display: inline-flex;
  margin-top: 1px;
}

.message-icon .icon {
  width: 14px;
  height: 14px;
}

.message-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: currentColor;
  opacity: 0.45;
}

.message-close:hover {
  opacity: 0.9;
}

.message-close .icon {
  width: 12px;
  height: 12px;
}

/* ==========================================================================
   Empty states
   ========================================================================== */

.empty-state {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 55px 24px;
  text-align: center;
}

.empty-state h2,
.empty-state h3 {
  margin-top: 13px;
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -0.025em;
}

.empty-state h3 {
  font-size: 15px;
}

.empty-state p {
  max-width: 420px;
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.empty-state.compact {
  padding: 28px 18px;
}

.empty-state.tiny {
  padding: 12px 0 2px;
}

.empty-state.tiny p {
  margin: 0 0 12px;
  font-size: 10.5px;
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--sage);
  color: var(--forest);
}

.empty-icon .icon {
  width: 20px;
  height: 20px;
}

.empty-actions {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 34px;
  padding: 18px 2px 0;
  border-top: 1px solid rgba(209, 201, 186, 0.6);
  color: var(--muted-light);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.app-footer-lock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.app-footer-lock .icon {
  width: 11px;
  height: 11px;
}

/* ==========================================================================
   Authentication
   ========================================================================== */

.auth-body {
  min-height: 100vh;
  background: var(--forest);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(450px, 0.94fr);
  min-height: 100vh;
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 45px 52px;
  background:
    radial-gradient(circle at 82% 18%, rgba(133, 178, 140, 0.28), transparent 25rem),
    radial-gradient(circle at 5% 95%, rgba(183, 98, 62, 0.16), transparent 22rem),
    linear-gradient(150deg, #1d4b40 0%, #173d34 55%, #112d26 100%);
  color: #eef4eb;
  overflow: hidden;
}

.auth-visual::after {
  position: absolute;
  right: -150px;
  bottom: -170px;
  width: 490px;
  height: 490px;
  border: 1px solid rgba(231, 238, 231, 0.08);
  border-radius: 50%;
  content: "";
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  z-index: 1;
}

.auth-brand-name {
  display: block;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
}

.auth-brand-sub {
  display: block;
  margin-top: 2px;
  color: rgba(231, 238, 231, 0.44);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-visual-copy {
  position: relative;
  z-index: 1;
  max-width: 470px;
  margin-top: 30px;
}

.auth-visual-copy h1 {
  font-family: var(--display);
  font-size: clamp(42px, 5.2vw, 68px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.auth-visual-copy p:last-child {
  max-width: 390px;
  margin-top: 17px;
  color: rgba(231, 238, 231, 0.6);
  font-size: 12.5px;
  line-height: 1.65;
}

.auth-invoice {
  position: absolute;
  right: 6%;
  bottom: 11%;
  z-index: 1;
  width: min(350px, 44%);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  background: rgba(253, 252, 248, 0.97);
  color: var(--ink);
  box-shadow: 0 35px 80px -30px rgba(0, 0, 0, 0.55);
  transform: rotate(-4.5deg);
}

.auth-invoice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.auth-invoice-label {
  color: var(--copper);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-invoice-number {
  color: var(--muted);
  font-size: 7.5px;
}

.auth-invoice-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 14px 0;
}

.auth-invoice-meta span {
  color: var(--muted);
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.auth-invoice-meta strong {
  font-size: 10px;
}

.auth-invoice-line,
.auth-invoice-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  font-size: 8.5px;
}

.auth-invoice-line {
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.auth-invoice-line strong {
  color: var(--ink);
  font-weight: 500;
}

.auth-invoice-total {
  margin-top: 7px;
  padding: 8px 9px;
  border-radius: 5px;
  background: var(--forest);
  color: #fff;
}

.auth-invoice-total span {
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}

.auth-invoice-total strong {
  font-size: 10px;
}

.auth-invoice-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 6px 13px;
  border: 2px solid rgba(23, 61, 52, 0.16);
  border-radius: 6px;
  color: rgba(23, 61, 52, 0.25);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transform: translate(-50%, -50%) rotate(-14deg);
  pointer-events: none;
}

.auth-visual-foot {
  position: relative;
  z-index: 1;
  color: rgba(231, 238, 231, 0.36);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 38px 45px;
  background:
    radial-gradient(circle at 100% 0%, rgba(214, 226, 210, 0.42), transparent 20rem),
    var(--paper);
}

.auth-form-wrap {
  width: 100%;
  max-width: 370px;
}

.auth-mobile-brand {
  display: none;
}

.auth-form-wrap h2 {
  font-family: var(--display);
  font-size: clamp(27px, 3vw, 35px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.auth-lede {
  margin: 11px 0 27px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.auth-form .field input {
  min-height: 45px;
  background: var(--white);
}

.auth-form .btn-block {
  height: 45px;
  margin-top: 4px;
}

.auth-messages {
  margin-bottom: 17px;
}

.auth-security {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.auth-security .icon {
  width: 12px;
  height: 12px;
}

.auth-copyright {
  margin-top: auto;
  padding-top: 35px;
  color: var(--muted-light);
  font-size: 8.5px;
}

.form-alert {
  margin-bottom: 16px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1180px) {
  .content {
    padding-right: 34px;
    padding-left: 34px;
  }

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

  .stat-card {
    min-height: 155px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(270px, 0.8fr);
  }
}

@media (max-width: 980px) {
  .sidebar {
    width: 248px;
  }

  .main {
    margin-left: 248px;
  }

  .content {
    padding: 34px 26px 20px;
  }

  .dashboard-grid,
  .detail-grid,
  .invoice-detail-grid,
  .form-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-aside {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-aside .tip-card:only-child,
  .form-aside .preview-card:only-child {
    grid-column: 1 / -1;
  }

  .next-invoice {
    flex-wrap: wrap;
  }

  .next-invoice-main {
    min-width: calc(100% - 60px);
  }

  .next-invoice-money {
    margin-left: 54px;
    align-items: flex-start;
    text-align: left;
  }

  .next-invoice-action {
    margin-left: auto;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .page-actions {
    width: 100%;
  }

  .client-head {
    align-items: flex-start;
  }
}

@media (max-width: 820px) {
  body.sidebar-open {
    overflow: hidden;
  }

  .sidebar {
    width: 280px;
    max-width: 88vw;
    transform: translateX(-105%);
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.26);
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-close {
    display: inline-flex;
  }

  .sidebar .brand {
    padding-right: 40px;
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    visibility: hidden;
    background: rgba(20, 29, 24, 0.38);
    opacity: 0;
    transition: opacity 220ms ease, visibility 220ms ease;
    backdrop-filter: blur(2px);
  }

  .sidebar-open .sidebar-scrim {
    visibility: visible;
    opacity: 1;
  }

  .main {
    margin-left: 0;
  }

  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 35;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 58px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(244, 241, 233, 0.88);
    backdrop-filter: blur(12px);
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--forest);
    font-family: var(--display);
    font-size: 12px;
    font-weight: 600;
  }

  .content {
    padding: 25px 18px 15px;
  }

  .page-head h1 {
    font-size: clamp(28px, 7vw, 36px);
  }

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

  .auth-visual {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 32px 24px;
  }

  .auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 44px;
  }

  .auth-form-wrap .eyebrow {
    margin-bottom: 9px;
  }
}

@media (max-width: 680px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .stat-card {
    min-height: 0;
    padding: 15px;
  }

  .stat-icon {
    margin-bottom: 12px;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-note {
    font-size: 9.5px;
  }

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

  .mini-stat:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .mini-stat:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    width: 100%;
    overflow-x: auto;
  }

  .segment {
    flex: 1;
    justify-content: center;
  }

  .search {
    width: 100%;
  }

  .card {
    padding: 18px;
    border-radius: 14px;
  }

  .card-flush {
    padding: 0;
  }

  .card-head {
    margin-bottom: 16px;
  }

  .card-head h2 {
    font-size: 15px;
  }

  .page-actions {
    gap: 7px;
  }

  .page-actions .btn {
    flex: 1;
  }

  .page-actions form {
    flex: 1;
  }

  .page-actions form .btn {
    width: 100%;
  }

  .client-identity {
    align-items: flex-start;
    gap: 12px;
  }

  .client-identity .avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 12px;
  }

  .info-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 17px;
  }

  .form-grid,
  .form-grid-3,
  .charge-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-span-2,
  .form-grid-3 .field-span-2 {
    grid-column: span 1;
  }

  .charge-row {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .charge-controls {
    justify-content: space-between;
    padding-bottom: 0;
  }

  .inline-line-form {
    grid-template-columns: minmax(0, 1fr) 80px;
  }

  .inline-line-form .line-description {
    grid-column: 1 / -1;
  }

  .inline-line-form .btn {
    grid-column: 1 / -1;
  }

  .form-aside {
    display: flex;
  }

  .next-invoice {
    align-items: flex-start;
    gap: 10px;
    padding: 13px 0;
  }

  .next-invoice .avatar {
    width: 34px;
    height: 34px;
    font-size: 9px;
  }

  .next-invoice-main {
    min-width: calc(100% - 46px);
  }

  .next-invoice-money {
    min-width: 0;
    margin-left: 44px;
  }

  .next-invoice-action {
    width: calc(100% - 44px);
    margin-left: 44px;
    text-align: left;
  }

  .next-invoice-action .btn,
  .next-invoice-action form,
  .next-invoice-action form .btn {
    width: 100%;
  }

  .invoice-paper {
    padding: 22px 18px;
    border-radius: 14px;
  }

  .invoice-paper::before {
    right: 18px;
    left: 18px;
  }

  .paper-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .paper-heading {
    align-items: flex-start;
    text-align: left;
  }

  .paper-meta {
    grid-template-columns: minmax(0, 1fr);
    gap: 17px;
    padding: 17px 0;
  }

  .paper-details {
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }

  .paper-period {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .paper-totals {
    justify-content: stretch;
  }

  .paper-summary {
    width: 100%;
  }

  .paper-foot {
    grid-template-columns: minmax(0, 1fr);
    gap: 17px;
  }

  .paper-lines {
    overflow-x: auto;
  }

  .paper-lines table {
    min-width: 0;
  }

  .paper-lines th:nth-child(3),
  .paper-lines td:nth-child(3) {
    display: none;
  }

  .paper-lines th,
  .paper-lines td {
    padding-right: 6px;
    padding-left: 6px;
  }

  .paper-lines th:first-child,
  .paper-lines td:first-child {
    padding-left: 0;
  }

  .paper-lines th:last-child,
  .paper-lines td:last-child {
    padding-right: 0;
  }

  .paper-lines th:nth-child(4),
  .paper-lines td:nth-child(4) {
    white-space: nowrap;
  }

  .data-table th,
  .data-table td {
    padding: 11px 12px;
  }

  .data-table th:first-child,
  .data-table td:first-child {
    padding-left: 18px;
  }

  .data-table th:last-child,
  .data-table td:last-child {
    padding-right: 18px;
  }

  .data-table {
    min-width: 620px;
  }

  .client-table {
    min-width: 720px;
  }

  .invoice-table {
    min-width: 720px;
  }

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

  .page-actions .btn-primary {
    order: -1;
  }
}

@media (max-width: 420px) {
  .next-bill-total strong {
    font-size: 20px;
  }

  .auth-panel {
    padding: 24px 18px;
  }

  .auth-mobile-brand {
    margin-bottom: 32px;
  }
}

@media (max-width: 360px) {
  .stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat-card {
    display: grid;
    grid-template-columns: 32px 1fr;
    column-gap: 10px;
    align-items: center;
  }

  .stat-icon {
    grid-row: span 2;
    margin: 0;
  }

  .stat-label {
    align-self: end;
  }

  .stat-value {
    font-size: 21px;
  }

  .stat-note {
    grid-column: 2;
  }
}

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

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .mobile-bar,
  .page-actions,
  .breadcrumb,
  .detail-side,
  .app-footer,
  .messages,
  .card:not(.invoice-paper) {
    display: none !important;
  }

  .main {
    margin: 0;
  }

  .content {
    max-width: none;
    padding: 0;
  }

  .invoice-detail-grid {
    display: block;
  }

  .invoice-paper {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
}
