:root {
  --background: #f8f9fa;
  --foreground: #626262;
  --ink: #4a4e57;
  --muted: #6f7b75;
  --line: #eae9e9;
  --green: #76b729;
  --green-dark: #6fb314;
  --green-soft: #f0f7e8;
  --white: #ffffff;
  --error-bg: #fff4f0;
  --error: #a23b1f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Montserrat, Arial, Helvetica, sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  background: var(--background);
}

.hero-image,
.hero-overlay,
.hero-pattern {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.24));
}

.hero-pattern {
  background-image: radial-gradient(circle at 18px 18px, rgba(118, 183, 41, 0.12) 1px, transparent 1px);
  background-size: 38px 38px;
  mix-blend-mode: screen;
}

.hero-inner {
  position: relative;
  display: flex;
  min-height: 92vh;
  max-width: 1280px;
  flex-direction: column;
  justify-content: space-between;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 45px rgba(74, 78, 87, 0.1);
  padding: 0.75rem 1rem;
}

.logo {
  width: min(260px, 58vw);
  height: auto;
}

.topbar span {
  display: inline-flex;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: var(--green);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.55rem 1rem;
}

.hero-content {
  max-width: 760px;
  padding: 4rem 0 5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--green-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  margin-bottom: 1.5rem;
  color: var(--green-dark);
  font-size: clamp(2.35rem, 7vw, 4.75rem);
  line-height: 1.02;
}

.hero-content > p:not(.eyebrow):not(.hero-claim) {
  max-width: 680px;
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-claim {
  border-left: 4px solid var(--green);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.65;
  padding-left: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.primary-link,
.secondary-link,
.ghost-link,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border-radius: 0.5rem;
  font-weight: 800;
  padding: 0.8rem 1.05rem;
  text-decoration: none;
}

.primary-link,
.primary-button,
.secondary-link {
  border: 0;
  background: var(--green);
  color: var(--white);
  cursor: pointer;
}

.primary-link:hover,
.primary-button:hover,
.secondary-link:hover {
  background: var(--green-dark);
  text-decoration: none;
}

.ghost-link {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.secondary-link {
  border: 1px solid var(--green);
}

.hero .secondary-link {
  background: rgba(255, 255, 255, 0.9);
  color: var(--green-dark);
}

.hero-meta {
  border-top: 1px solid var(--line);
  padding: 1rem 0 0;
}

.hero-meta p {
  margin: 0;
  font-size: 0.9rem;
}

.hero-meta strong {
  display: block;
  color: var(--green-dark);
}

.registration-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

.role-tabs {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(74, 78, 87, 0.06);
  margin-bottom: 1.75rem;
  padding: 0.25rem;
}

.role-tab {
  flex: 1;
  min-height: 2.75rem;
  border: 0;
  border-radius: 0.38rem;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  font-weight: 800;
}

.role-tab.active {
  background: var(--green);
  color: var(--white);
}

.role-tab[data-role-button="partner"].active {
  background: var(--ink);
}

.form-flow {
  display: grid;
  gap: 2rem;
}

.is-hidden {
  display: none !important;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(74, 78, 87, 0.06);
  padding: 1.4rem;
}

.panel h2,
.panel h3 {
  color: var(--green-dark);
}

.section-copy,
.panel p {
  line-height: 1.65;
}

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

.compact-grid {
  margin-top: 1.25rem;
}

.wide-field {
  grid-column: 1 / -1;
}

.short-field {
  max-width: 19rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field span {
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 2.9rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--ink);
  outline: none;
  padding: 0.75rem 0.85rem;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(118, 183, 41, 0.16);
}

.participants {
  display: grid;
  gap: 1rem;
}

.participant-card {
  display: grid;
  gap: 1rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.choice {
  display: grid;
  grid-template-columns: 1.15rem 1fr;
  gap: 0.85rem;
  min-height: 6.1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--white);
  cursor: pointer;
  padding: 0.95rem;
}

.choice:hover {
  border-color: var(--green);
  box-shadow: 0 10px 28px rgba(74, 78, 87, 0.1);
}

.choice input {
  margin-top: 0.24rem;
  accent-color: var(--green);
}

.choice span {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.choice strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.choice small {
  color: var(--foreground);
  font-size: 0.8rem;
  line-height: 1.45;
}

.choice em {
  color: var(--green-dark);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 800;
}

.schedule-note {
  border-radius: 0.5rem;
  background: var(--green-soft);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-top: 1.25rem;
  padding: 1rem;
}

.schedule-note p {
  margin-bottom: 0.25rem;
}

.consent {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.7rem;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--background);
  color: var(--ink);
  margin: 1.25rem 0;
  padding: 0.9rem;
}

.consent input {
  accent-color: var(--green);
  margin-top: 0.15rem;
}

.consent span {
  font-size: 0.875rem;
  line-height: 1.55;
}

.status-message {
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.55;
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
}

.status-message-success {
  background: var(--green-soft);
  color: #4f8a17;
}

.status-message-error {
  background: var(--error-bg);
  color: var(--error);
}

.sidebar {
  display: grid;
  align-self: start;
  gap: 1.25rem;
  position: sticky;
  top: 1.5rem;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.room-grid div {
  border-radius: 0.5rem;
  background: var(--background);
  padding: 0.8rem;
}

.room-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.room-grid strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.contact-list {
  display: grid;
  gap: 1rem;
  margin-bottom: 0;
}

.contact-list dt {
  color: var(--ink);
  font-weight: 800;
}

.contact-list dd {
  margin-left: 0;
}

.summary-panel p {
  margin-bottom: 0.6rem;
}

.summary-total {
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

.login-page,
.setup-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1.25rem;
}

.login-card,
.setup-card {
  width: min(100%, 28rem);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--white);
  box-shadow: 0 18px 45px rgba(74, 78, 87, 0.1);
  padding: 1.5rem;
}

.login-card {
  display: grid;
  gap: 1rem;
}

.login-logo,
.setup-logo {
  width: 16rem;
  max-width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.setup-checks {
  border-radius: 0.5rem;
  background: var(--background);
  margin: 1rem 0;
  padding: 1rem;
}

.setup-checks p {
  margin-bottom: 0.35rem;
}

.ok {
  color: #4f8a17;
  font-weight: 800;
}

.warn {
  color: var(--error);
  font-weight: 800;
}

.small-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-page {
  padding: 1.5rem 1.25rem 4rem;
}

.admin-header,
.stats-grid,
.admin-panel {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(74, 78, 87, 0.06);
  padding: 1rem;
}

.admin-title,
.admin-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-logo {
  width: 13.5rem;
  max-width: 45vw;
  height: auto;
}

.admin-title h1 {
  color: var(--green-dark);
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.stats-grid div {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--white);
  padding: 1rem;
}

.stats-grid span {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
}

.stats-grid strong {
  display: block;
  color: var(--green-dark);
  font-size: 2rem;
  margin-top: 0.35rem;
}

.admin-panel {
  margin-top: 1.5rem;
}

.admin-filter {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: end;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 1.25rem;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0.75rem 0.85rem 0;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

mark {
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 800;
  padding: 0.25rem 0.6rem;
}

summary {
  color: var(--green-dark);
  cursor: pointer;
  font-weight: 800;
}

.detail-box {
  max-width: 38rem;
  border-radius: 0.5rem;
  background: var(--background);
  font-size: 0.82rem;
  line-height: 1.55;
  margin-top: 0.6rem;
  padding: 0.75rem;
}

.empty-state {
  border-radius: 0.5rem;
  background: var(--background);
  margin: 1rem 0 0;
  padding: 1rem;
}

@media (max-width: 980px) {
  .registration-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .stats-grid,
  .admin-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar span {
    display: none;
  }

  .hero-content {
    padding: 3rem 0 4rem;
  }

  .hero-actions,
  .role-tabs,
  .admin-header,
  .admin-title {
    flex-direction: column;
    align-items: stretch;
  }

  .form-grid,
  .choice-grid,
  .room-grid,
  .stats-grid,
  .admin-filter {
    grid-template-columns: 1fr;
  }

  .choice {
    min-height: auto;
  }
}
