:root {
  --bg: #f4f4f3;
  --panel: #ffffff;
  --line: #e7e7e5;
  --ink: #0d1117;
  --muted: #6b7078;
  --soft: #f7f7f7;
  --dark: #090909;
  --green: #d9f8e9;
  --green-ink: #17724f;
  --blue: #e7efff;
  --blue-ink: #1d57aa;
  --yellow: #fff5bd;
  --yellow-ink: #7a6100;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, Arial, sans-serif;
  font-size: 12px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 205px;
  display: flex;
  flex-direction: column;
  padding: 12px 18px;
  background: var(--panel);
  border-right: 1px solid var(--line);
}

.panel-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 30px;
  font-weight: 800;
}

.panel-brand > span:last-child {
  display: grid;
  line-height: 1.15;
}

.panel-brand strong {
  font-size: 17px;
}

.panel-brand small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.brand-symbol {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: var(--dark);
  border-radius: 3px;
  font-size: 12px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  border-radius: 3px;
  color: #343941;
  font-weight: 700;
}

.nav-item span {
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 1px;
}

.nav-item.is-active {
  padding: 0 14px;
  background: #f2f2f2;
  color: #111;
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.dashboard {
  min-height: 100vh;
  margin-left: 205px;
  background: var(--panel);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 58px;
  padding: 0 22px;
}

.command-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(340px, 42vw);
  height: 36px;
  padding: 0 13px;
  background: #f7f7f7;
}

.command-search input,
.lead-search input,
.status-filter select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.top-actions {
  display: flex;
  align-items: center;
  padding-top: 6px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff;
  background: #111;
  border: 3px solid #eee8e2;
  border-radius: 50%;
  font-weight: 800;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 24px 28px 18px;
}

.page-head p {
  margin: 0 0 3px;
  color: var(--muted);
  font-weight: 600;
}

h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

h1 span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 11px;
  font-weight: 800;
}

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

.outline-button,
.solid-button {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  font-weight: 800;
}

.solid-button {
  color: #fff;
  background: #111;
}

.tabs {
  display: flex;
  gap: 26px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
}

.tabs button {
  position: relative;
  height: 44px;
  border: 0;
  background: transparent;
  font-weight: 800;
}

.tabs button.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: #111;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #f2f2f1;
}

.stats-grid article {
  min-height: 76px;
  padding: 17px 24px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.stats-grid span {
  display: block;
  color: #575d65;
  font-weight: 800;
}

.stats-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1;
}

.table-shell {
  background: #fff;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding: 14px 28px;
}

.lead-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  height: 38px;
  padding: 0 13px;
  background: #fff;
  border: 1px solid #f1f1f1;
}

.status-filter {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 170px;
  height: 38px;
  padding: 0 14px;
  background: #fff;
}

.status-filter span {
  font-weight: 800;
}

.table-wrap {
  position: relative;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  table-layout: fixed;
}

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

th {
  height: 44px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

th:first-child,
td:first-child {
  width: 46px;
  text-align: center;
}

th:nth-child(2) {
  width: 17%;
}

th:nth-child(3) {
  width: 24%;
}

th:nth-child(4) {
  width: 18%;
}

th:nth-child(5) {
  width: 13%;
}

th:nth-child(6) {
  width: 12%;
}

th:nth-child(7) {
  width: 13%;
}

.lead-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 800;
}

.lead-name span:last-child,
.contact-line strong,
td {
  overflow-wrap: anywhere;
}

.lead-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  color: #fff;
  border-radius: 50%;
  background: #26352f;
  font-size: 11px;
  font-weight: 800;
}

.contact-line {
  display: grid;
  gap: 4px;
}

.contact-line strong {
  font-size: 12px;
}

.contact-line span {
  color: var(--muted);
  font-size: 11px;
}

.team-stack {
  display: flex;
  align-items: center;
}

.team-avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: -6px;
  color: #fff;
  background: #111;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}

.team-avatar:first-child {
  margin-left: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.tag.new {
  color: var(--blue-ink);
  background: var(--blue);
}

.tag.proposal {
  color: var(--yellow-ink);
  background: var(--yellow);
}

.tag.won {
  color: var(--green-ink);
  background: var(--green);
}

.empty-state {
  display: none;
  place-items: center;
  gap: 6px;
  min-height: 140px;
  color: var(--muted);
  font-weight: 700;
}

.empty-state strong {
  color: #454a52;
}

.empty-state.is-visible {
  display: grid;
}

@media (max-width: 860px) {
  .sidebar {
    position: static;
    width: auto;
  }

  .dashboard {
    margin-left: 0;
  }

  .topbar,
  .page-head,
  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .command-search,
  .status-filter {
    width: 100%;
  }

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

select.tag-select {
  border: 0;
  outline: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  padding: 0 16px 0 8px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 8px;
}
