:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #242723;
  background: #f7f7f3;
  font-size: 14px;
  line-height: 1.5;
  --bg: #f7f7f3;
  --surface: #fff;
  --line: #e5e6df;
  --text: #242723;
  --muted: #636a62;
  --nav: #212522;
  --accent: #f5ad62;
  --accent-hover: #ef9c48;
  --radius: 14px;
  --shadow: 0 2px 4px #30352606;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.48;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}
svg {
  width: 19px;
  height: 19px;
  flex: none;
  vertical-align: middle;
}
h1,
h2,
p {
  margin: 0;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid #a75715;
  outline-offset: 3px;
}
.boot,
.loading {
  padding: 42px;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.shell {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--nav);
  color: #eaece7;
  padding: 23px 14px 15px;
}
.brand {
  display: grid;
  justify-items: start;
  gap: 3px;
}
.brand img {
  display: block;
  width: min(166px, 100%);
  height: auto;
}
.brand span {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 750;
  color: #abb3a8;
}
.sidebar .brand {
  padding: 0 9px 28px;
}
.sidebar .brand img {
  filter: invert(1);
}
.sidebar nav {
  display: grid;
  gap: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 9px;
  color: #c4cac1;
  font-size: 13px;
  font-weight: 620;
}
.nav-item:hover {
  background: #343a33;
  color: #fff;
}
.nav-item[aria-current] {
  background: #434237;
  color: #ffe0bf;
}
.nav-item[aria-current] svg {
  color: var(--accent);
}
.nav-divider {
  height: 1px;
  background: #40453d;
  margin: 10px 6px;
}
.profile {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: auto;
  padding: 11px 4px 0;
  border-top: 1px solid #40453d;
}
.profile > div {
  min-width: 0;
  flex: 1;
}
.profile strong,
.profile small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.profile small {
  color: #b1b9af;
  font-size: 11px;
}
.profile .icon-btn {
  color: #c4cac1;
}
.profile .icon-btn:hover {
  background: #343a33;
  color: white;
}
.avatar {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: #4c493b;
  color: #ffdfbc;
  font-size: 11px;
  font-weight: 750;
  display: inline-grid;
  place-items: center;
  flex: none;
}
.avatar.light {
  background: #f6ebde;
  color: #805023;
}
.main-shell {
  min-width: 0;
}
.topbar {
  height: 59px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 29px;
  color: var(--muted);
  font-size: 12px;
}
.topbar svg {
  width: 13px;
  height: 13px;
  color: #8a9088;
}
.topbar strong {
  color: var(--text);
}
.top-date {
  margin-left: auto;
}
.top-date::first-letter {
  text-transform: uppercase;
}
.main-shell main {
  max-width: 1620px;
  padding: 28px 29px 40px;
  margin: auto;
  outline: none;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.page-head h1 {
  font-size: 32px;
  letter-spacing: -1.25px;
  line-height: 1.13;
  font-weight: 760;
  overflow-wrap: anywhere;
}
.page-head p {
  color: var(--muted);
  margin-top: 7px;
  font-size: 13px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #dedfd8;
  background: white;
  border-radius: 8px;
  padding: 8px 12px;
  min-height: 37px;
  font-weight: 680;
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.12s ease;
}
.btn:hover {
  background: #f1f2ed;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #28231e;
}
.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn.quiet {
  border-color: transparent;
  background: transparent;
}
.btn.quiet:hover {
  background: #f2f3ee;
}
.btn.danger {
  margin-right: auto;
  color: #ac2824;
  border-color: transparent;
}
.btn.danger-solid {
  background: #a62e2a;
  border-color: #a62e2a;
  color: white;
}
.btn.danger-solid:hover {
  background: #8b2421;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 33px;
  height: 33px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #525b50;
  flex: none;
}
.icon-btn:hover {
  background: #f0f1ec;
  color: #222923;
}
.icon-btn svg {
  width: 17px;
  height: 17px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 19px;
}
.metric {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  min-width: 0;
}
.metric:hover {
  border-color: #c4c9bf;
}
.metric > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.metric > div span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 650;
}
.metric strong {
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.6px;
}
.metric > svg {
  margin-left: auto;
  color: #858a81;
  width: 14px;
}
.metric-icon,
.row-icon {
  width: 35px;
  height: 35px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: #eeefe9;
  color: #535d50;
  flex: none;
}
.metric-amber {
  background: #fff0df;
  color: #965220;
}
.metric-red,
.late-icon {
  background: #fce9e6;
  color: #a8322b;
}
.metric-blue {
  background: #e7f0fc;
  color: #335f96;
}
.metric-green {
  background: #eaf2e8;
  color: #3f6542;
}
.dash-grid,
.detail-grid,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.detail-grid {
  grid-template-columns: minmax(240px, 0.82fr) minmax(0, 1.35fr);
}
.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.panel-stack {
  display: grid;
  gap: 15px;
  min-width: 0;
}
.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  min-height: 54px;
  border-bottom: 1px solid #eff0eb;
}
.panel > header h2 {
  font-size: 15px;
  letter-spacing: -0.15px;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #82501f;
  white-space: nowrap;
}
.text-link:hover {
  text-decoration: underline;
}
.text-link svg {
  width: 14px;
  height: 14px;
}
.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 23px 15px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.empty svg {
  width: 17px;
  height: 17px;
  color: #6a7465;
}
.stage-list {
  padding: 4px 12px;
}
.stage-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 5px;
  border-bottom: 1px solid #eff0eb;
  min-height: 43px;
  min-width: 0;
  font-size: 13px;
}
.stage-line:last-child {
  border-bottom: 0;
}
.stage-line:hover:is(a) {
  background: #f8f8f5;
}
.stage-line > :first-child {
  margin-right: auto;
  min-width: 0;
}
.stage-line > svg {
  width: 13px;
  color: #7c8478;
}
.stage-line small {
  display: block;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #edf1f8;
  color: #3f5e88;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.tone-violet {
  background: #f0ebf8;
  color: #6c4a91;
}
.tone-amber {
  background: #fbefde;
  color: #8a561d;
}
.tone-teal {
  background: #e5f2ef;
  color: #326b60;
}
.tone-green {
  background: #e9f1e6;
  color: #476b43;
}
.task-row,
.timeline-row,
.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 13px;
  padding: 10px 3px;
  border-bottom: 1px solid #eff0eb;
  min-width: 0;
}
.task-row:last-child,
.timeline-row:last-child,
.contact-row:last-child {
  border-bottom: 0;
}
.row-copy {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.row-copy strong,
.row-copy small {
  display: block;
}
.row-copy strong {
  font-size: 13px;
}
.row-copy small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.row-copy p {
  font-size: 13px;
  margin-top: 4px;
  color: #475048;
  white-space: pre-wrap;
}
.row-copy a:hover {
  text-decoration: underline;
}
.row-actions {
  display: flex;
  gap: 2px;
}
.due {
  font-size: 11px;
  font-weight: 670;
  white-space: nowrap;
}
.due-late {
  color: #a52824;
}
.due-today {
  color: #8a4f20;
}
.due-upcoming {
  color: #526251;
}
.counter,
.column-count {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  padding: 2px 5px;
  border-radius: 6px;
  background: #eeefe9;
  color: #626b5e;
  font-size: 11px;
  font-weight: 750;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar select {
  min-width: 140px;
  width: auto;
}
.search {
  display: flex;
  align-items: center;
  position: relative;
  width: min(350px, 100%);
}
.search svg {
  position: absolute;
  left: 11px;
  width: 17px;
  color: var(--muted);
  pointer-events: none;
}
.search input {
  padding-left: 35px;
}
.result-count {
  font-size: 12px;
  color: var(--muted);
  margin: 13px 0 10px;
}
.board {
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  padding: 0 0 9px;
  scrollbar-color: #b6bcb1 transparent;
}
.board-column {
  flex: 1 0 180px;
  min-width: 0;
  background: #edeee8;
  border: 1px solid #e1e4dc;
  border-radius: 11px;
  min-height: 310px;
  transition: background 0.12s;
}
.board-column.is-drop {
  background: #f8ebda;
  border-color: #bc7938;
}
.board-column > header {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 6px 8px 8px;
}
.board-column > header .pill {
  margin-right: auto;
}
.board-column > header .icon-btn {
  width: 25px;
  height: 25px;
}
.board-column > header .icon-btn svg {
  width: 15px;
  height: 15px;
}
.column-body {
  display: grid;
  gap: 7px;
  padding: 0 7px 8px;
}
.column-empty {
  font-size: 12px;
  text-align: center;
  color: var(--muted);
  padding: 14px 3px;
  border: 1px dashed #c9cec3;
  border-radius: 8px;
}
.deal-card {
  border-radius: 9px;
  border: 1px solid #e1e4db;
  background: #fff;
  box-shadow: var(--shadow);
  cursor: grab;
  overflow: hidden;
  min-width: 0;
}
.deal-card.is-dragging {
  opacity: 0.45;
}
.deal-card:hover {
  border-color: #b5beb0;
}
.deal-card > a {
  display: block;
  padding: 10px 9px 8px;
  overflow-wrap: anywhere;
}
.deal-card > a:hover strong {
  text-decoration: underline;
}
.deal-card strong {
  display: block;
  font-size: 13px;
  line-height: 1.28;
}
.deal-title,
.deal-card > a small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.deal-due {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 8px;
  border-top: 1px solid #eff0eb;
  font-size: 11px;
  font-weight: 660;
}
.deal-due.due-late {
  background: #fff2ef;
}
.deal-due svg {
  width: 13px;
  height: 13px;
}
.deal-due span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.deal-due small {
  margin-left: auto;
  white-space: nowrap;
  font-size: 10px;
}
.company-row,
.company-table-header {
  display: grid;
  grid-template-columns: minmax(145px, 1.4fr) minmax(92px, 0.8fr) minmax(
      110px,
      1fr
    ) 48px 16px;
  gap: 10px;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid #eff0eb;
  overflow-wrap: anywhere;
}
.company-table-header {
  font-size: 11px;
  font-weight: 750;
  color: var(--muted);
}
.company-row:last-child {
  border-bottom: 0;
}
.company-row:hover {
  background: #f8f8f5;
}
.company-row > svg {
  width: 14px;
  color: var(--muted);
}
.company-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.company-name strong,
.company-name small {
  display: block;
}
.company-name small {
  font-size: 11px;
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.tabs a {
  padding: 6px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 650;
}
.tabs a:hover,
.tabs a[aria-current] {
  background: #eee9df;
  color: #6d451f;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 13px;
}
.back-link:hover {
  text-decoration: underline;
}
.back-link svg {
  width: 14px;
}
.detail-title,
.detail-sub,
.head-actions,
.stage-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.detail-sub {
  margin-top: 7px;
  color: var(--muted);
}
.detail-title {
  gap: 10px;
}
.detail-title .row-icon {
  width: 40px;
  height: 40px;
}
.details {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px 13px;
  margin: 0;
  padding: 14px 15px;
  font-size: 13px;
}
.details dt,
.contact-info dt {
  color: var(--muted);
}
.details dd,
.contact-info dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.details a,
.contact-info a {
  color: #82501f;
}
.details a:hover,
.contact-info a:hover {
  text-decoration: underline;
}
.contact-info {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 6px;
  margin: 5px 0 0;
  font-size: 11px;
}
.inline-note {
  padding: 12px 15px;
}
.inline-actions {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 8px;
  margin-top: 8px;
}
.inline-actions label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.inline-actions select {
  width: auto;
}
.settings-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 13px 15px;
}
.settings-hint {
  padding: 12px 15px 2px;
  font-size: 12px;
  color: var(--muted);
}
.settings-grid .stage-line {
  margin: 0 13px;
}
.stage-actions {
  gap: 1px;
  justify-content: end;
}
.stage-actions .icon-btn {
  width: 27px;
}
.auth-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(ellipse at 70% 10%, #f9e7d2, transparent 60%), #f3f3ed;
}
.auth-card {
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 45px #40372512;
  padding: 27px;
}
.auth-card .brand {
  margin-bottom: 26px;
}
.auth-card .brand span {
  color: #73786c;
}
.auth-card h1 {
  font-size: 26px;
  letter-spacing: -0.6px;
}
.auth-card p {
  color: var(--muted);
  margin: 4px 0 15px;
}
.auth-card .primary {
  justify-content: space-between;
}
.form-stack,
.dialog-fields,
.dialog-fields > div:not(.field-pair) {
  display: grid;
  gap: 11px;
}
.form-stack label,
.inline-note label {
  display: grid;
  gap: 4px;
  color: #454d43;
  font-weight: 660;
  font-size: 12px;
}
.inline-note .inline-actions label {
  display: flex;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d9dcd3;
  background: white;
  border-radius: 8px;
  padding: 8px 9px;
  font-size: 13px;
  min-height: 37px;
}
textarea {
  resize: vertical;
}
.form-error {
  color: #a52824 !important;
  font-size: 12px;
}
.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.dialog-message {
  color: var(--muted);
}
dialog {
  width: min(470px, calc(100% - 22px));
  max-height: calc(100dvh - 25px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 12px 70px #22252232;
  color: var(--text);
}
dialog::backdrop {
  background: #181d1880;
}
dialog > header,
dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
dialog h2 {
  font-size: 17px;
}
dialog .dialog-fields,
dialog .form-error {
  padding: 0 16px;
}
dialog .form-stack {
  padding-top: 13px;
}
dialog footer {
  justify-content: end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}
#toast {
  position: fixed;
  z-index: 5;
  right: 15px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px 7px 13px;
  max-width: calc(100vw - 30px);
  color: #fff;
  background: #2b342d;
  border-radius: 9px;
  box-shadow: 0 4px 18px #20262126;
  font-size: 13px;
}
#toast .icon-btn,
#toast .btn {
  color: #fff;
}
#toast .icon-btn:hover,
#toast .btn:hover {
  background: #4a554a;
}
.nav-item,
.btn,
.icon-btn,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
@media (max-width: 1120px) {
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .main-shell main {
    padding: 23px 19px 34px;
  }
  .topbar {
    padding: 0 19px;
  }
  .metrics {
    gap: 8px;
  }
  .metric {
    padding: 11px 8px;
    gap: 7px;
  }
  .metric > svg {
    display: none;
  }
}
@media (max-width: 860px) {
  .shell {
    grid-template-columns: 61px minmax(0, 1fr);
  }
  .sidebar {
    padding: 14px 7px 10px;
  }
  .sidebar .brand {
    padding: 0 4px 21px;
  }
  .sidebar .brand > span,
  .nav-item > span,
  .profile > div {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .nav-item {
    justify-content: center;
    padding: 10px 6px;
  }
  .profile {
    flex-direction: column;
  }
  .topbar {
    height: 48px;
  }
}
@media (max-width: 670px) {
  .dash-grid,
  .detail-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-head h1 {
    font-size: 26px;
  }
  .page-head {
    align-items: start;
    flex-wrap: wrap;
    margin-bottom: 17px;
  }
  .main-shell main {
    padding: 17px 12px 28px;
  }
  .topbar {
    padding: 0 12px;
  }
  .top-date {
    display: none;
  }
  .company-row,
  .company-table-header {
    grid-template-columns: minmax(0, 1fr) 43px 14px;
    padding: 8px 9px;
  }
  .company-table-header > :nth-child(2),
  .company-table-header > :nth-child(3),
  .table-phone,
  .table-email {
    display: none;
  }
  .task-row {
    flex-wrap: wrap;
  }
  .task-row > .row-copy {
    min-width: 55%;
  }
  .task-row > .due {
    margin-left: 45px;
  }
  .task-row .row-actions {
    margin-left: auto;
  }
  .head-actions {
    width: 100%;
  }
  .detail-grid > div:nth-child(2) {
    order: -1;
  }
}
@media (max-width: 420px) {
  .shell {
    grid-template-columns: 47px minmax(0, 1fr);
  }
  .sidebar {
    padding: 10px 4px 7px;
  }
  .sidebar .brand img {
    width: 100%;
    height: auto;
  }
  .sidebar .brand {
    padding-bottom: 15px;
  }
  .main-shell main {
    padding-inline: 9px;
  }
  .metric-icon {
    width: 29px;
    height: 29px;
  }
  .metric-icon svg {
    width: 15px;
  }
  .metric > div span {
    font-size: 10px;
  }
  .metric strong {
    font-size: 20px;
  }
  .board-column {
    flex-basis: 169px;
  }
  .panel > header {
    padding-inline: 10px;
  }
  .panel > header h2 {
    font-size: 14px;
  }
}
