:root {
  --bg: #f4f6f2;
  --ink: #1e2523;
  --muted: #6a746f;
  --line: #dce3dd;
  --panel: #ffffff;
  --panel-soft: #f9fbf7;
  --nav: #17221e;
  --nav-2: #26332e;
  --accent: #246b5b;
  --accent-2: #b75f2a;
  --blue: #2d5f8f;
  --red: #a6423c;
  --amber: #9a6b1f;
  --green: #2f745a;
  --shadow: 0 18px 44px rgba(37, 45, 40, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

.workspace-notice {
  border-bottom: 1px solid var(--line);
  background: #fff7ed;
  color: var(--ink);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.workspace-proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.workspace-proof-strip div {
  display: grid;
  gap: 4px;
  background: #fff;
  padding: 14px 16px;
}

.workspace-proof-strip strong {
  color: var(--accent);
  font-size: 13px;
}

.workspace-proof-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.workspace-explore-panel {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.workspace-explore-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--accent);
  font-weight: 900;
}

.workspace-explore-panel summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.workspace-explore-panel .workspace-proof-strip {
  padding-top: 0;
}

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

.onboarding {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  background:
    linear-gradient(110deg, rgba(23, 34, 30, 0.94), rgba(36, 107, 91, 0.82)),
    linear-gradient(45deg, rgba(183, 95, 42, 0.26), transparent 58%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1400' height='900' viewBox='0 0 1400 900'%3E%3Crect width='1400' height='900' fill='%23dfe7df'/%3E%3Cg opacity='.45'%3E%3Cpath d='M120 190h1160v520H120z' fill='%23fff'/%3E%3Cpath d='M180 260h220v38H180zm0 82h420v26H180zm0 54h380v26H180zm0 54h500v26H180zm0 92h320v32H180z' fill='%23246b5b'/%3E%3Cpath d='M760 270h360v260H760z' fill='%23eef4ee'/%3E%3Cpath d='M790 492l80-90 74 54 104-136 54 172z' fill='%23b75f2a'/%3E%3Cpath d='M760 574h360v56H760z' fill='%2317221e'/%3E%3C/g%3E%3C/svg%3E") center/cover;
}

.onboarding-copy {
  align-self: center;
  color: white;
  padding: clamp(28px, 7vw, 86px);
  max-width: 840px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.brand-lockup strong,
.top-brand strong {
  display: block;
  font-size: 18px;
}

.brand-lockup span,
.top-brand span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 750;
}

.onboarding h1 {
  margin: 34px 0 18px;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: 0;
}

.onboarding-copy p {
  max-width: 720px;
  margin: 0;
  color: #edf5ef;
  font-size: 18px;
  line-height: 1.65;
  font-weight: 650;
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
  max-width: 720px;
}

.pain-grid a,
.pain-grid div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.setup-card {
  align-self: center;
  margin: 28px;
  padding: 24px;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.setup-card h2,
.panel h2,
.modal h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.setup-card p,
.panel-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(36, 107, 91, 0.12);
}

.primary,
.secondary,
.ghost,
.danger {
  min-height: 38px;
  border-radius: 7px;
  border: 1px solid transparent;
  padding: 9px 12px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.primary {
  background: var(--accent);
  color: white;
}

.secondary {
  background: #edf4ef;
  color: var(--accent);
  border-color: #cfe1d8;
}

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

.danger {
  background: #fff1ef;
  color: var(--red);
  border-color: #efcac5;
}

.wide {
  width: 100%;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 14px;
  color: #fff;
  background: var(--nav);
}

.sidebar .top-brand span {
  color: #aebcb6;
}

.company-chip {
  padding: 12px;
  border-radius: 8px;
  background: var(--nav-2);
}

.company-chip strong {
  display: block;
}

.company-chip span {
  display: block;
  margin-top: 4px;
  color: #aebcb6;
  font-size: 12px;
}

.suite-links {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
}

.suite-links a {
  color: #edf5ef;
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
}

.suite-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.trust-chip {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(183, 95, 42, 0.16);
}

.trust-chip strong {
  color: #fff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.trust-chip span {
  color: #f4dfd1;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

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

.nav button {
  border: 0;
  border-radius: 7px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d9e4df;
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.nav button.active,
.nav button:hover {
  background: #31443d;
  color: #fff;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

.side-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  color: var(--muted);
  line-height: 1.45;
}

.status-strip.inline {
  margin-bottom: 14px;
}

.status-strip strong {
  color: var(--ink);
}

.kpi {
  min-height: 128px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(37, 45, 40, 0.05);
}

.kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi strong {
  display: block;
  margin-top: 12px;
  font-size: 28px;
  line-height: 1.1;
}

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

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.85fr);
  gap: 12px;
  margin-top: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(37, 45, 40, 0.05);
  overflow: hidden;
}

.panel.pad {
  padding: 16px;
}

.panel-head {
  min-height: 58px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
}

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

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

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

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

td.num,
th.num {
  text-align: right;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  background: #edf4ef;
  color: var(--accent);
}

.badge.red {
  background: #fff1ef;
  color: var(--red);
}

.badge.amber {
  background: #fff7e8;
  color: var(--amber);
}

.badge.blue {
  background: #edf4fc;
  color: var(--blue);
}

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

.import-restore {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.mini-row strong {
  display: block;
}

.mini-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.view-grid {
  display: grid;
  gap: 12px;
}

.split {
  display: grid;
  grid-template-columns: minmax(340px, 0.72fr) minmax(0, 1fr);
  gap: 12px;
}

.entry-card {
  padding: 16px;
}

.line-items {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.line-item {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 100px 100px 42px;
  gap: 8px;
  align-items: end;
}

.line-item.invoice {
  grid-template-columns: minmax(160px, 1fr) 78px 94px 80px 42px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink);
  background: white;
  font-weight: 900;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: white;
  font-weight: 850;
}

.tabs button.active {
  color: white;
  border-color: var(--accent);
  background: var(--accent);
}

.report-sheet {
  display: grid;
  gap: 10px;
}

.report-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.report-row.total {
  border-radius: 7px;
  border: 0;
  background: #edf4ef;
  font-weight: 900;
}

.chart {
  width: 100%;
  height: 240px;
  display: block;
}

.searchbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 180px;
  gap: 8px;
}

.empty {
  padding: 34px 18px;
  color: var(--muted);
  text-align: center;
}

.review-note {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
  border: 1px solid #e3d4a3;
  border-radius: 8px;
  padding: 12px 14px;
  color: #645016;
  background: #fff8dd;
  line-height: 1.45;
}

.review-note strong {
  color: #45350a;
}

.support-box {
  display: grid;
  gap: 12px;
}

.support-box h2 {
  margin: 0;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: 360px;
  padding: 13px 15px;
  border-radius: 8px;
  color: white;
  background: var(--nav);
  box-shadow: var(--shadow);
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(12, 18, 16, 0.58);
}

.modal {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 8px;
  padding: 18px;
  background: white;
  box-shadow: var(--shadow);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.mobile-nav-toggle {
  display: none;
}

@media (max-width: 1080px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid,
  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .onboarding {
    grid-template-columns: 1fr;
  }

  .setup-card {
    margin-top: 0;
  }

  .pain-grid,
  .form-grid,
  .searchbar {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    max-height: 44vh;
    padding: 12px;
    gap: 10px;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .nav button {
    flex: 0 0 auto;
    min-width: 138px;
    padding: 8px 10px;
    scroll-snap-align: start;
  }

  .company-chip,
  .side-footer {
    display: none;
  }

  .main {
    padding: 14px;
  }

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

  .line-item,
  .line-item.invoice {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .onboarding h1 {
    font-size: 40px;
  }

  .sidebar {
    max-height: 36vh;
  }

  .top-brand {
    align-items: center;
  }

  .top-brand span {
    display: none;
  }

  .line-item.invoice {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 42px;
    align-items: end;
  }

  .line-item.invoice label:first-child {
    grid-column: 1 / -1;
  }

  .line-item.invoice .icon-btn {
    grid-column: 4;
    grid-row: 2;
  }
}

@media (max-width: 760px) {
  .workspace-proof-strip {
    grid-template-columns: 1fr;
  }

  .workspace-explore-panel summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

