:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --ink: #151a23;
  --muted: #667085;
  --line: #e4e7ec;
  --accent: #176b87;
  --accent-soft: #e5f4f7;
  --green: #147a52;
  --green-soft: #e7f6ee;
  --gold: #a06400;
  --gold-soft: #fff2cf;
  --blue: #175cd3;
  --blue-soft: #e8f0ff;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 16px 14px;
  background: rgba(245, 246, 248, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar h1 {
  margin: 0;
  font-size: 22px;
}

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

.icon-button {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: 30px;
  line-height: 1;
}

.mobile-fab {
  display: none;
}

.small-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 12px;
  background: var(--bg);
  position: sticky;
  top: 79px;
  z-index: 4;
}

.tab {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  height: 38px;
  white-space: nowrap;
}

.tab.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 14px 80px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric,
.panel,
.record {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric {
  padding: 14px;
  min-height: 92px;
}

.metric span,
.hint {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
}

.metric.primary {
  border-color: #9bc9d5;
  background: var(--accent-soft);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.panel {
  padding: 14px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-title-row h2 {
  margin: 0 0 12px;
}

h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 10px;
}

.project-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
}

.project-search {
  display: grid;
  grid-template-columns: auto minmax(180px, 360px);
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.project-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 11px;
}

.project-search input:focus {
  outline: 2px solid #9bc9d5;
  outline-offset: 1px;
}

.project-filter button {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  padding: 0 12px;
}

.project-filter button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.filter-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.filter-summary strong {
  color: var(--ink);
  white-space: nowrap;
}

.text-button,
.submit {
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  height: 40px;
  padding: 0 14px;
}

.mini-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.mini-button:disabled {
  opacity: 0.45;
}

.ghost {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

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

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

.record {
  padding: 12px;
}

.project-record,
.loss-record {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.project-record {
  padding-top: 42px;
  border-left: 6px solid var(--blue);
}

.project-select {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.project-select input {
  width: 16px;
  height: 16px;
}

.project-record.category-airdrop {
  border-left-color: #2f6fed;
  background: linear-gradient(90deg, rgba(47, 111, 237, 0.09), #fff 42%);
}

.project-record.category-contest {
  border-left-color: #168957;
  background: linear-gradient(90deg, rgba(22, 137, 87, 0.11), #fff 42%);
}

.project-record.category-tge {
  border-left-color: #c47a00;
  background: linear-gradient(90deg, rgba(196, 122, 0, 0.13), #fff 42%);
}

.project-record.category-wallet_task,
.project-record.category-task {
  border-left-color: #7f56d9;
  background: linear-gradient(90deg, rgba(127, 86, 217, 0.12), #fff 42%);
}

.project-record.category-finance_airdrop,
.project-record.category-booster,
.project-record.category-tge_booster {
  border-left-color: #d9480f;
  background: linear-gradient(90deg, rgba(217, 72, 15, 0.11), #fff 42%);
}

.category-ribbon {
  position: absolute;
  top: 10px;
  left: 12px;
  min-width: 78px;
  border-radius: 8px;
  padding: 6px 10px;
  color: white;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 2px 7px rgba(16, 24, 40, 0.14);
}

.category-airdrop .category-ribbon {
  background: #175cd3;
}

.category-contest .category-ribbon {
  background: #147a52;
}

.category-tge .category-ribbon {
  background: #a15c00;
}

.category-wallet_task .category-ribbon,
.category-task .category-ribbon {
  background: #6941c6;
}

.category-finance_airdrop .category-ribbon,
.category-booster .category-ribbon,
.category-tge_booster .category-ribbon {
  background: #c4320a;
}

.record-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.record-main > strong,
.project-value > strong {
  white-space: nowrap;
  text-align: right;
}

.project-value {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 6px;
}

.project-sale-split {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.project-sale-split span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  color: #475467;
  background: #f2f4f7;
}

.project-sale-split span::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 999px;
}

.project-sale-split .sold::before {
  background: #6f9581;
}

.project-sale-split .holding::before {
  background: #7d91a8;
}

.symbol {
  font-size: 18px;
  font-weight: 750;
}

.sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.airdrop {
  color: var(--blue);
  background: var(--blue-soft);
}

.badge.contest {
  color: var(--green);
  background: var(--green-soft);
}

.badge.tge {
  color: var(--gold);
  background: var(--gold-soft);
}

.badge.wallet_task,
.badge.task {
  color: #6941c6;
  background: #f4ebff;
}

.badge.finance_airdrop,
.badge.booster,
.badge.tge_booster {
  color: #b54708;
  background: #fff6ed;
}

.category-chart {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 14px;
  align-items: center;
}

.donut-wrap {
  position: relative;
  width: 158px;
  height: 158px;
}

.donut {
  width: 158px;
  height: 158px;
  transform: rotate(-90deg);
}

.donut-total {
  position: absolute;
  inset: 28px;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
}

.donut-total span {
  color: var(--muted);
  font-size: 12px;
}

.donut-total strong {
  font-size: 16px;
}

.legend {
  display: grid;
  gap: 8px;
}

.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.legend-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.legend-row i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.bar-chart {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 42px 1fr 86px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.bar-row span {
  color: var(--muted);
}

.bar-row strong {
  text-align: right;
}

.bar-pair {
  display: grid;
  gap: 3px;
}

.bar {
  display: block;
  height: 8px;
  border-radius: 999px;
}

.bar.income {
  background: #168957;
}

.bar.loss {
  background: #d92d20;
}

.people-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.record-totals {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.record-totals span {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  padding: 6px 9px;
  color: var(--muted);
  font-size: 12px;
}

.person-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.person-cell {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 8px;
  display: grid;
  align-content: space-between;
  gap: 4px;
}

.person-cell span,
.person-cell em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.person-cell strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.person-cell.sold,
.person-cell.loss.good {
  border-color: #d5dfd9;
  background: #f7faf8;
}

.person-cell.sold em {
  color: #536b5e;
  font-weight: 700;
}

.person-cell.holding {
  border-color: #d6dee8;
  background: #f7f9fb;
}

.person-cell.holding em {
  color: #5c6d80;
  font-weight: 700;
}

.person-cell.claimed {
  border-color: #d0d5dd;
  background: #f8fafc;
}

.person-cell.empty {
  color: var(--muted);
  background: rgba(248, 250, 252, 0.78);
}

.person-cell.loss.bad {
  border-color: #f4b4ae;
  background: #fff1f0;
}

.position-summary {
  display: grid;
  gap: 12px;
}

.sold-flier-panel {
  grid-column: 1 / -1;
}

.panel-note {
  color: var(--muted);
  font-size: 12px;
}

.sold-flier-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sold-flier-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border: 1px solid #e1d8c8;
  border-radius: 8px;
  background: #fbfaf7;
  color: var(--ink);
  padding: 10px;
  text-align: left;
}

.sold-flier-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.sold-flier-row span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.sold-flier-values {
  justify-items: end;
  text-align: right;
}

.sold-flier-values b {
  color: #7a4e13;
  font-size: 13px;
}

.position-bars {
  display: grid;
  gap: 10px;
}

.position-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  align-items: center;
}

.position-button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0;
  text-align: left;
  color: inherit;
}

.audit-list {
  display: grid;
  gap: 8px;
}

.audit-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.audit-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.audit-row span {
  color: var(--muted);
  font-size: 12px;
}

.audit-row strong {
  font-size: 13px;
  font-weight: 600;
}

.quick-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
  display: grid;
  gap: 10px;
}

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

.quick-actions .text-button {
  height: auto;
  min-height: 38px;
  white-space: normal;
  padding: 7px 8px;
}

.position-row span {
  color: var(--muted);
  font-size: 13px;
}

.position-row strong {
  text-align: right;
  font-size: 13px;
}

.position-row i,
.category-line i {
  grid-column: 1 / -1;
  height: 10px;
  border-radius: 999px;
  background: #eef2f6;
  overflow: hidden;
}

.position-row b,
.category-line b {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: #168957;
}

.position-row b.holding {
  background: #2f6fed;
}

.compare-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: #f8fafc;
}

.compare-box span,
.compare-box em,
.category-line span {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.compare-box.good strong {
  color: #168957;
}

.compare-box.bad strong {
  color: #d92d20;
}

.category-line {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.category-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.category-line div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.focus-card {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
  display: grid;
  align-content: space-between;
  gap: 6px;
}

.focus-card.strong {
  border-color: #9bc9d5;
  background: var(--accent-soft);
}

.focus-card span,
.focus-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.focus-card strong {
  font-size: 20px;
  overflow-wrap: anywhere;
}

.loss-calendar-panel {
  margin-bottom: 12px;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-head h2 {
  margin: 0;
}

.calendar-head input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
}

.month-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.month-stat-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #f8fafc;
}

.month-stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.month-stat-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.year-months {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.year-months button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 7px 6px;
  text-align: left;
}

.year-months button.active {
  border-color: #9bc9d5;
  background: var(--accent-soft);
}

.year-months span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.year-months strong {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.loss-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-week {
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  padding: 4px 0;
}

.calendar-day {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 6px;
  display: grid;
  align-content: space-between;
  text-align: left;
  color: var(--ink);
}

.calendar-day.blank {
  border: 0;
  background: transparent;
}

.calendar-day span {
  color: var(--muted);
  font-size: 12px;
}

.calendar-day strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.calendar-day.bad {
  border-color: #f4b4ae;
  background: #fff1f0;
}

.calendar-day.good {
  border-color: #9dd9b7;
  background: #effaf4;
}

.calendar-day.empty {
  background: #fbfcfd;
}

.section-head.compact {
  margin-top: 14px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  background: white;
}

.chip.holding {
  border-color: #9bc9d5;
  background: var(--accent-soft);
}

.chip.sold {
  border-color: #b7dfc9;
  background: var(--green-soft);
}

.summary-list {
  display: grid;
  gap: 8px;
}

.summary-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.summary-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.summary-row-4 {
  grid-template-columns: minmax(92px, 1fr) minmax(106px, auto) minmax(106px, auto) minmax(106px, auto);
}

.summary-row span {
  text-align: right;
  white-space: nowrap;
}

.summary-row .net.good {
  color: #168957;
}

.summary-row .net.bad {
  color: #d92d20;
}

.sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(21, 26, 35, 0.36);
  align-items: end;
}

.sheet.active {
  display: flex;
}

.sheet-card {
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  background: var(--panel);
  border-radius: 12px 12px 0 0;
  padding: 16px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: white;
}

.person-entry {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.person-entry .entry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.add-menu {
  display: grid;
  gap: 10px;
}

.add-menu button {
  height: 54px;
  text-align: left;
  padding: 0 14px;
}

body.locked main,
body.locked .topbar,
body.locked .tabs,
body.locked .mobile-fab {
  filter: blur(2px);
  pointer-events: none;
}

.login-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  place-items: center;
  padding: 18px;
  background: rgba(21, 26, 35, 0.42);
}

.login-screen.active {
  display: grid;
}

.login-card {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 18px;
  display: grid;
  gap: 12px;
  box-shadow: 0 18px 50px rgba(21, 26, 35, 0.22);
}

.login-card h2 {
  margin: 0 0 4px;
}

.login-card p {
  margin: 0;
  color: var(--muted);
}

.session-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.privacy-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
}

.privacy-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--ink);
}

.privacy-toggle:has(input:checked) {
  background: #eef2f6;
  border-color: #c8d0da;
}

.session-bar span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.login-users-panel {
  margin-top: 12px;
}

.upload-preview {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

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

.candidate-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
  display: grid;
  gap: 8px;
}

@media (max-width: 720px) {
  .sold-flier-list {
    grid-template-columns: 1fr;
  }

  .sold-flier-row {
    padding: 8px;
  }

  .project-search {
    grid-template-columns: 1fr;
    gap: 5px;
  }

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

  .tabs {
    top: 79px;
  }

  .summary-row,
  .summary-row-4 {
    grid-template-columns: minmax(72px, 1fr) repeat(3, minmax(68px, auto));
    gap: 6px;
  }

  .summary-row strong,
  .summary-row span {
    font-size: 12px;
  }

  .category-chart {
    grid-template-columns: 1fr;
  }

  .donut-wrap {
    margin: 0 auto;
  }

  .topbar .icon-button {
    display: none;
  }

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

  .session-bar {
    display: grid;
    justify-items: end;
  }

  .login-card {
    align-self: center;
  }

  .upload-preview {
    max-height: 240px;
  }

  .mobile-fab {
    display: block;
    position: fixed;
    left: 16px;
    bottom: 18px;
    z-index: 30;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 8px;
    background: var(--ink);
    color: white;
    font-size: 34px;
    line-height: 1;
    box-shadow: 0 10px 28px rgba(21, 26, 35, 0.28);
  }

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

  .record-main {
    align-items: flex-start;
  }

  .record-main > strong {
    font-size: 14px;
  }

  .person-cell {
    min-height: 66px;
  }

  #projects .record-list {
    gap: 8px;
  }

  #projects .project-record {
    padding: 28px 8px 7px;
    border-left-width: 4px;
  }

  #projects .category-ribbon {
    top: 7px;
    left: 8px;
    min-width: 54px;
    padding: 3px 7px;
    font-size: 12px;
  }

  #projects .project-select {
    top: 6px;
    right: 8px;
    width: 26px;
    height: 26px;
  }

  #projects .symbol {
    font-size: 16px;
  }

  #projects .sub {
    font-size: 11px;
  }

  #projects .record-main > strong,
  #projects .project-value > strong {
    font-size: 13px;
  }

  #projects .project-value {
    gap: 4px;
  }

  #projects .project-sale-split {
    display: grid;
    justify-items: end;
    gap: 3px;
  }

  #projects .project-sale-split span {
    padding: 2px 5px;
    font-size: 10px;
  }

  #projects .record-totals {
    margin-top: 6px;
    gap: 5px;
  }

  #projects .record-totals span {
    padding: 3px 6px;
    font-size: 11px;
  }

  #projects .person-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 6px;
  }

  #projects .person-cell {
    min-height: 34px;
    padding: 4px 5px;
    gap: 1px;
  }

  #projects .person-cell span {
    font-size: 10px;
  }

  #projects .person-cell strong {
    font-size: 12px;
    line-height: 1.1;
  }

  #projects .person-cell em {
    display: none;
  }

  #projects .person-cell.empty {
    display: none;
  }

  #projects .project-record.no-claims .record-totals,
  #projects .project-record.no-claims .person-grid {
    display: none;
  }

  #projects .project-filter button {
    min-height: 32px;
    padding: 0 9px;
    font-size: 12px;
  }

  #projects .filter-summary {
    margin-bottom: 7px;
    font-size: 12px;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .audit-row {
    grid-template-columns: 58px 1fr;
  }

  .focus-grid,
  .month-stat-grid {
    grid-template-columns: 1fr;
  }

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

  .calendar-day {
    min-height: 50px;
    padding: 5px;
  }

  .calendar-day strong {
    font-size: 10px;
  }
}

@media (min-width: 721px) and (max-width: 980px) {
  .person-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
