:root {
  --bg: #f2ede2;
  --surface: #fffdf8;
  --surface-strong: #f7f2e6;
  --ink: #1f241d;
  --muted: #5f6658;
  --line: #d8cfbe;
  --accent: #1d7a46;
  --accent-2: #c95d32;
  --danger: #b4442c;
  --shadow: 0 20px 60px rgba(45, 35, 15, 0.12);
  --radius: 24px;
  --font: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(201, 93, 50, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(29, 122, 70, 0.15), transparent 30%),
    var(--bg);
}

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

img {
  max-width: 100%;
}

.landing-shell,
.card-shell,
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hero-card,
.profile-card,
.auth-card {
  width: min(100%, 860px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 242, 230, 0.95));
  border: 1px solid rgba(216, 207, 190, 0.8);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--muted);
}

h1, h2 {
  margin-top: 0;
}

.hero-copy,
.bio,
.subheadline,
.helper-text,
.status-text {
  color: var(--muted);
}

.privacy-box,
.event-context,
.panel,
.stat-card,
.contact-tile,
.check-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.privacy-box,
.event-context,
.panel {
  padding: 18px;
}

.hero-actions,
.row-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
}

.button-primary {
  background: var(--accent);
  color: white;
}

.button-secondary {
  background: transparent;
  border-color: var(--line);
}

.button-danger {
  background: var(--danger);
  color: white;
}

.notice {
  padding: 14px 16px;
  border-radius: 16px;
  margin-bottom: 20px;
}

.notice-success {
  background: rgba(29, 122, 70, 0.12);
  color: #145530;
}

.notice-error {
  background: rgba(180, 68, 44, 0.12);
  color: #7c2f1f;
}

.location-gate,
.stack-form {
  display: grid;
  gap: 16px;
}

.profile-header {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: center;
}

.avatar {
  width: 120px;
  aspect-ratio: 1;
  border-radius: 24px;
  object-fit: cover;
  background: var(--surface-strong);
}

.avatar-small {
  width: 90px;
}

.headline {
  font-size: 18px;
  margin: 8px 0 4px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.contact-tile {
  padding: 18px;
  display: grid;
  gap: 8px;
}

.tile-type {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.admin-sidebar {
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.82);
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  font-size: 24px;
  font-weight: 700;
}

.admin-nav {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}

.admin-nav a {
  padding: 10px 14px;
  border-radius: 14px;
}

.admin-nav a:hover {
  background: rgba(29, 122, 70, 0.08);
}

.admin-main {
  padding: 28px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
}

.stats-grid,
.admin-grid,
.form-grid,
.check-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 24px;
}

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

.stat-card {
  padding: 20px;
  display: grid;
  gap: 8px;
}

.stat-card strong {
  font-size: 32px;
}

.panel {
  margin-bottom: 22px;
}

.form-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

label,
.check-card {
  display: grid;
  gap: 8px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-label input,
.check-card input {
  width: auto;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.check-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.check-card {
  padding: 14px;
}

.filters-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filters-form > * {
  flex: 1 1 160px;
}

.map-card {
  display: grid;
  gap: 10px;
}

.map-stage {
  position: relative;
  width: min(100%, 1400px);
  margin-inline: auto;
}

.map-canvas {
  width: 100%;
  height: min(78vh, 1400px);
  min-height: 720px;
  max-height: 1400px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.map-card .helper-text {
  margin: 0;
}

.map-overlay-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 500;
  border: 1px solid rgba(31, 36, 29, 0.12);
  background: rgba(255, 253, 248, 0.96);
  color: var(--ink);
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 0;
  font: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(17, 13, 8, 0.16);
}

.map-overlay-button:hover {
  background: white;
}

.map-overlay-button.is-loading {
  opacity: 0.75;
}

code {
  background: rgba(31, 36, 29, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
}

.preview-body {
  background:
    radial-gradient(circle at 20% 20%, rgba(190, 49, 42, 0.2), transparent 26%),
    radial-gradient(circle at 80% 0%, rgba(255, 189, 89, 0.18), transparent 22%),
    #171210;
  color: #f7f3e8;
}

.preview-page {
  min-height: 100vh;
}

.preview-hero,
.preview-scroll,
.preview-map-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.preview-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 40px;
  margin-top: 16px;
  margin-bottom: 32px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.38);
}

.preview-hero-image,
.preview-hero-overlay,
.preview-copy {
  position: absolute;
  inset: 0;
}

.preview-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-hero-overlay {
  background:
    linear-gradient(180deg, rgba(16, 12, 10, 0.04) 0%, rgba(16, 12, 10, 0.12) 52%, rgba(16, 12, 10, 0.78) 82%, rgba(16, 12, 10, 0.96) 100%);
}

.preview-copy {
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 34px 28px 34px;
}

.preview-bottom-block {
  width: min(100%, 560px);
  display: grid;
  gap: 18px;
  margin-top: auto;
  text-align: center;
  justify-items: center;
}

.preview-hero-name,
.preview-section-head h2 {
  font-size: clamp(40px, 8vw, 82px);
  line-height: 0.92;
  margin: 0;
  letter-spacing: -0.05em;
}

.preview-hero-name span,
.preview-hero-name strong {
  display: block;
}

.preview-hero-name strong {
  font-weight: 900;
}

.preview-hero-name {
  font-size: clamp(58px, 12vw, 132px);
  line-height: 0.82;
  text-transform: uppercase;
  text-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

.preview-location {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(247, 243, 232, 0.7);
}

.preview-tagline {
  max-width: 34rem;
  color: rgba(247, 243, 232, 0.9);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.preview-event-card,
.event-context {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 14px;
  width: min(100%, 34rem);
  padding: 16px 18px;
  border-radius: 22px;
}

.preview-event-card {
  background: rgba(255, 248, 244, 0.12);
  border: 1px solid rgba(255, 248, 244, 0.18);
  color: rgba(255, 248, 244, 0.95);
}

.event-context {
  background: rgba(214, 82, 67, 0.08);
  border: 1px solid rgba(214, 82, 67, 0.16);
}

.event-context-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(214, 82, 67, 0.18);
  color: #af2e27;
  font-size: 28px;
  font-weight: 700;
}

.preview-event-card .event-context-icon {
  background: rgba(255, 248, 244, 0.18);
  color: #fff8f4;
}

.event-context-copy {
  display: grid;
  gap: 6px;
  text-align: left;
}

.event-context-copy p {
  margin: 0;
}

.event-context-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.05;
}

.event-context-description {
  font-size: 14px;
  line-height: 1.35;
  color: rgba(95, 102, 88, 0.96);
}

.event-context-location {
  font-size: 14px;
  font-weight: 600;
  color: rgba(57, 62, 54, 0.95);
}

.event-context-time {
  font-size: 13px;
  color: rgba(95, 102, 88, 0.88);
}

.preview-event-card .event-context-description,
.preview-event-card .event-context-location,
.preview-event-card .event-context-time {
  color: rgba(255, 248, 244, 0.84);
}

.preview-event-card .event-context-title {
  color: #fff8f4;
}

.preview-hero-actions {
  width: min(100%, 520px);
  justify-content: center;
}

.preview-hero-actions .button {
  flex: 1 1 220px;
  min-width: 220px;
  min-height: 54px;
  font-size: 18px;
  font-weight: 800;
}

.preview-hero-actions .button-primary {
  background: linear-gradient(180deg, #d65243 0%, #af2e27 100%);
  color: #fff8f4;
  box-shadow: 0 16px 30px rgba(175, 46, 39, 0.32);
}

.preview-hero-actions .button-secondary {
  background: rgba(255, 248, 244, 0.08);
  border-color: rgba(255, 248, 244, 0.22);
  color: #fff8f4;
}

.preview-hero-actions-single .button {
  max-width: 520px;
}

.preview-scroll,
.preview-map-section {
  padding: 70px 0 100px;
}

.preview-section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.preview-section-head h2 {
  font-size: clamp(28px, 4vw, 56px);
}

.preview-contact-stack {
  display: grid;
  gap: 24px;
}

.preview-contact-panel,
.preview-map-card {
  background: rgba(255, 249, 240, 0.94);
  color: #1f241d;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 32px;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.preview-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.preview-panel-header h3 {
  margin: 0;
  font-size: 28px;
}

.preview-panel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(175, 46, 39, 0.12);
  color: #af2e27;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.preview-map-surface {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(31, 36, 29, 0.08);
}

.preview-real-map {
  background: #ddd6c6;
}

.preview-map-surface .leaflet-control-zoom a {
  color: #1f241d;
}

.preview-map-surface .leaflet-popup-content-wrapper,
.preview-map-surface .leaflet-popup-tip {
  background: rgba(255, 253, 248, 0.96);
  color: #1f241d;
}

.preview-map-popup {
  display: grid;
  gap: 4px;
}

.preview-map-popup strong {
  font-size: 14px;
}

.preview-map-popup span {
  font-size: 13px;
  color: #5f6658;
}

.legend-meet {
  background: #af2e27;
}

.legend-home {
  background: #d46c3f;
}

.legend-user {
  background: #5924ff;
}

.preview-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #4a5147;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .preview-hero {
    min-height: 88vh;
  }
}

@media (max-width: 640px) {
  .hero-card,
  .profile-card,
  .auth-card,
  .panel {
    padding: 22px;
  }

  .profile-header {
    grid-template-columns: 1fr;
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-scroll,
  .preview-map-section {
    padding-top: 40px;
  }

  .preview-panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .preview-map-surface {
    min-height: 520px;
  }

  .map-canvas {
    width: 100%;
    height: min(100vw - 44px, 640px);
    min-height: 360px;
  }
}
