* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 0% 0%, #dbeafe 0%, transparent 35%),
    radial-gradient(circle at 100% 0%, #e0f2fe 0%, transparent 30%),
    #f8fafc;
  color: #1e293b;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 20px 36px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #0f172a;
  margin-bottom: 12px;
  font-weight: 700;
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #dbeafe;
  background: #fff;
  box-shadow: 0 8px 22px -14px #1d4ed8;
}

h1, h2, h3 {
  margin: 0 0 12px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe2eb;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 14px 30px -24px #1e3a8a;
}

.admin-card {
  padding: 22px;
}

.admin-hero {
  margin: 10px 0 16px;
  background: linear-gradient(135deg, #1d4ed8 0%, #0369a1 100%);
  color: #fff;
  border-radius: 16px;
  padding: 20px;
}

.admin-hero h1 {
  margin-bottom: 8px;
}

.admin-hero p {
  margin: 0;
  color: #dbeafe;
}

.admin-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.admin-nav-card {
  text-decoration: none;
  color: inherit;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid #dbe2eb;
  background: #fff;
  box-shadow: 0 12px 28px -24px #1e40af;
}

.admin-nav-card h3 {
  margin-bottom: 6px;
}

.admin-nav-card p {
  margin: 0;
  color: #475569;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

.admin-topbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sub-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

.sub-link {
  text-decoration: none;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
}

.sub-link.active {
  color: #fff;
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.event-menu {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  margin-top: 8px;
}

input,
textarea,
select {
  width: 100%;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}

.btn {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 0;
  color: #fff;
  background: #1d4ed8;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 24px -18px #1d4ed8;
}

.btn-muted {
  background: #475569;
}

#extractStatus {
  margin: 8px 0 0;
  color: #334155;
  font-size: 0.92rem;
}

.alert {
  border-radius: 8px;
  padding: 10px;
}

.error {
  background: #fee2e2;
  color: #991b1b;
}

.success {
  background: #dcfce7;
  color: #166534;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  border: 1px solid #dbe2eb;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.flyer {
  width: min(100%, 380px);
  border-radius: 10px;
  border: 1px solid #dbe2eb;
  margin: 10px 0;
}

.inline-options {
  display: flex;
  gap: 20px;
}

.inline-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
}

.inline-options input {
  width: auto;
}

.name-list {
  background: #fff;
  border: 1px solid #dbe2eb;
  border-radius: 12px;
  padding: 14px 14px 14px 30px;
}

.event-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.html-preview {
  margin-top: 8px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
}

.html-preview p {
  margin: 0 0 10px;
}

.html-preview p:last-child {
  margin-bottom: 0;
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hamburger-wrap {
  position: relative;
}

.hamburger-btn {
  width: 44px;
  height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  cursor: pointer;
}

.hamburger-btn span {
  display: block;
  height: 2px;
  background: #1e293b;
  border-radius: 999px;
}

.hamburger-panel {
  position: absolute;
  top: 50px;
  right: 0;
  min-width: 190px;
  padding: 8px;
  border: 1px solid #dbe2eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 30px -24px #0f172a;
  z-index: 20;
}

.menu-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 600;
}

.menu-link:hover {
  background: #eff6ff;
}

.action-cell {
  text-align: center;
  vertical-align: middle;
}

.inline-form {
  margin: 0;
}

.action-btn {
  margin-top: 0;
  min-width: 96px;
}

.action-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.booking-page {
  max-width: 980px;
}

.booking-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  align-items: start;
  background: linear-gradient(140deg, #ffffff 0%, #ecfeff 100%);
}

.booking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.booking-meta span {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.9rem;
}

.booking-flyer {
  width: 100%;
  max-width: 360px;
  margin: 0;
  justify-self: end;
  border: 2px solid #dbeafe;
}

.booking-form-card {
  max-width: 620px;
}

.booking-count {
  margin-top: 0;
}

.booking-form .btn {
  margin-top: 14px;
  width: 100%;
}

.booking-actions-grid {
  align-items: stretch;
}

.calendar-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.calendar-links .btn {
  margin-top: 0;
}

.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25d366;
  box-shadow: 0 12px 24px -18px #1f9d4f;
}

.description-html p {
  margin: 0 0 10px;
  line-height: 1.45;
}

.description-html p:last-child {
  margin-bottom: 0;
}

.summary-card {
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -22px #0f172a;
}

.summary-card h2 {
  margin-bottom: 8px;
}

.summary-card p {
  margin: 0;
}

.summary-card strong {
  font-size: 2rem;
  line-height: 1;
}

.summary-events {
  border-color: #bfdbfe;
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
}

.summary-events strong {
  color: #1d4ed8;
}

.summary-members {
  border-color: #bbf7d0;
  background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
}

.summary-members strong {
  color: #15803d;
}

.summary-participants {
  border-color: #fde68a;
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
}

.summary-participants strong {
  color: #b45309;
}

.wa-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #25d366;
  text-decoration: none;
}

.wa-icon::before {
  content: "WA";
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.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 print {
  .print-hide {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: 0;
    padding: 0;
  }
}

@media (max-width: 720px) {
  .booking-hero {
    grid-template-columns: 1fr;
  }

  .booking-flyer {
    justify-self: start;
    max-width: 100%;
  }

  .container {
    padding: 16px;
  }

  th, td {
    font-size: 0.9rem;
    padding: 7px;
  }
}

/* Admin events page polish */
.admin-events-page {
  max-width: 1220px;
}

.admin-events-topbar {
  margin: 12px 0 14px;
  padding: 14px 16px;
  background: linear-gradient(130deg, #ffffff 0%, #f1f7ff 100%);
  border: 1px solid #d9e4f2;
  border-radius: 14px;
}

.page-title {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.tabs-panel {
  padding: 14px;
}

.tabs-panel .sub-nav,
.tabs-panel .event-menu {
  margin: 0;
}

.tabs-panel .event-menu {
  margin-top: 10px;
}

.sub-link {
  font-weight: 600;
  padding: 9px 16px;
}

.btn {
  margin-top: 0;
  font-weight: 600;
  border-radius: 10px;
}

form .btn {
  margin-top: 12px;
}

.btn-muted {
  background: #475569;
}

.admin-topbar-actions .btn {
  min-width: 132px;
  text-align: center;
}

input,
textarea {
  border-radius: 10px;
  border-color: #cbd8e6;
  background: #ffffff;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #bfdbfe;
  outline-offset: 1px;
  border-color: #93c5fd;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-wrap table {
  min-width: 980px;
}

.action-stack {
  align-items: stretch;
}

.action-btn {
  min-width: 110px;
  width: 100%;
  text-align: center;
}

.admin-members-page,
.admin-participants-page {
  max-width: 1220px;
}

.admin-members-topbar,
.admin-participants-topbar {
  margin: 12px 0 14px;
  padding: 14px 16px;
  background: linear-gradient(130deg, #ffffff 0%, #f1f7ff 100%);
  border: 1px solid #d9e4f2;
  border-radius: 14px;
}

.admin-members-page .grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
