:root {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #23342f;
  background: #f3f2ee;
  font-size: 14px;
  line-height: 1.5;
  --surface: #fffefa;
  --muted: #607267;
  --line: #dce2d8;
  --green: #087b65;
  --tint: #e1eee4;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #c89837;
  outline-offset: 3px;
}
a {
  color: var(--green);
}
h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.8px;
  font-weight: 650;
  margin: 4px 0 8px;
}
h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
}
h3 {
  font-size: 14px;
  font-weight: 650;
  margin: 0 0 10px;
}
p {
  margin: 4px 0 14px;
}
.muted,
small {
  color: var(--muted);
}
small,
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--muted);
  margin-bottom: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: #23342f;
  border-radius: 7px;
  padding: 9px 14px;
  min-height: 39px;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  background: #eef3eb;
}
.btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.btn.primary:hover {
  background: #056451;
}
.btn.ghost {
  background: none;
  border-color: transparent;
}
.btn.danger {
  color: #a13f32;
}
.btn.small {
  min-height: 32px;
  padding: 5px 9px;
}
.btn.icon {
  padding: 8px;
  width: 38px;
  min-width: 38px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.spread {
  justify-content: space-between;
}
.right {
  justify-content: flex-end;
}
.gap-top {
  margin-top: 20px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  min-width: 0;
}
.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 28px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.brand {
  font-size: 30px;
  letter-spacing: -1.3px;
  font-weight: 750;
  text-decoration: none;
  color: #243a30;
  margin: 0 10px;
}
.brand span {
  color: var(--green);
}
.tagline {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--muted);
  margin: 2px 10px;
}
.context {
  padding: 0 10px 16px;
  border-bottom: 1px solid var(--line);
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.sidebar nav .btn {
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  font-size: 13px;
  border: 0;
  padding: 10px;
}
.sidebar nav .btn.active {
  background: var(--tint);
  color: var(--green);
  font-weight: 650;
}
.nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 14px 10px 3px;
}
.nav-sub {
  padding-left: 16px;
  display: grid;
  gap: 3px;
}
.profile {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tint);
  color: var(--green);
  font-weight: 600;
  flex-shrink: 0;
}
.main {
  min-width: 0;
}
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 15px 28px;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  min-height: 70px;
}
.topbar .search {
  margin-left: auto;
  max-width: 340px;
  min-width: 150px;
}
.search input {
  min-height: 36px;
}
.content {
  padding: 26px 28px;
  max-width: 1700px;
  margin: auto;
}
.heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.heading p {
  margin: 0;
  color: var(--muted);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.metric .number {
  font-size: 32px;
  line-height: 1.2;
  font-weight: 650;
  display: block;
  margin: 10px 0;
}
.metric-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--tint);
  border-radius: 10px;
  color: var(--green);
}
.columns {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
.empty {
  padding: 42px 12px;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
}
.empty .empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--tint);
  border-radius: 12px;
  color: var(--green);
  margin-bottom: 5px;
}
.empty p {
  max-width: 380px;
}
.empty h2 {
  margin: 0;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
th {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: #f5f5ef;
  padding: 11px 12px;
}
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  overflow-wrap: anywhere;
}
tbody tr:last-child td {
  border-bottom: 0;
}
td .btn {
  white-space: normal;
  text-align: left;
  justify-content: flex-start;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 5px;
  background: #eef3eb;
  color: #395e49;
  white-space: nowrap;
}
.badge.customer,
.badge.won {
  background: #e1eee4;
  color: #087b65;
}
.badge.overdue,
.badge.lost {
  background: #f7e8e1;
  color: #98412f;
}
.badge.prospect,
.badge.demo-booked {
  background: #e6eeed;
  color: #326a61;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child {
  border-bottom: 0;
}
.filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.filters label {
  font-size: 12px;
  color: var(--muted);
}
.filters select {
  min-width: 140px;
}
.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.stage {
  padding: 14px;
  background: #eeeee7;
  border-radius: 9px;
  min-width: 0;
}
.stage h2 {
  font-size: 13px;
  display: flex;
  justify-content: space-between;
}
.stage .panel {
  margin-top: 12px;
  padding: 16px;
}
.stage .deal-title {
  font-weight: 600;
  color: #23342f;
  text-decoration: none;
}
.stage .deal-title:hover {
  color: var(--green);
}
.stage select {
  margin-top: 12px;
  width: 100%;
  font-size: 12px;
}
.board small {
  display: block;
}
.record-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin: 20px 0;
  overflow: auto;
}
.record-tabs .btn {
  border-radius: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
}
.record-tabs .btn.active {
  border-bottom-color: var(--green);
  color: var(--green);
}
dl {
  margin: 0;
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.facts dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.notes {
  white-space: pre-wrap;
}
.timeline {
  border-left: 2px solid var(--line);
  padding: 5px 0 16px 16px;
  margin-top: 10px;
}
.toolbar {
  margin-bottom: 18px;
}
.checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
}
.checkbox input {
  width: auto;
  min-height: 0;
}
.auth-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth {
  width: 100%;
  max-width: 440px;
}
.auth .brand {
  margin: 0;
}
.auth .eyebrow {
  margin: 4px 0 30px;
}
.auth h1 {
  font-size: 25px;
}
.auth footer {
  font-size: 12px;
  color: var(--muted);
  margin-top: 20px;
}
.form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}
.form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
input,
select,
textarea {
  padding: 9px 11px;
  min-height: 40px;
  border: 1px solid #cbd4c9;
  border-radius: 6px;
  background: var(--surface);
  color: #23342f;
  max-width: 100%;
}
textarea {
  width: 100%;
  resize: vertical;
  min-height: 96px;
}
.form .hint {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}
.error {
  padding: 10px 12px;
  border-radius: 6px;
  color: #98412f;
  background: #f8e9e4;
  margin-top: 12px;
}
.error:empty {
  display: none;
}
.notice {
  padding: 12px 16px;
  border-left: 3px solid var(--green);
  background: var(--tint);
  margin: 16px 0;
}
.password-result {
  padding: 16px;
  background: #f5f5ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.password-result code {
  display: block;
  font-size: 18px;
  user-select: all;
  margin: 10px 0;
}
.loading {
  padding: 30px;
  text-align: center;
}
svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
dialog {
  background: var(--surface);
  color: #23342f;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
  width: min(680px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
}
dialog::backdrop {
  background: #14251c88;
}
dialog .dialog-top {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
dialog h2 {
  margin: 0;
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 18px;
  background: #23342f;
  color: #fffefa;
  border-radius: 8px;
  max-width: calc(100% - 48px);
  z-index: 20;
}
footer.page-footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 11px;
}
.nowrap {
  white-space: nowrap;
}
.mobile-toggle {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1450px) {
  .board {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .content {
    padding: 24px 20px;
  }
  .topbar {
    padding: 14px 20px;
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 16px;
  }
}
@media (max-width: 760px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .sidebar.open {
    display: flex;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .profile,
  .sidebar .context {
    display: none;
  }
  .sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sidebar .nav-label {
    grid-column: 1/-1;
  }
  .nav-sub {
    padding: 0;
    display: contents;
  }
  .mobile-toggle {
    display: inline-flex;
  }
  .topbar .search {
    flex: 1;
  }
  .topbar {
    gap: 10px;
  }
  .heading h1 {
    font-size: 27px;
  }
  .board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metrics .number {
    font-size: 27px;
  }
  .metric-icon {
    display: none;
  }
}
@media (max-width: 480px) {
  .content {
    padding: 20px 14px;
  }
  .topbar {
    padding: 12px 14px;
  }
  .topbar .crumb {
    display: none;
  }
  .metrics,
  .board,
  .facts,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .metric .number {
    margin: 0;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .btn {
    min-height: 44px;
  }
  .heading .row {
    width: 100%;
  }
  input,
  select,
  textarea {
    font-size: 16px;
  }
  .filters select {
    min-width: 0;
    max-width: 100%;
  }
}
@media print {
  .sidebar,
  .topbar,
  .heading > .row,
  .filters,
  .page-footer,
  button,
  #toast {
    display: none !important;
  }
  .shell {
    display: block;
  }
  .content {
    padding: 0;
  }
  .panel {
    break-inside: avoid;
  }
  .metrics {
    grid-template-columns: repeat(3, 1fr);
  }
}
