:root {
  --ink: #10201b;
  --muted: #61736c;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --line: #dce5df;
  --mint: #dff6eb;
  --green: #0c6b4d;
  --green-2: #074b3a;
  --gold: #d8a444;
  --coral: #e86f51;
  --shadow: 0 24px 70px rgba(16, 32, 27, .13);
}

* { box-sizing: border-box; }
body.account-body {
  margin: 0;
  min-height: 100vh;
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f2fbf6 0%, var(--paper) 52%, #f7f3ea 100%);
}
a { color: inherit; }
.hidden { display: none !important; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px clamp(18px, 4vw, 58px);
  background: rgba(251, 250, 246, .88);
  border-bottom: 1px solid rgba(16, 32, 27, .08);
  backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
}
nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  font-size: .9rem;
  color: var(--muted);
}
nav a, .primary-cta {
  text-decoration: none;
  font-weight: 800;
}
.primary-cta, .header-button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 28px rgba(12, 107, 77, .2);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.header-button {
  background: #fff;
  color: var(--green-2);
  border: 1px solid var(--line);
  box-shadow: none;
}

.login-shell, .account-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}
.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(48px, 8vw, 94px) 0;
}
.eyebrow, .section-kicker {
  margin: 0 0 12px;
  color: var(--green);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1, h2 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  line-height: .92;
}
h1 { font-size: clamp(4.8rem, 13vw, 10rem); }
h2 { font-size: clamp(2.2rem, 5vw, 4.8rem); }
.lead {
  max-width: 760px;
  margin: 20px 0 0;
  color: #2f4039;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.55;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.trust-row span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.55);
  color: var(--muted);
  font-size: .9rem;
}
.login-panel, .panel, .metric-card {
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(16, 32, 27, .06);
}
.login-panel {
  padding: clamp(22px, 4vw, 34px);
}
label {
  display: block;
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
}
input, select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.login-panel button, .user-form button { width: 100%; margin-top: 16px; }
.small-note, .muted, .metric-card p {
  color: var(--muted);
  line-height: 1.65;
}
.form-error {
  padding: 12px;
  border-radius: 8px;
  background: #fde3da;
  color: #8b2716;
  font-weight: 800;
}

.account-shell { padding: clamp(34px, 6vw, 76px) 0 80px; }
.account-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.metric-card { padding: 24px; }
.metric-label {
  display: block;
  margin-bottom: 14px;
  color: var(--green);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.metric-card strong {
  display: block;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1;
}
.panel { padding: clamp(22px, 4vw, 34px); }
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}
.user-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 16px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--mint);
}
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green-2);
  font-weight: 800;
  font-size: .78rem;
}
.status-pill.inactive, .status-pill.past_due {
  background: #fde3da;
  color: #8b2716;
}
.table-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.table-actions button {
  min-height: 34px;
  padding: 0 10px;
  box-shadow: none;
  font-size: .78rem;
}
.danger-button { background: var(--coral); }

@media (max-width: 900px) {
  .site-header { align-items: flex-start; flex-wrap: wrap; }
  nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 2px; }
  .login-shell, .dashboard-grid, .user-form { grid-template-columns: 1fr; }
  .account-hero { display: block; }
  .account-hero .primary-cta { margin-top: 18px; }
}
