:root {
  --terracotta: #c17a5a;
  --sage: #7a9e7e;
  --warm-bg: #faf6f1;
  --text: #3a332e;
  --card-bg: #ffffff;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--warm-bg);
  color: var(--text);
  line-height: 1.5;
}

.hidden { display: none !important; }

/* Password Gate */
.password-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #faf6f1 0%, #e8d5c4 100%);
  background-image: url('bg-patio.jpg');
  background-size: cover;
  background-position: center;
}

.gate-card {
  background: rgba(255,255,255,0.95);
  padding: 2.5rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow);
  max-width: 400px;
  width: 90%;
}

.gate-logo { width: 80px; height: 80px; object-fit: contain; margin-bottom: 1rem; }

.gate-card h1 { color: var(--terracotta); margin-bottom: 0.5rem; }

.gate-card input, .gate-card button {
  width: 100%;
  padding: 0.75rem;
  margin: 0.5rem 0;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 1rem;
}

.gate-card button {
  background: var(--terracotta);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.error { color: #c0392b; font-size: 0.9rem; min-height: 1.2em; }

/* Header */
header {
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-logo { width: 48px; height: 48px; object-fit: contain; }

nav { display: flex; gap: 1.25rem; flex: 1; }

.nav-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}

.nav-link.active, .nav-link:hover {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
}

.logout-btn {
  background: none;
  border: 1px solid #ccc;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

/* Hero */
.hero {
  height: 420px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.25), rgba(0,0,0,0.45));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 2rem;
}

.hero-overlay h1 { font-size: 2.6rem; margin-bottom: 0.5rem; text-shadow: 0 2px 8px rgba(0,0,0,0.4); }

/* Sections */
.section { display: none; padding: 2rem 0 4rem; }
.section.active { display: block; }

.container { max-width: 1000px; margin: 0 auto; padding: 0 1.5rem; }

h2 { margin: 1.5rem 0 1rem; color: var(--terracotta); }

/* Cards & Forms */
.form-card, .event-card, .summary-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.form-card input, .form-card select, .form-card textarea {
  width: 100%;
  padding: 0.7rem;
  margin: 0.4rem 0 0.8rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
}

.primary-btn {
  background: var(--terracotta);
  color: white;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-right: 0.5rem;
}

.secondary-btn {
  background: #eee;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
}

.events-grid, .events-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.event-card h3 { margin-bottom: 0.4rem; }

.note { background: #fff8e7; padding: 0.8rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.9rem; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.gallery img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
}

/* Summary Table */
.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.summary-table th, .summary-table td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid #eee;
}

.summary-table th { background: #f8f4f0; }

.mt-4 { margin-top: 1.5rem; }

footer {
  text-align: center;
  padding: 2rem;
  color: #888;
  font-size: 0.85rem;
  border-top: 1px solid #eee;
  margin-top: 2rem;
}

@media (max-width: 700px) {
  .header-inner { flex-wrap: wrap; }
  nav { order: 3; width: 100%; justify-content: space-around; margin-top: 0.5rem; }
  .hero-overlay h1 { font-size: 1.8rem; }
}
