:root {
  --ink: #17211d;
  --muted: #68756f;
  --line: #dbe3df;
  --paper: #fbfcfa;
  --panel: #ffffff;
  --accent: #0d7c66;
  --accent-strong: #075746;
  --sun: #f3b23a;
  --rose: #cc4b54;
  --blue: #3867d6;
  --shadow: 0 18px 45px rgba(23, 33, 29, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 8%, rgba(13, 124, 102, 0.08), transparent 28%),
    linear-gradient(135deg, #f7faf7 0%, #eef4f1 52%, #f9f7f1 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

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

.auth-screen {
  display: none;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 34px;
  align-items: center;
  min-height: 100vh;
  padding: 42px;
}

body.auth-required .auth-screen {
  display: grid;
}

body.auth-required .shell {
  display: none;
}

.auth-copy {
  max-width: 720px;
}

.auth-brand {
  margin-bottom: 48px;
}

.auth-copy h1 {
  max-width: 760px;
  margin-top: 12px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: 0;
}

.auth-copy > p:not(.eyebrow) {
  max-width: 560px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.landing-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
  margin-top: 28px;
}

.landing-proof div,
.checkout-preview {
  border: 1px solid rgba(23, 33, 29, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
}

.landing-proof div {
  min-height: 104px;
  padding: 16px;
}

.landing-proof strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.landing-proof span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.checkout-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 760px;
  margin-top: 12px;
  padding: 18px;
}

.checkout-preview h2 {
  margin: 6px 0 8px;
  font-size: 24px;
}

.checkout-preview p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.45;
}

.checkout-preview > span {
  flex: 0 0 auto;
  padding: 9px 11px;
  border-radius: 999px;
  background: #e8f5ee;
  color: #126241;
  font-size: 13px;
  font-weight: 800;
}

.auth-card {
  display: grid;
  gap: 15px;
  padding: 24px;
  border: 1px solid rgba(23, 33, 29, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin-top: 6px;
  font-size: 28px;
}

.text-button {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 750;
}

.fine-print {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 26px;
  border-right: 1px solid rgba(23, 33, 29, 0.08);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px);
}

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

.brand-mark,
.brand-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.brand-mark {
  background: var(--ink);
  color: white;
  font-weight: 800;
}

.brand-logo {
  display: block;
  flex: 0 0 auto;
  overflow: visible;
}

.brand p,
.brand span,
.eyebrow,
h1,
h2,
p {
  margin: 0;
}

.brand p {
  font-weight: 800;
}

.brand span {
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.nav-item span {
  display: grid;
  place-items: center;
  width: 22px;
  color: var(--accent);
}

.nav-item.active,
.nav-item:hover {
  background: #eaf3f0;
  color: var(--ink);
}

.sidebar-panel {
  margin-top: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f4f8f5);
}

.account-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.account-panel h2 {
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-panel p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
}

.sidebar-panel h2 {
  margin-top: 8px;
  font-size: 19px;
  line-height: 1.2;
}

.sidebar-panel p:last-child {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.workspace {
  min-width: 0;
  padding: 30px;
}

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

.topbar h1 {
  max-width: 780px;
  margin-top: 8px;
  font-size: clamp(31px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: 0;
}

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

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.primary-button,
.ghost-button,
.ghost-link,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 15px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.primary-button {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  font-weight: 750;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.ghost-button,
.ghost-link,
.icon-button {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

.ghost-button:hover,
.ghost-link:hover,
.icon-button:hover {
  border-color: #aebdb6;
}

.icon-button {
  width: 42px;
  padding: 0;
  font-size: 20px;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

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

.onboarding-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(23, 33, 29, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.onboarding-strip h2 {
  margin-top: 6px;
  font-size: 22px;
}

.onboarding-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.onboarding-guide {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(23, 33, 29, 0.09);
  border-radius: 8px;
  background: #fffdf7;
  box-shadow: var(--shadow);
}

.onboarding-guide[hidden] {
  display: none;
}

.onboarding-guide-head,
.onboarding-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.onboarding-guide-head h2 {
  margin-top: 6px;
  font-size: 24px;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.onboarding-step {
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.onboarding-step > span {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #eaf4f1;
  color: var(--green);
  font-weight: 800;
}

.onboarding-step.done > span {
  background: var(--green);
  color: white;
}

.onboarding-step div {
  flex: 1;
  min-width: 0;
}

.onboarding-step p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.metric,
.panel {
  border: 1px solid rgba(23, 33, 29, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
  min-height: 128px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 12px;
  font-size: 30px;
  line-height: 1;
}

.metric small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 14px;
}

.panel {
  min-width: 0;
  padding: 20px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel h2 {
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.15;
}

.risk-list {
  display: grid;
  gap: 10px;
}

.risk-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.risk-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.risk-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.badge.danger {
  background: #fdecee;
  color: #a72f39;
}

.badge.warn {
  background: #fff4d9;
  color: #7a5200;
}

.badge.ok {
  background: #e8f5ee;
  color: #126241;
}

.badge.neutral {
  background: #edf1f3;
  color: #52605a;
}

.risk-item p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
}

.risk-money {
  font-weight: 850;
  white-space: nowrap;
}

.cash-chart {
  display: grid;
  align-items: end;
  grid-template-columns: repeat(5, minmax(44px, 1fr));
  gap: 12px;
  min-height: 300px;
  padding: 12px 4px 0;
}

.bar {
  display: grid;
  align-content: end;
  gap: 8px;
  min-height: 252px;
}

.bar-fill {
  min-height: 12px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--accent), var(--blue));
}

.bar-label {
  min-height: 54px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}

.bar-label strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.invoice-layout {
  grid-template-columns: 1fr;
}

.invoice-form,
.reminder-controls,
.settings-form,
.checkout-form {
  display: grid;
  gap: 14px;
}

.invoice-create-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #eef8f5);
}

.invoice-create-hero h2 {
  max-width: 660px;
  margin-top: 6px;
  font-size: 30px;
  line-height: 1.1;
}

.invoice-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.invoice-create-panel .invoice-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.invoice-create-panel .invoice-form label:nth-child(4),
.invoice-create-panel .invoice-form button {
  grid-column: 1 / -1;
}

.invoice-create-panel .invoice-form button {
  justify-self: start;
}

.invoice-preview-panel {
  position: sticky;
  top: 20px;
}

.preview-sticky {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.preview-sticky h2 {
  margin: 0;
  font-size: 24px;
}

.invoice-mini-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(13, 124, 102, 0.18);
  border-radius: 8px;
  background: var(--paper);
}

.invoice-mini-card div {
  display: grid;
  gap: 4px;
}

.invoice-mini-card span,
.invoice-mini-card small,
.mini-meta {
  color: var(--muted);
  font-size: 12px;
}

.mini-total {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.mini-total strong {
  font-size: 26px;
}

.invoice-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.invoice-flow span {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 8px;
  background: #eaf3f0;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.invoice-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 360px;
  padding: 14px;
  resize: vertical;
  line-height: 1.55;
}

.compact-textarea {
  min-height: 118px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 124, 102, 0.12);
}

.table-panel {
  overflow: hidden;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td {
  font-size: 14px;
}

.row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.small-button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
}

.small-button:hover {
  border-color: #aebdb6;
}

.danger-button {
  color: #a72f39;
}

.danger-button:hover {
  border-color: #e1a1a7;
  background: #fdecee;
}

.reminder-layout {
  grid-template-columns: 420px minmax(0, 1fr);
}

.reminder-history-panel {
  grid-column: 1 / -1;
}

.reminder-controls {
  margin-bottom: 16px;
}

.reminder-history {
  display: grid;
  gap: 10px;
}

.history-item {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.history-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-item strong {
  font-size: 14px;
}

.history-item span {
  color: var(--muted);
  font-size: 12px;
}

.history-item p {
  color: var(--muted);
  line-height: 1.45;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
  box-shadow: var(--shadow);
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.invoice-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 18, 15, 0.42);
}

.invoice-detail-modal[hidden] {
  display: none;
}

.invoice-detail-card {
  width: min(940px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
}

.invoice-detail-card > header,
.invoice-detail-card > section,
.invoice-detail-card > footer {
  padding: 20px;
}

.invoice-detail-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.invoice-detail-hero {
  background:
    linear-gradient(90deg, rgba(13, 124, 102, 0.10), transparent 50%),
    #ffffff;
}

.invoice-detail-hero > div:first-child {
  display: grid;
  gap: 6px;
}

.invoice-detail-hero p:not(.eyebrow) {
  color: var(--muted);
}

.detail-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.invoice-detail-card h2,
.invoice-detail-card h3,
.invoice-detail-card p {
  margin: 0;
}

.invoice-detail-card h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

.email-confirm-card {
  width: min(760px, 100%);
}

.email-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.email-review-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafcfb;
}

.email-review-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.email-review-grid strong {
  overflow-wrap: anywhere;
}

.email-review-message pre {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf5;
  color: var(--ink);
  font-family: inherit;
  line-height: 1.45;
  white-space: pre-wrap;
}

.email-confirm-status {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
}

.icon-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 20px;
}

.detail-grid div {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.detail-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  padding: 0 20px 20px;
}

.detail-columns section,
.detail-timeline {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.detail-columns p,
.payment-detail p {
  color: var(--muted);
  line-height: 1.5;
}

.payment-detail strong {
  color: var(--ink);
  font-size: 22px;
}

.detail-timeline {
  display: grid;
  gap: 10px;
  margin: 0 20px 20px;
}

.detail-timeline div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.detail-timeline div:first-of-type {
  border-top: 0;
}

.detail-timeline span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.empty {
  display: grid;
  place-items: center;
  min-height: 170px;
  border: 1px dashed #bdc9c3;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 156px;
  padding: 22px;
  border: 1px dashed #bdc9c3;
  border-radius: 8px;
  background: #fbfdfb;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  font-size: 17px;
}

.empty-state p {
  max-width: 360px;
  line-height: 1.45;
}

.dashboard-lanes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.dashboard-lane {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(23, 33, 29, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 33, 29, 0.06);
}

.dashboard-lane header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
}

.dashboard-lane h3 {
  margin: 5px 0 0;
  font-size: 15px;
  line-height: 1.25;
}

.dashboard-lane header > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eaf3f0;
  color: var(--accent-strong);
  font-weight: 850;
}

.lane-invoice {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.lane-invoice:hover {
  border-color: rgba(13, 124, 102, 0.34);
  background: #f5faf7;
}

.lane-invoice .badge {
  grid-column: 1 / -1;
  justify-self: start;
}

.lane-invoice small {
  color: var(--muted);
}

.lane-invoice b {
  align-self: end;
  white-space: nowrap;
}

.lane-empty {
  display: grid;
  place-items: center;
  min-height: 104px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.pricing-hero {
  max-width: 860px;
  margin-bottom: 18px;
}

.integrations-hero {
  max-width: 880px;
  margin-bottom: 18px;
}

.settings-hero {
  max-width: 880px;
  margin-bottom: 18px;
}

.integrations-hero h2 {
  margin-top: 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
}

.settings-hero h2 {
  margin-top: 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
}

.integrations-hero p:last-child {
  max-width: 680px;
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.settings-hero p:last-child {
  max-width: 680px;
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.email-status-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(23, 33, 29, 0.09);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.email-status-panel h3 {
  margin-top: 6px;
  font-size: 22px;
}

.email-status-panel p {
  margin-top: 8px;
  color: var(--muted);
}

.email-status-panel dl {
  display: grid;
  min-width: min(100%, 360px);
  gap: 10px;
  margin: 0;
}

.email-status-panel dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.email-status-panel dt {
  color: var(--muted);
  font-size: 13px;
}

.email-status-panel dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.status-error {
  color: #9d3b2f !important;
  font-weight: 700;
}

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

.integration-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(23, 33, 29, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.integration-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.integration-logo {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #eaf3f0;
  color: var(--accent-strong);
  font-size: 22px;
  font-weight: 850;
}

.integration-card h3 {
  margin: 0 0 5px;
  font-size: 22px;
}

.integration-card p {
  color: var(--muted);
  line-height: 1.45;
}

.integration-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.integration-status {
  min-height: 38px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f4f8f5;
  color: var(--muted);
  font-size: 14px;
}

.integration-status.connected {
  background: #e8f5ee;
  color: #126241;
  font-weight: 750;
}

.sync-panel {
  margin-top: 0;
}

.sync-summary {
  display: grid;
  gap: 10px;
}

.sync-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.sync-item strong {
  display: block;
}

.sync-item span {
  color: var(--muted);
  font-size: 13px;
}

.pricing-hero h2 {
  margin-top: 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
}

.pricing-hero p:last-child {
  max-width: 680px;
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.trial-button {
  margin-top: 18px;
}

.billing-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 460px);
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid rgba(13, 124, 102, 0.24);
  border-radius: 8px;
  background: #eaf4f1;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.billing-toggle button {
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(13, 124, 102, 0.16);
  border-radius: 6px;
  background: #ffffff;
  color: #10211b;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.billing-toggle button.active {
  background: #0b5f50;
  border-color: #0b5f50;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(13, 124, 102, 0.22);
}

.billing-toggle button:not(.active):hover {
  border-color: rgba(13, 124, 102, 0.42);
}

.billing-toggle span {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 800;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.checkout-panel {
  margin-top: 14px;
}

.checkout-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.checkout-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff4d9;
  color: #7a5200;
  font-size: 12px;
  font-weight: 800;
}

.checkout-status.active {
  background: #e8f5ee;
  color: #126241;
}

.subscription-summary {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.5;
}

.subscription-summary strong {
  color: var(--ink);
}

.price-card {
  display: grid;
  gap: 22px;
  align-content: space-between;
  min-height: 390px;
  padding: 22px;
  border: 1px solid rgba(23, 33, 29, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.price-card.featured {
  border-color: rgba(13, 124, 102, 0.45);
  background: linear-gradient(180deg, #ffffff, #eef8f5);
}

.price-card h3 {
  margin: 8px 0 6px;
  font-size: 30px;
  line-height: 1.05;
}

.billing-note {
  min-height: 38px;
  margin-bottom: 10px;
  color: #0d7c66 !important;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.billing-note.discount-note {
  color: #c33b2e !important;
}

.price-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.5;
}

.price-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
}

.price-card li::marker {
  color: var(--accent);
}

@media (max-width: 1120px) {
  .auth-screen {
    grid-template-columns: 1fr;
    padding: 26px;
  }

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

  .sidebar {
    position: static;
    padding: 18px;
  }

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

  .sidebar-panel {
    display: none;
  }

  .workspace {
    padding: 22px;
  }

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

  .onboarding-strip {
    display: grid;
  }

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

  .onboarding-steps,
  .email-review-grid {
    grid-template-columns: 1fr;
  }

  .email-status-panel {
    display: grid;
  }

  .split,
  .invoice-layout,
  .reminder-layout,
  .settings-layout,
  .integrations-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

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

  .invoice-filters {
    grid-template-columns: 1fr 1fr;
  }

  .invoice-create-layout {
    grid-template-columns: 1fr;
  }

  .invoice-preview-panel {
    position: static;
  }

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

  .dashboard-lanes,
  .detail-columns {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .auth-screen {
    padding: 18px;
  }

  .auth-copy h1 {
    font-size: 40px;
  }

  .landing-proof,
  .checkout-preview {
    grid-template-columns: 1fr;
  }

  .checkout-preview {
    display: grid;
  }

  .topbar {
    display: grid;
  }

  .topbar h1 {
    font-size: 34px;
  }

  .topbar-actions,
  .button-row,
  .onboarding-actions,
  .nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-button,
  .ghost-button,
  .ghost-link {
    width: 100%;
  }

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

  .cash-chart {
    grid-template-columns: repeat(5, minmax(36px, 1fr));
    gap: 8px;
  }

  .checkout-form {
    grid-template-columns: 1fr;
  }

  .billing-toggle {
    display: grid;
  }

  .billing-toggle button {
    width: 100%;
  }

  .invoice-filters {
    grid-template-columns: 1fr;
  }

  .invoice-create-hero,
  .invoice-create-panel .invoice-form {
    grid-template-columns: 1fr;
  }

  .invoice-create-hero {
    display: grid;
  }

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

  .onboarding-guide-head,
  .onboarding-step,
  .email-status-panel dl div {
    align-items: flex-start;
    display: grid;
  }

  .email-status-panel dd {
    text-align: left;
  }

  .dashboard-lanes,
  .detail-columns {
    grid-template-columns: 1fr;
  }

  .risk-item {
    grid-template-columns: 1fr;
  }
}

body {
  background: #f4f7f5;
}

.shell {
  background:
    linear-gradient(90deg, #ffffff 0, #ffffff 288px, transparent 288px),
    linear-gradient(180deg, #f7faf8, #eef3f0);
}

.sidebar {
  gap: 22px;
  background: #fbfcfb;
}

.brand {
  padding-bottom: 4px;
}

.brand p {
  font-size: 17px;
}

.brand span {
  font-size: 12px;
}

.nav {
  gap: 6px;
}

.nav-item {
  position: relative;
  min-height: 46px;
  padding: 10px 11px;
  border: 1px solid transparent;
  font-weight: 750;
}

.nav-item span {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef5f1;
  color: var(--accent-strong);
}

.nav-item svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.nav-item.active {
  border-color: rgba(13, 124, 102, 0.16);
  background: #e7f3ee;
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-item.active span {
  background: var(--accent);
  color: white;
}

.account-panel,
.sidebar-panel,
.metric,
.panel,
.onboarding-strip,
.preview-sticky,
.invoice-create-hero {
  border-color: rgba(23, 33, 29, 0.08);
  box-shadow: 0 12px 28px rgba(23, 33, 29, 0.06);
}

.account-panel {
  background: #17211d;
  color: white;
}

.account-panel .eyebrow,
.account-panel p:not(.eyebrow) {
  color: #bfd1ca;
}

.account-panel .ghost-button {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.18);
}

.workspace {
  padding: 34px;
}

.topbar {
  align-items: center;
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid rgba(23, 33, 29, 0.08);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(23, 33, 29, 0.05);
}

.topbar h1 {
  max-width: 820px;
  font-size: 34px;
  line-height: 1.08;
}

.primary-button,
.ghost-button,
.ghost-link,
.icon-button,
.small-button {
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.primary-button:hover,
.ghost-button:hover,
.ghost-link:hover,
.icon-button:hover,
.small-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  box-shadow: 0 8px 18px rgba(13, 124, 102, 0.18);
}

.metrics {
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  background: #ffffff;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--sun));
}

.metric strong {
  font-size: 28px;
}

.panel {
  background: #ffffff;
}

.panel-header {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(23, 33, 29, 0.07);
}

.risk-item,
.history-item {
  background: #ffffff;
}

.risk-item:hover,
tbody tr:hover {
  background: #f7fbf8;
}

.cash-chart {
  min-height: 280px;
}

.bar-fill {
  background: linear-gradient(180deg, #0d7c66 0%, #36a58f 72%, #f3b23a 100%);
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

table {
  min-width: 920px;
}

th {
  background: #f7faf8;
}

td,
th {
  padding: 14px 12px;
}

.row-actions {
  gap: 6px;
}

.small-button {
  padding: 0 10px;
}

.invoice-create-hero {
  background:
    linear-gradient(90deg, rgba(13, 124, 102, 0.10), transparent 46%),
    #ffffff;
}

.invoice-create-hero h2 {
  font-size: 32px;
}

.invoice-create-panel {
  padding: 0;
  overflow: hidden;
}

.invoice-create-panel .panel-header {
  margin: 0;
  padding: 22px;
  background: #f7faf8;
}

.invoice-create-panel .invoice-form {
  padding: 22px;
}

.invoice-create-panel label {
  padding: 12px;
  border: 1px solid rgba(23, 33, 29, 0.07);
  border-radius: 8px;
  background: #fbfcfb;
}

.invoice-create-panel label:focus-within {
  border-color: rgba(13, 124, 102, 0.34);
  background: white;
}

.preview-sticky {
  padding: 0;
  overflow: hidden;
}

.preview-sticky > .eyebrow,
.preview-sticky > h2,
.invoice-flow {
  margin-inline: 18px;
}

.preview-sticky > .eyebrow {
  margin-top: 18px;
}

.invoice-mini-card {
  margin: 0 18px;
  border-color: rgba(13, 124, 102, 0.22);
  background:
    linear-gradient(180deg, #ffffff, #f5faf7);
}

.mini-total {
  color: var(--accent-strong);
}

.invoice-flow {
  margin-bottom: 18px;
}

input,
select,
textarea {
  border-color: #d5ded9;
}

@media (max-width: 1120px) {
  .shell {
    background: #f4f7f5;
  }

  .topbar {
    align-items: flex-start;
  }
}

@media (max-width: 680px) {
  .workspace {
    padding: 18px;
  }

  .topbar,
  .invoice-create-hero {
    padding: 16px;
  }

  .topbar h1,
  .invoice-create-hero h2 {
    font-size: 28px;
  }
}
