:root {
  --bg: #07131c;
  --bg-deep: #0d202c;
  --surface: rgba(11, 27, 39, 0.9);
  --surface-strong: rgba(15, 33, 47, 0.98);
  --surface-accent: rgba(13, 40, 52, 0.96);
  --surface-alt: rgba(10, 25, 36, 0.92);
  --text: #edf3f6;
  --muted: #9eb2be;
  --primary: #1bd0c3;
  --primary-strong: #0ea89b;
  --secondary: #1ec5ba;
  --accent: #67e5da;
  --border: rgba(118, 225, 216, 0.16);
  --border-strong: rgba(118, 225, 216, 0.26);
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.24);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 14%, rgba(27, 208, 195, 0.16), transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(26, 84, 111, 0.22), transparent 28%),
    linear-gradient(180deg, #051019 0%, var(--bg) 42%, #081722 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(93, 142, 165, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 142, 165, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 11, 17, 0.18), transparent 26%),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.06), transparent 44%);
  pointer-events: none;
}

.page-shell {
  position: relative;
  z-index: 1;
}

.hero {
  padding: 30px clamp(20px, 4vw, 56px) 64px;
}

.compact-hero {
  padding-bottom: 24px;
}

.topbar,
.hero-grid,
.admin-intro,
.content {
  max-width: 1200px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 36px;
  padding: 26px 28px;
  border-radius: 40px;
  background: rgba(5, 16, 25, 0.82);
  border: 1px solid rgba(97, 224, 214, 0.18);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-soft);
}

.topbar > div:first-child {
  flex: 0 0 auto;
}

.member-hero-header--compact h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.eyebrow,
.kicker,
.section-note,
.helper-text {
  color: var(--muted);
}

.eyebrow,
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  letter-spacing: -0.045em;
}

h2 {
  font-size: clamp(2.5rem, 5vw, 4.9rem);
  max-width: 10ch;
  letter-spacing: -0.05em;
}

h3 {
  font-size: 1.52rem;
  letter-spacing: -0.03em;
}

p {
  line-height: 1.6;
}

a {
  color: inherit;
}

.topbar-actions,
.hero-highlights,
.tab-strip,
.portal-tabs,
.panel-head,
.event-meta,
.approval-item-actions,
.request-meta,
.member-row,
.event-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-grid,
.admin-intro,
.dashboard-grid,
.info-grid {
  display: grid;
  gap: 24px;
}

.hero-grid {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 34px;
}

.admin-intro {
  grid-template-columns: 1fr 420px;
  align-items: start;
  gap: 34px;
}

.hero-copy {
  padding: clamp(22px, 2.8vw, 40px) 0;
}

.hero-text {
  max-width: 58ch;
  font-size: 1.08rem;
  color: rgba(237, 243, 246, 0.84);
}

.hero-highlights span,
.pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(12, 35, 49, 0.86);
  border: 1px solid rgba(98, 225, 215, 0.16);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  font-size: 0.9rem;
}

.hero-highlights span {
  padding: 12px 16px;
}

.drop-screen,
.admin-login {
  position: relative;
}

.drop-screen::before,
.admin-login::before {
  content: "";
  position: absolute;
  inset: 22px -16px -18px 20px;
  background:
    linear-gradient(135deg, rgba(29, 209, 196, 0.12), rgba(35, 104, 136, 0.08)),
    radial-gradient(circle at top left, rgba(28, 208, 196, 0.18), transparent 54%);
  border-radius: var(--radius-xl);
  filter: blur(10px);
  pointer-events: none;
  z-index: -1;
}

.drop-card,
.panel,
.status-banner {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(22px);
  border: 1px solid rgba(97, 224, 214, 0.12);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.drop-card,
.panel {
  padding: 26px;
}

.drop-card-header {
  margin-bottom: 18px;
}

.tab-button,
.ghost-button,
.primary-button,
.secondary-button,
.danger-button {
  border: 0;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.tab-button,
.ghost-button,
.secondary-button,
.danger-button {
  padding: 11px 15px;
}

.primary-button {
  padding: 13px 20px;
  color: #041015;
  background: linear-gradient(135deg, #2fe7da, var(--primary-strong));
  font-weight: 700;
  box-shadow: 0 14px 28px rgba(17, 172, 159, 0.22);
}

.ghost-button,
.secondary-button {
  background: rgba(8, 23, 34, 0.76);
  color: var(--text);
  border: 1px solid rgba(103, 229, 218, 0.22);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

.danger-button {
  background: rgba(166, 103, 93, 0.14);
  color: #ffd9d3;
  border: 1px solid rgba(216, 132, 118, 0.18);
}

.tab-button.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #041015;
  box-shadow: 0 10px 22px rgba(15, 168, 155, 0.18);
}

.tab-panel {
  display: none;
}

.tab-panel.active,
.portal-tab-panel.active,
.dashboard,
.event-card,
.request-card,
.approval-item,
.member-row {
  display: block;
}

.portal-tab-panel {
  display: none;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.address-assist {
  display: grid;
  gap: 6px;
  margin-top: -4px;
}

.address-suggestions {
  display: grid;
  gap: 8px;
  padding: 12px;
  margin-top: -4px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(8, 24, 35, 0.96);
}

.address-suggestion-button {
  width: 100%;
  border: 1px solid rgba(103, 229, 218, 0.14);
  border-radius: 14px;
  background: rgba(12, 31, 44, 0.92);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.address-suggestion-button strong {
  display: block;
  margin-bottom: 4px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(8, 24, 35, 0.96);
  color: var(--text);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(27, 208, 195, 0.18);
  border-color: rgba(27, 208, 195, 0.5);
}

.content {
  padding: 0 clamp(20px, 4vw, 52px) 52px;
}

.section-heading,
.status-banner {
  margin-bottom: 24px;
}

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

.portal-tabs {
  margin-bottom: 20px;
}

.portal-tabs--top {
  margin-bottom: 0;
  align-items: center;
  justify-content: flex-end;
}

.topbar-actions {
  align-items: end;
  justify-content: flex-end;
  margin-left: auto;
}

#memberTopTabs,
#adminTopTabs {
  justify-content: flex-end;
}

body[data-page="admin"] .topbar-actions,
body[data-page="member"] .topbar-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.topbar-utility-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-tab-button,
.admin-tab-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(7, 22, 32, 0.88);
  border: 1px solid rgba(103, 229, 218, 0.18);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
  color: var(--text);
  box-shadow: none;
}

.portal-tab-button.active,
.admin-tab-button.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #041015;
  box-shadow: 0 12px 24px rgba(14, 168, 155, 0.16);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
}

.panel {
  overflow: hidden;
}

.panel-accent {
  background:
    radial-gradient(circle at top right, rgba(27, 208, 195, 0.09), transparent 32%),
    linear-gradient(180deg, rgba(11, 31, 43, 0.96), rgba(8, 25, 36, 0.94));
}

.newsletter-splash,
.newsletter-splash-top {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: center;
}

.newsletter-splash-top {
  grid-template-columns: 1fr;
}

.newsletter-splash-copy {
  display: grid;
  gap: 14px;
}

.newsletter-splash-media {
  position: relative;
}

.newsletter-image,
.newsletter-preview-image {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  border-radius: 22px;
  display: block;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.newsletter-image,
.newsletter-preview-image,
.newsletter-section-media img,
.section-builder-media img {
  cursor: zoom-in;
}

.newsletter-splash-media--top .newsletter-image,
.newsletter-splash-media--top .newsletter-image-placeholder {
  min-height: 360px;
}

.newsletter-image-placeholder {
  min-height: 280px;
  border-radius: 22px;
  display: grid;
  place-items: end start;
  padding: 24px;
  color: #eff8fa;
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
  background:
    linear-gradient(180deg, rgba(4, 14, 22, 0.18), rgba(4, 14, 22, 0.82)),
    linear-gradient(135deg, rgba(8, 39, 55, 0.95), rgba(18, 124, 119, 0.82));
}

.panel-head {
  align-items: start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.newsletter-body,
.request-inbox,
.approval-list,
.member-directory,
.admin-event-list,
.event-list {
  display: grid;
  gap: 14px;
}

.newsletter-body p {
  margin: 0;
}

.newsletter-sections-panel {
  margin-top: 20px;
}

.newsletter-body h2,
.newsletter-body h3,
.newsletter-body blockquote,
.newsletter-body ul,
.newsletter-body ol,
.newsletter-body hr,
.newsletter-body figure {
  margin: 0;
}

.newsletter-body blockquote {
  padding: 14px 18px;
  border-left: 4px solid var(--secondary);
  background: rgba(30, 197, 186, 0.08);
  border-radius: 0 14px 14px 0;
}

.newsletter-body img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}

.newsletter-accordion-item {
  border: 1px solid rgba(103, 229, 218, 0.12);
  border-radius: 24px;
  background: rgba(8, 24, 35, 0.92);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.newsletter-accordion-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
}

.newsletter-accordion-summary::-webkit-details-marker {
  display: none;
}

.newsletter-accordion-content {
  padding: 0 18px 18px;
}

.newsletter-accordion-icon {
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  font-family: "Manrope", sans-serif;
  line-height: 1;
  color: var(--primary);
  font-weight: 700;
}

.newsletter-accordion-icon::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}

.newsletter-accordion-item[open] .newsletter-accordion-icon::after {
  content: "-";
}

.member-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, 0.58fr);
  gap: 24px;
  margin-bottom: 24px;
}

.member-home-hero {
  padding: 0;
  overflow: hidden;
}

.member-home-hero-media {
  position: relative;
  min-height: 540px;
  border-radius: inherit;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(8, 31, 43, 0.98), rgba(7, 20, 30, 0.94));
}

.member-home-carousel,
.member-home-slides {
  position: absolute;
  inset: 0;
}

.member-home-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 540ms ease, transform 6s ease;
}

.member-home-slide.active {
  opacity: 1;
  transform: scale(1);
}

.member-home-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.member-home-slide-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.member-home-overlay {
  position: relative;
  z-index: 1;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  padding: clamp(30px, 5vw, 48px);
  background:
    linear-gradient(90deg, rgba(3, 14, 22, 0.9) 0%, rgba(3, 14, 22, 0.52) 52%, rgba(3, 14, 22, 0.18) 100%),
    linear-gradient(180deg, rgba(3, 14, 22, 0.08) 0%, rgba(3, 14, 22, 0.78) 100%);
}

.member-home-overlay h3 {
  font-size: clamp(2rem, 4vw, 4rem);
  max-width: 11ch;
}

.member-home-description,
.member-home-preview-text {
  margin: 0;
  max-width: 46ch;
  font-size: 1.03rem;
  color: rgba(237, 243, 246, 0.85);
}

.member-home-actions,
.member-home-indicators,
.member-home-preview-indicators {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.member-home-indicators {
  padding-top: 4px;
}

.member-home-indicator,
.member-home-preview-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(237, 243, 246, 0.36);
  background: rgba(237, 243, 246, 0.2);
  transition: background 180ms ease, width 180ms ease, border-color 180ms ease;
}

.member-home-indicator {
  cursor: pointer;
}

.member-home-indicator.active,
.member-home-preview-dot.active {
  width: 34px;
  background: var(--primary);
  border-color: rgba(27, 208, 195, 0.9);
}

.member-home-side {
  display: grid;
  gap: 24px;
}

.member-home-stat-card,
.member-home-quick-note {
  display: grid;
  gap: 14px;
  align-content: start;
}

.member-home-stats {
  display: grid;
  gap: 14px;
}

.member-home-stats div {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(103, 229, 218, 0.12);
  background: rgba(8, 24, 35, 0.72);
}

.member-home-stats strong {
  font-family: "Fraunces", serif;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1;
}

.member-home-stats span {
  color: var(--muted);
  font-size: 0.95rem;
}

.member-home-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.member-shortcut-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.member-shortcut-card:hover,
.member-shortcut-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(103, 229, 218, 0.32);
  background: linear-gradient(180deg, rgba(12, 37, 52, 0.98), rgba(8, 25, 35, 0.96));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.member-shortcut-card h3,
.member-shortcut-card p {
  margin: 0;
}

.member-shortcut-card > div {
  display: grid;
  gap: 10px;
}

.member-shortcut-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(27, 208, 195, 0.16), rgba(27, 208, 195, 0.04));
  border: 1px solid rgba(103, 229, 218, 0.2);
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.newsletter-builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: 24px;
}

.builder-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.builder-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(8, 24, 35, 0.7);
}

.builder-composer-block {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(8, 24, 35, 0.66);
}

.builder-subhead {
  margin-bottom: 0;
}

.builder-file-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
}

.builder-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.newsletter-preview-panel {
  display: grid;
  gap: 18px;
  align-content: start;
  position: sticky;
  top: 24px;
  min-width: 0;
}

.member-home-preview-card {
  display: grid;
  gap: 14px;
}

.member-home-preview-frame {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(103, 229, 218, 0.16);
  background: linear-gradient(180deg, rgba(12, 36, 50, 0.98), rgba(7, 23, 33, 0.96));
}

.member-home-preview-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.member-home-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(3, 14, 22, 0.9) 0%, rgba(3, 14, 22, 0.54) 52%, rgba(3, 14, 22, 0.16) 100%),
    linear-gradient(180deg, rgba(3, 14, 22, 0.04) 0%, rgba(3, 14, 22, 0.76) 100%);
}

.member-home-preview-overlay h4 {
  margin: 0;
  font-size: clamp(1.6rem, 2.7vw, 2.2rem);
  max-width: 12ch;
}

.home-slide-builder-list {
  display: grid;
  gap: 18px;
}

.home-slide-builder-card .section-builder-media img {
  aspect-ratio: 16 / 10;
}

.home-slide-builder-card .section-image-placeholder {
  aspect-ratio: 16 / 10;
}

.preview-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.preview-copy h4,
.preview-copy .pill,
.preview-copy .newsletter-body {
  min-width: 0;
  overflow-wrap: anywhere;
}

.preview-copy .newsletter-body {
  gap: 16px;
}

.preview-copy .newsletter-section,
.preview-copy .newsletter-section--image-right {
  flex-direction: column;
  padding: 18px;
  gap: 14px;
}

.preview-copy .newsletter-section-media {
  flex: none;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 10;
}

.preview-copy .newsletter-section-copy {
  gap: 10px;
}

.preview-copy .newsletter-section-copy h2 {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.preview-copy .newsletter-section-copy p,
.preview-copy .newsletter-section-copy ul,
.preview-copy .newsletter-section-copy ol {
  font-size: 0.98rem;
}

.section-builder-list {
  display: grid;
  gap: 18px;
}

.section-builder-card {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(8, 24, 35, 0.9);
  display: grid;
  gap: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.section-builder-topbar,
.section-builder-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.section-builder-topbar {
  align-items: center;
  justify-content: space-between;
}

.section-builder-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1fr);
  gap: 18px;
}

.section-builder-media,
.section-builder-fields {
  display: grid;
  gap: 12px;
}

.section-builder-media {
  align-content: start;
}

.image-position-controls {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(7, 20, 29, 0.82);
  border: 1px solid rgba(103, 229, 218, 0.12);
}

.image-position-controls label {
  gap: 6px;
  font-size: 0.95rem;
}

.image-position-controls input[type="range"] {
  padding: 0;
}

.section-builder-media img,
.newsletter-section-media img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 18px;
  object-fit: cover;
}

.section-builder-media img {
  aspect-ratio: 1 / 1;
}

.section-image-placeholder,
.newsletter-section-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px dashed rgba(103, 229, 218, 0.24);
  background: rgba(6, 20, 29, 0.82);
  color: var(--muted);
  font-weight: 700;
}

.newsletter-section {
  display: flex;
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  border-radius: 26px;
  border: 1px solid rgba(103, 229, 218, 0.12);
  background: linear-gradient(180deg, rgba(10, 28, 40, 0.94), rgba(7, 22, 32, 0.96));
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
}

.newsletter-section--image-right {
  flex-direction: row-reverse;
}

.newsletter-section-media {
  flex: 0 0 38%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 18px;
}

.newsletter-section-copy {
  flex: 1;
  display: grid;
  gap: 12px;
  align-content: start;
}

.newsletter-section-copy h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.newsletter-section-copy p,
.newsletter-section-copy ul {
  margin: 0;
}

.status-banner {
  padding: 18px 22px;
  border-left: 6px solid var(--secondary);
  background: linear-gradient(135deg, rgba(8, 28, 39, 0.96), rgba(9, 22, 31, 0.9));
}

.status-banner strong {
  display: block;
  margin-bottom: 6px;
}

.event-card,
.request-card,
.approval-item,
.member-row {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(10, 28, 40, 0.95), rgba(7, 22, 32, 0.94));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.event-card h4,
.request-card h4,
.approval-item h4 {
  margin: 0 0 6px;
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
}

.event-meta,
.request-meta,
.member-row,
.approval-item-actions {
  margin-top: 12px;
  align-items: center;
}

.request-workspace {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.request-inbox-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: 18px;
  align-items: start;
}

@media (min-width: 1280px) {
  .topbar,
  .hero-grid,
  .admin-intro,
  .content {
    max-width: 1420px;
  }

  .hero {
    padding-left: clamp(28px, 4vw, 68px);
    padding-right: clamp(28px, 4vw, 68px);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(420px, 0.7fr);
    gap: 48px;
  }

  .admin-intro {
    grid-template-columns: minmax(0, 1.18fr) minmax(420px, 0.82fr);
    gap: 42px;
  }

  .dashboard-grid,
  .info-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }

  .member-home-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.5fr);
  }

  .member-home-hero-media,
  .member-home-overlay {
    min-height: 590px;
  }

  .newsletter-builder-grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(520px, 0.88fr);
    gap: 30px;
  }

  .request-inbox-layout {
    grid-template-columns: minmax(340px, 0.72fr) minmax(0, 1.28fr);
    gap: 24px;
  }
}

@media (min-width: 1600px) {
  .topbar,
  .hero-grid,
  .admin-intro,
  .content {
    max-width: 1540px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.34fr) minmax(460px, 0.66fr);
  }

  .member-home-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(340px, 0.45fr);
  }

  .member-home-hero-media,
  .member-home-overlay {
    min-height: 640px;
  }

  .newsletter-builder-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(580px, 0.92fr);
  }
}

.request-inbox-sidebar,
.request-inbox-detail {
  display: grid;
  gap: 16px;
}

.request-filter-bar {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(9, 26, 37, 0.92);
}

.request-inbox-list {
  display: grid;
  gap: 10px;
}

.request-list-entry {
  display: grid;
  gap: 10px;
}

.request-list-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(103, 229, 218, 0.14);
  border-radius: 18px;
  padding: 16px;
  background: rgba(9, 24, 34, 0.9);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
  color: var(--text);
}

.request-list-item.active {
  border-color: rgba(27, 208, 195, 0.4);
  background: linear-gradient(135deg, rgba(10, 43, 52, 0.96), rgba(10, 31, 42, 0.94));
}

.request-inline-detail {
  display: grid;
  gap: 12px;
}

.request-status-stack {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.request-thread-card {
  display: grid;
  gap: 16px;
}

.request-thread-header,
.request-status-row,
.request-review-actions,
.attachment-list,
.request-message-head,
.request-notice-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.request-thread-header {
  align-items: start;
  justify-content: space-between;
}

.request-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.request-contact-grid > div {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(9, 26, 37, 0.88);
  border: 1px solid rgba(103, 229, 218, 0.12);
}

.request-contact-grid p,
.request-contact-grid strong {
  margin: 0;
  overflow-wrap: anywhere;
}

.request-status-row {
  justify-content: flex-end;
}

.request-thread,
.request-notice-list {
  display: grid;
  gap: 12px;
}

.request-message,
.request-notice {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(103, 229, 218, 0.1);
  background: rgba(8, 24, 35, 0.9);
  color: var(--text);
}

.request-message {
  max-width: min(82%, 720px);
}

.request-message--member {
  justify-self: start;
  background: linear-gradient(135deg, rgba(18, 56, 68, 0.95), rgba(10, 40, 51, 0.96));
  border-color: rgba(93, 232, 220, 0.2);
}

.request-message--admin {
  justify-self: end;
  background: linear-gradient(135deg, rgba(25, 84, 78, 0.96), rgba(11, 56, 61, 0.94));
  border-color: rgba(72, 226, 212, 0.22);
}

.request-notice {
  background: linear-gradient(135deg, rgba(33, 40, 49, 0.96), rgba(18, 27, 35, 0.96));
  border-color: rgba(160, 182, 197, 0.18);
}

.request-message .pill,
.request-notice .pill {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  color: var(--text);
}

.request-message .helper-text,
.request-notice .helper-text {
  color: rgba(212, 226, 234, 0.72);
}

.request-message-head {
  align-items: center;
}

.request-message p {
  margin: 0;
}

.attachment-link {
  text-decoration: none;
}

.member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.member-row--editable {
  display: grid;
  gap: 14px;
}

.member-row-actions,
.directory-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.member-edit-form {
  padding-top: 8px;
}

.directory-search-control {
  min-width: min(320px, 100%);
}

.directory-sort-control {
  min-width: 180px;
}

.member-directory--scroll {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

.empty-state {
  padding: 20px;
  text-align: center;
  border: 1px dashed rgba(31, 42, 36, 0.18);
  border-radius: var(--radius-md);
  color: var(--muted);
}

.newsletter-preview-frame {
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(247, 243, 236, 0.96), rgba(255, 255, 255, 0.9));
  padding: 14px;
}

.newsletter-preview-frame .newsletter-preview-image {
  width: 100%;
  height: auto;
  border-radius: 18px;
  object-fit: contain;
  background: rgba(240, 233, 223, 0.75);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 320px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(31, 42, 36, 0.92);
  color: white;
  box-shadow: var(--shadow);
  z-index: 20;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 72px 24px 24px;
  background: rgba(13, 20, 17, 0.86);
  backdrop-filter: blur(8px);
}

.image-lightbox-image {
  max-width: min(1100px, 92vw);
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  background: white;
}

.image-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hidden {
  display: none !important;
}

.tab-button:hover,
.portal-tab-button:hover,
.admin-tab-button:hover,
.ghost-button:hover,
.primary-button:hover,
.secondary-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

@media (max-width: 920px) {
  .hero-grid,
  .admin-intro,
  .dashboard-grid,
  .info-grid,
  .member-home-grid,
  .member-home-shortcuts,
  .newsletter-splash,
  .newsletter-builder-grid,
  .builder-meta-grid,
  .section-builder-grid,
  .request-inbox-layout,
  .request-contact-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-section,
  .newsletter-section--image-right {
    flex-direction: column;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    justify-items: start;
  }

  .portal-tabs--top {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  body[data-page="admin"] .topbar-actions,
  body[data-page="member"] .topbar-actions {
    display: flex;
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .portal-tabs--top .portal-tab-button,
  .portal-tabs--top .admin-tab-button,
  .topbar-actions .ghost-button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .topbar-utility-actions {
    justify-content: flex-start;
  }

  .hero-copy {
    padding-top: 0;
  }

  .request-message {
    max-width: 100%;
  }

  .member-home-hero-media,
  .member-home-overlay {
    min-height: 430px;
  }

  .member-home-overlay {
    padding: 24px;
  }

  .member-shortcut-card {
    grid-template-columns: 1fr;
  }

  .directory-controls {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .hero,
  .content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .drop-card,
  .panel {
    padding: 18px;
  }

  h2 {
    max-width: none;
  }

  .member-home-overlay h3 {
    max-width: none;
  }

  .member-home-preview-frame {
    min-height: 280px;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }

  .image-lightbox {
    padding: 84px 16px 16px;
  }

  .image-lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 132px);
  }

  .image-lightbox-close {
    top: 16px;
    right: 16px;
  }
}
