@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@400;500;600&display=swap');

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

:root {
  --bg: #f5efe6;
  --surface: #ffffff;
  --surface-2: #fbf7f0;
  --hover: rgba(185, 211, 212, 0.18);
  --border: #e1d8c8;
  --border-strong: #cdc1ad;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --accent: #EDD79C;
  --accent-hover: #e3c87f;
  --accent-fg: #1a1a1a;
  --secondary: #B9D3D4;
  --error: #c54545;
  --radius: 10px;
  --radius-lg: 14px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1100px; margin: 0 auto; padding: 24px; }

header.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
header.brand .logo {
  display: block;
  height: 52px;
  width: auto;
}
header.brand .name {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: 0.005em;
  font-size: 14px;
  color: var(--text);
}
header.brand .name a { color: inherit; }

h1 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.005em;
  line-height: 1.25;
  margin-bottom: 6px;
}
h2 {
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 10px;
}
h3 {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--accent);
  color: var(--accent-fg);
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.secondary:hover { background: var(--hover); border-color: var(--border-strong); }
.btn.full { width: 100%; }

.events-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.events-table th, .events-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.events-table th {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-2);
}
.events-table tr:last-child td { border-bottom: none; }
.events-table tbody tr:hover td { background: var(--hover); cursor: pointer; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.gallery-item {
  aspect-ratio: 1 / 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.gallery-item:hover { border-color: var(--border-strong); }
.gallery-item img,
.gallery-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item .badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--secondary);
  color: var(--text);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.modal-overlay { position: fixed; inset: 0; background: rgba(26,26,26,0.45); display: none; z-index: 100; }
.modal-overlay.open { display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(26,26,26,0.12);
}

.stats { display: flex; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  min-width: 130px;
}
.stat .label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.stat .value {
  font-family: "Playfair Display", serif;
  font-size: 26px;
  font-weight: 600;
  margin-top: 4px;
  color: var(--text);
}

.form-row { margin-bottom: 14px; }
.form-row label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(185, 211, 212, 0.35);
}

.readonly-field {
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.error-msg { color: var(--error); font-size: 13px; margin-top: 8px; }

@media (max-width: 600px) {
  .container { padding: 16px; }
  header.brand { padding: 12px 16px; }
  header.brand .logo { height: 44px; }
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .events-table th, .events-table td { padding: 10px 12px; font-size: 12px; }
}
