/* South African Intelligence School 40 Year Reunion */

:root {
  --black: #0a0a0a;
  --ink: #141414;
  --gold: #ffcc00;
  --gold-dim: #c9a000;
  --red: #c00000;
  --red-deep: #8a0000;
  --white: #ffffff;
  --cream: #f4f1e8;
  --muted: #b8b8b8;
  --line: rgba(255, 204, 0, 0.28);
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --header-h: 72px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--cream);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(192, 0, 0, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(255, 204, 0, 0.12), transparent 45%),
    linear-gradient(180deg, #000 0%, #121212 40%, #1a0a0a 100%);
  line-height: 1.55;
  padding-top: calc(var(--header-h) + var(--safe-top));
  padding-bottom: var(--safe-bottom);
}

/* Site-wide crest watermark — fixed & centred in the viewport while content scrolls */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.85)),
    url("../images/logo/logo.png") center center / min(420px, 70vw) no-repeat;
  opacity: 0.22;
  pointer-events: none;
}

a {
  color: var(--gold);
  text-decoration: none;
}
a:hover {
  color: #ffe066;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Header */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 2px solid var(--gold);
  padding-top: var(--safe-top);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--gold);
  justify-self: center;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(255, 204, 0, 0.25));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1.05rem;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hamburger {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--gold);
  transition: 0.2s ease;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-self: end;
  min-width: 0;
}

.header-user {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  color: var(--gold);
  max-width: 5.5rem;
  min-width: 0;
  text-decoration: none;
  line-height: 1.15;
  text-align: center;
}
.header-user:hover {
  color: #ffe066;
}
.header-user-name {
  font-size: 0.68rem;
  font-weight: 600;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}
.header-user .icon-btn {
  flex-shrink: 0;
  pointer-events: none;
  padding: 0.15rem 0.35rem 0;
  font-size: 1.15rem;
  line-height: 1;
}

.icon-btn {
  color: var(--gold);
  background: transparent;
  border: 1px solid transparent;
  font-size: 1.25rem;
  padding: 0.4rem;
  cursor: pointer;
}
.icon-btn:hover {
  border-color: var(--line);
}

@media (min-width: 760px) {
  .header-user {
    max-width: 7.5rem;
  }
  .header-user-name {
    font-size: 0.78rem;
  }
}

.main-nav {
  display: none;
  background: #050505;
  border-top: 1px solid var(--line);
}
.main-nav.open {
  display: block;
}
.main-nav a {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--cream);
}
.main-nav a:hover {
  color: var(--gold);
}

@media (min-width: 900px) {
  .hamburger {
    display: none;
  }
  .header-inner {
    grid-template-columns: 1fr auto;
  }
  .brand {
    justify-self: start;
  }
  .main-nav {
    display: block;
    border-top: none;
    background: transparent;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: var(--safe-top);
    height: var(--header-h);
  }
  .main-nav .container {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    height: 100%;
    width: auto;
  }
  .main-nav a {
    border: 0;
    padding: 0;
    font-size: 0.82rem;
    white-space: nowrap;
  }
}

/* Hero */
.home-page .hero {
  min-height: auto;
  padding: 3.25rem 0 2.5rem;
}

.hero-kicker {
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 0.85rem;
  margin: 0 0 0.6rem;
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h) - var(--safe-top));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 0 4rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.45));
  pointer-events: none;
  animation: crestGlow 8s ease-in-out infinite alternate;
}

@keyframes crestGlow {
  from { opacity: 0.75; }
  to { opacity: 1; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}

.hero-crest {
  width: min(180px, 42vw);
  margin: 0 auto 1.5rem;
  animation: riseIn 0.9s ease both;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.75rem;
  line-height: 1.15;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
  animation: riseIn 0.9s ease 0.12s both;
}

.hero p {
  color: var(--cream);
  font-size: 1.08rem;
  margin: 0 0 1.75rem;
  animation: riseIn 0.9s ease 0.22s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  animation: riseIn 0.9s ease 0.32s both;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-sizing: border-box;
  min-height: 2.75rem;
  padding: 0.75rem 1.35rem;
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: 0.2s ease;
  vertical-align: middle;
  text-decoration: none;
  white-space: nowrap;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.btn-row form {
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: 0;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red-deep);
}
.btn-primary:hover {
  background: var(--red-deep);
  color: var(--white);
}

.btn-gold {
  background: var(--gold);
  color: #111;
  border-color: var(--gold-dim);
}
.btn-gold:hover {
  background: #ffe066;
  color: #111;
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn-outline:hover {
  background: rgba(255, 204, 0, 0.12);
  color: var(--gold);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-ghost:hover {
  color: var(--cream);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Sections */
.section {
  padding: 2.5rem 0 3.5rem;
}

.section-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 0.5rem;
  justify-content: space-between;
}

.section-title-row .section-title {
  margin: 0;
}

.section-title-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--gold);
  border: 1px solid rgba(255, 204, 0, 0.45);
  text-decoration: none;
  transition: 0.2s ease;
}

.section-title-action:hover,
.section-title-action:focus-visible {
  color: #111;
  background: var(--gold);
  border-color: var(--gold);
  outline: none;
}

.section-title-action i {
  font-size: 1.15rem;
}

.section-lead {
  color: var(--muted);
  max-width: 40rem;
  margin: 0 0 1.75rem;
}

/* Sponsors & donations */
.sponsors-subhead {
  font-family: var(--font-display);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
}

.sponsors-layout {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .sponsors-layout {
    grid-template-columns: minmax(16rem, 0.9fr) minmax(0, 1.4fr);
    align-items: start;
  }
}

.sponsors-banking {
  padding: 1.15rem 1.25rem;
}

.sponsors-banking-public {
  max-width: 28rem;
  margin: 0 0 1.75rem;
}

.banking-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.85rem;
  margin: 0;
}

.banking-dl dt {
  color: var(--muted);
  font-size: 0.88rem;
}

.banking-dl dd {
  margin: 0;
  color: var(--cream);
  font-weight: 600;
}

.sponsors-form-panel {
  margin: 0;
  width: 100%;
  max-width: none;
}

.form-row-2 {
  display: grid;
  gap: 0 1rem;
}

@media (min-width: 700px) {
  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.sponsor-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
}

.sponsor-card {
  padding: 1rem;
  text-align: center;
}

.sponsor-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold);
  margin: 0.5rem 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sponsor-details {
  margin: 0.45rem 0 0.35rem;
  color: var(--cream);
  font-size: 0.92rem;
  line-height: 1.4;
  text-align: left;
}

.sponsor-logo,
.sponsor-logo-link {
  display: block;
  margin: 0 auto;
}

.sponsor-logo {
  max-width: 100%;
  max-height: 5.5rem;
  width: auto;
  height: auto;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.35rem;
}

.admin-sponsor-thumb {
  max-width: 4.5rem;
  max-height: 2.5rem;
  object-fit: contain;
  margin-top: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.2rem;
}

.donation-admin-form select,
.donation-admin-form textarea {
  display: block;
  width: 100%;
  margin-bottom: 0.4rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: var(--cream);
  font: inherit;
}

.banking-admin-form .form-group input,
.banking-admin-form .form-group textarea {
  width: 100%;
}

.panel {
  background: rgba(10, 10, 10, 0.75);
  border: 1px solid var(--line);
  padding: 1.5rem;
}

.day-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 760px) {
  .day-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.day-item {
  border-left: 3px solid var(--red);
  background: rgba(0, 0, 0, 0.55);
  padding: 1.1rem 1.2rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.day-item:hover {
  transform: translateY(-3px);
  border-left-color: var(--gold);
}

.programme-schedule-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gold);
  margin: 1rem 0 0.5rem;
}

.programme-schedule {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  border-top: 1px solid var(--line);
}

.programme-schedule li {
  display: grid;
  grid-template-columns: 4.25rem 1fr;
  gap: 0.65rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  align-items: start;
}

.programme-time {
  font-family: var(--font-display);
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.programme-activity {
  color: var(--cream);
}

.programme-schedule-compact {
  margin-top: 0.75rem;
  margin-bottom: 0.35rem;
}
.programme-schedule-compact li {
  padding: 0.35rem 0;
  font-size: 0.92rem;
}

.programme-schedule-dialog {
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.programme-admin-table input[type="time"],
.programme-admin-table input[type="text"] {
  width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 900px) {
  .day-grid-programme {
    grid-template-columns: 1fr;
  }
}

.day-item h3 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
  color: var(--gold);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.day-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.25rem 0;
}

/* Home venue / map */
.venue-section {
  padding-top: 0.5rem;
}

.venue-panel {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.35rem 1.4rem 1.5rem;
}

.venue-dates,
.venue-address,
.venue-host {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
  color: var(--cream);
  line-height: 1.45;
}

.venue-dates i,
.venue-address i,
.venue-host i {
  color: var(--gold);
  margin-top: 0.2rem;
  width: 1.1rem;
  text-align: center;
  flex-shrink: 0;
}

.venue-address a,
.venue-host a,
.venue-map-link {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.venue-address a:hover,
.venue-host a:hover,
.venue-map-link:hover {
  color: #ffe066;
}

.venue-map-note {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.venue-map {
  margin-top: 0.35rem;
}

.venue-map iframe {
  display: block;
  width: 100%;
  height: min(320px, 55vw);
  border: 1px solid var(--line);
  background: #0a0a0a;
}

.venue-photos-section {
  padding-top: 0;
}

.venue-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.75rem;
}

.venue-photo-thumb {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line);
  background: #0a0a0a;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.venue-photo-thumb:hover,
.venue-photo-thumb:focus-visible {
  border-color: var(--gold);
  outline: none;
}

.venue-photo-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: transform 0.25s ease;
}

.venue-photo-thumb:hover .venue-photo-thumb-img {
  transform: scale(1.06);
}

/* Forms */
.auth-container,
.form-panel {
  width: min(560px, 100%);
  margin: 2rem auto;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid var(--line);
  padding: 1.75rem;
}

.form-panel.wide {
  width: min(800px, 100%);
}

.auth-container h1,
.form-panel h1 {
  font-family: var(--font-display);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--cream);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: #111;
  color: var(--cream);
  font: inherit;
}

/* Date/time match other fields; force bright white custom picker icons */
input[type="date"],
input[type="time"],
.form-group input[type="date"],
.form-group input[type="time"],
.programme-admin-table input[type="time"] {
  color: var(--cream);
  background: #111;
  border: 1px solid rgba(255, 204, 0, 0.35);
  color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 1 !important;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  margin-left: 0.25rem;
  /* Replace native glyph with an explicit white SVG (filters are unreliable here) */
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.15rem 1.15rem;
  filter: none !important;
  /* Hide original painted icon */
  color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}

input[type="time"]::-webkit-calendar-picker-indicator {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 16 14'/%3E%3C/svg%3E");
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-group small {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
}

.checkbox-label {
  display: flex !important;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 400 !important;
}
.checkbox-label input {
  width: auto;
  margin-top: 0.25rem;
}

.day-checks {
  display: grid;
  gap: 0.65rem;
}
.day-checks label {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem;
  font-weight: 400;
}
.day-checks input {
  width: auto;
  margin-top: 0.2rem;
}

.day-checks-detailed {
  gap: 1rem;
}
.day-reg-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.85rem 1rem;
}
.day-reg-block.is-selected {
  border-color: var(--line);
}
.day-reg-toggle {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0;
  cursor: pointer;
}
.day-reg-details {
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.day-reg-details[hidden] {
  display: none !important;
}
.day-guest-name-row[hidden] {
  display: none !important;
}
.day-guest-count {
  max-width: 6rem;
}

.auth-links {
  margin-top: 1.25rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.alert {
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-left: 3px solid;
}
.alert-error {
  background: rgba(192, 0, 0, 0.18);
  border-color: var(--red);
}
.alert-success {
  background: rgba(255, 204, 0, 0.12);
  border-color: var(--gold);
  color: var(--cream);
}

.profile-view dl {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0.5rem 1rem;
  margin: 0;
}
.profile-view dt {
  color: var(--muted);
}
.profile-view dd {
  margin: 0;
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-display);
  border: 1px solid var(--gold);
  color: var(--gold);
}
.status-badge.cancelled {
  border-color: var(--muted);
  color: var(--muted);
}
.status-badge.confirmed {
  border-color: #2e7d32;
  color: #7dcea0;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.data th,
table.data td {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}
table.data th {
  font-family: var(--font-display);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* Manage registrations: notes + equal Save/Delete */
table.data tbody tr {
  height: 1px; /* let cells adopt the row’s tallest content */
}
table.data td.reg-actions-cell {
  min-width: 16rem;
  height: 100%;
}
.reg-fee-help {
  margin: 0 0 1rem;
  color: rgba(245, 240, 230, 0.75);
}
.reg-payment-cell {
  min-width: 9.5rem;
  vertical-align: top;
}
.reg-admin-pay-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}
.reg-pay-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.25rem;
}
.reg-pay-status {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.reg-pay-status--paid { color: #7dcea0; }
.reg-pay-status--partial { color: #f4d03f; }
.reg-pay-status--unpaid { color: #f1948a; }
.reg-pay-status--none { color: rgba(245, 240, 230, 0.55); }
.reg-pay-label {
  font-size: 0.8rem;
  margin: 0;
}
.reg-pay-input-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.reg-pay-prefix {
  color: var(--gold, #ffcc00);
  font-weight: 600;
}
.reg-pay-input {
  width: 6.5rem;
  box-sizing: border-box;
  padding: 0.4rem 0.5rem;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: var(--cream);
  font: inherit;
}
.reg-admin-layout {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  height: 100%;
  min-height: 100%;
}
.reg-admin-notes-wrap {
  flex: 1 1 auto;
  display: flex;
  margin: 0;
  min-width: 0;
  min-height: 100%;
}
.reg-admin-notes {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 6.5rem;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: var(--cream);
  font: inherit;
  line-height: 1.4;
  resize: vertical;
}
.reg-admin-btns {
  display: flex;
  flex-direction: column;
  flex: 0 0 7.25rem;
  width: 7.25rem;
  gap: 0.5rem;
  align-self: flex-start;
}
.reg-admin-btns .btn,
.reg-admin-btns .reg-delete-form,
.reg-admin-btns a.btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
  text-align: center;
}
.reg-admin-btns .btn,
.reg-admin-btns a.btn {
  width: 100%;
  min-width: 0;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.reg-admin-btns a.btn {
  border: 1px solid var(--gold);
}

.reg-lock-form {
  display: inline-flex;
  margin: 0;
}

.reg-on-behalf-panel {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
}

.reg-on-behalf-form label {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 0.85rem;
}

.reg-on-behalf-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: stretch;
}

.reg-on-behalf-row select {
  flex: 1 1 16rem;
  min-width: 12rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: var(--cream);
  font: inherit;
}

.reg-on-behalf-form small {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
}

.reg-summary-layout {
  display: grid;
  gap: 1.25rem;
  margin: 0 0 1.5rem;
}
@media (min-width: 800px) {
  .reg-summary-layout {
    grid-template-columns: minmax(16rem, 0.9fr) minmax(0, 1.3fr);
    align-items: start;
  }
}
.reg-page-totals .banking-dl dd {
  font-size: 1.05rem;
}
table.data tfoot th,
table.data tfoot td {
  border-top: 2px solid var(--gold);
  background: rgba(255, 204, 0, 0.08);
  vertical-align: top;
}
.reg-page-total-row small {
  display: block;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-family: inherit;
  color: var(--cream);
  margin-top: 0.2rem;
}
.reg-member-fee {
  margin: 1.25rem 0 0;
  padding: 1rem 1.1rem;
}
.reg-member-fee-amount {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold);
  margin: 0 0 0.35rem;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Footer */
.main-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 calc(1.5rem + var(--safe-bottom));
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.6);
}

/* Translation review modal */
body.tr-modal-open {
  overflow: hidden;
}
.tr-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.tr-modal[hidden] {
  display: none !important;
}
.tr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
}
.tr-modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  background: #121212;
  border: 1px solid var(--gold);
  padding: 1.25rem 1.25rem 1.4rem;
  color: var(--cream);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}
.tr-modal-panel h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 2rem 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--gold);
}
.tr-modal-lead {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.tr-modal-close {
  position: absolute;
  right: 0.55rem;
  top: 0.35rem;
  background: none;
  border: 0;
  color: var(--gold);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}
.tr-modal-panel .form-group {
  margin-bottom: 0.9rem;
}
.tr-modal-panel textarea {
  min-height: 8rem;
}

/* Add to home overlay */
.add-to-home-instructions {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}
.instructions-content {
  background: #111;
  border: 1px solid var(--gold);
  padding: 1.25rem;
  width: min(420px, 100%);
  position: relative;
  color: var(--cream);
}
.instructions-close {
  position: absolute;
  right: 0.5rem;
  top: 0.35rem;
  background: none;
  border: 0;
  color: var(--gold);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (display-mode: standalone) {
  body {
    padding-top: calc(var(--header-h) + var(--safe-top));
  }
}

/* Memories */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.memory-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 760px) {
  .memory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.memory-card {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.memory-thumb {
  display: block;
  width: 100%;
  height: 140px;
  max-height: 140px;
  overflow: hidden;
  background-color: #111;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.memory-card-body {
  padding: 1.1rem 1.2rem 1.25rem;
  min-width: 0;
}
.memory-card-body h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.memory-card-body h2 a {
  color: var(--gold);
}

.memory-content {
  color: var(--cream);
  line-height: 1.65;
  overflow: hidden;
}
.memory-content img {
  max-width: 100% !important;
  height: auto !important;
}
.memory-content img.float-left {
  float: left;
  margin: 0 1rem 1rem 0;
  max-width: 50%;
}
.memory-content img.float-right {
  float: right;
  margin: 0 0 1rem 1rem;
  max-width: 50%;
}
.memory-content img.center-image {
  display: block;
  margin: 1rem auto;
}
.memory-content img.full-width {
  width: 100%;
  display: block;
  margin: 1rem 0;
}
.memory-article::after {
  content: "";
  display: table;
  clear: both;
}

/* TinyMCE on dark theme */
.tox-tinymce {
  border: 1px solid rgba(255, 204, 0, 0.35) !important;
}
.tox-promotion,
.tox-statusbar__branding {
  display: none !important;
}

/* Profile photos */
.profile-photos {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.profile-photo-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 1rem;
}
@media (min-width: 640px) {
  .profile-photo-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.profile-photo-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  padding: 1rem;
}
.profile-photo-card h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gold);
  margin: 0 0 0.75rem;
}
.profile-thumb,
.member-thumb {
  width: 96px;
  height: 96px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  background: #111;
}
.profile-thumb.placeholder,
.member-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 0.35rem;
}
.profile-thumb-btn,
.member-thumb-btn {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
  position: relative;
}
.profile-thumb-btn:hover .profile-thumb,
.member-thumb-btn:hover .member-thumb {
  outline: 2px solid var(--gold);
}
.photo-upload-form {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.photo-upload-form input[type="file"] {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Members directory */
.members-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.member-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--line);
  padding: 0.85rem 1rem;
}
.member-photos {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.member-thumb {
  width: 72px;
  height: 72px;
}
.member-thumb-label {
  display: block;
  text-align: center;
  font-size: 0.7rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}
.member-info {
  min-width: 0;
  flex: 1;
}
.member-info h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Photo lightbox */
body.photo-lightbox-open {
  overflow: hidden;
}
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.photo-lightbox[hidden] {
  display: none !important;
}
.photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}
.photo-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #0a0a0a;
  border: 1px solid var(--gold);
  padding: 1rem;
  text-align: center;
}
.photo-lightbox-panel img {
  max-width: 100%;
  max-height: 75vh;
  height: auto;
  object-fit: contain;
}
.photo-lightbox-caption {
  color: var(--gold);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 2rem 0.75rem 0;
}
.photo-lightbox-close {
  position: absolute;
  right: 0.5rem;
  top: 0.25rem;
  background: none;
  border: 0;
  color: var(--gold);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}
.photo-lightbox-rotate {
  margin-top: 0.75rem;
}
.photo-lightbox-rotate[hidden] {
  display: none !important;
}

/* Wine shop */
.wine-labels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
  margin: 0 0 2rem;
}
.wine-labels figure {
  margin: 0;
}
.wine-labels button {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.wine-labels img {
  display: block;
  width: 100%;
  height: auto;
}
.wine-labels figcaption {
  margin-top: 0.45rem;
  color: var(--gold);
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.shop-grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}
.shop-card {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.1rem 1.15rem;
}
.shop-card h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
  margin: 0.7rem 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.shop-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  cursor: zoom-in;
}
.shop-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shop-card-image--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  color: var(--gold);
  font-size: 2.4rem;
  opacity: 0.55;
}
.shop-vintage {
  margin: 0 0 0.35rem;
  color: var(--gold);
  font-size: 0.88rem;
  letter-spacing: 0.03em;
}
.shop-desc {
  margin: 0 0 0.65rem;
  color: var(--cream);
  font-size: 0.92rem;
  line-height: 1.45;
  flex: 1 1 auto;
}
.shop-price {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold);
  margin: 0 0 0.5rem;
}
.shop-add-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: auto;
}
.shop-add-form input[type="number"] {
  width: 4.5rem;
  padding: 0.55rem 0.45rem;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: #111;
  color: var(--cream);
  font: inherit;
}
.shop-cart-count {
  display: inline-block;
  min-width: 1.35rem;
  padding: 0.05rem 0.4rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}
.shop-cart-table input[type="number"] {
  width: 4.75rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: #111;
  color: var(--cream);
  font: inherit;
}
.shop-checkout-total {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
  margin: 0 0 1rem;
}
.shop-checkout-layout {
  margin-top: 0;
}
.shop-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.shop-product-actions form {
  margin: 0;
}
@media (max-width: 699px) {
  .shop-add-form {
    flex-wrap: wrap;
  }
  .shop-add-form .btn {
    flex: 1 1 auto;
  }
}

.gallery-upload {
  margin-bottom: 1.75rem;
}
body.gallery-slideshow-open {
  overflow: hidden;
}
.gallery-slideshow {
  position: fixed;
  inset: 0;
  z-index: 4000;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-slideshow[hidden] {
  display: none !important;
}
.gallery-slideshow:fullscreen,
.gallery-slideshow:-webkit-full-screen {
  width: 100%;
  height: 100%;
  background: #000;
}
.gallery-slideshow img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.gallery-slideshow-hint,
.gallery-slideshow-caption {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.85rem 1.25rem 1.4rem;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 4px #000;
}
.gallery-slideshow-hint {
  top: 0;
  font-size: 0.9rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.62), transparent);
}
.gallery-slideshow-caption {
  bottom: 0;
  padding-top: 1.6rem;
  padding-bottom: 0.85rem;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.gallery-card {
  margin: 0;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--line);
  padding: 0.6rem;
}
.gallery-card .venue-photo-thumb {
  border: 0;
}
.gallery-photo-wrap {
  position: relative;
}
.gallery-rotate-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid rgba(255, 204, 0, 0.7);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: var(--gold);
  cursor: pointer;
}
.gallery-rotate-btn:hover,
.gallery-rotate-btn:focus-visible {
  background: var(--gold);
  color: #111;
  outline: none;
}
.gallery-rotate-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}
.gallery-card img.venue-photo-thumb-img {
  object-fit: cover;
}
.gallery-caption {
  margin: 0.65rem 0 0.25rem;
}
.gallery-card .day-meta {
  margin: 0.35rem 0;
}
.gallery-card form {
  margin: 0.35rem 0 0;
}

.user-filter {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
}
.user-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}
.user-filter-row .form-group {
  flex: 1 1 240px;
  margin-bottom: 0;
}
.order-for-results {
  margin-top: 0.35rem;
  border: 1px solid rgba(255, 204, 0, 0.35);
  background: #111;
  max-height: 240px;
  overflow: auto;
}
.order-for-results button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: inherit;
  border: 0;
  border-bottom: 1px solid rgba(255, 204, 0, 0.15);
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  font: inherit;
}
.order-for-results button:hover,
.order-for-results button:focus {
  background: rgba(255, 204, 0, 0.12);
}
#order-for-clear {
  margin-top: 0.5rem;
}

