@font-face{font-family:'Instrument Sans';font-style:normal;font-weight:400;font-display:swap;src:url('/workspace/assets/instrument-sans-400.ttf') format('truetype')}
@font-face{font-family:'Instrument Sans';font-style:normal;font-weight:500;font-display:swap;src:url('/workspace/assets/instrument-sans-500.ttf') format('truetype')}
@font-face{font-family:'Instrument Sans';font-style:normal;font-weight:600;font-display:swap;src:url('/workspace/assets/instrument-sans-600.ttf') format('truetype')}
@font-face{font-family:'Instrument Sans';font-style:normal;font-weight:700;font-display:swap;src:url('/workspace/assets/instrument-sans-700.ttf') format('truetype')}

:root {
  --bg: #f5f5f0;
  --surface: #fff;
  --ink: #202b28;
  --muted: #777f79;
  --line: #e8eae3;
  --nav: #172522;
  --nav-muted: #a6b3ac;
  --gold: #b3934f;
  --gold-light: #f2ecdd;
  --green: #3f715d;
  --green-light: #edf4ed;
  --red: #ae5c48;
  --red-light: #fbefeb;
  --blue: #617d94;
  --blue-light: #edf2f6;
  --radius: 12px;
  --sidebar: 224px;
  --shadow: 0 10px 40px #1725220b;
  --font: 'Instrument Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  -webkit-font-smoothing: antialiased
}

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent
}

button {
  cursor: pointer
}

button {
  color: inherit
}

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

button,
input,
select,
textarea {
  outline-offset: 3px
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px
}

button:disabled {
  cursor: default;
  opacity: .45
}

svg {
  flex-shrink: 0
}

button svg {
  pointer-events: none
}

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

h1 {
  font-size: 31px;
  letter-spacing: -1.25px;
  line-height: 1.2;
  font-weight: 500
}

h2 {
  font-size: 15px;
  letter-spacing: -.35px;
  font-weight: 600
}

h3 {
  font-size: 14px;
  font-weight: 600
}

small {
  font-size: 11px
}

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

.small {
  font-size: 12px
}

.strong {
  font-weight: 600
}

.positive {
  color: var(--green)
}

.negative {
  color: var(--red)
}

.nowrap {
  white-space: nowrap
}

.num {
  font-variant-numeric: tabular-nums
}

.hide {
  display: none !important
}

.icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.65
}

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

.spacer {
  flex: 1
}

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

.between {
  justify-content: space-between
}

.wrap {
  flex-wrap: wrap
}

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

.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted)
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: white;
  padding: 12px
}

.skip-link:focus {
  top: 16px
}

/* Workspace shell */
.sidebar {
  width: var(--sidebar);
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--nav);
  color: #eff2ec;
  display: flex;
  flex-direction: column;
  z-index: 40;
  padding: 27px 16px 14px
}

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

.brand-mark {
  background: #faf8f1;
  border-radius: 7px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  overflow: hidden
}

.brand-mark img {
  width: 29px;
  height: 25px;
  object-fit: contain
}

.brand-name {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.9px;
  line-height: 1
}

.brand-name small {
  font-size: 8px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 2.4px;
  margin-top: 5px;
  color: #c2b486
}

.workspace-picker {
  width: 100%;
  background: #24332e;
  border: 1px solid #35433c;
  border-radius: 8px;
  color: #e2e8df;
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  margin: 0 0 21px
}

.workspace-monogram {
  width: 29px;
  height: 29px;
  border-radius: 6px;
  background: #3d4e43;
  color: #e7d9b5;
  display: grid;
  place-items: center;
  font-size: 11px;
  flex-shrink: 0
}

.workspace-picker strong {
  font-weight: 500;
  font-size: 11px;
  display: block
}

.workspace-picker small {
  font-size: 9px;
  color: var(--nav-muted)
}

.sidebar-scroll {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: #3a4c41 transparent
}

.nav-label {
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #819488;
  margin: 16px 12px 7px
}

.nav-label:first-child {
  margin-top: 0
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #b9c7bf;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: none;
  border-radius: 7px;
  text-align: left;
  margin: 2px 0;
  transition: background .15s, color .15s;
  font-size: 12px
}

.nav-item:hover {
  background: #26372f;
  color: white
}

.nav-item.active {
  background: #d6c49a;
  color: #172522;
  font-weight: 600
}

.nav-item .icon {
  width: 17px;
  height: 17px
}

.nav-count {
  margin-left: auto;
  font-size: 9px;
  min-width: 18px;
  border-radius: 4px;
  background: #ffffff0c;
  text-align: center;
  padding: 1px 5px;
  color: #c1cbbf
}

.active .nav-count {
  background: #17252212;
  color: var(--ink)
}

.sidebar-bottom {
  padding-top: 14px;
  margin-top: 12px;
  border-top: 1px solid #ffffff12
}

.user-button {
  display: flex;
  gap: 10px;
  align-items: center;
  background: none;
  border: 0;
  width: 100%;
  text-align: left;
  color: #eff2ec;
  padding: 9px 5px
}

.user-button strong {
  font-size: 11px;
  font-weight: 500;
  display: block
}

.user-button small {
  font-size: 10px;
  color: var(--nav-muted)
}

.avatar {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e9ece3;
  border-radius: 50%;
  color: #526152;
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0
}

.avatar.gold {
  background: #eee4cc;
  color: #8e7240
}

.avatar.blue {
  background: #e6edf2;
  color: #617b91
}

.avatar.pink {
  background: #f0e7e2;
  color: #9d7261
}

.avatar.dark {
  background: #ccd6be;
  color: #314e3f
}

.avatar.lg {
  width: 56px;
  height: 56px;
  font-size: 18px
}

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

.workspace {
  margin-left: var(--sidebar);
  min-height: 100vh
}

.topbar {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: #f9faf5
}

.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  color: #8a928b
}

.breadcrumb strong {
  font-weight: 500;
  color: var(--ink)
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto
}

.search-trigger {
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #8b928c;
  font-size: 11px
}

.key {
  border: 1px solid #dfe3d9;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 9px;
  color: #929b92
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative
}

.icon-button:hover {
  background: #e8ece3
}

.notification-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  position: absolute;
  top: 6px;
  right: 7px
}

.top-divider {
  height: 22px;
  width: 1px;
  background: var(--line)
}

.demo-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #dfdfd1;
  border-radius: 4px;
  color: #7e846f;
  font-size: 9px;
  letter-spacing: .4px;
  padding: 3px 7px;
  white-space: nowrap
}

.demo-label:before {
  content: '';
  width: 4px;
  height: 4px;
  background: #a6a98a;
  border-radius: 50%
}

.mobile-menu {
  display: none
}

.main {
  padding: 30px 34px 24px;
  max-width: 1720px;
  margin: auto
}

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

.page-heading p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px
}

.page-heading .eyebrow {
  margin-bottom: 10px
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 9px
}

.btn {
  min-height: 36px;
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #dfe3d8;
  border-radius: 7px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, transform .15s
}

.btn:hover {
  background: #f5f5ef;
  border-color: #cbd2c3
}

.btn:active {
  transform: translateY(1px)
}

.btn.primary {
  background: var(--nav);
  color: #fff;
  border-color: var(--nav)
}

.btn.primary:hover {
  background: #2c4339
}

.btn.gold {
  background: var(--gold-light);
  border-color: #e4d9bf;
  color: #76602e
}

.btn.ghost {
  background: transparent;
  border-color: transparent
}

.btn.danger {
  color: var(--red);
  border-color: #ecd1c7
}

.btn.sm {
  min-height: 29px;
  padding: 5px 9px;
  font-size: 10px
}

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

.text-button {
  border: 0;
  background: none;
  font-size: 11px;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  font-weight: 500
}

.text-button:hover {
  color: #172522
}

.text-button .icon {
  width: 14px;
  height: 14px
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  color: #949b91;
  letter-spacing: .1px
}

/* Metrics and charts */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px
}

.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  min-height: 136px
}

.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #727c71
}

.metric-label .icon {
  color: #a0a792;
  width: 16px;
  height: 16px
}

.metric-value {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -1.2px;
  margin: 12px 0 12px;
  font-weight: 500;
  display: flex;
  align-items: baseline;
  gap: 6px
}

.metric-value small {
  font-size: 12px;
  color: #7f8a7d;
  letter-spacing: 0;
  font-weight: 400
}

.metric-foot {
  font-size: 10px;
  display: flex;
  gap: 5px;
  align-items: center;
  color: var(--muted)
}

.metric-foot .icon {
  width: 12px;
  height: 12px
}

.metric.featured {
  background: #23382f;
  color: #f8f8f2;
  border-color: #23382f
}

.metric.featured .metric-label {
  color: #c2cdbb
}

.metric.featured .metric-label .icon {
  color: #a5bc9d
}

.metric.featured .metric-foot {
  color: #b7c4af
}

.metric.featured .positive {
  color: #c7dcaf
}

.metric.featured:after {
  content: '';
  width: 130px;
  height: 130px;
  position: absolute;
  right: -55px;
  top: 38px;
  border: 1px solid #ffffff09;
  border-radius: 50%;
  box-shadow: 0 0 0 22px #ffffff03, 0 0 0 44px #ffffff02
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden
}

.panel-head {
  padding: 20px 21px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px
}

.panel-head p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px
}

.panel-body {
  padding: 20px 21px
}

.panel-head+.panel-body {
  padding-top: 17px
}

.chart-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 15px 21px 0;
  gap: 10px
}

.chart-total {
  font-size: 24px;
  letter-spacing: -.7px;
  line-height: 1.25;
  font-weight: 500
}

.chart-total small {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0;
  display: block;
  margin-top: 4px;
  font-weight: 400
}

.legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 9px;
  flex-wrap: wrap
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px
}

.swatch {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 2px
}

.swatch.gold {
  background: #c6b386
}

.swatch.light {
  background: #dce2d6
}

.chart {
  padding: 12px 18px 4px;
  width: 100%
}

.chart svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible
}

.chart text {
  font-family: var(--font);
  font-size: 9px;
  fill: #8a9387
}

.chart .gridline {
  stroke: #eceee8;
  stroke-dasharray: 3 4
}

.chart rect.bar:hover {
  fill: #b69b64
}

.chart-summary {
  border-top: 1px solid var(--line);
  padding: 13px 21px;
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px
}

.chart-summary .icon {
  color: var(--gold);
  width: 14px;
  height: 14px
}

.pulse {
  background: #f0eddf;
  border-color: #e6e0cd
}

.pulse .panel-head {
  padding-top: 18px
}

.pulse-mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: #776741;
  font-weight: 600
}

.pulse-mark .icon {
  width: 15px;
  height: 15px
}

.pulse-date {
  font-size: 9px;
  color: #8e866e
}

.pulse h3 {
  font-size: 19px;
  letter-spacing: -.6px;
  line-height: 1.3;
  font-weight: 500;
  margin-bottom: 9px
}

.pulse p {
  font-size: 11px;
  line-height: 1.7;
  color: #7b7b64
}

.pulse .panel-body {
  padding: 17px 21px 19px
}

.pulse .btn {
  background: #fbf9f1;
  border-color: #ddd5bf;
  margin-top: 15px;
  width: 100%;
  justify-content: space-between;
  color: #6e613e
}

.pipeline-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 3px
}

.stage-preview {
  padding-right: 6px
}

.stage-preview .stage-name {
  font-size: 10px;
  color: var(--muted)
}

.stage-preview strong {
  font-size: 19px;
  font-weight: 500;
  display: block;
  margin: 7px 0 2px;
  letter-spacing: -.5px
}

.stage-preview small {
  font-size: 9px;
  color: var(--muted)
}

.stage-line {
  height: 4px;
  border-radius: 4px;
  background: #d5dfd4;
  margin-top: 13px
}

.stage-preview:nth-child(2) .stage-line {
  background: #aebfad
}

.stage-preview:nth-child(3) .stage-line {
  background: #c6b386
}

.stage-preview:nth-child(4) .stage-line {
  background: #3f6653
}

.panel-toolbar {
  padding: 13px 20px;
  background: #fafbf8;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px
}

.mini-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: #f1f3ed;
  border: 1px solid #e7eadf;
  border-radius: 7px
}

.mini-tabs button {
  background: transparent;
  border: 0;
  padding: 4px 10px;
  color: #8a9386;
  border-radius: 4px;
  font-size: 10px
}

.mini-tabs button.active {
  background: #fff;
  box-shadow: 0 1px 3px #00000008;
  color: var(--ink)
}

.task-list {
  padding: 5px 20px 10px
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f1eb
}

.task-item:last-child {
  border: 0
}

.check-circle {
  width: 15px;
  height: 15px;
  min-width: 15px;
  border: 1px solid #c4cdbd;
  background: #fff;
  border-radius: 50%;
  margin-top: 2px;
  padding: 0;
  display: grid;
  place-items: center
}

.check-circle:hover {
  border-color: var(--green);
  background: #f0f4eb
}

.check-circle.checked {
  border-color: var(--green);
  background: var(--green);
  color: #fff
}

.check-circle .icon {
  width: 11px;
  height: 11px
}

.task-copy {
  flex: 1;
  font-size: 11px
}

.task-copy small {
  display: block;
  color: #999f93;
  font-size: 9px;
  margin-top: 3px
}

.task-item.done .task-copy {
  text-decoration: line-through;
  color: #a1a79b
}

.task-due {
  font-size: 9px;
  color: #a58b50;
  margin-top: 1px
}

.task-due.late {
  color: var(--red)
}

.activity-list {
  padding: 8px 21px 12px
}

.activity {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  position: relative
}

.activity:not(:last-child):after {
  content: '';
  width: 1px;
  background: #ebeee5;
  position: absolute;
  top: 37px;
  bottom: -5px;
  left: 13px
}

.activity-icon {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #f0f3ea;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #7a8c6c
}

.activity-icon .icon {
  width: 13px;
  height: 13px
}

.activity-copy {
  font-size: 10px;
  padding-top: 1px
}

.activity-copy small {
  display: block;
  font-size: 9px;
  color: #9ba293;
  margin-top: 4px
}

.tiny-progress {
  height: 5px;
  background: #ecf0e6;
  border-radius: 4px;
  overflow: hidden
}

.tiny-progress span {
  display: block;
  height: 100%;
  background: #9aaf8c;
  border-radius: 4px
}

/* Lists and records */
.tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 21px;
  overflow: auto
}

.tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  padding: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap
}

.tabs button.active {
  border-bottom-color: var(--ink);
  color: var(--ink);
  font-weight: 500
}

.tabs .count {
  margin-left: 5px;
  font-size: 9px;
  background: #e8ece1;
  border-radius: 4px;
  padding: 2px 5px
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line)
}

.input-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fcfcf9;
  padding: 7px 10px;
  max-width: 300px;
  min-width: 200px
}

.input-search .icon {
  width: 15px;
  height: 15px;
  color: #929a8a
}

.input-search input {
  border: 0;
  outline: none;
  width: 100%;
  background: none;
  font-size: 11px;
  color: var(--ink)
}

.input-search:focus-within {
  outline: 2px solid #b3934f66
}

.select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 28px 7px 10px;
  color: #677360;
  background: #fff;
  font-size: 11px;
  max-width: 100%
}

.table-wrap {
  overflow: auto
}

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

th {
  font-weight: 400;
  color: #92998d;
  font-size: 9px;
  padding: 12px 20px;
  background: #fcfcfa;
  border-bottom: 1px solid var(--line);
  white-space: nowrap
}

td {
  padding: 14px 20px;
  border-bottom: 1px solid #eef0e9;
  vertical-align: middle
}

tr:last-child td {
  border: 0
}

tbody tr {
  transition: background .12s
}

tbody tr:hover {
  background: #fafbf6
}

.cell-title {
  font-weight: 500;
  font-size: 11px;
  display: block;
  white-space: nowrap
}

.cell-sub {
  font-size: 9px;
  color: var(--muted);
  margin-top: 3px;
  display: block;
  white-space: nowrap
}

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

.cell-link {
  padding: 0;
  background: none;
  border: 0;
  text-align: left
}

.cell-link:hover .cell-title {
  color: var(--green)
}

.table-footer {
  border-top: 1px solid var(--line);
  padding: 13px 20px;
  display: flex;
  justify-content: space-between;
  color: #939b8b;
  font-size: 10px;
  align-items: center
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 500;
  background: #f0f2eb;
  color: #7c8771
}

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

.badge.green {
  background: #edf4eb;
  color: #5c8455
}

.badge.gold {
  background: #f8f2e3;
  color: #ab8b43
}

.badge.red {
  background: #fcf0eb;
  color: #b86a54
}

.badge.blue {
  background: #edf2f6;
  color: #6d8da5
}

.badge.gray {
  background: #f1f2ed;
  color: #8c9484
}

.badge.no-dot:before {
  display: none
}

.chip {
  font-size: 9px;
  padding: 3px 7px;
  border: 1px solid #e4e8dd;
  border-radius: 4px;
  color: #8b9680;
  white-space: nowrap
}

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

.empty>.icon {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  color: #a9b59d
}

.empty h3 {
  color: var(--ink);
  font-size: 16px;
  margin-bottom: 7px
}

.empty p {
  font-size: 12px;
  margin-bottom: 18px
}

.stats-inline {
  display: flex;
  gap: 32px;
  margin-bottom: 24px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px
}

.stats-inline strong {
  font-size: 23px;
  font-weight: 500;
  display: block;
  letter-spacing: -.7px;
  margin-top: 5px
}

.stats-inline small {
  color: var(--muted);
  font-size: 10px
}

.stats-inline>div {
  flex: 1;
  border-right: 1px solid var(--line)
}

.stats-inline>div:last-child {
  border: 0
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px
}

.filter-bar .spacer {
  min-width: 10px
}

.kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  gap: 16px;
  overflow: auto;
  padding-bottom: 15px
}

.kanban-column {
  background: #ebece5;
  border: 1px solid #e3e6db;
  border-radius: 10px;
  padding: 12px;
  min-height: 510px;
  transition: background .15s
}

.kanban-column.drag-over {
  background: #e1e8d9;
  outline: 2px dashed #7c9a6d
}

.kanban-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 2px 12px;
  border-bottom: 1px solid #dce0d3;
  margin-bottom: 12px
}

.kanban-head h3 {
  font-size: 11px;
  font-weight: 500;
  display: flex;
  gap: 7px;
  align-items: center
}

.kanban-head small {
  font-size: 9px;
  color: #89957d
}

.kanban-head .stage-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b4c1ab
}

.kanban-column:nth-child(2) .stage-dot {
  background: #88a381
}

.kanban-column:nth-child(3) .stage-dot {
  background: #c6af7a
}

.kanban-column:nth-child(4) .stage-dot {
  background: #4e7458
}

.deal-card {
  border: 1px solid #dfe4d6;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 15px;
  box-shadow: 0 2px 2px #25322003;
  cursor: grab
}

.deal-card:active {
  cursor: grabbing
}

.deal-card h3 {
  font-size: 12px;
  line-height: 1.5;
  margin: 9px 0 2px;
  font-weight: 500
}

.deal-card p {
  font-size: 10px;
  color: #8e9784
}

.deal-value {
  font-size: 18px;
  letter-spacing: -.5px;
  margin-top: 14px
}

.deal-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eef0e8;
  margin-top: 13px;
  padding-top: 11px
}

.deal-date {
  font-size: 9px;
  color: #95a087;
  display: flex;
  align-items: center;
  gap: 4px
}

.deal-date .icon {
  width: 12px;
  height: 12px
}

.add-deal {
  border: 1px dashed #d0d9c4;
  background: none;
  width: 100%;
  border-radius: 6px;
  padding: 9px;
  color: #8a997a;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px
}

.add-deal .icon {
  width: 13px;
  height: 13px
}

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

.job-card {
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius)
}

.job-card h3 {
  font-size: 15px;
  margin: 17px 0 5px;
  letter-spacing: -.2px
}

.job-card p {
  font-size: 11px;
  color: var(--muted)
}

.job-card .tiny-progress {
  margin: 20px 0 9px
}

.job-card .job-footer {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.job-progress {
  font-size: 9px;
  color: var(--muted);
  display: flex;
  justify-content: space-between
}

.member-card {
  padding: 24px;
  text-align: center
}

.member-card .avatar {
  margin-bottom: 14px
}

.member-card h3 {
  font-size: 16px;
  margin-bottom: 4px
}

.member-card .badge {
  margin: 14px 0
}

.member-card .member-meta {
  padding: 15px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted)
}

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

.doc-card {
  padding: 19px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left
}

.doc-card:hover {
  border-color: #c0cbb4
}

.doc-cover {
  height: 92px;
  background: #f5f5ee;
  border-radius: 6px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  position: relative;
  overflow: hidden
}

.doc-cover .icon {
  width: 30px;
  height: 30px;
  color: #9caa8a
}

.doc-card h3 {
  font-size: 11px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.doc-card small {
  font-size: 9px;
  color: var(--muted)
}

.doc-card .row {
  justify-content: space-between;
  margin-top: 10px
}

.document-icon {
  width: 34px;
  height: 40px;
  border: 1px solid #e2d9bf;
  background: #f9f5e8;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #a99056
}

.timeline {
  border-left: 1px solid var(--line);
  margin-left: 8px;
  padding-left: 24px
}

.timeline-item {
  position: relative;
  padding: 0 0 25px
}

.timeline-item:before {
  content: '';
  position: absolute;
  left: -29px;
  top: 5px;
  background: #d8e0ce;
  border: 3px solid white;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-sizing: content-box
}

.timeline-item p {
  font-size: 12px
}

.timeline-item small {
  color: var(--muted);
  display: block;
  margin-top: 5px
}

/* Schedule, reports, settings */
.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr)
}

.calendar-weekdays>div {
  text-align: center;
  padding: 15px 5px;
  font-size: 10px;
  color: var(--muted);
  border-bottom: 1px solid var(--line)
}

.calendar-day {
  min-height: 104px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 9px;
  cursor: pointer;
  background: #fff;
  text-align: left;
  transition: background .15s
}

.calendar-day:nth-child(7n) {
  border-right: 0
}

.calendar-day:hover {
  background: #f8f9f2
}

.calendar-day.outside {
  background: #fafbf6;
  color: #c0c7b6
}

.day-number {
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  width: 24px;
  height: 24px
}

.calendar-day.today .day-number {
  background: var(--nav);
  color: white;
  border-radius: 50%
}

.calendar-day.selected {
  box-shadow: inset 0 0 0 1px #9ba987;
  background: #f7f8ee
}

.cal-event {
  display: block;
  padding: 3px 5px;
  background: #edf2e8;
  color: #778c64;
  border-radius: 3px;
  font-size: 8px;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.cal-event.gold {
  background: #f7efdc;
  color: #a68f54
}

.agenda-item {
  padding: 13px 0;
  border-bottom: 1px solid var(--line)
}

.agenda-item:last-child {
  border: 0
}

.agenda-item small {
  color: var(--gold);
  font-size: 9px
}

.agenda-item h3 {
  font-size: 12px;
  margin: 6px 0 3px
}

.agenda-item p {
  font-size: 10px;
  color: var(--muted)
}

.reports-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px
}

.donut-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 28px 20px
}

.donut {
  width: 150px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(#5a785b 0 65%, #c2ae79 65% 83%, #b9795d 83% 93%, #e0e5d7 93%)
}

.donut:before {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: white
}

.donut-label {
  position: relative;
  text-align: center
}

.donut-label strong {
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -.8px;
  display: block
}

.donut-label small {
  color: var(--muted);
  font-size: 9px
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 100px
}

.donut-legend .row {
  gap: 7px;
  font-size: 10px
}

.donut-legend .num {
  margin-left: auto;
  font-size: 10px
}

.horizontal-bars {
  display: flex;
  flex-direction: column;
  gap: 19px
}

.bar-row .row {
  justify-content: space-between;
  font-size: 10px;
  margin-bottom: 8px
}

.bar-row .tiny-progress {
  height: 7px
}

.settings-layout {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr);
  gap: 28px
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 4px
}

.settings-nav button {
  text-align: left;
  padding: 11px 12px;
  background: none;
  border: 0;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted)
}

.settings-nav button.active {
  background: #e9ede1;
  color: var(--ink);
  font-weight: 500
}

.settings-section {
  max-width: 800px
}

.settings-section .panel {
  margin-bottom: 22px
}

.setting-row {
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  border-bottom: 1px solid var(--line)
}

.setting-row:last-child {
  border-bottom: 0
}

.setting-row h3 {
  font-size: 12px;
  margin-bottom: 4px
}

.setting-row p {
  font-size: 11px;
  color: var(--muted)
}

.switch {
  width: 34px;
  height: 20px;
  border: 0;
  border-radius: 20px;
  background: #d7decd;
  padding: 3px;
  flex-shrink: 0;
  position: relative
}

.switch:after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s
}

.switch.on {
  background: #617e58
}

.switch.on:after {
  transform: translateX(14px)
}

.integration-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px
}

.integration-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #edf1e7;
  display: grid;
  place-items: center;
  font-weight: 600;
  color: #798b67
}

.automation-card {
  padding: 22px
}

.automation-flow {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 20px 0 15px
}

.automation-step {
  background: #f2f4ec;
  border: 1px solid #e4e9da;
  border-radius: 6px;
  padding: 9px;
  font-size: 10px;
  flex: 1
}

.automation-step .eyebrow {
  font-size: 8px;
  letter-spacing: .6px;
  margin-bottom: 5px;
  display: block
}

.automation-card p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px
}

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

/* Forms, dialogs, record drawer */
.overlay {
  position: fixed;
  inset: 0;
  background: #15221a60;
  backdrop-filter: blur(3px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  animation: fade-in .15s ease
}

.modal {
  background: #fafbf7;
  border-radius: 14px;
  width: 560px;
  max-width: 100%;
  max-height: 90vh;
  box-shadow: 0 20px 90px #11211630;
  display: flex;
  flex-direction: column;
  overflow: hidden
}

.modal.wide {
  width: 780px
}

.modal-head {
  padding: 22px 25px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 12px
}

.modal-head h2 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -.7px
}

.modal-head p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px
}

.modal-body {
  padding: 24px 25px;
  overflow: auto
}

.modal-footer {
  padding: 16px 25px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  background: #f7f9f2
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px
}

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

.field.full {
  grid-column: 1/-1
}

.field>label {
  font-size: 11px;
  font-weight: 500;
  color: #62705b
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #dfe6d5;
  border-radius: 6px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  min-height: 38px
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid #b3934f44;
  border-color: #b3bf9f
}

.form-note {
  padding: 12px;
  border: 1px solid #e8e2cb;
  background: #f5f1e3;
  border-radius: 6px;
  color: #8f8155;
  font-size: 10px;
  line-height: 1.6;
  grid-column: 1/-1
}

.drawer-overlay {
  justify-content: flex-end;
  padding: 0;
  backdrop-filter: blur(1px)
}

.drawer {
  width: 560px;
  max-width: 100%;
  height: 100%;
  background: #fafbf7;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 60px #15221a20;
  animation: slide-in .18s ease
}

.drawer .modal-head {
  padding: 23px 27px
}

.drawer-content {
  overflow: auto;
  padding: 26px
}

.drawer-hero {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 24px
}

.drawer-hero h2 {
  font-size: 24px;
  letter-spacing: -.8px;
  margin-bottom: 5px;
  font-weight: 500
}

.drawer-hero p {
  font-size: 11px;
  color: var(--muted)
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 21px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px
}

.detail-grid dt {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px
}

.detail-grid dd {
  font-size: 12px;
  margin: 0
}

.drawer-section {
  margin-top: 24px
}

.drawer-section>h3 {
  margin-bottom: 14px
}

.drawer-section .note {
  padding: 15px;
  border: 1px solid #e1e8d7;
  border-radius: 7px;
  background: #f2f6eb;
  font-size: 11px;
  color: #7c8d6b
}

.document-preview {
  background: white;
  border: 1px solid var(--line);
  padding: 30px
}

.document-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px
}

.document-brand {
  display: flex;
  gap: 9px;
  align-items: center;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -.5px
}

.document-brand img {
  width: 29px
}

.document-title {
  text-align: right
}

.document-title h2 {
  font-size: 22px
}

.document-title small {
  font-size: 10px;
  color: var(--muted)
}

.invoice-to {
  display: flex;
  justify-content: space-between;
  margin-bottom: 25px;
  font-size: 11px
}

.invoice-to .eyebrow {
  margin-bottom: 6px;
  font-size: 8px
}

.document-preview th,
.document-preview td {
  padding: 13px 0
}

.document-totals {
  margin: 20px 0 24px auto;
  max-width: 230px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 11px
}

.document-totals>div {
  display: flex;
  justify-content: space-between
}

.document-totals .total {
  font-size: 16px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
  margin-top: 3px
}

.document-note {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 9px;
  color: var(--muted);
  line-height: 1.7
}

.signature {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 21px;
  color: #677658;
  padding: 18px 0 9px
}

.search-modal .modal-body {
  padding: 8px
}

.global-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line)
}

.global-search input {
  border: 0;
  background: transparent;
  outline: none;
  font-size: 15px;
  flex: 1;
  min-width: 0
}

.search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: none;
  text-align: left;
  border-radius: 7px
}

.search-result:hover {
  background: #edf2e5
}

.search-result strong {
  font-size: 12px;
  font-weight: 500;
  display: block
}

.search-result small {
  font-size: 10px;
  color: var(--muted)
}

.notification {
  display: flex;
  gap: 13px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line)
}

.notification p {
  font-size: 12px
}

.notification small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
  display: block
}

.business-option {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 12px;
  text-align: left
}

.business-option.active {
  border-color: #9caf84;
  background: #f4f7ec
}

.business-option strong {
  display: block;
  font-size: 13px
}

.business-option small {
  font-size: 10px;
  color: var(--muted)
}

.toast {
  position: fixed;
  bottom: 24px;
  left: calc(50% + 112px);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: #24382c;
  color: #fff;
  padding: 12px 19px;
  border-radius: 8px;
  box-shadow: 0 7px 30px #14231620;
  z-index: 110;
  font-size: 12px;
  transition: opacity .2s, transform .2s;
  max-width: calc(100vw - 40px);
  text-align: center
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0)
}

.demo-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #e3ddc7;
  background: #f4f0e4;
  color: #958151;
  padding: 11px 15px;
  border-radius: 8px;
  font-size: 11px;
  margin-bottom: 20px
}

.demo-banner .icon {
  width: 15px;
  height: 15px
}

.task-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px
}

.all-task .task-item {
  padding: 18px 0
}

.all-task .task-copy {
  font-size: 13px
}

.all-task .task-copy small {
  font-size: 10px
}

.note-input {
  display: flex;
  gap: 8px;
  margin-top: 12px
}

.note-input input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px;
  flex: 1;
  min-width: 0
}

.notes-entry {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px
}

.notes-entry small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 5px
}

.quote-items {
  width: 100%;
  margin: 10px 0
}

.quote-item {
  display: grid;
  grid-template-columns: 1fr 68px 100px 30px;
  gap: 8px;
  align-items: center;
  margin-top: 10px
}

.quote-item input {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  width: 100%;
  min-width: 0
}

.quote-labels {
  font-size: 9px;
  color: var(--muted)
}

.quote-total-preview {
  text-align: right;
  margin-top: 18px;
  font-size: 20px;
  font-weight: 500
}

.audit-message {
  padding: 15px;
  border-left: 2px solid #c7b989;
  background: #f5f2e6;
  color: #87764f;
  font-size: 11px;
  margin-bottom: 18px
}

@keyframes fade-in {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes slide-in {
  from {
    transform: translateX(30px);
    opacity: .4
  }

  to {
    transform: translateX(0);
    opacity: 1
  }
}

/* Responsive layouts */
@media(min-width:1600px) {
  .main {
    padding: 38px 46px
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 330px
  }

  .metric {
    padding: 22px 24px
  }

  .metric-value {
    font-size: 35px
  }

  .chart {
    padding-top: 20px
  }
}

@media(max-width:1240px) {
  :root {
    --sidebar: 200px
  }

  .sidebar {
    padding-left: 12px;
    padding-right: 12px
  }

  .main {
    padding: 25px
  }

  .topbar {
    padding: 0 25px
  }

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

  .metrics {
    gap: 12px
  }

  .metric {
    padding: 16px;
    min-height: 130px
  }

  .metric-value {
    font-size: 27px
  }

  .metric-foot {
    font-size: 9px
  }

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

  .calendar-layout {
    grid-template-columns: minmax(0, 1fr)
  }

  .calendar-layout>.panel:last-child {
    display: none
  }

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

  td,
  th {
    padding-left: 15px;
    padding-right: 15px
  }

  .toast {
    left: calc(50% + 100px)
  }
}

@media(max-width:1050px) {
  .dashboard-grid {
    grid-template-columns: 1fr
  }

  .dashboard-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start
  }

  .dashboard-aside>.panel:last-child {
    grid-column: 1/-1
  }

  .dashboard-aside .activity-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px
  }

  .dashboard-aside .activity:after {
    display: none
  }

  .page-heading {
    align-items: flex-start
  }

  .heading-actions {
    flex-wrap: wrap;
    justify-content: flex-end
  }

  .top-actions {
    gap: 10px
  }

  .search-trigger span {
    display: none
  }

  .reports-grid {
    grid-template-columns: 1fr
  }

  .panel-head {
    padding-left: 18px;
    padding-right: 18px
  }
}

@media(max-width:800px) {
  :root {
    --sidebar: 0px
  }

  .sidebar {
    width: 240px;
    transform: translateX(-100%);
    transition: transform .2s
  }

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

  .mobile-shade {
    display: none;
    position: fixed;
    inset: 0;
    background: #17252280;
    z-index: 35
  }

  .mobile-shade.open {
    display: block
  }

  .workspace {
    margin-left: 0
  }

  .topbar {
    height: 64px;
    padding: 0 20px;
    gap: 12px
  }

  .mobile-menu {
    display: inline-flex
  }

  .breadcrumb {
    font-size: 10px
  }

  .main {
    padding: 25px 20px
  }

  .page-heading {
    margin-bottom: 23px
  }

  h1 {
    font-size: 28px
  }

  .top-actions {
    gap: 9px
  }

  .topbar .demo-label {
    font-size: 8px
  }

  .metrics {
    gap: 12px
  }

  .metric {
    padding: 16px
  }

  .metric-value {
    font-size: 27px
  }

  .toast {
    left: 50%
  }

  .settings-layout {
    grid-template-columns: 1fr
  }

  .settings-nav {
    flex-direction: row;
    overflow: auto;
    gap: 6px
  }

  .settings-nav button {
    white-space: nowrap
  }

  .settings-section {
    max-width: none
  }

  .document-grid {
    grid-template-columns: repeat(3, 1fr)
  }

  .task-board {
    grid-template-columns: 1fr
  }

  .kanban {
    grid-template-columns: repeat(4, 260px)
  }

  .settings-nav button {
    font-size: 11px
  }

  .page-heading .eyebrow {
    font-size: 9px
  }

  .footer {
    font-size: 9px
  }
}

@media(max-width:580px) {
  .main {
    padding: 22px 16px 20px
  }

  .topbar {
    padding: 0 13px;
    gap: 7px
  }

  .topbar .breadcrumb>span,
  .topbar .breadcrumb>.icon {
    display: none
  }

  .top-divider {
    display: none
  }

  .topbar .demo-label {
    display: none
  }

  .top-actions {
    gap: 7px
  }

  .topbar .avatar {
    width: 28px;
    height: 28px;
    font-size: 10px
  }

  .page-heading {
    display: block
  }

  .page-heading h1 {
    font-size: 28px;
    letter-spacing: -1px
  }

  .page-heading p {
    font-size: 11px;
    line-height: 1.6
  }

  .heading-actions {
    margin-top: 17px;
    justify-content: flex-start;
    gap: 7px
  }

  .heading-actions .btn {
    font-size: 10px;
    min-height: 34px
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
    margin-bottom: 18px
  }

  .metric {
    padding: 15px 14px;
    min-height: 125px;
    border-radius: 10px
  }

  .metric-label {
    font-size: 10px
  }

  .metric-value {
    font-size: 27px;
    margin: 11px 0 10px
  }

  .metric-foot {
    font-size: 8px;
    gap: 4px
  }

  .metric-label .icon {
    width: 14px;
    height: 14px
  }

  .dashboard-grid {
    gap: 18px
  }

  .dashboard-aside {
    display: flex;
    flex-direction: column;
    gap: 18px
  }

  .dashboard-aside>.panel {
    width: 100%
  }

  .dashboard-aside .activity-list {
    display: block
  }

  .dashboard-aside .activity:after {
    display: block
  }

  .panel-head {
    padding: 17px 16px 0
  }

  .panel-head h2 {
    font-size: 14px
  }

  .panel-body {
    padding: 17px 16px
  }

  .panel-head+.panel-body {
    padding-top: 16px
  }

  .chart-top {
    padding: 14px 16px 0;
    align-items: flex-start
  }

  .chart-total {
    font-size: 22px
  }

  .legend {
    font-size: 8px;
    gap: 9px
  }

  .chart {
    padding: 8px 9px 4px
  }

  .chart-summary {
    padding: 12px 16px;
    font-size: 9px
  }

  .mini-tabs button {
    padding: 4px 7px;
    font-size: 9px
  }

  .pipeline-strip {
    gap: 10px
  }

  .stage-preview .stage-name {
    font-size: 9px
  }

  .stage-preview strong {
    font-size: 16px
  }

  .stage-preview small {
    font-size: 8px
  }

  .pipeline-strip .stage-preview:last-child {
    padding: 0
  }

  .table-toolbar {
    padding: 13px;
    gap: 9px;
    flex-wrap: wrap
  }

  .input-search {
    min-width: 150px;
    max-width: none;
    flex: 1
  }

  .filter-bar {
    flex-wrap: wrap
  }

  .filter-bar .input-search {
    flex-basis: 100%
  }

  .filter-bar .spacer {
    display: none
  }

  .table-footer {
    padding: 12px 15px;
    font-size: 9px
  }

  td,
  th {
    padding: 12px 15px
  }

  .tabs {
    gap: 21px;
    margin-bottom: 18px
  }

  .tabs button {
    font-size: 11px
  }

  .card-grid {
    grid-template-columns: 1fr
  }

  .document-grid {
    grid-template-columns: 1fr 1fr;
    gap: 11px
  }

  .doc-card {
    padding: 14px
  }

  .stats-inline {
    padding: 15px;
    gap: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr
  }

  .stats-inline>div:nth-child(2) {
    border: 0
  }

  .stats-inline strong {
    font-size: 22px
  }

  .stats-inline small {
    font-size: 9px
  }

  .calendar-day {
    min-height: 75px;
    padding: 4px
  }

  .day-number {
    font-size: 10px;
    width: 23px;
    height: 23px
  }

  .cal-event {
    font-size: 7px;
    padding: 2px;
    margin-top: 3px
  }

  .calendar-weekdays>div {
    font-size: 9px
  }

  .calendar-layout .panel-head {
    flex-wrap: wrap
  }

  .calendar-layout {
    gap: 17px
  }

  .calendar-layout>.panel:last-child {
    display: block
  }

  .footer {
    display: block;
    line-height: 2
  }

  .footer span {
    display: block
  }

  .overlay {
    padding: 14px
  }

  .modal {
    max-height: 94vh;
    border-radius: 12px
  }

  .modal-head {
    padding: 18px
  }

  .modal-body {
    padding: 18px
  }

  .modal-footer {
    padding: 15px 18px
  }

  .modal-head h2 {
    font-size: 19px
  }

  .form-grid {
    gap: 15px
  }

  .form-grid>.field {
    grid-column: 1/-1
  }

  .drawer-overlay {
    padding: 0
  }

  .drawer .modal-head {
    padding: 18px
  }

  .drawer-content {
    padding: 20px
  }

  .document-preview {
    padding: 19px 15px
  }

  .document-title h2 {
    font-size: 18px
  }

  .document-brand {
    font-size: 16px
  }

  .document-header {
    gap: 10px
  }

  .quote-item {
    grid-template-columns: 1fr 42px 72px 24px;
    gap: 5px
  }

  .quote-item input {
    font-size: 10px;
    padding: 7px 5px
  }

  .setting-row {
    gap: 12px
  }

  .integration-card {
    gap: 9px;
    padding: 13px
  }

  .integration-card h3 {
    font-size: 11px
  }

  .integration-card .btn {
    font-size: 9px;
    padding: 5px 8px
  }

  .setting-row p {
    font-size: 10px
  }

  .donut-wrap {
    gap: 20px
  }

  .donut {
    width: 135px
  }

  .task-due {
    font-size: 9px
  }

  .demo-banner {
    font-size: 10px
  }

  .notes-entry {
    font-size: 11px
  }

  .kanban {
    margin-left: -2px;
    margin-right: -2px
  }

  .toast {
    bottom: 20px;
    width: max-content;
    max-width: calc(100vw - 28px);
    font-size: 11px
  }
}

.stack,
.panel,
.dashboard-grid>*,
.reports-grid>*,
.calendar-layout>* {
  min-width: 0
}

.calendar-day {
  min-width: 0;
  overflow: hidden
}

.doc-card {
  min-width: 0
}

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

  .doc-card .row {
    flex-wrap: wrap;
    gap: 6px
  }
}

.modal-footer {
  flex-wrap: wrap
}

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

@media(max-width:580px) {
  .metric-foot {
    font-size: 9px;
    flex-wrap: wrap;
    gap: 2px 4px
  }

  .metric {
    min-height: 135px
  }

  .nav-item {
    min-height: 42px;
    font-size: 13px
  }

  .sidebar .workspace-picker strong {
    font-size: 12px
  }

  .sidebar .workspace-picker small {
    font-size: 10px
  }

  .panel-head>div:first-child {
    min-width: 0
  }

  .panel-head p {
    max-width: 180px
  }

  .mini-tabs {
    flex-shrink: 0
  }

  .field input,
  .field select,
  .field textarea,
  .note-input input,
  .input-search input {
    font-size: 16px
  }

  .btn {
    min-height: 38px
  }

  .modal-footer .btn {
    flex: 1
  }

  .drawer-content {
    overflow-x: hidden
  }

  .detail-grid dd {
    overflow-wrap: anywhere
  }

  .quote-item input {
    font-size: 14px
  }

  .calendar-layout {
    grid-template-columns: minmax(0, 1fr)
  }
}

@media(prefers-reduced-motion:reduce) {

  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important
  }
}

@media print {
  body {
    background: white
  }

  .sidebar,
  .topbar,
  .main,
  .toast,
  .modal-head,
  .modal-footer,
  .skip-link {
    display: none !important
  }

  .overlay {
    position: static;
    display: block;
    background: white;
    padding: 0;
    backdrop-filter: none
  }

  .modal,
  .modal.wide {
    display: block;
    max-width: none;
    width: 100%;
    max-height: none;
    box-shadow: none;
    border: 0;
    overflow: visible;
    background: white
  }

  .modal-body {
    padding: 0;
    overflow: visible
  }

  .document-preview {
    border: 0;
    padding: 20px
  }

  .document-preview table {
    font-size: 12px
  }

  .document-preview th,
  .document-preview td {
    padding: 16px 0
  }

  .document-preview .badge {
    border: 1px solid #ddd
  }

  body:has(.overlay) .workspace {
    display: none
  }

  .modal-body>.audit-message {
    display: none
  }
}


/* Rivora refinement: typography, motion, and touch layouts. */
:root {
  --bg: #f6f5f1;
  --ink: #26312d;
  --muted: #6d776f;
  --nav: #1b2b25;
  --line: #e5e8df;
  --radius: 9px;
  --font: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, .68, 0, 1);
  --fast: 140ms;
  --normal: 240ms;
}
body { font-size: 14px; line-height: 1.5; text-rendering: optimizeLegibility; }
button, a { touch-action: manipulation; }
h1 { font-size: 30px; font-weight: 600; letter-spacing: -.9px; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: -.3px; }
h3 { font-weight: 600; }
.small { font-size: 13px; }
.eyebrow { text-transform: none; font-size: 12px; letter-spacing: 0; font-weight: 400; }
.main { padding-top: 28px; }
.main:focus { outline: none; }
.page-heading { align-items: center; margin-bottom: 25px; }
.page-heading p { font-size: 13px; margin-top: 7px; }
.page-heading .eyebrow { margin-bottom: 8px; color: #7e877c; }
.brand-name { font-size: 25px; letter-spacing: -.9px; }
.brand-name small { font-size: 8px; letter-spacing: 2.3px; }
.brand { padding-bottom: 25px; }
.sidebar-brand-row { display: flex; align-items: flex-start; justify-content: space-between; }
.mobile-brand, .mobile-nav, .mobile-close, .mobile-pipeline-controls { display: none; }
.nav-item { font-size: 13px; padding-top: 9px; padding-bottom: 9px; border-radius: 6px; transition: background var(--fast), color var(--fast); }
.nav-label { letter-spacing: 1px; color: #9cae9f; font-size: 9px; }
.nav-item.active { background: #d6c59c; font-weight: 500; }
.workspace-picker strong { font-size: 12px; }
.workspace-picker small, .user-button small { font-size: 11px; }
.user-button strong { font-size: 12px; }
.breadcrumb { font-size: 12px; }
.search-trigger { font-size: 12px; }
.topbar { background: #fafbf7; height: 70px; }
.btn { font-size: 12px; min-height: 38px; border-radius: 6px; transition: background var(--fast), border-color var(--fast), box-shadow var(--fast), transform 100ms; }
.btn.sm { font-size: 11px; min-height: 32px; }
.btn:active, .icon-button:active { transform: scale(.97); }
.icon-button { transition: background var(--fast), color var(--fast), transform 100ms; }
.text-button { font-size: 12px; transition: color var(--fast); }
.metric { padding: 19px 20px; border-radius: 9px; min-height: 143px; }
.metric.featured { background: #273e30; border-color: #273e30; }
.metric.featured:after { display: none; }
.metric-label { font-size: 12px; color: #717b70; }
.metric-value { font-size: 33px; font-weight: 500; letter-spacing: -1.3px; margin: 12px 0; }
.metric-value small { font-size: 13px; }
.metric-foot { font-size: 11px; gap: 4px 6px; flex-wrap: wrap; }
.metric-foot .row { gap: 2px; }
.metric.featured .metric-label { color: #cdd7c8; }
.metric.featured .metric-foot { color: #c4d0bc; }
.panel { border-radius: 9px; box-shadow: none; }
.panel-head p { font-size: 12px; margin-top: 5px; }
.panel-head { padding-top: 20px; }
.chart-total { font-size: 27px; letter-spacing: -.7px; }
.chart-total small { font-size: 11px; }
.chart text { font-size: 10px; }
.legend { font-size: 11px; }
.chart-summary { font-size: 11px; }
.mini-tabs button { font-size: 11px; padding: 6px 11px; }
.pulse { background: #f1edde; border-color: #e5decb; }
.pulse-mark { font-size: 12px; font-weight: 500; letter-spacing: 0; }
.pulse-date { font-size: 10px; }
.pulse h3 { font-size: 25px; font-weight: 500; letter-spacing: -.7px; margin: 2px 0 11px; }
.pulse p { font-size: 12px; line-height: 1.7; }
.pulse .btn { justify-content: flex-start; margin-top: 19px; min-height: 38px; }
.pulse .btn .icon { order: 2; margin-left: auto; }
.stage-preview .stage-name { font-size: 11px; }
.stage-preview strong { font-size: 21px; }
.stage-preview small { font-size: 10px; }
.task-item { gap: 11px; padding: 14px 0; }
.task-copy { font-size: 12px; line-height: 1.55; }
.task-copy small, .task-due { font-size: 10px; }
.check-circle { margin-top: 3px; width: 18px; height: 18px; min-width: 18px; transition: background var(--fast), border-color var(--fast); }
.activity-copy { font-size: 12px; }
.activity-copy small { font-size: 10px; }
.activity { padding: 11px 0; }
.activity-icon { width: 29px; height: 29px; }
.table-toolbar { padding-top: 16px; padding-bottom: 16px; }
.input-search input, .select { font-size: 12px; }
.input-search { padding: 9px 11px; background: #fafbf7; border-radius: 6px; }
.cell-title { font-size: 13px; font-weight: 500; }
.cell-sub { font-size: 11px; margin-top: 4px; }
table { font-size: 12px; }
th { font-size: 11px; background: #fafbf7; }
td { padding-top: 15px; padding-bottom: 15px; }
.badge { font-size: 10px; padding: 4px 7px; border-radius: 4px; }
.badge.green { color: #467041; }
.badge.gold { color: #8d6c28; }
.badge.red { color: #9e503c; }
.badge.blue { color: #506e87; }
.chip { font-size: 10px; }
.tabs { gap: 24px; }
.tabs button { font-size: 13px; padding-bottom: 12px; transition: color var(--fast), border-color var(--normal); }
.tabs .count { font-size: 10px; }
.table-footer { font-size: 11px; }
.stats-inline { border-radius: 8px; }
.stats-inline small { font-size: 12px; }
.stats-inline strong { font-size: 26px; }
.kanban-head h3 { font-size: 12px; }
.kanban-head small { font-size: 10px; }
.deal-card { border-radius: 7px; box-shadow: 0 1px 2px #25322003; transition: border-color var(--fast), box-shadow var(--normal); }
.deal-card h3 { font-size: 14px; line-height: 1.45; }
.deal-card p { font-size: 12px; }
.deal-value { font-size: 22px; font-weight: 500; }
.deal-date { font-size: 11px; }
.deal-card-footer .avatar.sm { width: 28px; height: 28px; font-size: 10px; }
.add-deal { font-size: 12px; min-height: 38px; }
.job-card { border-radius: 8px; transition: border-color var(--fast); }
.job-card h3 { font-size: 16px; font-weight: 500; }
.job-card p { font-size: 12px; }
.job-progress { font-size: 11px; }
.doc-card h3 { font-size: 13px; }
.doc-card small { font-size: 11px; }
.calendar-weekdays>div { font-size: 11px; }
.cal-event { font-size: 10px; }
.agenda-item h3 { font-size: 14px; }
.agenda-item small, .agenda-item p { font-size: 12px; }
.settings-nav button { font-size: 13px; }
.setting-row h3 { font-size: 14px; }
.setting-row p { font-size: 12px; }
.automation-card h3 { font-size: 15px; }
.automation-card p { font-size: 12px; }
.automation-step, .automation-foot { font-size: 11px; }
.footer { font-size: 11px; padding-top: 19px; }
.field>label { font-size: 12px; }
.field input, .field select, .field textarea { min-height: 42px; font-size: 14px; border-radius: 6px; }
.form-note { font-size: 12px; }
.overlay { backdrop-filter: blur(2px); animation: backdrop-in 180ms ease both; background: #15221a55; }
.modal { border-radius: 12px; animation: modal-in 260ms var(--ease) both; max-height: min(90dvh, calc(var(--visual-height, 100dvh) - 32px)); }
.modal-head h2 { font-size: 21px; font-weight: 600; letter-spacing: -.5px; }
.modal-head p { font-size: 12px; }
.modal-head #dialog-title:focus { outline: none; }
.modal-head, .modal-footer { flex-shrink: 0; }
.modal-body, .drawer-content { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.drawer { animation: drawer-in 280ms var(--ease) both; }
.overlay.closing { animation: backdrop-out 180ms ease both; pointer-events: none; }
.overlay.closing .modal { animation: modal-out 180ms ease both; }
.overlay.closing .drawer { animation: drawer-out 180ms ease both; }
.drawer-hero h2 { font-size: 25px; font-weight: 500; }
.drawer-hero p, .detail-grid dt { font-size: 12px; }
.detail-grid dd { font-size: 14px; }
.drawer-section .note, .notes-entry { font-size: 13px; }
.search-result strong { font-size: 14px; }
.search-result small { font-size: 12px; }
.search-result { min-height: 52px; }
.search-result>span { min-width: 0; }
.search-result strong, .search-result small { overflow-wrap: anywhere; }
.quote-item>label { min-width: 0; }
.quote-item>label>span { display: none; }
.toast { font-size: 13px; border-radius: 7px; transition: opacity 180ms, transform 240ms var(--ease); }
.tiny-progress span { transition: width 280ms var(--ease); }
.switch { transition: background 180ms; }
.switch:after { transition: transform 180ms var(--ease); }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-out { to { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(8px) scale(.99); } }
@keyframes drawer-in { from { opacity: .6; transform: translateX(36px); } to { opacity: 1; transform: translateX(0); } }
@keyframes drawer-out { to { opacity: 0; transform: translateX(28px); } }
@keyframes sheet-in { from { opacity: .6; transform: translateY(36px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(24px); } }
@media (hover: hover) and (pointer: fine) {
  .job-card:hover, .doc-card:hover, .deal-card:hover { border-color: #b4bfa8; }
  .btn.primary:hover { box-shadow: 0 2px 5px #1725221a; }
  .nav-item:hover .icon { color: inherit; }
}
@media (max-width: 1240px) {
  .metric { padding: 17px; }
  .metric-value { font-size: 30px; }
  .metric-foot { font-size: 10px; }
  .dashboard-grid { gap: 18px; }
}
@media (max-width: 1050px) {
  .dashboard-aside { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .sidebar { width: min(310px, calc(100vw - 48px)); padding: max(22px, env(safe-area-inset-top)) 16px 20px; transition: transform 280ms var(--ease); height: 100dvh; }
  .sidebar.open { box-shadow: 12px 0 45px #14211720; }
  .sidebar-brand-row .brand { padding-left: 6px; }
  .mobile-close { display: inline-flex; color: #c9d2c1; margin-top: -4px; }
  .mobile-close:hover { background: #2a3c31; }
  .mobile-shade { display: block; opacity: 0; visibility: hidden; background: #15251e66; transition: opacity 220ms, visibility 220ms; backdrop-filter: blur(2px); }
  .mobile-shade.open { opacity: 1; visibility: visible; }
  .nav-item { min-height: 45px; font-size: 14px; padding-left: 14px; }
  .nav-label { margin-top: 19px; font-size: 10px; }
  .topbar { position: sticky; top: 0; z-index: 25; background: #fafbf7f5; backdrop-filter: blur(12px); height: 64px; padding: 0 17px; }
  .topbar .breadcrumb, .topbar .mobile-menu, .topbar .demo-label, .topbar .key, .top-divider { display: none; }
  .mobile-brand { display: flex; align-items: baseline; gap: 6px; font-size: 25px; letter-spacing: -1px; font-weight: 500; }
  .mobile-brand span { font-size: 8px; letter-spacing: 1.7px; color: #93825a; }
  .top-actions { gap: 5px; }
  .search-trigger { width: 42px; height: 44px; justify-content: center; padding: 0; }
  .topbar .icon-button { width: 44px; height: 44px; }
  .topbar .avatar { width: 31px; height: 31px; font-size: 11px; }
  .mobile-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; inset: auto 0 0; z-index: 30; padding: 4px max(8px, env(safe-area-inset-left)) max(7px, env(safe-area-inset-bottom)); background: #fafbf7f5; backdrop-filter: blur(18px); border-top: 1px solid #dfe5d7; }
  .mobile-nav button { background: transparent; border: 0; color: #7a8674; min-height: 55px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; position: relative; transition: color var(--fast), background var(--fast); border-radius: 7px; }
  .mobile-nav .icon { width: 21px; height: 21px; stroke-width: 1.6; }
  .mobile-nav button.active { color: #273e30; font-weight: 600; }
  .mobile-nav button.active:before { content: ''; width: 20px; height: 2px; border-radius: 2px; background: #ad945c; position: absolute; top: 0; }
  .mobile-nav button:active { background: #eaf0e2; }
  .workspace { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .modal-open .mobile-nav { visibility: hidden; }
  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); left: 50%; font-size: 12px; }
  .main { padding: 23px 20px; }
  .page-heading p { font-size: 13px; line-height: 1.55; }
  .heading-actions { margin-top: 16px; }
  .footer { line-height: 1.8; font-size: 11px; }
  .settings-nav { scrollbar-width: none; }
}
@media (max-width: 600px) {
  h1 { font-size: 28px; letter-spacing: -.7px; }
  h2 { font-size: 16px; }
  .main { padding: 22px 16px; }
  .page-heading { display: block; margin-bottom: 22px; }
  .page-heading .eyebrow { font-size: 12px; margin-bottom: 7px; }
  .page-heading p { font-size: 13px; max-width: 32ch; }
  .heading-actions { display: flex; justify-content: flex-start; gap: 10px; }
  .btn, .btn.sm, .heading-actions .btn { min-height: 44px; font-size: 13px; padding: 10px 13px; }
  .heading-actions>.primary { margin-left: auto; }
  .heading-actions>.btn:only-child { margin-left: 0; }
  .heading-actions .select { flex: 1; }
  .select { min-height: 44px; font-size: 16px; padding: 9px 27px 9px 11px; }
  .heading-actions .select { font-size: 16px; }
  .icon-button { width: 44px; height: 44px; }
  .icon-button .icon { width: 18px; height: 18px; }
  .metric { padding: 16px 14px; min-height: 148px; border-radius: 8px; }
  .metric-label { font-size: 12px; line-height: 1.3; align-items: flex-start; gap: 5px; }
  .metric-label .icon { width: 15px; height: 15px; }
  .metric-value { font-size: 29px; line-height: 1.3; margin: 12px 0 10px; letter-spacing: -1px; }
  .metric-value small { font-size: 12px; }
  .main[data-page="reports"] .metric-value { font-size: clamp(20px, 6.5vw, 29px); }
  .metric-foot { font-size: 10px; line-height: 1.45; gap: 1px 5px; }
  .metric-foot .icon { width: 12px; height: 12px; }
  .metrics { gap: 10px; margin-bottom: 18px; }
  .panel-head { padding: 18px 16px 0; gap: 10px; }
  .panel-head h2 { font-size: 16px; }
  .panel-head p { font-size: 12px; max-width: none; }
  .panel-body { padding: 18px 16px; }
  .chart-top { padding: 17px 16px 0; gap: 8px; }
  .chart-total { font-size: 26px; }
  .chart-total small { font-size: 11px; }
  .legend { font-size: 10px; gap: 10px; }
  .chart { padding: 11px 10px 6px; }
  .chart text { font-size: 12px; }
  .chart-summary { font-size: 11px; line-height: 1.5; padding: 13px 16px; }
  .mini-tabs button { min-height: 34px; font-size: 11px; padding: 6px 9px; }
  .stage-preview strong { font-size: 21px; }
  .stage-preview small, .stage-preview .stage-name { font-size: 11px; }
  .pipeline-strip { grid-template-columns: 1fr 1fr; gap: 20px; }
  .stage-line { margin-top: 10px; }
  .dashboard-aside { display: flex; }
  .pulse h3 { font-size: 27px; }
  .pulse p { font-size: 13px; }
  .pulse-mark { font-size: 13px; }
  .pulse-date { font-size: 11px; }
  .pulse .btn { min-height: 44px; }
  .task-list { padding-left: 12px; padding-right: 16px; }
  .task-item, .all-task .task-item { padding: 10px 0; align-items: center; gap: 5px; }
  .task-copy, .all-task .task-copy { font-size: 14px; }
  .task-copy small, .all-task .task-copy small { font-size: 12px; margin-top: 4px; }
  .task-due { font-size: 11px; margin-left: 6px; }
  .check-circle { width: 44px; min-width: 44px; height: 44px; margin: 0; border: 0; position: relative; background: transparent !important; }
  .check-circle:before { content: ''; position: absolute; width: 21px; height: 21px; border: 1px solid #b7c3aa; border-radius: 50%; background: #fff; transition: background var(--fast), border-color var(--fast); }
  .check-circle.checked:before { background: #4e7351; border-color: #4e7351; }
  .check-circle .icon { position: relative; z-index: 1; width: 14px; height: 14px; }
  .activity-copy { font-size: 13px; }
  .activity-copy small { font-size: 11px; }
  .activity-list { padding-left: 16px; padding-right: 16px; }
  .text-button { font-size: 12px; min-height: 32px; }
  .table-toolbar { padding: 14px; gap: 10px; }
  .table-toolbar>.small { display: none; }
  .table-toolbar .select { width: 100%; }
  .table-toolbar .input-search { flex-basis: 100%; }
  .input-search { min-height: 44px; }
  .input-search input { font-size: 16px; }
  .filter-bar { gap: 10px; }
  .filter-bar .select { flex: 1; }
  .filter-bar>.muted { font-size: 12px; }
  .tabs { gap: 22px; scrollbar-width: none; margin-bottom: 17px; }
  .tabs button { min-height: 44px; font-size: 13px; padding-bottom: 10px; }
  .tabs .count { font-size: 11px; }
  .table-wrap:has(.record-table) { overflow: visible; }
  .record-table, .record-table tbody { display: block; width: 100%; }
  .record-table thead { display: none; }
  .record-table tr { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 13px 18px; padding: 18px; position: relative; border-bottom: 1px solid var(--line); }
  .record-table tr:last-child { border-bottom: 0; }
  .record-table td { display: block; padding: 0; border: 0; white-space: normal; min-width: 0; font-size: 14px; }
  .record-table td:before { content: attr(data-label); display: block; font-size: 11px; color: #7a8474; font-weight: 400; margin-bottom: 4px; line-height: 1.3; }
  .record-table td[data-field="primary"] { grid-column: 1 / -1; padding-right: 35px; }
  .record-table td[data-field="primary"]:before, .record-table td[data-field="action"]:before { display: none; }
  .record-table td[data-field="primary"] .cell-link { min-height: 44px; }
  .record-table td[data-field="action"] { position: absolute; top: 16px; right: 10px; }
  .record-table td[data-field="action"] .btn { font-size: 11px; min-height: 40px; padding: 8px; }
  .record-table td[data-field="action"] .icon-button { width: 40px; height: 44px; }
  .record-table .cell-title { font-size: 15px; white-space: normal; overflow-wrap: anywhere; }
  .record-table .cell-sub { font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
  .record-table .avatar { width: 36px; height: 36px; font-size: 12px; }
  .record-table .avatar.sm { width: 26px; height: 26px; font-size: 10px; }
  .record-table .badge { font-size: 11px; padding: 4px 7px; }
  .table-footer { padding: 12px 16px; font-size: 11px; }
  .table-footer .btn { min-height: 40px; }
  .stats-inline { gap: 17px 12px; padding: 17px; }
  .stats-inline small { font-size: 12px; }
  .stats-inline strong { font-size: 25px; }
  .mobile-pipeline-controls { display: block; margin-bottom: 14px; }
  .mobile-pipeline-controls label { display: block; font-size: 12px; margin-bottom: 7px; color: var(--muted); }
  .mobile-pipeline-controls select { width: 100%; font-size: 16px; background: #fff; }
  .main[data-page="pipeline"] .filter-bar>.muted { display: none; }
  .kanban { display: block; margin: 0; overflow: visible; }
  .kanban-column { display: none; min-height: 0; padding: 13px; }
  .kanban-column.mobile-active { display: block; }
  .kanban-head { padding: 2px 1px 12px; }
  .kanban-head h3 { font-size: 13px; }
  .kanban-head small { font-size: 12px; }
  .deal-card { padding: 16px; margin-bottom: 12px; cursor: default; }
  .deal-card h3 { font-size: 17px; margin-top: 5px; }
  .deal-card p { font-size: 13px; }
  .deal-card .icon-button { width: 44px !important; height: 44px !important; margin-top: -9px; margin-right: -10px; }
  .deal-card .chip { font-size: 11px; }
  .deal-value { font-size: 25px; margin-top: 15px; }
  .deal-date { font-size: 12px; }
  .add-deal { min-height: 46px; font-size: 14px; }
  .job-card { padding: 18px; }
  .job-card h3 { font-size: 18px; margin-top: 13px; }
  .job-card p { font-size: 13px; }
  .job-progress { font-size: 12px; }
  .document-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .doc-card { padding: 14px; }
  .doc-card h3 { font-size: 13px; white-space: normal; line-height: 1.4; }
  .doc-card small { font-size: 11px; }
  .doc-cover { height: 85px; }
  .doc-card .row { gap: 5px; margin-top: 12px; }
  .doc-card .chip { font-size: 10px; max-width: 100%; white-space: normal; }
  .calendar-day { min-height: 63px; padding: 5px 3px; vertical-align: top; }
  .day-number { width: 28px; height: 28px; font-size: 13px; }
  .calendar-weekdays>div { font-size: 12px; padding: 13px 2px; }
  .cal-event { display: inline-block; width: 5px; height: 5px; padding: 0; font-size: 0; margin: 4px 1px 0; border-radius: 50%; background: #6e8760; }
  .cal-event.gold { background: #b4995b; }
  .calendar-layout>.panel:last-child { display: block; }
  .agenda-item { padding: 17px 0; }
  .agenda-item h3 { font-size: 15px; }
  .settings-nav button { min-height: 44px; font-size: 13px; }
  .setting-row h3 { font-size: 14px; }
  .setting-row p { font-size: 12px; line-height: 1.6; }
  .setting-row .switch { min-width: 38px; }
  .form-note, .demo-banner { font-size: 12px; line-height: 1.6; }
  .overlay { padding: 8px 0 0; align-items: flex-end; backdrop-filter: blur(2px); }
  .modal { width: 100%; max-width: none; max-height: min(calc(100dvh - 8px), calc(var(--visual-height, 100dvh) - 8px)); border-radius: 18px 18px 0 0; animation: sheet-in 280ms var(--ease) both; }
  .modal:before { content: ''; width: 33px; height: 4px; border-radius: 4px; background: #d4dbcb; display: block; margin: 9px auto 0; flex-shrink: 0; }
  .overlay.closing .modal { animation: sheet-out 180ms ease both; }
  .modal-head { padding: 16px 18px; gap: 8px; }
  .modal-head h2 { font-size: 21px; }
  .modal-head p { font-size: 12px; line-height: 1.5; margin-top: 5px; }
  .modal-body { padding: 20px 18px; }
  .modal-footer { padding: 14px 18px max(18px, env(safe-area-inset-bottom)); gap: 9px; }
  .modal-footer .btn { min-width: min(126px, 40%); min-height: 46px; }
  .field>label { font-size: 13px; }
  .field input, .field select, .field textarea, .note-input input { font-size: 16px; min-height: 47px; }
  .field textarea { min-height: 105px; }
  .form-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .drawer-overlay { padding: 0; }
  .drawer { width: 100%; height: var(--visual-height, 100dvh); max-height: 100dvh; animation: drawer-in 260ms var(--ease) both; }
  .drawer .modal-head { padding: 15px 18px; }
  .drawer-content { padding: 22px 18px; }
  .drawer-hero h2 { font-size: 25px; }
  .drawer-hero p { font-size: 13px; }
  .drawer-section .note { font-size: 13px; }
  .detail-grid { gap: 20px 14px; }
  .detail-grid dt { font-size: 12px; }
  .detail-grid dd { font-size: 14px; }
  .notes-entry { font-size: 13px; }
  .quote-item.quote-labels { display: none; }
  .quote-item { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 40px; gap: 12px 9px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #f5f7ef; }
  .quote-item>label>span { display: block; font-size: 12px; color: #748067; margin-bottom: 6px; }
  .quote-item>label:first-child { grid-column: 1 / -1; }
  .quote-item input { font-size: 16px; min-height: 44px; padding: 9px; background: #fff; }
  .quote-item>.icon-button { width: 40px !important; height: 44px !important; align-self: end; }
  .document-preview { padding: 22px 15px; }
  .document-preview th, .document-preview td { font-size: 11px; padding: 12px 5px 12px 0; }
  .document-preview th:first-child, .document-preview td:first-child { max-width: 150px; overflow-wrap: anywhere; }
  .document-preview .document-totals { font-size: 13px; }
  .document-preview .document-note { font-size: 11px; }
  .document-brand { font-size: 17px; }
  .global-search { padding: 13px 2px; }
  .global-search input { font-size: 16px; }
  .global-search .key { display: none; }
  .search-result { padding: 13px 7px; gap: 10px; }
  .search-result strong { font-size: 14px; }
  .search-result small { font-size: 12px; }
  .notification p { font-size: 14px; }
  .notification small { font-size: 12px; }
  .business-option { padding: 16px 12px; }
  .business-option strong { font-size: 14px; }
  .business-option small { font-size: 12px; }
}
@media (max-width: 360px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .metric { padding: 14px 11px; }
  .metric-value { font-size: 26px; }
  .metric-label .icon { display: none; }
  .topbar { padding: 0 12px; }
  .top-actions { gap: 0; }
  .mobile-brand { font-size: 23px; }
  .mobile-brand span { display: none; }
  .panel-head:has(.mini-tabs) { flex-wrap: wrap; }
  .record-table tr { padding: 16px; gap: 12px; }
  .record-table .cell-title { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .mobile-nav, .mobile-brand { display: none !important; }
  .overlay, .modal, .drawer { animation: none !important; transform: none !important; max-height: none !important; }
  .modal:before { display: none !important; }
}

/* Rivora Astra 2.5: compact invoice list and accessible metric navigation. */
button.metric.is-link {font:inherit;text-align:left;width:100%;cursor:pointer;transition:border-color .17s ease,transform .17s ease,box-shadow .17s ease;}
button.metric.is-link:hover {border-color:#8ba99b;box-shadow:0 6px 18px rgba(22,45,36,.08);transform:translateY(-1px)}
button.metric.is-link:focus-visible{outline:3px solid #65957c;outline-offset:3px}
.metric-open{display:inline-flex;align-items:center;gap:4px;position:absolute;right:15px;bottom:12px;font-size:10px;opacity:.8}
.metric-open .icon{width:12px;height:12px}
.invoice-list-panel .table-wrap{max-height:470px;overflow:auto;overscroll-behavior:contain}
.invoice-pagination{border-top:1px solid var(--line);padding:12px 18px;display:flex;gap:10px;align-items:center;justify-content:space-between;font-size:12px;color:var(--muted);flex-wrap:wrap}
.pagination-current{min-width:40px;text-align:center;font-variant-numeric:tabular-nums}
.invoice-pagination .btn:disabled{opacity:.4;cursor:not-allowed}
.invoice-filters{margin-left:auto}
.cloud-warning{margin-bottom:15px;padding:12px 14px;background:#fff3e4;border:1px solid #e4b478;border-radius:7px;font-size:12px;color:#714a1e;display:flex;gap:10px;align-items:center;justify-content:space-between}
.demo-label.live{color:#fff;background:#2c6447;border-color:#2c6447}
button.demo-label{cursor:pointer}
@media(max-width:650px){.invoice-pagination{padding:12px}.metric-open{position:static;margin-top:7px}.invoice-filters{margin-left:0}}
@media(prefers-reduced-motion:reduce){button.metric.is-link{transition:none!important;transform:none!important}}

/* Rivora Astra 2.6: page-sized lists, preserving the existing design tokens. */
.compact-pagination {padding:13px 20px;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.compact-pagination .row {display:flex;gap:8px;align-items:center}
.compact-pagination button:disabled {opacity:.42;cursor:not-allowed}
.pipeline-load-more {display:block;margin:10px auto 3px;padding:8px 10px;color:#285c42;font-size:12px;font-weight:600;border:1px solid #c6d7c9;border-radius:6px;background:#fff}
.pipeline-load-more:hover {background:#f1f7f0}
.cloud-loading {min-height:230px;display:flex;align-items:center;justify-content:center;gap:14px;text-align:left;color:#253c31;padding:24px}
.cloud-loading strong{font-weight:700}.cloud-loading p{color:#738177;font-size:13px;margin:6px 0 0}
.loading-spinner{display:inline-block;width:25px;height:25px;border:3px solid #d9e8df;border-top-color:#466e56;border-radius:50%;animation:rv26spin .8s linear infinite}
@keyframes rv26spin {to{transform:rotate(360deg)}}
@media(max-width:650px){.compact-pagination{padding:12px;gap:10px}.compact-pagination .row{width:100%;justify-content:space-between}}
@media(prefers-reduced-motion:reduce){.loading-spinner{animation:none}}

/* Rivora Astra 2.7 | Calm, essentials-first refinement. Keeps Astra's visual identity. */
.calm-nav-group { margin:0; }
.calm-nav-group > summary { list-style:none; display:flex;align-items:center;justify-content:space-between;cursor:pointer;min-height:28px;user-select:none; }
.calm-nav-group > summary::-webkit-details-marker{display:none}
.calm-nav-group > summary .icon{height:13px;width:13px;transition:transform .18s ease;opacity:.75}
.calm-nav-group[open] > summary .icon{transform:rotate(180deg)}
.calm-nav-group > summary:hover{color:#d8e5d9}
.calm-nav-items{padding-bottom:3px}
.calm-more { margin-top:16px;border:1px solid var(--line);border-radius:8px;background:var(--surface,#fff);overflow:hidden; }
.calm-more > summary {display:flex;align-items:center;justify-content:space-between;padding:15px 18px;font-weight:650;font-size:13px;cursor:pointer;color:#355344;list-style:none;background:#fafbf8;}
.calm-more > summary::-webkit-details-marker{display:none}
.calm-more > summary:after {content:'+';font-size:18px;font-weight:400;color:#617c68;line-height:1}
.calm-more[open] > summary:after {content:'−'}
.calm-more > summary:hover {background:#f4f7f1}
.calm-more-content {padding:15px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.calm-more-content > .panel{margin:0;min-width:0}
.main[data-page="dashboard"] .dashboard-grid > .stack > .panel:last-child {margin-bottom:0}
.main[data-page="dashboard"] .dashboard-grid{align-items:start}
.main[data-page="dashboard"] .dashboard-aside > .panel:last-child{margin-bottom:0}
.main[data-page="reports"] .calm-more-content{grid-template-columns:repeat(2,minmax(0,1fr))}
.main[data-page="tasks"] .task-board{grid-template-columns:minmax(0,1fr)}
.main[data-page="tasks"] .calm-more-content{display:block}
.main[data-page="quotes"] .calm-more-content,.main[data-page="payments"] .calm-more-content,.main[data-page="expenses"] .calm-more-content {display:block}
.main[data-page="quotes"] .calm-more-content .stats-inline,.main[data-page="payments"] .calm-more-content .stats-inline,.main[data-page="expenses"] .calm-more-content .stats-inline {margin:0}
.calm-filter-row{display:flex;gap:10px;align-items:center;justify-content:flex-start;margin:13px 0 16px}
.calm-filter-row label{font-size:12px;font-weight:650;color:#53695b}
.calm-filter-row select{max-width:210px;min-height:38px}
.calm-form-optional{border:1px solid var(--line);border-radius:7px;margin-top:4px}
.calm-form-optional > summary{padding:12px 13px;cursor:pointer;list-style:none;font-size:13px;font-weight:600;color:#3d594a}
.calm-form-optional > summary::-webkit-details-marker{display:none}
.calm-form-optional > summary:after{content:' +';float:right}
.calm-form-optional[open] > summary:after{content:' −'}
.calm-form-date-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0 12px 12px}
.calm-drawer-section{border-top:1px solid var(--line);margin-top:10px}
.calm-drawer-section > summary{font-size:13px;font-weight:650;color:#344d3e;cursor:pointer;padding:15px 3px;list-style:none}
.calm-drawer-section > summary:after{content:'+';float:right;color:#677a69}
.calm-drawer-section[open] > summary:after{content:'−'}
.calm-drawer-section > summary::-webkit-details-marker{display:none}
.calm-drawer-section .drawer-section{padding-top:0;margin-top:0;border-top:none}
@media(max-width:900px){.calm-more-content{grid-template-columns:1fr}.main[data-page="reports"] .calm-more-content{grid-template-columns:1fr}}
@media(max-width:650px){.calm-more > summary{padding:14px;font-size:13px}.calm-more-content{padding:12px}.calm-form-date-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.calm-nav-group > summary .icon{transition:none}}

/* Astra live-auth gate. Uses the original typography, colors and controls. */
.cloud-auth-gate{max-width:490px;margin:clamp(35px,8vh,85px) auto;padding:29px 26px 33px;text-align:center;border:1px solid var(--border,#dce4dd);border-radius:12px;background:var(--surface,#fff)}
.cloud-auth-logo{height:49px;width:49px;object-fit:contain;display:block;margin:0 auto 14px}
.cloud-auth-gate h1{font-size:23px;line-height:1.25;margin:0 0 12px;color:var(--ink,#182a24)}
.cloud-auth-gate p{font-size:14px;line-height:1.6;color:#556560;margin:0 0 23px}
.cloud-auth-gate small{display:block;font-size:12px;line-height:1.5;color:#687b72;margin-top:20px}
.cloud-retry-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:16px}
@media(max-width:480px){.cloud-auth-gate{margin:22px 6px;padding:28px 17px}.cloud-auth-gate h1{font-size:21px}}

/* Revenue period controls: retain Astra tokens and keep the mobile header compact. */
.revenue-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.revenue-period-control{display:inline-flex;align-items:center;padding:3px;gap:3px;border:1px solid var(--line);border-radius:8px;background:#eeefe8}
.revenue-period-control button{border:0;background:transparent;color:var(--muted);border-radius:5px;padding:8px 12px;min-height:34px;white-space:nowrap;font-size:12px;font-weight:600;transition:background 160ms ease,color 160ms ease,box-shadow 160ms ease,transform 100ms ease}
.revenue-period-control button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 4px #17252212}
.revenue-period-control button:hover{color:var(--ink)}
.revenue-period-control button:active{transform:translateY(1px)}
.revenue-period-control button:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
 .doc-card:hover,.job-card:hover{box-shadow:0 5px 15px #1725220c}
 .btn:not(:disabled):active,.icon-button:not(:disabled):active{transform:translateY(1px)}
}
@media(max-width:650px){.heading-actions:has(.revenue-controls){width:100%;flex-wrap:wrap}.revenue-controls{flex:1;min-width:0}.revenue-period-control{display:flex;flex:1}.revenue-period-control button{flex:1;min-height:40px;padding:8px 10px}.revenue-controls .select{max-width:100%}}
@media(prefers-reduced-motion:reduce){.revenue-period-control button{transition:none;transform:none!important}}

.revenue-period-note{margin:-9px 0 20px;color:var(--muted);font-size:12px;line-height:1.5}

/* Quotes: concise service labels, generous click targets, readable policies. */
.quote-record-table { table-layout: fixed; width: 100%; }
.quote-record-table th:first-child { width: 32%; }
.quote-record-table th:nth-child(2) { width: 22%; }
.quote-record-table th:nth-child(3) { width: 12%; }
.quote-record-table th:nth-child(4) { width: 15%; }
.quote-record-table th:nth-child(5) { width: 12%; }
.quote-record-table th:last-child { width: 7%; }
.quote-record-table td { overflow-wrap: anywhere; }
.quote-title-link { width: 100%; min-width: 0; min-height: 48px; padding: 8px 0; }
.quote-title-link .cell-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.quote-record-row { cursor: pointer; }
.quote-record-row:hover { background: #f6f8f2; }
.quote-record-table .icon-button { width: auto; min-width: 45px; font-size: 12px; }
.quote-policy-copy { white-space: pre-wrap; overflow-wrap: anywhere; }
.quote-policy-copy h3 { margin: 20px 0 8px; font-size: 13px; }
.quote-workflow-note { padding: 16px; border-radius: 12px; background: #edf2e9; margin-bottom: 18px; }
.quote-workflow-note p { font-size: 12px; margin: 5px 0 0; }
.quote-signature-canvas { display: block; width: 100%; height: 180px; background: white; border: 1px solid var(--line); border-radius: 12px; touch-action: none; margin: 8px 0; }
.quote-consent { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0; font-size: 13px; }
.quote-consent input { width: 18px; height: 18px; flex-shrink: 0; }
.quote-link-input { display: block; width: 100%; margin: 10px 0 16px; padding: 12px; }
.notification-count { position: absolute; top: -3px; right: -4px; min-width: 17px; padding: 1px 4px; border-radius: 12px; font-size: 10px; background: #d9c58e; color: #182c25; }
.notification.unread { background: #f6f3e8; }
.notification.cell-link { width: 100%; text-align: left; }
@media(max-width: 700px) { .quote-record-table { min-width: 0; table-layout: auto; } .quote-record-table th:first-child { width: 48%; } .quote-record-table th:nth-child(2),.quote-record-table td:nth-child(2),.quote-record-table th:nth-child(5),.quote-record-table td:nth-child(5) { display: none; } .quote-record-table th:last-child { width: 44px; } .modal-footer { flex-wrap: wrap; } .quote-signature-canvas { height: 150px; } }
