@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=DM+Sans:wght@300;400;500;600&display=swap");

:root {
  --paper: #f4f5f8;
  --dutch-blue: #21468b;
  --dutch-blue-dark: #1a3266;
  --dutch-blue-light: #dce4f2;
  --dark: #1a1612;
  --mid: #1a3266;
  --muted: #5a6d8f;
  --bg: var(--paper);
  --bg2: #ebedf2;
  --border: rgba(33, 70, 139, 0.12);
  --radius: 12px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", sans-serif;
  --touch-min: 48px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--dark);
  line-height: 1.55;
  font-size: 16px;
  min-height: 100vh;
  padding-bottom: 84px; /* space for sticky save bar */
}

/* ── Top banner ── */
.top-banner {
  background: var(--dutch-blue);
  color: rgba(255,255,255,0.92);
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.05em;
  padding: 8px 1rem;
}

/* ── Dutch flag stripe ── */
.dutch-flag-stripe { display: flex; height: 4px; }
.stripe-red   { flex: 1; background: #ae1c28; }
.stripe-white { flex: 1; background: #ffffff; }
.stripe-blue  { flex: 1; background: #21468b; }

/* ── App shell ── */
.app-shell {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.75rem 1rem 2rem;
}

/* ── Page header ── */
.page-header {
  text-align: center;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 500;
  color: var(--dutch-blue);
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.page-header p {
  font-size: 13px;
  color: var(--muted);
}

.paragraph {
  font-size: 13px;
  color: var(--muted);
}

/* ── Cards ── */
.lookup-card,
.member-card,
.member-list-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-top: 3px solid var(--dutch-blue);
}

.lookup-card h2,
.member-card h2,
.member-list-card h2 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--dutch-blue);
  margin-bottom: 1.1rem;
}

/* ── Form label ── */
label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

/* ── Input + button side by side ── */
.input-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}

.input-row input { flex: 1; }

/* ── Text input ── */
input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 18px;
  color: var(--dark);
  background: var(--paper);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: var(--touch-min);
  -webkit-appearance: none;
}

input[type="text"]:focus {
  border-color: var(--dutch-blue);
  box-shadow: 0 0 0 3px rgba(33,70,139,0.1);
  background: #fff;
}

input[type="text"]::placeholder {
  color: var(--muted);
  opacity: 0.55;
}

/* ── Buttons (base) ── */
button {
  background: var(--dutch-blue);
  color: #fff;
  padding: 14px 20px;
  border: none;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  min-height: var(--touch-min);
  transition: background 0.2s, transform 0.12s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

button:hover  { background: var(--dutch-blue-dark); }
button:active { transform: scale(0.97); }
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ── Messages ── */
.message {
  margin-top: 0.75rem;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.2s;
}

.message.success {
  background: #edf7ed;
  color: #1e6b1e;
  border: 1px solid #b6ddb6;
  padding: 12px 14px;
}

.message.error {
  background: #fdf2f2;
  color: #9b1c1c;
  border: 1px solid #f5c2c2;
  padding: 12px 14px;
}

.message.info {
  background: var(--dutch-blue-light);
  color: var(--dutch-blue-dark);
  border: 1px solid rgba(33,70,139,0.2);
  padding: 12px 14px;
}

/* ── Member list ── */
.member-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Individual member row (populated by app.js) */
.member-list .member-item,
.member-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  min-height: var(--touch-min);
}

/* Remove buttons inside member list */
.member-list button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  padding: 6px 12px;
  min-height: 36px;
  border-radius: 6px;
}

.member-list button:hover {
  background: #fdf2f2;
  color: #9b1c1c;
  border-color: #f5c2c2;
}

/* ── RSVP hint ── */
.rsvp-hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ── RSVP checkbox grid ── */
.grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.grid-container label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--dark);
  min-height: var(--touch-min);
  transition: border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.grid-container label:active { transform: scale(0.97); }

.grid-container label:has(input:checked) {
  border-color: var(--dutch-blue);
  background: var(--dutch-blue-light);
}

.grid-container input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--dutch-blue);
  cursor: pointer;
}

/* ── Sticky Save bar ── */
.sticky-save {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(244,245,248,0.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: center;
}

.btn-save {
  width: 100%;
  max-width: 480px;
  padding: 16px;
  font-size: 16px;
  border-radius: 10px;
  min-height: 52px;
}

.btn-save--success {
  background: #2e7d32 !important;
}

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 1.25rem;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  letter-spacing: 0.04em;
  margin-top: 2rem;
}

/* ── Desktop: wider grid ── */
@media (min-width: 520px) {
  .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
  .app-shell { padding: 2rem 1.5rem 3rem; }
}

/* ── Prevent horizontal scroll on mobile ── */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* ── Scrollable table wrapper (admin & dashboard) ── */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.table-wrapper table {
  min-width: 480px;
  margin-top: 0;
}

/* ── Select All button ── */
.select-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--dutch-blue);
  border: 1.5px solid var(--dutch-blue);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  margin-bottom: 0.75rem;
  transition: background 0.15s, color 0.15s;
  width: 100%;
  justify-content: center;
}
.select-all-btn:hover { background: var(--dutch-blue-light); }
.select-all-btn:active { transform: scale(0.97); }

/* ── Inner grid wrapper for RSVP checkboxes ── */
.rsvp-grid-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
@media (min-width: 520px) {
  .rsvp-grid-inner {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

/* ── Mobile overrides ── */
@media (max-width: 520px) {
  .admin-form-grid {
    grid-template-columns: 1fr !important;
  }
  .tab-btn {
    font-size: 13px;
    padding: 9px 10px;
  }
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .dashboard-header h2 {
    font-size: 1rem;
  }
}

/* Tab Buttons */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ccc;
    padding-bottom: 8px;
}
.tab-btn {
    padding: 10px 16px;
    cursor: pointer;
    background: #f1f1f1;
    border: none;
    font-size: 14px;
    border-radius: 5px 5px 0 0;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    text-align: center;
}
.tab-btn.active {
    background: #2e7559;
    color: white;
    font-weight: bold;
}

/* Dashboard Headers */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.refresh-btn {
    padding: 10px 15px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.refresh-btn:hover { background: #555; }

/* Accountability Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}
th { background-color: #f9f9f9; }

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
}
.status-submitted { background-color: #d4edda; color: #155724; }
.status-missing { background-color: #f8d7da; color: #721c24; }

/*logo*/

.site-brand {
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Crect width='60' height='60' fill='%23f4f5f8'/%3E%3Cpath d='M0 0v60M6 0v60M12 0v60M18 0v60M24 0v60M30 0v60M36 0v60M42 0v60M48 0v60M54 0v60M0 0h60M0 6h60M0 12h60M0 18h60M0 24h60M0 30h60M0 36h60M0 42h60M0 48h60M0 54h60' stroke='%23c8102e' stroke-opacity='0.1' stroke-width='0.8'/%3E%3C/svg%3E");
  background-repeat: repeat;
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
}

.site-brand-link {
  display: inline-block;
  text-decoration: none;
}

.site-brand-logo {
  display: block;
  margin: 0 auto;
  max-height: 180px;
  width: auto;
  max-width: min(300px, 78vw);
  object-fit: contain;
}

.site-brand-logo-placeholder {
  width: 100px;
  height: 100px;
  margin: 0 auto;
  border-radius: 8px;
  border: 2px dashed rgba(200, 16, 46, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
}