:root {
  --green: #00a88a;
  --green-dark: #087d6c;
  --ink: #10282d;
  --muted: #617579;
  --line: #dce7e5;
  --soft: #f2f8f7;
  --card: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f4f8f7;
  color: var(--ink);
  font: 14px/1.5 Inter, "Segoe UI", Arial, sans-serif;
}

a { color: var(--green-dark); }
button, input, select { font: inherit; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px max(24px, calc((100vw - 1180px) / 2));
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 9px;
}

.brand strong {
  display: block;
  font-size: 21px;
}

.brand small {
  display: block;
  color: var(--muted);
}

.top-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}

.top-actions a {
  color: #38545a;
  font-weight: 800;
  text-decoration: none;
}

.website-account-badge {
  align-items: center;
  display: flex;
  gap: 9px;
  margin-left: auto;
}

.account-summary {
  display: grid;
  line-height: 1.25;
  max-width: 190px;
}

.account-summary strong,
.account-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-summary small {
  color: var(--muted);
  font-size: 11px;
}

.account-signin-link,
.account-profile-link,
.account-signout-button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  padding: 8px 11px;
  text-decoration: none;
}

.account-signout-button {
  color: #8f1212;
}

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

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 18px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: center;
}

.hero h1 {
  max-width: 760px;
  margin: 6px 0 10px;
  font-size: 34px;
  line-height: 1.15;
}

.hero p {
  color: #38545a;
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: #fbfdfc;
}

.profile-card small {
  display: block;
  color: var(--muted);
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 13px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  border: 1px solid #b8ece4;
  border-radius: 999px;
  padding: 6px 11px;
  background: #eafaf7;
  color: var(--green-dark);
  font-weight: 900;
}

.status-pill.muted {
  border-color: var(--line);
  background: var(--soft);
  color: #38545a;
}

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

.kpi-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}

.kpi-card span,
.detail-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.kpi-card strong {
  display: block;
  margin: 7px 0;
  font-size: 26px;
}

.kpi-card small,
.boundary {
  color: var(--muted);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.panel-heading h2,
.panel h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.reports-table {
  min-width: 940px;
  table-layout: fixed;
}

.reports-table th:nth-child(1) { width: 46%; }
.reports-table th:nth-child(2) { width: 13%; }
.reports-table th:nth-child(3) { width: 11%; }
.reports-table th:nth-child(4) { width: 10%; }
.reports-table th:nth-child(5) { width: 8%; }
.reports-table th:nth-child(6) { width: 12%; }

.reports-table td:first-child {
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.reports-table td:nth-child(2),
.reports-table td:nth-child(3),
.reports-table td:nth-child(4) {
  color: #38545a;
}

.reports-table td:nth-child(4) {
  white-space: nowrap;
}

.report-actions-cell {
  white-space: nowrap;
}

.report-row-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.report-row-actions .quiet + .quiet {
  margin-inline-start: 0;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}

th {
  background: var(--soft);
  color: #38545a;
  font-size: 12px;
  font-weight: 900;
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.credit-meter {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.credit-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.fact-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.fact-list div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

.fact-list dt {
  color: var(--muted);
}

.fact-list dd {
  margin: 0;
  font-weight: 900;
}

.panel h3 {
  margin: 22px 0 10px;
  font-size: 16px;
}

.activity-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
}

.activity-list strong {
  color: var(--ink);
}

.activity-list small {
  color: var(--muted);
}

.plan-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.payment-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, auto);
  gap: 12px;
  align-items: end;
  margin: 16px 0;
}

.payment-form .primary {
  grid-column: 1 / -1;
}

.credit-estimate {
  min-height: 42px;
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 12px;
  background: var(--soft);
}

.credit-estimate span {
  color: #38545a;
  font-size: 12px;
}

.primary,
.secondary,
.quiet {
  border-radius: 7px;
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
}

.primary {
  border: 0;
  background: var(--green);
  color: #fff;
}

.secondary,
.quiet {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.quiet {
  padding: 7px 11px;
}

.quiet + .quiet {
  margin-inline-start: 7px;
}

.danger {
  color: #a40000;
}

.danger-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 16px 24px;
  align-items: end;
  border-color: #e5c7c7;
}

.danger-zone p {
  color: #6e4141;
}

.danger-zone .danger {
  justify-self: start;
  border-color: #c98989;
}

.danger-zone .message {
  grid-column: 1 / -1;
  color: #8f1212;
}

.empty-state {
  margin: 0 0 14px;
  border-left: 3px solid #b8ceca;
  padding: 12px 14px;
  background: var(--soft);
  color: #38545a;
}

.message {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--green-dark);
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: #38545a;
  font-weight: 800;
}

input,
select {
  min-height: 42px;
  border: 1px solid #bdcecb;
  border-radius: 7px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
}

@media (max-width: 900px) {
  .hero,
  .kpi-grid,
  .split-grid,
  .form-grid,
  .danger-zone {
    grid-template-columns: 1fr;
  }

  .topbar,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .website-account-badge {
    flex-wrap: wrap;
    margin-left: 0;
    width: 100%;
  }
}
