:root {
  --green-950: #073b2a;
  --green-800: #0b5d3f;
  --green-700: #08794f;
  --green-600: #0b9360;
  --green-100: #dff5e9;
  --green-50: #f1fbf5;
  --ink: #17352b;
  --muted: #65786f;
  --line: #dbe7e0;
  --danger: #b42318;
  --white: #fff;
  --shadow: 0 14px 40px rgba(7, 59, 42, .09);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #f4f8f5;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 12px max(20px, calc((100vw - 1180px) / 2));
  color: white;
  background: rgba(7, 59, 42, .96);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: var(--green-950);
  background: #d7f4e3;
  font-size: 22px;
  font-weight: 900;
}
.brand strong, .brand small { display: block; }
.brand small { color: #b9d9ca; font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.hero {
  padding: 64px 20px 86px;
  color: white;
  background:
    radial-gradient(circle at 90% 10%, rgba(72, 196, 126, .35), transparent 26%),
    linear-gradient(135deg, #073b2a, #08794f);
}
.hero-inner { width: min(1180px, 100%); margin: auto; }
.eyebrow {
  display: inline-flex;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  color: #cff4df;
  background: rgba(255,255,255,.08);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero h1 { max-width: 770px; margin: 18px 0 10px; font-size: clamp(32px, 5vw, 56px); line-height: 1.08; letter-spacing: -.035em; }
.hero p { max-width: 720px; margin: 0; color: #cce3d8; font-size: 17px; }
.region-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.region-chip { padding: 9px 13px; border-radius: 10px; background: rgba(255,255,255,.1); font-size: 13px; }
.container { width: min(1180px, calc(100% - 32px)); margin: -42px auto 64px; position: relative; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.form-card { padding: clamp(18px, 3vw, 34px); }
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 15px 16px;
  border: 1px solid #bde5cd;
  border-radius: 14px;
  background: var(--green-50);
  color: #315c49;
}
.notice strong { color: var(--green-800); }
.section { padding: 24px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.section-number {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: white;
  background: var(--green-700);
  font-weight: 800;
}
.section-heading h2 { margin: 0; font-size: 20px; line-height: 1.25; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.subheading { margin: 24px 0 13px; font-size: 14px; color: var(--green-800); text-transform: uppercase; letter-spacing: .04em; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.field { grid-column: span 4; }
.field.half { grid-column: span 6; }
.field.wide { grid-column: 1 / -1; }
.field.quarter { grid-column: span 3; }
label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cbdad1;
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: white;
  transition: border .15s, box-shadow .15s;
}
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(11,147,96,.12); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdfb;
  font-weight: 600;
}
.check input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--green-700); }
.member-card {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcfefc;
}
.member-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.member-title { margin: 0; font-size: 16px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 0;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 750;
  transition: transform .15s, opacity .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-primary { color: white; background: var(--green-700); }
.btn-primary:hover { background: var(--green-800); }
.btn-soft { color: var(--green-800); background: var(--green-100); }
.btn-outline { color: inherit; border: 1px solid currentColor; background: transparent; }
.btn-danger { color: var(--danger); background: #feeceb; }
.btn-small { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.form-footer { display: flex; justify-content: flex-end; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 17px;
  border-radius: 12px;
  color: white;
  background: var(--green-950);
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
  transform: translateY(30px);
  opacity: 0;
  pointer-events: none;
  transition: .2s;
}
.toast.show { transform: none; opacity: 1; }
.toast.error { background: #8e1c13; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.login-cover {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(32px, 7vw, 90px);
  color: white;
  background: radial-gradient(circle at 20% 20%, rgba(100,212,149,.35), transparent 30%), linear-gradient(145deg, #052f22, #08794f);
}
.login-cover h1 { max-width: 600px; margin: 18px 0 12px; font-size: clamp(36px, 6vw, 64px); line-height: 1.05; }
.login-cover p { max-width: 560px; color: #c8e5d7; }
.login-panel { display: grid; place-items: center; padding: 28px; background: #f4f8f5; }
.login-card { width: min(440px, 100%); padding: 32px; }
.login-card h2 { margin: 0 0 6px; font-size: 28px; }
.login-card > p { margin: 0 0 24px; color: var(--muted); }
.login-card .field { margin-bottom: 16px; }
.login-card .btn { width: 100%; margin-top: 4px; }
.dashboard-shell { width: min(1240px, calc(100% - 32px)); margin: 32px auto 60px; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-title h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; }
.page-title p { margin: 5px 0 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { padding: 19px; }
.stat span { color: var(--muted); font-size: 13px; }
.stat strong { display: block; margin-top: 5px; font-size: 28px; }
.table-card { overflow: hidden; }
.table-toolbar { display: flex; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #4b6559; background: #f6faf7; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
td { font-size: 14px; }
.actions { display: flex; gap: 7px; }
.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: var(--green-800); background: var(--green-100); font-size: 12px; font-weight: 750; }
.muted { color: var(--muted); }
.footer { padding: 24px 20px; color: #718077; text-align: center; font-size: 13px; }

@media (max-width: 820px) {
  .field, .field.half, .field.quarter { grid-column: span 6; }
  .login-page { grid-template-columns: 1fr; }
  .login-cover { min-height: 300px; }
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .topbar { min-height: 64px; }
  .brand small { display: none; }
  .hero { padding-top: 42px; }
  .container { width: min(100% - 20px, 1180px); }
  .form-card { border-radius: 14px; }
  .field, .field.half, .field.quarter { grid-column: 1 / -1; }
  .section-heading { gap: 10px; }
  .member-card { padding: 14px; }
  .form-footer, .page-title, .table-toolbar { align-items: stretch; flex-direction: column; }
  .form-footer .btn, .page-title .btn { width: 100%; }
  .login-card { padding: 24px 20px; }
  .top-actions .btn span { display: none; }
}
