:root {
  --cream: #fbf8f1;
  --paper: #fff;
  --espresso: #183f2a;
  --terracotta: #cc512e;
  --teal: #183f2a;
  --sand: #d9c19c;
  --ink: #1d2b22;
  --muted: #6a6e67;
  --line: #e3d6c3;
  --success: #2f6a45;
  --danger: #b83e2d;
  --radius: 20px;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--cream);
  color: var(--ink);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
body {
  margin: 0;
}
a {
  color: var(--teal);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--espresso);
  font-weight: 900;
  text-decoration: none;
}
.brand img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
}
header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px max(24px, calc((100vw - 1120px) / 2));
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  color: var(--muted);
}
header nav,
footer nav,
.meta,
.actions,
.inline-actions,
.admin-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
header nav a,
footer nav a {
  text-decoration: none;
}
.brand {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--espresso);
  font-weight: 900;
  font-size: 20px;
  text-decoration: none;
}
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 24px;
}
.hero {
  padding: 80px 0;
  max-width: 820px;
}
.hero h1,
.profile h1 {
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  margin: 12px 0 20px;
  color: var(--espresso);
}
.hero > p,
.profile > div > p {
  font-size: 20px;
  line-height: 1.6;
  color: var(--muted);
}
.eyebrow {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: var(--terracotta);
}
h2 {
  font-size: 30px;
  color: var(--espresso);
  margin-top: 52px;
}
.button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: var(--terracotta);
  color: #fff;
  padding: 14px 22px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.button.secondary {
  background: var(--teal);
}
.small-button {
  font-size: 12px;
  padding: 8px 11px;
  background: var(--espresso);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(75, 36, 24, 0.06);
}
.card img,
.image-placeholder {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.image-placeholder {
  display: grid;
  place-items: center;
  background: #f2e8d8;
  font-size: 54px;
}
.card-body {
  padding: 20px;
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.card .card-body {
  border: 0;
}
.card h3,
.card p {
  margin: 0 0 8px;
}
.card p,
.menu-item p,
.updated {
  color: var(--muted);
}
.empty,
.notice {
  border: 1px dashed #d9c19c;
  background: #fbf8f1;
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.notice {
  text-align: left;
  border-style: solid;
  border-color: #c7ddce;
  background: #f0f7f2;
  margin: 24px 0;
}
.cover {
  width: 100%;
  height: min(48vw, 480px);
  object-fit: cover;
  border-radius: 28px;
}
.profile {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 36px;
  padding: 42px 0;
}
.profile h1 {
  font-size: 52px;
}
.badge,
.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 10px;
  background: #e7f3ea;
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
}
.pill {
  background: #f8e5de;
  color: var(--danger);
  margin-top: 6px;
}
.menu-list {
  display: grid;
  gap: 12px;
}
.menu-item {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}
.menu-item p {
  margin: 8px 0 0;
}
article {
  max-width: 780px;
  margin: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(24px, 5vw, 58px);
  line-height: 1.7;
}
article h1 {
  font-size: 46px;
  color: var(--espresso);
}
.auth-card {
  max-width: 520px;
  margin: 60px auto;
  padding: 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.auth-card form {
  display: grid;
  gap: 18px;
}
.auth-card label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}
input,
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d2c1a7;
  border-radius: 12px;
  font: inherit;
  background: #fff;
}
.flash {
  padding: 14px;
  border-radius: 12px;
  margin: 12px 0;
}
.flash.error {
  background: #fae9e3;
  color: var(--danger);
}
.admin-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 14px 24px;
  background: var(--espresso);
  color: #fff;
}
.admin-nav a,
.admin-nav button {
  color: #fff;
  text-decoration: none;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}
.admin-nav form {
  margin-left: auto;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
.metric {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.metric span,
.metric strong {
  display: block;
}
.metric span {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.metric strong {
  font-size: 24px;
  color: var(--espresso);
}
.table-wrap {
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
th,
td {
  text-align: left;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.inline-actions {
  gap: 5px;
}
.inline-actions form {
  margin: 0;
}
.inline-actions .plan-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(115px, 1fr));
  gap: 5px;
  min-width: 290px;
  padding-top: 5px;
  border-top: 1px solid var(--line);
}
.plan-form input,
.plan-form select {
  min-width: 0;
  padding: 7px 8px;
  font-size: 12px;
}
.admin-create {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
  gap: 14px;
  margin: 20px 0;
}
.admin-create label,
.config-form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}
.config-list {
  display: grid;
  gap: 16px;
}
.config-form {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.config-form textarea {
  min-height: 100px;
  margin-bottom: 12px;
}
.benefits .card-body {
  min-height: 160px;
}
.portal-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 18px;
  color: #fff;
  background: var(--espresso);
}
.portal-nav strong { margin-right: 12px; white-space: nowrap; }
.portal-nav button {
  border: 0;
  border-radius: 999px;
  padding: 9px 12px;
  color: #fff;
  background: rgba(255,255,255,.1);
  white-space: nowrap;
  cursor: pointer;
}
.portal-nav form { margin-left: auto; }
#portal-message { max-width: 1120px; margin: 12px auto 0; padding: 0 24px; }
.payment-proof { display: block; width: min(100%, 640px); max-height: 640px; object-fit: contain; margin: 18px 0; border-radius: 16px; background: var(--cream); }
.portal-logo { width: 90px; height: 90px; border-radius: 22px; object-fit: cover; }
@media (max-width: 700px) {
  header {
    align-items: flex-start;
  }
  header nav {
    display: none;
  }
  .profile {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 48px 0;
  }
  .menu-item {
    flex-direction: column;
  }
  .admin-nav {
    overflow: auto;
    flex-wrap: nowrap;
  }
  .admin-nav a {
    white-space: nowrap;
  }
  footer {
    align-items: flex-start;
    gap: 20px;
    flex-direction: column;
  }
}
