/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-muted: #f1f4f3;
  --surface-strong: #0f1f1d;
  --text: #17211f;
  --text-soft: #52615d;
  --text-muted: #6e7b77;
  --line: #dce3e0;
  --line-strong: #c6d0cc;
  --brand: #047968;
  --brand-strong: #035f52;
  --brand-soft: #e4f3ef;
  --accent: #df6757;
  --accent-soft: #fbe7e3;
  --success: #177245;
  --success-soft: #e3f4ea;
  --warning: #a96a00;
  --warning-soft: #fff1d5;
  --danger: #bd3027;
  --danger-soft: #fde6e3;
  --info: #286fb4;
  --info-soft: #e5f0fb;
  --shadow: 0 18px 40px rgba(22, 34, 31, 0.08);
  --shadow-soft: 0 8px 22px rgba(22, 34, 31, 0.06);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family:
    Inter,
    "Geist Sans",
    "SF Pro Display",
    "Segoe UI",
    system-ui,
    sans-serif;
  background: var(--bg);
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

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

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(4, 121, 104, 0.22);
  outline-offset: 2px;
}

code {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08rem 0.28rem;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 0.92em;
}

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

.sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.25rem;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mark,
.brand-image {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
}

.paidfast-logo {
  display: block;
  background: transparent;
}

.brand-image {
  border: 1px solid var(--line);
  background: #ffffff;
  object-fit: cover;
}

.brand-lockup strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.25;
}

.brand-lockup small {
  display: block;
  margin-top: 0.1rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.app-brand-lockup {
  align-self: flex-start;
}

.field-help {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.side-nav {
  display: grid;
  grid-gap: 0.35rem;
  gap: 0.35rem;
}

.side-nav a {
  border-radius: var(--radius);
  padding: 0.72rem 0.78rem;
  color: var(--text-soft);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.side-nav a:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
  transform: translateX(2px);
}

.side-nav a.is-active,
.side-nav a[aria-current="page"] {
  background: var(--brand);
  color: #ffffff;
  transform: none;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  grid-gap: 0.35rem;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.86rem;
}

.sidebar-footer span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-soft);
}

.dashboard-main {
  width: min(100%, 1480px);
  padding: 1.25rem;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.topbar h1 {
  margin-top: 0.25rem;
  font-size: 1.65rem;
  line-height: 1.15;
}

.topbar-subtitle,
.section-copy,
.minor-note {
  color: var(--text-soft);
  line-height: 1.5;
}

.topbar-subtitle {
  margin-top: 0.35rem;
  max-width: 58ch;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.topbar-side {
  min-width: min(390px, 100%);
  display: grid;
  justify-items: end;
  grid-gap: 0.75rem;
  gap: 0.75rem;
}

.organization-lockup {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.55rem 0.65rem;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-align: right;
}

.organization-copy {
  min-width: 0;
}

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

.organization-copy strong {
  max-width: 240px;
  overflow: hidden;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organization-copy small {
  margin-top: 0.12rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.organization-image,
.organization-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  flex: 0 0 auto;
}

.organization-image {
  display: block;
  border: 1px solid var(--line);
  background: #ffffff;
  object-fit: cover;
}

.organization-mark {
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #ffffff;
  font-weight: 900;
}

.eyebrow {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.button,
.auth-form button,
.oauth-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 0.85rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.button:hover,
.auth-form button:hover,
.oauth-button:hover {
  transform: translateY(-1px);
}

.button.primary,
.auth-form button {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(4, 121, 104, 0.16);
}

.button.primary:hover,
.auth-form button:hover {
  background: var(--brand-strong);
}

.button.secondary,
.oauth-button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.button.secondary:hover,
.oauth-button:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-soft);
}

.button.ghost:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.button[disabled],
.auth-form button[disabled],
.oauth-button[disabled],
button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.compact-button {
  min-height: 32px;
  padding: 0 0.65rem;
  font-size: 0.84rem;
}

.feedback-stack {
  display: grid;
  grid-gap: 0.6rem;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.alert {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  font-weight: 700;
}

.alert.error {
  border-color: rgba(189, 48, 39, 0.22);
  background: var(--danger-soft);
  color: var(--danger);
}

.alert.success {
  border-color: rgba(23, 114, 69, 0.2);
  background: var(--success-soft);
  color: var(--success);
}

.sync-note {
  width: -moz-fit-content;
  width: fit-content;
  border: 1px solid var(--info);
  border-radius: var(--radius);
  padding: 0.5rem 0.72rem;
  background: var(--info-soft);
  color: var(--info);
  font-size: 0.9rem;
  font-weight: 800;
}

.dashboard-section {
  scroll-margin-top: 1rem;
  margin-top: 1rem;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  grid-gap: 1rem;
  gap: 1rem;
}

.revenue-card,
.surface-panel,
.panel,
.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.revenue-card {
  display: grid;
  grid-gap: 1rem;
  gap: 1rem;
  padding: 1.15rem;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.section-header.compact {
  align-items: center;
}

.section-header h2 {
  margin-top: 0.22rem;
  font-size: 1.2rem;
}

.section-copy {
  margin-top: 0.28rem;
  max-width: 64ch;
  font-size: 0.95rem;
}

.section-stat {
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  background: var(--surface-muted);
  text-align: right;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.section-stat span,
.metric-card span,
.progress-block span,
.trend-head span,
.inspector-grid span,
.totals-grid span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-stat strong {
  display: block;
  margin-top: 0.18rem;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.hero-metric {
  display: block;
  font-size: 2.55rem;
  line-height: 1.05;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.progress-block {
  display: grid;
  grid-gap: 0.6rem;
  gap: 0.6rem;
}

.progress-block > div:first-child,
.trend-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.progress-block strong,
.trend-head strong {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 0.25s ease;
}

.trend-panel {
  display: grid;
  grid-gap: 0.8rem;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
  background: var(--surface-muted);
}

.mini-chart {
  height: 160px;
  display: grid;
  grid-template-columns: repeat(6, minmax(28px, 1fr));
  align-items: end;
  grid-gap: 0.65rem;
  gap: 0.65rem;
}

.chart-column {
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  grid-gap: 0.4rem;
  gap: 0.4rem;
  height: 100%;
}

.bar-track {
  height: 100%;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px;
  background: #ffffff;
}

.bar-track span {
  width: 100%;
  border-radius: 5px;
  background: var(--brand);
  transition: height 0.25s ease;
}

.chart-column small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-chart,
.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--surface-muted);
  color: var(--text-soft);
}

.empty-state {
  display: grid;
  justify-items: start;
  grid-gap: 0.55rem;
  gap: 0.55rem;
}

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

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
}

.metric-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  min-height: 154px;
  padding: 1rem;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--brand);
}

.metric-card.success::before {
  background: var(--success);
}

.metric-card.warning::before {
  background: var(--warning);
}

.metric-card.danger::before {
  background: var(--danger);
}

.metric-card.info::before {
  background: var(--info);
}

.metric-card strong {
  margin-top: 0.55rem;
  font-size: 1.55rem;
  line-height: 1.15;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.metric-card p {
  margin-top: 0.45rem;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.status-pill {
  width: -moz-fit-content;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.status-pill.small {
  min-height: 24px;
  padding: 0 0.5rem;
  font-size: 0.72rem;
}

.status-pill.success {
  border-color: rgba(23, 114, 69, 0.18);
  background: var(--success-soft);
  color: var(--success);
}

.status-pill.warning {
  border-color: rgba(169, 106, 0, 0.22);
  background: var(--warning-soft);
  color: var(--warning);
}

.status-pill.danger {
  border-color: rgba(189, 48, 39, 0.2);
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pill.info {
  border-color: rgba(40, 111, 180, 0.18);
  background: var(--info-soft);
  color: var(--info);
}

.status-pill.neutral {
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--text-soft);
}

.surface-panel {
  padding: 1rem;
}

.table-scroll {
  margin-top: 1rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.invoice-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
  table-layout: fixed;
}

.invoice-table th {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
}

.invoice-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0.75rem;
  vertical-align: middle;
}

.invoice-list-table th:nth-child(1),
.invoice-list-table td:nth-child(1) {
  width: 170px;
}

.invoice-list-table th:nth-child(2),
.invoice-list-table td:nth-child(2) {
  width: 245px;
}

.invoice-list-table th:nth-child(3),
.invoice-list-table td:nth-child(3) {
  width: 180px;
}

.invoice-list-table th:nth-child(4),
.invoice-list-table td:nth-child(4) {
  width: 120px;
}

.invoice-list-table th:nth-child(5),
.invoice-list-table td:nth-child(5),
.invoice-list-table th:nth-child(6),
.invoice-list-table td:nth-child(6) {
  width: 150px;
}

.invoice-list-table th:nth-child(7),
.invoice-list-table td:nth-child(7) {
  width: 150px;
}

.invoice-row {
  cursor: pointer;
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.invoice-row:hover {
  background: var(--surface-muted);
}

.invoice-row.is-selected {
  background: var(--brand-soft);
  box-shadow: inset 4px 0 0 var(--brand);
}

.numeric {
  text-align: right;
}

.money-cell {
  font-weight: 850;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--brand-strong);
  cursor: pointer;
  font-weight: 900;
  padding: 0;
  text-align: left;
  text-decoration: none;
}

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

.table-note {
  display: block;
  margin-top: 0.22rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.action-menu {
  position: relative;
  display: inline-block;
  min-width: 112px;
  isolation: isolate;
}

.action-menu summary {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 0.7rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  list-style: none;
}

.action-menu summary::-webkit-details-marker {
  display: none;
}

.action-menu[open] summary {
  border-color: rgba(4, 121, 104, 0.28);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.action-menu-panel {
  position: absolute;
  z-index: 70;
  top: calc(100% + 0.35rem);
  right: 0;
  width: min(420px, calc(100vw - 2rem));
  display: none;
  gap: 0.85rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: 0.9rem;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(9, 31, 27, 0.22);
}

.action-menu[open] .action-menu-panel {
  display: grid;
  animation: menu-pop 0.16s ease-out;
}

.action-menu-section {
  display: grid;
  grid-gap: 0.45rem;
  gap: 0.45rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.8rem;
}

.action-menu-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.action-menu-panel button,
.action-menu-panel a {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 0.8rem;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.payment-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 0.45rem;
  gap: 0.45rem;
}

.payment-action-grid button {
  justify-content: center;
  padding-inline: 0.45rem;
}

.action-menu-panel button:hover,
.action-menu-panel a:hover {
  background: var(--surface-muted);
}

.action-menu-label {
  padding: 0 0.35rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

@keyframes menu-pop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.invoice-inspector {
  margin-top: 1rem;
  display: grid;
  grid-gap: 0.9rem;
  gap: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--surface-muted);
}

.invoice-modal-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(7, 16, 14, 0.56);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
}

.invoice-modal {
  width: min(980px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  display: grid;
  grid-gap: 0.9rem;
  gap: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.invoice-detail-head,
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.invoice-detail-head {
  align-items: flex-start;
}

.invoice-detail-head h3 {
  margin-top: 0.2rem;
  font-size: 1.3rem;
}

.status-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inspector-grid,
.totals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 0.75rem;
  gap: 0.75rem;
}

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

.inspector-grid div,
.totals-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  background: var(--surface);
}

.inspector-grid strong,
.totals-grid strong {
  display: block;
  margin-top: 0.22rem;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.credit-note-detail-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
  background: var(--surface-muted);
}

.credit-note-detail-card span {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.credit-note-detail-card strong {
  display: block;
  margin-top: 0.3rem;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.inline-actions button,
.inline-actions a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  background: var(--surface);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.inline-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.invoice-line-list {
  display: grid;
  grid-gap: 0.45rem;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.invoice-line-list li {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(150px, 0.8fr) minmax(120px, auto);
  grid-gap: 0.75rem;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  background: var(--surface);
}

.invoice-line-list li span:nth-child(2) {
  color: var(--text-soft);
}

.invoice-line-list strong {
  text-align: right;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.invoice-notes {
  border-left: 4px solid var(--brand);
  padding-left: 0.75rem;
  color: var(--text-soft);
  line-height: 1.5;
}

.workflow-grid,
.activity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-gap: 1rem;
  gap: 1rem;
}

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

.single-workflow {
  grid-template-columns: minmax(0, 780px);
}

.panel {
  padding: 1rem;
}

.primary-workflow {
  border-color: rgba(4, 121, 104, 0.24);
  box-shadow: 0 18px 38px rgba(4, 121, 104, 0.08);
}

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

label {
  display: grid;
  grid-gap: 0.4rem;
  gap: 0.4rem;
  margin-top: 0.8rem;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 800;
}

label.full {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.58rem 0.68rem;
  background: #ffffff;
  color: var(--text);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(4, 121, 104, 0.12);
}

input[type="file"] {
  padding: 0.45rem 0.55rem;
}

textarea {
  resize: vertical;
}

.panel > .button,
.panel > button,
.auth-form button {
  margin-top: 0.9rem;
}

.logo-preview-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.8rem;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 800;
}

.logo-preview {
  display: block;
  width: 180px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  object-fit: cover;
}

.simple-list {
  display: grid;
  grid-gap: 0.5rem;
  gap: 0.5rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.simple-list li {
  display: grid;
  grid-template-columns: minmax(92px, auto) minmax(0, 1fr) auto;
  grid-gap: 0.65rem;
  gap: 0.65rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.65rem;
  background: var(--surface-muted);
  color: var(--text-soft);
}

.message-list li.message-item {
  grid-template-columns: minmax(92px, auto) minmax(0, 1fr) auto;
  align-items: start;
}

.message-template {
  grid-column: 1 / -1;
  margin: 0.1rem 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.simple-list strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.minor-note {
  margin-top: 0.45rem;
  font-size: 0.92rem;
}

.brand-chip {
  width: -moz-fit-content;
  width: fit-content;
  border: 1px solid rgba(4, 121, 104, 0.2);
  border-radius: var(--radius);
  padding: 0.32rem 0.62rem;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.subtitle {
  margin-top: 0.55rem;
  color: var(--text-soft);
  line-height: 1.5;
}

.loading-shell .dashboard-main {
  display: grid;
  align-content: start;
  grid-gap: 1rem;
  gap: 1rem;
}

.loading-nav {
  gap: 0.75rem;
}

.skeleton-card {
  overflow: hidden;
}

.skeleton-line {
  position: relative;
  display: block;
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.82), transparent);
  animation: shimmer 1.35s infinite;
}

.skeleton-line.short {
  width: 68%;
}

.skeleton-line.title {
  width: 46%;
  height: 20px;
}

.skeleton-line.hero {
  width: 76%;
  height: 44px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.auth-card {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin-top: 0.65rem;
  font-size: 1.8rem;
  line-height: 1.15;
}

.auth-form {
  display: grid;
  grid-gap: 0.05rem;
  gap: 0.05rem;
  margin-top: 1rem;
}

.oauth-button {
  width: 100%;
  margin-top: 0.75rem;
}

.auth-inline-note {
  margin-top: 0.45rem;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101413;
    --surface: #171d1b;
    --surface-muted: #202826;
    --surface-strong: #f1f5f3;
    --text: #edf4f1;
    --text-soft: #b9c6c1;
    --text-muted: #90a09a;
    --line: #2d3935;
    --line-strong: #40514c;
    --brand-soft: #0d2f2a;
    --accent-soft: #3a201c;
    --success-soft: #103321;
    --warning-soft: #372809;
    --danger-soft: #3b1715;
    --info-soft: #14283b;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.22);
  }

  .sidebar,
  .topbar {
    background: rgba(23, 29, 27, 0.9);
  }

  input,
  select,
  textarea,
  .bar-track,
  .brand-image,
  .logo-preview {
    background: #111715;
  }

  .skeleton-line::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

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

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

@media (max-width: 980px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .side-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .side-nav a {
    white-space: nowrap;
  }

  .sidebar-footer {
    display: none;
  }

  .topbar,
  .section-header,
  .invoice-detail-head {
    display: grid;
  }

  .topbar-actions,
  .status-row {
    justify-content: flex-start;
  }

  .topbar-side {
    min-width: 0;
    justify-items: start;
  }

  .organization-lockup {
    justify-content: flex-start;
    text-align: left;
  }

  .workflow-grid,
  .activity-grid {
    grid-template-columns: 1fr;
  }

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

  .section-actions {
    justify-content: flex-start;
  }

  .invoice-list-table {
    min-width: 0;
    border-spacing: 0 0.85rem;
  }

  .invoice-list-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

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

  .invoice-list-table tr {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
  }

  .invoice-list-table td {
    display: grid;
    grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
    grid-gap: 0.75rem;
    gap: 0.75rem;
    border-bottom: 1px solid var(--line);
    padding: 0.7rem 0;
    text-align: left;
  }

  .invoice-list-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .invoice-list-table td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .invoice-list-table .money-cell {
    white-space: normal;
  }

  .invoice-list-table .status-stack {
    align-items: flex-start;
  }

  .invoice-list-table .action-menu {
    width: 100%;
    min-width: 0;
  }

  .invoice-list-table .action-menu summary {
    width: 100%;
    justify-content: center;
  }

  .invoice-list-table .action-menu-panel {
    position: fixed;
    inset: auto 1rem 1rem;
    z-index: 100;
    width: auto;
    max-height: min(78vh, 620px);
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-top: 0;
    border-radius: 22px;
    padding: 1rem;
    box-shadow: 0 28px 90px rgba(9, 31, 27, 0.34);
  }
}

@media (max-width: 640px) {
  .dashboard-main,
  .sidebar {
    padding: 0.85rem;
  }

  .topbar-actions,
  .button {
    width: 100%;
  }

  .topbar-side,
  .organization-lockup {
    width: 100%;
  }

  .organization-copy strong {
    max-width: none;
  }

  .surface-panel {
    padding: 0.75rem;
  }

  .section-actions,
  .section-actions .button,
  .section-actions .section-stat {
    width: 100%;
  }

  .section-actions .section-stat {
    text-align: left;
  }

  .invoice-list-table td {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .payment-action-grid {
    grid-template-columns: 1fr;
  }

  .invoice-list-table .action-menu-panel {
    inset: auto 0.75rem 0.75rem;
    max-height: 82vh;
    padding: 0.9rem;
  }

  .hero-metric {
    font-size: 2rem;
  }

  .metric-grid,
  .form-grid,
  .inspector-grid,
  .totals-grid {
    grid-template-columns: 1fr;
  }

  .mini-chart {
    gap: 0.4rem;
  }

  .invoice-line-list li,
  .simple-list li {
    grid-template-columns: 1fr;
  }

  .invoice-line-list strong {
    text-align: left;
  }

  .section-stat {
    min-width: 0;
    text-align: left;
  }
}

