:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #efeae2;
  color: #17212b;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
}

.card {
  width: min(100%, 430px);
  padding: 36px 28px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 18px 50px rgb(17 27 33 / 12%);
}

.auth-card { text-align: center; }
.mark, .member-badge {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 22px;
  background: #075e54;
  color: #fff;
  font-size: 34px;
  font-weight: 700;
}
.member-badge { background: #128c7e; }
.member-badge.small { width: 48px; height: 48px; margin: 0; border-radius: 16px; font-size: 21px; }

.eyebrow { margin: 0; color: #667781; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 8px 0 12px; font-size: clamp(27px, 8vw, 32px); line-height: 1.2; }
h2 { margin: 0; font-size: 20px; }
.muted { margin: 0 0 24px; color: #667781; line-height: 1.55; }

.form-stack { display: grid; gap: 10px; margin-top: 24px; text-align: left; }
.form-stack label { margin-top: 4px; color: #40515b; font-size: 14px; font-weight: 700; }
.form-stack input, .form-stack select {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid #d4dadd;
  border-radius: 13px;
  background: #fff;
  color: #17212b;
  outline: none;
}
.form-stack input:focus, .form-stack select:focus { border-color: #128c7e; box-shadow: 0 0 0 3px rgb(18 140 126 / 12%); }

.primary-button, .secondary-button, .small-button {
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 700;
}
.primary-button { min-height: 52px; margin-top: 12px; background: #075e54; color: #fff; }
.secondary-button { width: 100%; min-height: 48px; margin-top: 22px; background: #eef2f2; color: #40515b; }
.small-button { padding: 9px 12px; background: #eef2f2; color: #075e54; white-space: nowrap; }

.alert { margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; background: #fff1f0; color: #a32820; font-size: 14px; line-height: 1.45; text-align: left; }
.status { display: inline-block; margin-top: 14px; padding: 6px 12px; border-radius: 999px; background: #d9fdd3; color: #075e54; font-size: 12px; font-weight: 700; }

.dashboard-card { text-align: left; }
.top-row, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.top-row h1 { margin-bottom: 0; }
.welcome-panel { margin: 28px 0 18px; padding: 20px; border-radius: 18px; background: linear-gradient(135deg, #075e54, #128c7e); color: #fff; }
.welcome-panel p { margin: 0 0 6px; font-size: 19px; font-weight: 700; }
.welcome-panel span { font-size: 13px; opacity: .85; }
.action-list { overflow: hidden; border: 1px solid #e5e9eb; border-radius: 16px; }
.action-list a { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 0 16px; color: #17212b; text-decoration: none; }
.action-list a + a { border-top: 1px solid #e5e9eb; }
.action-list span { color: #667781; font-size: 26px; }

.admin-shell { width: min(100% - 32px, 900px); margin: 0 auto; padding: max(26px, env(safe-area-inset-top)) 0 max(40px, env(safe-area-inset-bottom)); }
.page-header { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.page-header h1 { margin-bottom: 0; }
.back-link { padding: 10px 12px; border-radius: 12px; background: #fff; color: #075e54; font-size: 17px; font-weight: 700; text-decoration: none; }
.panel { margin-bottom: 18px; padding: 22px; border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgb(17 27 33 / 7%); }
.member-list { margin-top: 14px; }
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.member-row + .member-row { border-top: 1px solid #e8ecee; }
.member-row strong, .member-row span { display: block; }
.member-row span { margin-top: 3px; color: #667781; font-size: 13px; }
.section-heading span { color: #667781; font-size: 13px; }
.table-wrap { margin-top: 14px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 10px; border-bottom: 1px solid #e8ecee; text-align: left; white-space: nowrap; }
th { color: #667781; font-size: 12px; }
.result { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.result.success { background: #d9fdd3; color: #075e54; }
.result.failed { background: #fff1f0; color: #a32820; }
.empty { padding: 28px; color: #667781; text-align: center; }

@media (max-width: 520px) {
  .shell { padding-inline: 14px; }
  .card { padding: 30px 21px; border-radius: 20px; }
  .admin-shell { width: min(100% - 20px, 900px); }
  .page-header { align-items: flex-start; gap: 10px; }
  .panel { padding: 18px 15px; border-radius: 16px; }
}
