* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f8fa;
  color: #1d2430;
}

a {
  color: #2457c5;
  text-decoration: none;
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.1;
}

h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

.muted {
  color: #687385;
}

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

.metric,
.panel,
.lead,
.ledger-row {
  background: #fff;
  border: 1px solid #e2e6ee;
  border-radius: 8px;
}

.metric {
  padding: 16px;
}

.metric span {
  display: block;
  color: #687385;
  font-size: 13px;
}

.metric strong {
  display: block;
  font-size: 26px;
  margin-top: 6px;
}

.panel {
  padding: 18px;
  margin-bottom: 18px;
}

textarea,
input {
  width: 100%;
  border: 1px solid #cfd6e2;
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 8px;
}

.form-row {
  margin-bottom: 14px;
}

.form-row.compact {
  min-width: 220px;
  margin-bottom: 0;
}

.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  background: #1e4fbf;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #e8ebf1;
  vertical-align: top;
}

th {
  color: #687385;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  background: #eef2f8;
}

.lead {
  padding: 14px;
  margin-bottom: 10px;
}

.lead strong {
  display: block;
  margin-bottom: 4px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.inline-action {
  margin: 0;
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e8ebf1;
  margin-bottom: 14px;
}

.tab {
  min-height: 34px;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: #687385;
  border: 1px solid transparent;
  border-bottom: 0;
}

.tab.is-active {
  background: #fff;
  color: #1d2430;
  border-color: #e2e6ee;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

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

  .topbar {
    display: block;
  }
}
