:root {
  --ink: #162018;
  --muted: #667165;
  --line: #d9dfd4;
  --paper: #f5f6f1;
  --panel: #ffffff;
  --brand: #315f3d;
  --brand-strong: #203f2b;
  --brand-soft: #e8f0e6;
  --accent: #9b1f24;
  --accent-strong: #74181b;
  --silver: #ecefeb;
  --shadow: 0 18px 50px rgba(22, 32, 24, 0.1);
  --shadow-soft: 0 10px 28px rgba(22, 32, 24, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% -8%, rgba(49, 95, 61, 0.13), transparent 30%),
    linear-gradient(180deg, #fbfcf8 0%, var(--paper) 48%, #eef1ea 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.login-body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(245, 246, 241, 0.92)),
    var(--paper);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 82px;
  padding: 12px clamp(18px, 5vw, 56px);
  border-bottom: 1px solid rgba(217, 223, 212, 0.86);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 16px rgba(22, 32, 24, 0.12));
}

.brand-text {
  display: grid;
  gap: 2px;
  line-height: 1.05;
}

.brand-text strong,
.brand-text small {
  display: block;
}

.brand-text strong {
  font-size: 1.05rem;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.header-actions,
.header-nav {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 14px;
}

.header-nav {
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.76);
}

.header-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.header-link.is-active {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 6px 16px rgba(49, 95, 61, 0.18);
}

.logout-form {
  margin: 0;
}

.logout-button {
  min-height: 44px;
  border: 1px solid #edcfd1;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--accent);
  background: #fff;
  font-weight: 800;
}

.logout-button:hover {
  color: #fff;
  background: var(--accent-strong);
}

.auth-shell,
.member-shell {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.app-shell {
  padding-bottom: 56px;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.login-card {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1fr);
  width: 100%;
  min-width: 0;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(217, 223, 212, 0.92);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 5vw, 46px);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(49, 95, 61, 0.94), rgba(32, 63, 43, 0.98)),
    var(--brand);
}

.login-brand-panel h1 {
  max-width: 330px;
  font-size: clamp(2.25rem, 3.2vw, 3.15rem);
  line-height: 1.08;
}

.login-brand-panel p {
  max-width: 380px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
}

.light-eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.login-form-panel {
  display: grid;
  align-content: center;
  min-width: 0;
  overflow: hidden;
  padding: clamp(28px, 5vw, 54px);
}

.mobile-logo {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-weight: 900;
}

.mobile-logo .auth-logo {
  width: 44px;
  height: 44px;
}

.auth-shell {
  display: grid;
  min-height: calc(100vh - 82px);
  place-items: center;
  padding: 48px 0;
}

.auth-shell-split {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  gap: clamp(28px, 7vw, 80px);
}

.auth-intro {
  max-width: 620px;
}

.auth-logo-shell {
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.14);
}

.auth-logo {
  width: 94px;
  height: 94px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(22, 32, 24, 0.14));
}

.auth-intro h1 {
  max-width: 620px;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
}

.auth-intro p {
  max-width: 500px;
  color: var(--muted);
  font-size: 1.12rem;
}

.auth-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.auth-feature-list span {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 8px 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  font-weight: 900;
}

.auth-panel,
.hero-panel,
.admin-panel,
.quick-action,
.resource-card,
.admin-create {
  border: 1px solid rgba(217, 223, 212, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.auth-panel {
  width: min(520px, 100%);
  padding: clamp(24px, 5vw, 42px);
}

.login-panel-header p:last-child {
  margin: 10px 0 0;
}

.form-panel {
  box-shadow: var(--shadow);
}

.verify-shell {
  width: min(100% - 32px, 560px);
}

.verify-panel {
  text-align: center;
}

.verify-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

h2 {
  font-size: 1.15rem;
}

.muted,
.welcome-band p {
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  background: #fff;
}

input,
select {
  min-height: 46px;
  padding: 11px 13px;
}

textarea {
  min-height: 110px;
  resize: vertical;
  padding: 12px 14px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(49, 95, 61, 0.16);
}

button,
.button-link {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 11px 18px;
  color: #fff;
  background: var(--brand);
  font: inherit;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button-link:hover {
  background: var(--brand-strong);
}

.secondary-link {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.secondary-link:hover {
  background: var(--brand-soft);
}

.danger-button {
  color: #8b2024;
  background: #f8e8e9;
}

.danger-button:hover {
  color: #fff;
  background: var(--accent-strong);
}

.notice {
  margin: 18px 0;
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 800;
}

.notice-info {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.notice-error {
  color: #7f2615;
  background: #f9e9e4;
}

.wide-panel {
  width: min(700px, 100%);
}

.event-shell {
  max-width: 1040px;
}

.welcome-band {
  margin: 30px 0 22px;
}

.hero-panel {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(24px, 5vw, 42px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(232, 240, 230, 0.94)),
    var(--panel);
}

.hero-panel h1 {
  max-width: 760px;
}

.hero-panel p {
  max-width: 660px;
  margin: 14px 0 0;
  font-size: 1.05rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(105px, 1fr));
  gap: 10px;
  min-width: 360px;
}

.admin-hero .hero-stats {
  grid-template-columns: repeat(3, minmax(95px, 1fr));
  min-width: 360px;
}

.hero-stats article {
  border: 1px solid rgba(49, 95, 61, 0.14);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.event-hero {
  align-items: center;
}

.event-date-card {
  min-width: 180px;
  border: 1px solid rgba(49, 95, 61, 0.14);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.event-date-card span,
.event-date-card strong {
  display: block;
}

.event-date-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-date-card strong {
  margin-top: 5px;
  font-size: 1.2rem;
}

.registration-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.registration-summary {
  border: 1px solid rgba(217, 223, 212, 0.92);
  border-radius: 8px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.registration-summary dl {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

.registration-summary dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.registration-summary dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.registration-card {
  width: 100%;
}

.hero-stats strong {
  font-size: 1.7rem;
  line-height: 1;
}

.hero-stats span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
  margin: 0 0 22px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 18px;
  text-decoration: none;
}

.quick-action:hover,
.resource-card:hover {
  border-color: rgba(49, 95, 61, 0.46);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.primary-action {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}

.primary-action small {
  color: rgba(255, 255, 255, 0.74);
}

.action-icon,
.card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 900;
}

.action-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.24);
}

.quick-action:not(.primary-action) .action-icon {
  color: var(--brand);
  background: var(--brand-soft);
}

.quick-action strong,
.quick-action small {
  display: block;
}

.quick-action small {
  margin-top: 3px;
  color: var(--muted);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.resource-column {
  min-width: 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.compact-heading {
  display: block;
}

.section-heading p {
  margin: 6px 0 0;
}

.resource-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  margin-bottom: 12px;
  padding: 16px;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.card-icon {
  width: 44px;
  height: 44px;
  color: var(--brand);
  background: var(--brand-soft);
}

.event-icon {
  color: var(--accent);
  background: #f8e8e9;
}

.resource-card strong,
.resource-card small {
  display: block;
}

.resource-card small {
  margin-top: 5px;
  color: var(--muted);
}

.admin-shell {
  padding-bottom: 56px;
}

.admin-section {
  margin-bottom: 20px;
}

.admin-panel {
  padding: 20px;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcf8;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
}

.check-row input {
  width: 20px;
  min-height: 20px;
}

.admin-create {
  margin-top: 16px;
  padding: 16px;
}

.admin-create summary {
  cursor: pointer;
  font-weight: 900;
}

.admin-create form {
  margin-top: 16px;
}

.export-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

@media (max-width: 920px) {
  .login-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .login-brand-panel {
    display: none;
  }

  .login-form-panel {
    padding: 28px;
  }

  .mobile-logo {
    display: inline-flex;
  }

  .auth-shell-split,
  .content-grid,
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    place-items: stretch;
    padding: 28px 0 42px;
  }

  .auth-intro {
    text-align: center;
  }

  .auth-logo-shell {
    margin-right: auto;
    margin-left: auto;
  }

  .auth-intro h1,
  .auth-intro p {
    margin-right: auto;
    margin-left: auto;
  }

  .auth-feature-list {
    justify-content: center;
  }

  .hero-panel,
  .export-panel,
  .event-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .registration-layout {
    grid-template-columns: 1fr;
  }

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

  .site-header,
  .header-actions {
    align-items: flex-start;
  }

  .site-header {
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .header-nav {
    flex-wrap: wrap;
  }

  .admin-row,
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .brand-text {
    display: none;
  }

  .auth-shell,
  .member-shell,
  .login-shell {
    width: min(1160px, calc(100% - 24px));
  }

  .login-shell {
    padding: 18px 0;
  }

  .login-form-panel {
    padding: 22px;
  }

  .auth-intro h1 {
    font-size: 2.35rem;
  }

  .auth-intro p {
    font-size: 1rem;
  }

  .auth-feature-list span {
    flex: 1 1 100%;
    text-align: center;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .resource-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .card-icon {
    display: none;
  }
}

@media (min-width: 761px) {
  .login-shell {
    width: min(980px, calc(100% - 48px));
    padding: 40px 0;
  }

  .login-card {
    grid-template-columns: 390px minmax(0, 1fr);
    min-height: 560px;
  }

  .login-brand-panel {
    display: flex;
  }

  .login-form-panel {
    padding: 48px;
  }

  .mobile-logo {
    display: none;
  }

  .site-header {
    flex-direction: row;
    align-items: center;
  }

  .header-actions {
    width: auto;
    align-items: center;
  }
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .site-header {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
    padding: 12px 16px;
  }

  .brand-logo {
    width: 50px;
    height: 50px;
  }

  .header-actions {
    width: 100%;
    align-items: stretch;
    justify-content: space-between;
  }

  .header-nav {
    flex: 1;
  }

  .header-link {
    flex: 1;
    justify-content: center;
  }

  .logout-button {
    min-height: 42px;
  }

  .login-shell {
    width: 100%;
    min-height: 100vh;
    place-items: start center;
    padding: 18px 0;
  }

  .login-card {
    grid-template-columns: 1fr;
    width: calc(100vw - 40px);
    max-width: 330px;
    min-width: 0;
    min-height: auto;
  }

  .login-brand-panel {
    display: none;
  }

  .login-form-panel {
    min-width: 0;
    width: 100%;
    overflow: hidden;
    padding: 24px 22px;
  }

  .login-form-panel *,
  .login-panel-header {
    max-width: 100%;
  }

  .login-panel-header p {
    overflow-wrap: anywhere;
  }

  .mobile-logo {
    display: inline-flex;
  }
}

@media (min-width: 761px) and (max-width: 1040px) {
  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel,
  .event-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-stats,
  .admin-hero .hero-stats {
    min-width: 0;
  }
}
