.auth-gateway {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 450px);
  align-items: center;
  align-content: normal;
  gap: clamp(32px, 6vw, 100px);
  min-height: 100svh;
  padding: 48px max(32px, calc((100vw - 1380px) / 2));
  overflow: hidden;
  background: #132b25;
  color: #fffaf1;
  --text: #fffaf1;
  --muted: #d9dfd4;
  --line: #829b8d;
  --logo: #fffaf1;
}

.auth-backdrop {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.24);
  filter: saturate(.75);
}

.auth-gateway::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(8, 30, 25, .7);
  pointer-events: none;
}

.auth-copy {
  max-width: 720px;
}

.auth-logo {
  width: min(620px, 100%);
  margin: 0 0 4px -8px;
}

.auth-copy h1 {
  margin: 10px 0 0;
  max-width: 700px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 39px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.12;
}

.auth-copy p {
  margin-top: 18px;
  color: #e6e1d5;
  font-size: 14px;
}

.auth-grid,
.auth-grid:has(#member-form-section[hidden]) {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  max-width: 450px;
  border: 0;
}

.auth-grid .form-panel,
.auth-grid .form-panel:first-child {
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 6px;
  padding: 32px;
  background: rgba(14, 42, 34, .91);
  box-shadow: 0 16px 46px rgba(0, 0, 0, .14);
}

.auth-grid .form-panel h2 {
  margin: 12px 0 12px;
  color: #fffaf1;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 31px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.12;
}

.auth-grid .form-panel .eyebrow {
  color: #eac57d;
  letter-spacing: 0;
}

.auth-grid .form-intro {
  margin: 0 0 24px;
  color: #d9dfd4;
  font-size: 14px;
}

.auth-grid form {
  gap: 15px;
}

.auth-grid input,
.auth-grid select {
  border: 1px solid #a4b4a9;
  border-radius: 3px;
  background: #fffaf1;
  color: #162820;
}

.auth-grid input:focus-visible,
.auth-grid select:focus-visible {
  outline: 2px solid #e6bd74;
  outline-offset: 1px;
}

.auth-grid .primary-button,
.auth-grid .secondary-button {
  width: 100%;
  min-height: 48px;
  justify-self: stretch;
  margin-top: 4px;
  border-radius: 4px;
  background: #fffaf1;
  color: #173f32;
}

.auth-grid .primary-button:hover,
.auth-grid .secondary-button:hover {
  background: #e8ddc9;
  color: #173f32;
}

.auth-gateway.is-invite {
  grid-template-columns: 1fr;
  align-content: center;
  gap: 20px;
  padding-top: 36px;
  padding-bottom: 36px;
}

.auth-gateway.is-invite .auth-logo {
  width: min(400px, 100%);
}

.auth-gateway.is-invite .auth-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 1000px;
}

.dashboard-route .workspace {
  position: relative;
  max-width: none;
  padding: 0 0 72px;
}

.app-shell > .sidebar {
  position: sticky;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  gap: 0 18px;
  min-height: 72px;
  padding: 8px 24px;
}

.sidebar > .brand {
  display: flex;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
}

.sidebar > .nav-list {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  max-width: 100%;
  flex-wrap: nowrap;
  gap: 18px;
  overflow-x: auto;
  padding: 0;
}

.sidebar .nav-item {
  flex: 0 0 auto;
  min-height: 44px;
  white-space: nowrap;
}

.sidebar > .header-actions {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.header-actions .ritual-card {
  display: flex;
  flex: 0 1 auto;
  gap: 12px;
  min-width: 0;
  width: auto;
  max-width: none;
  text-align: right;
}

.header-actions .ritual-card > div {
  min-width: 0;
}

.header-actions .ritual-card p {
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions .compact-button {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 40px;
  width: auto;
  margin: 0;
  padding: 0 12px;
}

.header-actions .notification-bell {
  flex: 0 0 42px;
}

@media (max-width: 960px) {
  .app-shell > .sidebar {
    position: static;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px 12px;
    min-height: 0;
    padding: 8px 18px 10px;
  }

  .sidebar > .brand {
    display: none;
  }

  .sidebar > .header-actions {
    display: contents;
  }

  .header-actions .notification-bell {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .header-actions .ritual-card {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    justify-content: space-between;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    text-align: left;
  }
}

#dashboard {
  --text: #1c2b22;
  --muted: #667369;
  --line: #d5cbb9;
  --surface: #f5f0e6;
  --soft: #e5e9de;
  --accent: #173f32;
  color: var(--text);
  background: #f5f0e6;
}

#dashboard .club-hero {
  position: relative;
  display: block;
  isolation: isolate;
  height: min(66svh, 610px);
  min-height: 440px;
  overflow: hidden;
  background: #263c3d;
  color: #fffaf1;
}

#dashboard .hero-photo {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  border: 0;
  overflow: hidden;
}

#dashboard .hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.25);
  filter: saturate(.84);
  background: #263c3d;
}

#dashboard .hero-photo img:hover {
  transform: scale(1.25);
}

#dashboard .club-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(to bottom, rgba(8, 30, 26, .72), rgba(8, 30, 26, .12) 38%, rgba(8, 30, 26, .74));
  pointer-events: none;
}

#dashboard .hero-logo {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: max(36px, calc((100vw - 1320px) / 2));
  width: 320px;
  margin: 0;
  background: #fffaf1;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .2));
}

#dashboard .hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  width: min(calc(100% - 72px), 1320px);
  height: 100%;
  margin: 0 auto;
  padding: 180px 0 46px;
  color: #fffaf1;
}

#dashboard .hero-eyebrow {
  margin: 0 0 12px;
  color: #f0cc86;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#dashboard .hero-copy h2 {
  max-width: 920px;
  margin: 0 0 12px;
  color: #fffaf1;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 66px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.02;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .22);
}

#dashboard .hero-session-meta {
  margin: 0 0 23px;
  color: #fffaf1;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

#dashboard .hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

#dashboard .hero-actions .primary-button {
  min-height: 48px;
  border-radius: 4px;
  background: #fffaf1;
  color: #173f32;
}

#dashboard .hero-actions .primary-button:hover {
  background: #e8ddc9;
}

#dashboard .hero-actions span {
  color: #fffaf1;
  font-size: 13px;
  font-weight: 750;
}

#dashboard .dashboard-content {
  width: min(calc(100% - 72px), 1320px);
  margin: 0 auto;
}

#dashboard .hero-metrics {
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

#dashboard .metric-button {
  min-height: 104px;
  padding: 18px 22px;
}

#dashboard .metric-button:first-child {
  padding-left: 0;
}

#dashboard .metric-button strong {
  font-size: 29px;
  letter-spacing: 0;
}

#dashboard .dashboard-metric-detail {
  max-width: none;
  margin: 0 0 24px;
  padding: 22px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

#dashboard .dashboard-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 34px;
  margin-top: 30px;
  border: 0;
}

#dashboard .dashboard-grid > .panel {
  min-width: 0;
  padding: 24px 0 34px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

#dashboard .dashboard-grid > .panel {
  grid-column: 1 / -1;
}

#dashboard .rules-list {
  max-width: 76ch;
}

#admin-audit-search {
  width: min(100%, 420px);
  margin: 18px 0 8px;
}

#dashboard .dashboard-grid .panel h3 {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
}

#dashboard .my-status-list {
  gap: 0;
}

#dashboard .my-status-card {
  padding: 18px 0 24px;
  border-top: 1px solid var(--line);
}

#dashboard .my-status-card:first-child {
  border-top: 0;
}

#dashboard .my-status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 0;
}

#dashboard .my-status-grid > span {
  border-bottom: 1px solid var(--line);
  padding-left: 0;
}

#dashboard .my-status-grid small {
  letter-spacing: 0;
}

#dashboard .session-row-link {
  min-height: 100px;
}

#dashboard .session-row-link:hover,
#dashboard .session-row-link:focus-visible {
  background: #e8ece4;
}

:root[data-theme="dark"] #dashboard {
  --text: #f4efe4;
  --muted: #b8c4b0;
  --line: #3f5b4b;
  --surface: #173126;
  --soft: #244536;
  background: #10261d;
}

:root[data-theme="dark"] #dashboard .session-row-link:hover,
:root[data-theme="dark"] #dashboard .session-row-link:focus-visible {
  background: #244536;
}

@media (max-width: 1080px) {
  .auth-gateway {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 25px;
    padding: 40px 28px;
  }

  .auth-logo {
    width: min(440px, 100%);
  }

  .auth-grid,
  .auth-grid:has(#member-form-section[hidden]) {
    max-width: 540px;
  }

  #dashboard .hero-copy h2 {
    font-size: 56px;
  }
}

@media (max-width: 680px) {
  .auth-gateway,
  .auth-gateway.is-invite {
    min-height: 100svh;
    align-content: center;
    gap: 20px;
    padding: 28px 18px 42px;
  }

  .auth-backdrop {
    transform: scale(1.65);
  }

  .auth-copy h1 {
    font-size: 25px;
  }

  .auth-grid .form-panel,
  .auth-grid .form-panel:first-child {
    padding: 22px;
  }

  .auth-grid .form-panel h2 {
    font-size: 25px;
  }

  .auth-gateway.is-invite .auth-grid {
    grid-template-columns: 1fr;
  }

  #dashboard .club-hero {
    height: min(58svh, 520px);
    min-height: 370px;
  }

  #dashboard .hero-photo img {
    object-position: center;
    transform: scale(1.6);
  }

  #dashboard .hero-photo img:hover {
    transform: scale(1.6);
  }

  #dashboard .hero-logo {
    top: 2px;
    left: 18px;
    width: 196px;
  }

  #dashboard .hero-copy {
    width: calc(100% - 36px);
    padding: 120px 0 26px;
  }

  #dashboard .hero-copy h2 {
    font-size: 42px;
  }

  #dashboard .hero-session-meta {
    font-size: 15px;
  }

  #dashboard .dashboard-content {
    width: calc(100% - 36px);
  }

  #dashboard .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #dashboard .metric-button,
  #dashboard .metric-button:first-child {
    display: grid;
    grid-template-rows: auto minmax(2.7em, auto);
    align-content: start;
    gap: 4px;
    min-height: 96px;
    padding: 16px 12px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  #dashboard .metric-button:first-child {
    padding-left: 0;
  }

  #dashboard .metric-button:last-child {
    border-right: 0;
    padding-right: 0;
  }

  #dashboard .metric-button strong {
    font-size: 23px;
    line-height: 1.15;
  }

  #dashboard .metric-button span {
    font-size: 11px;
    line-height: 1.35;
  }

  #dashboard .dashboard-grid {
    grid-template-columns: 1fr;
    margin-top: 12px;
  }

  #dashboard .dashboard-grid > .panel {
    grid-column: 1 / -1;
  }

  #dashboard .my-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #dashboard .dashboard-grid .panel h3 {
    font-size: 24px;
  }
}
