/* Mis Restaurantes — Estilos principales */
/* Task 7: Diseño moderno, limpio y responsivo */

/* =====================================================================
   RESET Y BASE
   ===================================================================== */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

/* Prevent classic scrollbar from creating a visible gap on the right */
@supports (scrollbar-color: auto) {
  html {
    scrollbar-color: rgba(0,0,0,0.25) transparent;
  }
}
::-webkit-scrollbar {
  width: 8px;
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: #f5f4f0;
  color: #1a1a1a;
  min-height: 100vh;
  line-height: 1.5;
}

body.map-active {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* =====================================================================
   HEADER / HERO
   ===================================================================== */

.site-header {
  background: #ffffff;
  padding: 2.25rem 0 1rem;
  position: sticky;
  top: 0;
  z-index: 1100;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 0 1.5rem;
}

.site-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.site-tagline {
  font-size: 1rem;
  color: #6b6b6b;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

#panel-explore-search {
  margin-top: 1.25rem;
}

/* =====================================================================
   BARRA DE BÚSQUEDA
   ===================================================================== */

.search-container {
  position: relative;
  max-width: 660px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 9999px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0.5rem 0.5rem 1.75rem;
  gap: 0.5rem;
  transition: box-shadow 0.2s ease;
}

.search-container:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.search-container:focus-within {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.search-icon {
  font-size: 1rem;
  color: #6b6b6b;
  flex-shrink: 0;
  pointer-events: none;
  line-height: 1;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  color: #1a1a1a;
  padding: 0.6rem 0;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}

.search-input::placeholder {
  color: #9e9b93;
}

/* Chrome: quitar icono nativo del input[type=search] */
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration {
  -webkit-appearance: none;
}

.search-btn {
  flex-shrink: 0;
  background: #1a4d3a;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.search-btn:hover {
  background: #143527;
  transform: scale(1.05);
}

.search-btn-icon {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  z-index: 100;
}

.autocomplete-dropdown[hidden] {
  display: none;
}

.autocomplete-item {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.95rem;
  color: #1a1a1a;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}

.autocomplete-item:hover {
  background: #f0eeea;
}

.autocomplete-item.is-active {
  background: rgba(26, 77, 58, 0.08);
}

.autocomplete-item + .autocomplete-item {
  border-top: 1px solid #f0eeea;
}

/* =====================================================================
   MAIN CONTENT
   ===================================================================== */

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* =====================================================================
   CONTADOR DE RESULTADOS
   ===================================================================== */

.result-count {
  text-align: left;
  font-size: 2rem;
  color: #1a1a1a;
  margin-bottom: 0;
  font-weight: 700;
  padding-left: 0.5rem;
  white-space: nowrap;
}

.results-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 0.5rem 0.75rem;
  gap: 1rem;
  position: relative;
  z-index: 200;
}

.results-toolbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.results-toolbar[hidden] {
  display: none;
}

.filter-bar {
  padding: 0;
  display: flex;
  margin-left: 0;
}

.filter-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: nowrap;
}

.filter-icon {
  width: 1.55rem;
  height: 1.55rem;
  object-fit: contain;
  opacity: 1;
  filter: brightness(0);
  flex-shrink: 0;
  margin-right: 0.25rem;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.filter-bar-inner.is-expanded .filter-icon {
  transform: rotate(90deg);
}

.filter-bar-inner .filter-pill,
.filter-bar-inner .filter-clear-btn {
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.filter-bar-inner.is-expanded .filter-pill,
.filter-bar-inner.is-expanded .filter-clear-btn {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.filter-bar-inner .filter-pill:nth-child(2) { transition-delay: 0.03s; }
.filter-bar-inner .filter-pill:nth-child(3) { transition-delay: 0.06s; }
.filter-bar-inner .filter-pill:nth-child(4) { transition-delay: 0.09s; }
.filter-bar-inner .filter-clear-btn { transition-delay: 0.12s; }

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 1.55rem;
  font-weight: 700;
  color: #1a1a1a;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

.filter-pill:hover {
  color: #1a1a1a;
}

.filter-pill.is-active {
  color: #1a1a1a;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

.filter-pill.is-open {
  color: #1a1a1a;
}

.filter-pill-chevron {
  width: 0.75rem;
  height: 0.75rem;
  opacity: 0.4;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.filter-pill:hover .filter-pill-chevron,
.filter-pill.is-open .filter-pill-chevron {
  opacity: 0.8;
}

.filter-pill.is-open .filter-pill-chevron {
  transform: rotate(180deg);
}

.filter-dropdown {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  min-width: 11rem;
  max-height: 16rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 0.3rem 0;
  z-index: 100;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: background 0.1s ease;
}

.filter-option:hover {
  background: #fafafa;
}

.filter-option input[type="checkbox"] {
  width: 0.85rem;
  height: 0.85rem;
  accent-color: #1a1a1a;
  flex-shrink: 0;
  cursor: pointer;
}

.filter-option-label {
  flex: 1;
  font-size: 0.78rem;
  color: #333;
}

.filter-option-count {
  font-size: 0.7rem;
  color: #bbb;
  font-weight: 400;
}

.filter-clear-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.4rem;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  color: #bbb;
  cursor: pointer;
  transition: color 0.15s ease;
}

.filter-clear-btn:hover {
  color: #1a1a1a;
}

#rl-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.rl-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a1a1a;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

.rl-filter-pill:hover {
  color: #1a1a1a;
}

.rl-filter-pill.is-active {
  color: #1a1a1a;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

.rl-filter-pill.is-open {
  color: #1a1a1a;
}

.rl-filter-pill-chevron {
  width: 0.75rem;
  height: 0.75rem;
  opacity: 0.4;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.rl-filter-pill:hover .rl-filter-pill-chevron,
.rl-filter-pill.is-open .rl-filter-pill-chevron {
  opacity: 0.8;
}

.rl-filter-pill.is-open .rl-filter-pill-chevron {
  transform: rotate(180deg);
}

.rl-filter-dropdown {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  min-width: 11rem;
  max-height: 16rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 0.3rem 0;
  z-index: 100;
}

.rl-filter-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: background 0.1s ease;
}

.rl-filter-option:hover {
  background: #fafafa;
}

.rl-filter-option input[type="checkbox"] {
  width: 0.85rem;
  height: 0.85rem;
  accent-color: #1a1a1a;
  flex-shrink: 0;
  cursor: pointer;
}

.rl-filter-option-label {
  flex: 1;
  font-size: 0.78rem;
  color: #333;
}

.rl-filter-option-count {
  font-size: 0.7rem;
  color: #bbb;
  font-weight: 400;
}

.rl-filter-clear-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.4rem;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  color: #bbb;
  cursor: pointer;
  transition: color 0.15s ease;
}

.rl-filter-clear-btn:hover {
  color: #1a1a1a;
}

body.map-active .filter-bar {
  padding: 0;
}

/* =====================================================================
   ESTADO HERO (inicial)
   ===================================================================== */

.hero-state {
  padding: 0;
}

.suggestions-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.suggestions-heading {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-align: left;
}

.suggestions-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1a4d3a;
}

.suggestions-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.suggestion-card {
  position: relative;
  min-height: 18.5rem;
  border: none;
  border-radius: 28px;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(160deg, #325c4a 0%, #17372a 45%, #101817 100%);
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  isolation: isolate;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.carousel-row {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.carousel-country-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #17372a;
}

.carousel-container {
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 0 0.5rem;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track .suggestion-card {
  flex: 0 0 calc(33.333% - 0.67rem);
  scroll-snap-align: start;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(17, 24, 22, 0.08);
  background: #ffffff;
  color: #1a1a1a;
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(13, 18, 16, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  z-index: 2;
}

.carousel-btn:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 10px 24px rgba(13, 18, 16, 0.28);
}

.carousel-btn-prev {
  left: -0.8rem;
}

.carousel-btn-next {
  right: -0.8rem;
}

.carousel-btn:disabled {
  opacity: 0;
  pointer-events: none;
}

.suggestion-card:hover,
.suggestion-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 28px 54px rgba(17, 24, 22, 0.24);
}

.suggestion-card:focus-visible {
  outline: 3px solid rgba(26, 77, 58, 0.8);
  outline-offset: 4px;
}

.suggestion-media,
.suggestion-scrim,
.suggestion-content,
.suggestion-badge,
.suggestion-rating {
  position: absolute;
  inset: 0;
}

.suggestion-media {
  z-index: -3;
}

.suggestion-image {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.4s ease;
}

.suggestion-card:hover .suggestion-image,
.suggestion-card:focus-visible .suggestion-image {
  transform: scale(1.08);
}

.suggestion-scrim {
  z-index: -2;
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.05) 40%, rgba(0, 0, 0, 0.55) 100%);
}

.suggestion-card--fallback .suggestion-scrim {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 35%),
    linear-gradient(160deg, rgba(26, 77, 58, 0.4) 0%, rgba(23, 55, 42, 0.95) 55%, rgba(16, 24, 23, 1) 100%);
}

.suggestion-badge {
  inset: auto;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  top: 1rem;
  left: 1rem;
}

.suggestion-content {
  inset: auto 0 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.4rem;
}

.suggestion-city {
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.suggestion-region {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.98rem;
}

.suggestion-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.65rem;
}

.suggestion-reviews,
.suggestion-cta {
  font-size: 0.9rem;
}

.suggestion-reviews {
  color: rgba(255, 255, 255, 0.88);
}

.suggestion-cta {
  color: #e8f5ee;
  font-weight: 600;
}

/* =====================================================================
   ESTADO VACÍO (sin resultados)
   ===================================================================== */

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
}

.empty-emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  line-height: 1;
}

.empty-text {
  font-size: 1.05rem;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.empty-hint {
  font-size: 0.9rem;
  color: #9e9b93;
}

.did-you-mean-state {
  text-align: center;
  padding: 4rem 1rem;
}

.dym-emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  line-height: 1;
}

.dym-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
}

.dym-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.dym-link {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  background: #f1f0ec;
  color: #1a4d3a;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.dym-link:hover {
  background: #1a4d3a;
  color: #ffffff;
}

/* =====================================================================
   GRID DE TARJETAS
   ===================================================================== */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* =====================================================================
   TARJETA DE RESTAURANTE
   ===================================================================== */

.restaurant-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.restaurant-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.11);
}


/* Cuerpo de la tarjeta */
.card-body {
  position: relative;
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

/* Header de la tarjeta */
.card-header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.card-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

.card-city {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a4d3a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Meta (tipo + precio) */
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.card-meta .card-badges {
  display: contents;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  background: #f0f5f2;
  color: #1a4d3a;
  border: 1px solid #a8c5b5;
  white-space: nowrap;
}

/* Dirección */
.card-address {
  font-size: 0.82rem;
  color: #8a8780;
  line-height: 1.4;
}

/* Notas */
.card-notes {
  font-size: 0.83rem;
  color: #5a5a5a;
  font-style: italic;
  background: #fafaf8;
  border-left: 3px solid #1a4d3a;
  padding: 0.5rem 0.75rem;
  border-radius: 0 6px 6px 0;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* =====================================================================
   SECCIÓN DE PLATOS IMPRESCINDIBLES
   ===================================================================== */

.must-try {
  background: #fafaf8;
  border-top: 1px solid #ece9e2;
  margin: 0.25rem -1.25rem -1rem;
  padding: 0.85rem 1.25rem 1rem;
  border-radius: 0 0 14px 14px;
}

.must-try-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1a4d3a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.must-try-list {
  list-style: none;
  counter-reset: dishes;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.must-try-list li {
  counter-increment: dishes;
  font-size: 0.88rem;
  color: #2a2a2a;
  padding-left: 1.75rem;
  position: relative;
  line-height: 1.4;
}

.must-try-list li::before {
  content: counter(dishes);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.25rem;
  height: 1.25rem;
  background: #1a4d3a;
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* =====================================================================
   SCROLL LOADER (3 dots)
   ===================================================================== */

.scroll-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 0 1rem;
}

.scroll-loader[hidden] {
  display: none;
}

.scroll-loader-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1a4d3a;
  animation: loader-bounce 1.2s ease-in-out infinite;
}

.scroll-loader-dot:nth-child(2) { animation-delay: 0.2s; }
.scroll-loader-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loader-bounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1;   }
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.82rem;
  color: #b0ada5;
  background: #ffffff;
  border-top: 1px solid #e8e5de;
}

/* =====================================================================
   SPLIT LAYOUT (map view)
   ===================================================================== */

body.map-active .main-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: none;
  padding: 0;
  margin: 0;
}

body.map-active .header-inner .site-tagline {
  display: none;
}

body.map-active .header-inner {
  padding: 0;
  margin: 0 auto;
}

body.map-active .site-header {
  padding: 2.25rem 0 0;
  position: static;
}

body.map-active .site-footer {
  display: none;
}

.split-layout {
  display: flex;
  flex: 1;
  overflow-y: auto;
  height: 100%;
  background: #f5f4f0;
}

.split-layout[hidden] {
  display: none;
}

/* Left panel: cards */
.split-cards {
  flex: 40;
  min-width: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.split-map {
  flex: 55;
  min-width: 0;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1.5rem;
  background: #f5f4f0;
}

.split-map .leaflet-container,
.split-map #map-instance {
  border-radius: 16px;
  border: 2px solid #1a4d3a;
  height: 100% !important;
}

.split-dishes {
  display: flex;
  gap: 0;
  flex-shrink: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  justify-content: flex-end;
  align-items: flex-start;
  position: relative;
}

.dishes-info-wrap {
  display: inline;
  position: relative;
}

.dishes-info-icon {
  width: 1.75rem;
  height: 1.75rem;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s ease;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.3rem;
}

.dishes-info-icon:hover {
  opacity: 1;
}

/* Tooltip container — uses position:fixed to escape overflow:hidden ancestors */
.dishes-info-tooltip {
  display: none;
  position: fixed;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.14), 0 1px 4px rgba(0,0,0,0.06);
  padding: 1rem 1.15rem;
  min-width: 300px;
  max-width: 420px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 10000;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

.dishes-info-tooltip-section {
  margin-bottom: 0.75rem;
}

.dishes-info-tooltip-section:last-child {
  margin-bottom: 0;
}

.dishes-info-tooltip-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #1a4d3a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.dishes-info-tooltip-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 0.4rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid #f0eeea;
}

.dishes-info-tooltip-item:last-child {
  border-bottom: none;
}

.dishes-info-tooltip-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #2a2a2a;
  white-space: nowrap;
}

.dishes-info-tooltip-desc {
  font-size: 0.75rem;
  color: #777;
  font-weight: 400;
  line-height: 1.3;
  flex-basis: 100%;
}

.split-dishes[hidden] {
  display: none;
}

.split-dishes-col {
  flex: none;
  min-width: 0;
  margin-left: 0.8rem;
}

.split-dishes-col:first-of-type {
  margin-left: 0;
}

.split-dishes-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a4d3a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.55rem;
  line-height: 1.75rem;
}

.dishes-flag-icon {
  width: 24px;
  height: 17px;
  vertical-align: middle;
  border-radius: 2px;
  object-fit: cover;
}

.split-dishes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.split-dishes-list li {
  font-size: 0.95rem;
  color: #2a2a2a;
  position: relative;
  line-height: 1.4;
  font-weight: 600;
}

#map-instance {
  width: 100%;
  height: 100%;
}

/* =====================================================================
   MINIMALISTIC CARD (split view)
   ===================================================================== */

.restaurant-card--mini {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-shrink: 0;
}

.restaurant-card--mini:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  border-color: #c5ddd2;
}

.restaurant-card--mini.is-active {
  border-color: #1a4d3a;
  box-shadow: 0 4px 16px rgba(26, 77, 58, 0.15);
}

.mini-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

.mini-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.mini-city {
  font-size: 0.72rem;
  color: #1a4d3a;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mini-rating {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: #1a4d3a;
  border-radius: 6px;
  padding: 0.1rem 0.42rem;
  line-height: 1.5;
}

.mini-tipo {
  font-size: 0.72rem;
  color: #8a8780;
}

.mini-address {
  font-size: 0.75rem;
  color: #b0ada5;
  line-height: 1.3;
}

/* =====================================================================
   MAP PINS (Leaflet divIcon)
   ===================================================================== */

.map-pin {
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22), 0 0 0 1.5px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  line-height: 1.5;
  transform-origin: center bottom;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.map-pin:hover {
  background: #1a1a1a;
  color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.map-pin.is-active {
  background: #1a1a1a;
  color: #ffffff;
  transform: scale(1.18);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  z-index: 10000 !important;
}

/* Leaflet tooltip — custom style to match site */
.leaflet-tooltip.restaurant-tooltip {
  background: #ffffff;
  border: none;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a1a1a;
  padding: 0.4rem 0.7rem;
  white-space: nowrap;
}

.leaflet-tooltip.restaurant-tooltip::before {
  display: none;
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.detail-overlay[hidden] {
  display: none;
}

.detail-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 14, 0.52);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.detail-overlay-panel {
  position: relative;
  width: min(980px, 100%);
  height: 95vh;
  max-height: 95vh;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.35s ease;
  will-change: transform;
}

.detail-overlay.is-open .detail-overlay-backdrop {
  opacity: 1;
}

.detail-overlay.is-open .detail-overlay-panel {
  transform: translateY(0);
}

.detail-overlay.is-closing .detail-overlay-backdrop {
  opacity: 0;
}

.detail-overlay.is-closing .detail-overlay-panel {
  transform: translateY(100%);
}

.detail-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid #e2dfd6;
  background: rgba(255, 255, 255, 0.94);
  color: #1a4d3a;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.detail-close-btn:hover {
  background: #f5f4f0;
  transform: scale(1.05);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.15);
}

.detail-content {
  height: 100%;
  overflow-y: auto;
  background: #f5f4f0;
}

.detail-article {
  padding-bottom: 2rem;
}

.detail-hero {
  padding: 0;
  position: relative;
}

.detail-hero .edit-mode {
  padding: 1rem;
  background: #fff;
}

.edit-photos-hero-btn {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.edit-photos-hero-btn .edit-btn-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.edit-photos-hero-btn:hover {
  background: rgba(255, 255, 255, 0.45);
  transform: translateX(-50%) scale(1.08);
}

.detail-hero-media {
  width: 100%;
  height: 250px;
  background: #dcd8ce;
}

.detail-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-hero-media--placeholder {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.25), transparent 38%),
    linear-gradient(150deg, #2f5a48 0%, #1a4d3a 50%, #102b21 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}

.detail-hero-placeholder-name {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.detail-header,
.detail-info,
.detail-must-try,
.detail-notes,
.detail-location {
  margin: 1rem 1rem 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  border: 1px solid #ebe8df;
}

.detail-header {
  padding: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.detail-city {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1a4d3a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.detail-city-wrapper,
.detail-name-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.detail-city-wrapper .edit-btn,
.detail-name-wrapper .edit-btn {
  flex-shrink: 0;
}

.detail-city-wrapper.is-editing,
.detail-name-wrapper.is-editing {
  display: block;
}

.detail-name {
  font-size: 1.7rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #1a1a1a;
}

.detail-header-meta {
  margin-top: 0.6rem;
}

.detail-rating {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  background: #1a4d3a;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
}

.michelin-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-left: 0.35rem;
}

.hidden-gem-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-left: 0.35rem;
}

.must-visit-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-left: 0.35rem;
}

.fantastic-views-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-left: 0.35rem;
}

.tag-badge-inactive {
  background: #e5e7eb;
  color: #9ca3af;
}

.detail-fav-btn {
  border: 1.5px solid #ccc;
  background: #ffffff;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: visible;
  isolation: isolate;
  padding: 0;
  --heart-bubble-size: 2.9rem;
  --heart-particle-size: 0.28rem;
  --heart-burst-radius-inner: 0.95rem;
  --heart-burst-radius-outer: 1.75rem;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.detail-fav-btn:hover {
  background: #fff0f0;
  transform: scale(1.08);
}

.detail-fav-btn.is-fav {
  background: #fff0f0;
  border-color: #e74c3c;
}

.detail-fav-btn:hover {
  background: #fff0f0;
  border-color: #e8657a;
  transform: scale(1.08);
}

.detail-fav-btn.is-fav:hover {
  background: #fde8e8;
}

.detail-fav-heart-icon {
  width: 1.4rem;
  height: 1.4rem;
  object-fit: contain;
  pointer-events: none;
  transition: filter 0.2s ease, opacity 0.2s ease;
  filter: grayscale(100%) brightness(1.5) opacity(0.45);
}

.detail-fav-btn:hover .detail-fav-heart-icon {
  filter: brightness(0) saturate(100%) invert(52%) sepia(67%) saturate(2000%) hue-rotate(325deg) brightness(95%) contrast(95%);
  opacity: 0.8;
}

.detail-fav-btn.is-fav .detail-fav-heart-icon {
  filter: brightness(0) saturate(100%) invert(27%) sepia(95%) saturate(5500%) hue-rotate(345deg) brightness(95%) contrast(95%);
  opacity: 1;
}

.detail-fav-btn.is-fav:hover .detail-fav-heart-icon {
  filter: brightness(0) saturate(100%) invert(20%) sepia(95%) saturate(6000%) hue-rotate(350deg) brightness(85%) contrast(100%);
}

@keyframes heart-pop {
  0%   { transform: scale(1); }
  15%  { transform: scale(1.35); }
  30%  { transform: scale(0.85); }
  50%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes heart-bubble {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.75;
  }
  50% {
    opacity: 0.45;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.85);
    opacity: 0;
  }
}

@keyframes heart-particles {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    box-shadow:
      0 calc(-1 * var(--heart-burst-radius-inner)) 0 0 #ff6b8f,
      calc(0.5 * var(--heart-burst-radius-inner)) calc(-0.87 * var(--heart-burst-radius-inner)) 0 0 #ff8a65,
      calc(0.87 * var(--heart-burst-radius-inner)) calc(-0.5 * var(--heart-burst-radius-inner)) 0 0 #ff9b6a,
      var(--heart-burst-radius-inner) 0 0 0 #ff5d73,
      calc(0.87 * var(--heart-burst-radius-inner)) calc(0.5 * var(--heart-burst-radius-inner)) 0 0 #ff8f6b,
      calc(0.5 * var(--heart-burst-radius-inner)) calc(0.87 * var(--heart-burst-radius-inner)) 0 0 #ffb36b,
      0 var(--heart-burst-radius-inner) 0 0 #ff7b88,
      calc(-0.5 * var(--heart-burst-radius-inner)) calc(0.87 * var(--heart-burst-radius-inner)) 0 0 #ff8ea3,
      calc(-0.87 * var(--heart-burst-radius-inner)) calc(0.5 * var(--heart-burst-radius-inner)) 0 0 #ff6f61,
      calc(-1 * var(--heart-burst-radius-inner)) 0 0 0 #ff7d7d,
      calc(-0.87 * var(--heart-burst-radius-inner)) calc(-0.5 * var(--heart-burst-radius-inner)) 0 0 #ff9671,
      calc(-0.5 * var(--heart-burst-radius-inner)) calc(-0.87 * var(--heart-burst-radius-inner)) 0 0 #ff7396;
  }
  50% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.62);
    box-shadow:
      0 calc(-1 * var(--heart-burst-radius-outer)) 0 0 #ff6b8f,
      calc(0.5 * var(--heart-burst-radius-outer)) calc(-0.87 * var(--heart-burst-radius-outer)) 0 0 #ff8a65,
      calc(0.87 * var(--heart-burst-radius-outer)) calc(-0.5 * var(--heart-burst-radius-outer)) 0 0 #ff9b6a,
      var(--heart-burst-radius-outer) 0 0 0 #ff5d73,
      calc(0.87 * var(--heart-burst-radius-outer)) calc(0.5 * var(--heart-burst-radius-outer)) 0 0 #ff8f6b,
      calc(0.5 * var(--heart-burst-radius-outer)) calc(0.87 * var(--heart-burst-radius-outer)) 0 0 #ffb36b,
      0 var(--heart-burst-radius-outer) 0 0 #ff7b88,
      calc(-0.5 * var(--heart-burst-radius-outer)) calc(0.87 * var(--heart-burst-radius-outer)) 0 0 #ff8ea3,
      calc(-0.87 * var(--heart-burst-radius-outer)) calc(0.5 * var(--heart-burst-radius-outer)) 0 0 #ff6f61,
      calc(-1 * var(--heart-burst-radius-outer)) 0 0 0 #ff7d7d,
      calc(-0.87 * var(--heart-burst-radius-outer)) calc(-0.5 * var(--heart-burst-radius-outer)) 0 0 #ff9671,
      calc(-0.5 * var(--heart-burst-radius-outer)) calc(-0.87 * var(--heart-burst-radius-outer)) 0 0 #ff7396;
  }
}

.detail-info {
  padding: 1rem 1.1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
}

.detail-section-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1a4d3a;
  margin-bottom: 0.45rem;
}

.detail-badges .badge {
  padding: 0.32rem 0.72rem;
  font-size: 0.83rem;
}

.detail-must-try {
  margin-top: 1rem;
  padding: 1rem 1.1rem 1.15rem;
  border-top: 1px solid #ebe8df;
}

.detail-must-try .must-try-title {
  font-size: 0.82rem;
  margin-bottom: 0.62rem;
}

.detail-must-try .must-try-list li {
  font-size: 0.95rem;
}

.famous-dishes {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 1.1rem 1.15rem;
  border-top: 1px solid #ebe8df;
}

.famous-dishes-col {
  flex: 1;
  min-width: 0;
}

.famous-dishes-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a4d3a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.62rem;
}

.famous-dishes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.famous-dishes-list li {
  font-size: 0.92rem;
  color: #2a2a2a;
  position: relative;
  line-height: 1.4;
  font-weight: 600;
}

/* Famous dish clickable buttons */
.famous-dish-btn {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  padding: 0;
  text-align: left;
  font-weight: inherit;
  line-height: inherit;
  transition: color 0.15s, text-decoration-color 0.15s;
  text-decoration: underline transparent;
}

.famous-dish-btn:hover {
  color: #b35900;
  text-decoration: underline currentColor;
}

.famous-dish-btn:focus-visible {
  outline: 2px solid #b35900;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Best dish toggle (admin) */
.best-dish-toggle {
  cursor: pointer;
  background: none;
  border: none;
  font-size: 0.85rem;
  padding: 0 0.15rem;
  opacity: 0.35;
  transition: opacity 0.15s, transform 0.15s;
  vertical-align: middle;
  line-height: 1;
}
.best-dish-toggle:hover {
  opacity: 0.7;
  transform: scale(1.15);
}
.best-dish-toggle.best-dish-active,
.best-dish-toggle[aria-pressed="true"] {
  opacity: 1;
}
.best-dish-toggle:focus-visible {
  outline: 2px solid #b35900;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Best dish indicator (non-admin view) */
.best-dish-indicator {
  font-size: 0.8rem;
  vertical-align: middle;
  margin-left: 0.2rem;
}

/* Best dish badge in table */
.best-dish-badge {
  background: #fff3cd;
  color: #856404;
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
}

/* Best dishes dropdown in table */
.best-dishes-cell {
  cursor: pointer;
  position: relative;
}
.best-dishes-cell:hover {
  background: #fef9e7;
}
.best-dishes-empty {
  color: #aaa;
}
.best-dishes-dropdown-wrapper {
  position: fixed;
  z-index: 10001;
}
.best-dishes-dropdown {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  min-width: 220px;
  max-width: 320px;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.4rem 0;
}
.best-dishes-dropdown-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
  padding: 0.4rem 0.8rem 0.3rem;
  border-bottom: 1px solid #eee;
  margin-bottom: 0.2rem;
}
.best-dishes-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.1s;
}
.best-dishes-dropdown-item:hover {
  background: #fef9e7;
}
.best-dish-canonical-option {
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.best-dish-canonical-option.best-dish-canonical-active {
  background: #fff8db;
  font-weight: 600;
}
.best-dish-canonical-check {
  display: inline-block;
  width: 0.9rem;
  text-align: center;
  color: #c89c00;
}
.best-dish-canonical-emoji {
  display: inline-block;
}
.best-dish-canonical-name {
  flex: 1;
}
.best-dishes-checkbox {
  accent-color: #b35900;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* Toast notification */
.app-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #333;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.app-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.app-toast--error {
  background: #c0392b;
}

.detail-notes {
  padding: 1rem 1.1rem;
}

.detail-notes-copy {
  font-size: 0.95rem;
  line-height: 1.7;
  border-left-width: 4px;
  background: #fafaf8;
  border-radius: 0 8px 8px 0;
}

.reviewer-name-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  color: #1a4d3a;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
  vertical-align: baseline;
  line-height: inherit;
}

.reviewer-name-btn:hover {
  border-bottom-color: #1a4d3a;
  color: #2d6a4f;
}

.detail-location {
  padding: 1rem 1.1rem 1.2rem;
}

.detail-address {
  font-size: 0.9rem;
  color: #615f58;
  margin-bottom: 0.85rem;
}

.detail-location-title {
  margin-top: 0.35rem;
}

.detail-mini-map {
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #d9d6ce;
}

.detail-map-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a8780;
  background: #f7f6f2;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Results toolbar bar when map is active */
body.map-active .results-toolbar {
  padding: 0.6rem 1rem;
  margin: 0;
  background: #fff;
}

body.map-active #result-count {
  text-align: left;
  padding: 0;
  margin: 0;
  font-size: 1.2rem;
}

body.map-active .filter-pill {
  font-size: 0.95rem;
}

body.map-active .filter-icon {
  width: 1.6rem;
  height: 1.6rem;
}

@media (max-width: 768px) {
  .split-layout {
    flex-direction: column;
    height: auto;
  }

  .split-cards {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e2dfd6;
  }

  .split-map {
    position: relative;
    width: 100%;
    height: 50vh;
    padding: 0.75rem;
  }

  .detail-overlay-panel {
    width: 100%;
    height: 96vh;
    max-height: 96vh;
    border-radius: 18px 18px 0 0;
  }

  .detail-close-btn {
    top: 0.8rem;
    right: 0.8rem;
  }

  .detail-hero-media {
    height: 220px;
  }

  .detail-name {
    font-size: 1.45rem;
  }

  .detail-info {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   RESPONSIVO — móvil (≤768px)
   ===================================================================== */

@media (max-width: 768px) {
  .site-header {
    padding: 0 0 1.5rem;
  }

  .header-inner {
    margin-top: 1.5rem;
    padding: 0 1rem;
  }

  .site-title {
    font-size: 1.5rem;
  }

  .site-tagline {
    font-size: 0.9rem;
  }

  .main-content {
    padding: 1.5rem 1rem 3rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .hero-state,
  .empty-state {
    padding: 3rem 1rem;
  }

  .hero-state {
    padding: 0;
  }

  .suggestions-heading {
    text-align: center;
  }

  .suggestions-subtitle {
    margin: 0 auto;
  }

  .suggestions-grid {
    gap: 1.25rem;
  }

  .carousel-track .suggestion-card {
    flex-basis: 100%;
    min-height: 18rem;
  }

  .carousel-btn-prev { left: -0.35rem; }
  .carousel-btn-next { right: -0.35rem; }
}

@media (max-width: 1024px) {
  .carousel-track .suggestion-card {
    flex-basis: calc(50% - 0.5rem);
  }
}

/* =====================================================================
   LANGUAGE SWITCHER
   ===================================================================== */

.lang-switcher {
  position: absolute;
  top: 1.1rem;
  left: 1.25rem;
  display: flex;
  gap: 0.35rem;
  z-index: 10;
}

.lang-btn {
  background: none;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0.2rem;
  width: 2.75rem;
  height: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lang-flag {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 5px;
}

.lang-btn:hover {
  opacity: 0.8;
  transform: scale(1.1);
}

.lang-btn.active {
  opacity: 1;
  border-color: #1a4d3a;
}

@media (max-width: 768px) {
  .lang-switcher {
    top: 0.25rem;
    left: 0.75rem;
  }

  .lang-btn {
    width: 2.35rem;
    height: 1.7rem;
  }
}

.tab-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0.75rem 1.5rem 0;
  margin-bottom: 0;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.65rem 0.25rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: #6b6b6b;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
  margin-bottom: -1px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tab-icon {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.tab-btn:hover .tab-icon,
.tab-btn.active .tab-icon {
  opacity: 1;
}

.tab-btn:hover {
  color: #1a1a1a;
}

.tab-btn.active {
  color: #1a1a1a;
  font-weight: 600;
  border-bottom-color: #1a1a1a;
}

.card-header {
  overflow: visible;
  padding-right: 2.8rem;
}

.fav-btn {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  background: #ffffff;
  border: 1.5px solid #ccc;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
  isolation: isolate;
  --heart-bubble-size: 1.85rem;
  --heart-particle-size: 0.2rem;
  --heart-burst-radius-inner: 0.62rem;
  --heart-burst-radius-outer: 1.2rem;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.fav-btn:hover {
  background: #fff0f0;
  border-color: #e8657a;
  transform: scale(1.1);
}

.fav-btn.is-fav {
  background: #fff0f0;
  border-color: #e74c3c;
}

.fav-btn.is-fav:hover {
  background: #fde8e8;
}

.fav-heart-icon {
  width: 1.1rem;
  height: 1.1rem;
  object-fit: contain;
  pointer-events: none;
  transition: filter 0.2s ease, opacity 0.2s ease;
  filter: grayscale(100%) brightness(1.5) opacity(0.45);
}

.fav-btn:hover .fav-heart-icon {
  filter: brightness(0) saturate(100%) invert(52%) sepia(67%) saturate(2000%) hue-rotate(325deg) brightness(95%) contrast(95%);
  opacity: 0.8;
}

.fav-btn.is-fav .fav-heart-icon {
  filter: brightness(0) saturate(100%) invert(27%) sepia(95%) saturate(5500%) hue-rotate(345deg) brightness(95%) contrast(95%);
  opacity: 1;
}

.fav-btn.is-fav:hover .fav-heart-icon {
  filter: brightness(0) saturate(100%) invert(20%) sepia(95%) saturate(6000%) hue-rotate(350deg) brightness(85%) contrast(100%);
}

.fav-btn.heart-burst,
.detail-fav-btn.heart-burst {
  animation: heart-pop 0.55s cubic-bezier(0.17, 0.89, 0.32, 1.49);
}

.fav-btn.heart-burst::before,
.detail-fav-btn.heart-burst::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--heart-bubble-size);
  height: var(--heart-bubble-size);
  border-radius: 50%;
  border: 2px solid rgba(231, 76, 60, 0.42);
  background: radial-gradient(circle, rgba(231, 76, 60, 0.22) 0%, rgba(231, 76, 60, 0.08) 35%, rgba(231, 76, 60, 0) 72%);
  pointer-events: none;
  opacity: 0;
  animation: heart-bubble 0.56s ease-out;
}

.fav-btn.heart-burst::after,
.detail-fav-btn.heart-burst::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--heart-particle-size);
  height: var(--heart-particle-size);
  border-radius: 50%;
  background: #ff7d9a;
  pointer-events: none;
  opacity: 0;
  animation: heart-particles 0.62s ease-out;
}

.correction-icon-btn {
  position: absolute;
  top: 0.35rem;
  right: 2.5rem;
  background: #ffffff;
  border: 1.5px solid #ccc;
  border-radius: 50%;
  width: 1.75rem;
  height: 1.75rem;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
  line-height: 1;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.65;
}

.correction-icon-btn:hover {
  background: #f0f5ff;
  border-color: #7195c7;
  transform: scale(1.1);
  opacity: 1;
}

@media (max-width: 768px) {
  .tab-nav {
    gap: 1.25rem;
  }

  .tab-btn {
    font-size: 0.9rem;
  }
}

/* =====================================================================
   AUTHENTICATION
   ===================================================================== */

.auth-area {
  position: fixed;
  top: 1.1rem;
  right: 1.25rem;
  z-index: 1300;
  pointer-events: auto;
}

.auth-sign-in-btn {
  background: #ffffff;
  border: 1.5px solid #d9d6ce;
  border-radius: 9999px;
  padding: 0.45rem 1.1rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a4d3a;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-sign-in-btn:hover {
  background: #f5f4f0;
  border-color: #1a4d3a;
  transform: scale(1.03);
  box-shadow: 0 2px 8px rgba(26, 77, 58, 0.12);
}

.auth-user-menu {
  position: fixed;
  top: 1.1rem;
  right: 1.25rem;
  z-index: 1300;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
}

.auth-user-menu[hidden] {
  display: none;
}

.auth-avatar-btn {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 2px solid #e2dfd6;
  background: #f5f4f0;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.auth-avatar-btn:hover {
  border-color: #1a4d3a;
  transform: scale(1.08);
}

.auth-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.auth-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 200px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  z-index: 100;
  opacity: 0;
  transform: scale(0.92) translateY(-8px);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.auth-dropdown.is-open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.auth-dropdown[hidden] {
  display: none;
}

.auth-dropdown-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0eeea;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.auth-user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
}

.auth-user-email {
  font-size: 0.78rem;
  color: #8a8780;
}

.auth-user-role {
  padding: 0.1rem 0.42rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  background: #1a4d3a;
  color: #fff;
  margin-top: 0.3rem;
  align-self: flex-start;
  text-transform: capitalize;
}

.auth-user-role:not([hidden]) {
  display: inline-block;
}

.auth-sign-out-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 1rem;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.85rem;
  color: #6b6b6b;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.auth-sign-out-btn:hover {
  background: #f5f4f0;
  color: #1a1a1a;
}

.auth-about-me-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 1rem;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.85rem;
  color: #6b6b6b;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.auth-about-me-btn:hover {
  background: #f5f4f0;
  color: #1a1a1a;
}

.auth-reviewer-btn {
  width: 100%;
  text-align: left;
  padding: 0.6rem 1rem;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.85rem;
  color: #1a4d3a;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease;
}

.auth-reviewer-btn[hidden] {
  display: none;
}

.auth-reviewer-btn:hover {
  background: #f0faf5;
}

.app-launcher {
  position: relative;
}

.app-launcher-btn {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #5f6368;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
  padding: 0;
}

.app-launcher-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #1a1a1a;
}

.notification-btn {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  padding: 0;
}

.notification-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.notification-bell-icon {
  width: 1.3rem;
  height: 1.3rem;
  object-fit: contain;
}

.app-launcher-dropdown {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: -1rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  min-width: 220px;
  z-index: 200;
  opacity: 0;
  transform: scale(0.92) translateY(-8px);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-launcher-dropdown.is-open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.app-launcher-dropdown[hidden] {
  display: none;
}

.app-launcher-item[hidden] {
  display: none;
}

.app-launcher-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 0.5rem;
  border: none;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.12s ease;
  font-family: inherit;
}

.app-launcher-item:hover {
  background: #f5f4f0;
}

.app-launcher-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.app-launcher-icon-img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

.app-launcher-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #3c4043;
  text-align: center;
  line-height: 1.2;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 14, 0.52);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.auth-modal-panel {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 2.25rem 2rem;
  max-width: 380px;
  width: calc(100% - 2rem);
  box-shadow: 0 24px 50px rgba(17, 24, 22, 0.22);
  text-align: center;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.auth-modal.is-open .auth-modal-backdrop {
  opacity: 1;
}

.auth-modal.is-open .auth-modal-panel {
  transform: scale(1);
  opacity: 1;
}

.auth-modal.is-closing .auth-modal-backdrop {
  opacity: 0;
}

.auth-modal.is-closing .auth-modal-panel {
  transform: scale(0.95);
  opacity: 0;
}

.auth-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid #e2dfd6;
  background: #ffffff;
  color: #6b6b6b;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.auth-modal-close:hover {
  background: #f5f4f0;
  color: #1a1a1a;
}

.auth-modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.auth-modal-subtitle {
  font-size: 0.9rem;
  color: #6b6b6b;
  margin-bottom: 1.5rem;
}

.auth-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.auth-provider-btn:hover {
  transform: translateY(-1px);
}

.auth-google-btn {
  background: #ffffff;
  border: 1.5px solid #e2dfd6;
  color: #1a1a1a;
}

.auth-google-btn:hover {
  border-color: #c5c1b8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auth-facebook-btn {
  background: #1877F2;
  border: 1.5px solid #1877F2;
  color: #ffffff;
}

.auth-facebook-btn:hover {
  background: #1565d8;
  border-color: #1565d8;
  box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
}

.auth-provider-icon {
  flex-shrink: 0;
}

.link-account-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.link-account-modal[hidden] {
  display: none;
}

.link-account-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 14, 0.52);
}

.link-account-modal-panel {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 2.25rem 2rem;
  max-width: 380px;
  width: calc(100% - 2rem);
  box-shadow: 0 24px 50px rgba(17, 24, 22, 0.22);
  text-align: center;
}

.link-account-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid #e2dfd6;
  background: #ffffff;
  color: #6b6b6b;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.link-account-modal-close:hover {
  background: #f5f4f0;
  color: #1a1a1a;
}

.link-account-modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.link-account-modal-message {
  font-size: 0.9rem;
  color: #4a4a4a;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.link-account-continue-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: none;
  background: #1a4d3a;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.link-account-continue-btn:hover {
  background: #15412f;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .auth-area {
    top: 0.25rem;
    right: 0.75rem;
  }

  .auth-user-menu {
    top: 0.25rem;
    right: 0.75rem;
    gap: 0.35rem;
  }

  .auth-sign-in-btn {
    font-size: 0.78rem;
    padding: 0.35rem 0.85rem;
  }

  .auth-avatar-btn {
    width: 2.2rem;
    height: 2.2rem;
  }

  .app-launcher-btn {
    width: 2.2rem;
    height: 2.2rem;
  }

  .notification-btn {
    width: 1.9rem;
    height: 1.9rem;
  }

  .notification-bell-icon {
    width: 1rem;
    height: 1rem;
  }

  .app-launcher-dropdown {
    right: -2.5rem;
    min-width: 180px;
    padding: 0.75rem;
  }

  .auth-modal-panel {
    padding: 1.75rem 1.5rem;
    border-radius: 16px;
  }
}

/* =====================================================================
   PROFILE OVERLAY
   ===================================================================== */

.profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-overlay[hidden] {
  display: none;
}

.profile-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 14, 0.52);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.profile-overlay-panel {
  position: relative;
  width: min(600px, 90%);
  height: auto;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  will-change: transform, opacity;
}

.profile-overlay.is-open .profile-overlay-backdrop {
  opacity: 1;
}

.profile-overlay.is-open .profile-overlay-panel {
  transform: scale(1);
  opacity: 1;
}

.profile-overlay.is-closing .profile-overlay-backdrop {
  opacity: 0;
}

.profile-overlay.is-closing .profile-overlay-panel {
  transform: scale(0.95);
  opacity: 0;
}

.profile-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid #e2dfd6;
  background: rgba(255, 255, 255, 0.94);
  color: #1a4d3a;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.profile-close-btn:hover {
  background: #f5f4f0;
  transform: scale(1.05);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.15);
}

.profile-content {
  height: auto;
  max-height: inherit;
  overflow-y: auto;
  background: #f5f4f0;
}

.profile-header {
  padding: 2.5rem 2rem 1.5rem;
  background: #fff;
  text-align: center;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e2dfd6;
}

.profile-avatar-wrap {
  position: relative;
  display: inline-block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  cursor: pointer;
}

.profile-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.profile-avatar-wrap:hover .profile-avatar-overlay {
  opacity: 1;
}

.profile-avatar-camera {
  width: 28px;
  height: 28px;
  color: #fff;
}

.profile-avatar-wrap.is-uploading .profile-avatar-overlay {
  opacity: 1;
}

.profile-avatar-wrap.is-uploading .profile-avatar-camera {
  animation: avatarSpin 0.8s linear infinite;
}

@keyframes avatarSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 1rem;
}

.profile-role-badge {
  display: inline-block;
  padding: 0.1rem 0.42rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  background: #1a4d3a;
  color: #fff;
  text-transform: capitalize;
  margin-top: 0.5rem;
}

.profile-member-since {
  font-size: 0.85rem;
  color: #8a8780;
  margin-top: 0.5rem;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem 2rem;
  background: #fff;
  margin-top: 1px;
}

.profile-stat {
  text-align: center;
}

.profile-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a4d3a;
}

.profile-stat-label {
  font-size: 0.78rem;
  color: #8a8780;
  margin-top: 0.15rem;
}

.profile-bio-section {
  padding: 1.5rem 2rem;
  background: #fff;
  margin: 0.75rem 1rem 1rem;
  border-radius: 14px;
}

.profile-bio-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a4d3a;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-bio-edit {
  padding: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.18s ease;
}

.profile-bio-edit:hover {
  background: #f5f4f0;
}

.profile-bio-edit-icon {
  width: 2rem;
  height: 2rem;
  display: block;
}

.profile-bio-display {
  font-size: 0.9rem;
  color: #4a4a4a;
  line-height: 1.6;
  white-space: pre-wrap;
}

.profile-bio-empty {
  font-size: 0.9rem;
  color: #8a8780;
}

.profile-bio-textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid #e2dfd6;
  font-family: inherit;
  font-size: 0.9rem;
  color: #1a1a1a;
  resize: vertical;
  background: #f5f4f0;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.profile-bio-textarea:focus {
  outline: none;
  border-color: #1a4d3a;
}

.profile-bio-char-count {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  text-align: right;
  font-size: 0.75rem;
  color: #999;
  margin-top: 0.25rem;
  transition: color 0.2s ease;
}

.profile-bio-wave {
  flex-shrink: 0;
}

.profile-bio-char-count.is-max {
  color: #d32f2f;
  font-weight: 600;
}

.profile-bio-actions {
  display: flex;
  align-items: center;
  margin-top: 0.75rem;
}

.profile-bio-save {
  padding: 0.5rem 1.5rem;
  background: #1a4d3a;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.25s ease;
}

.profile-bio-save:hover {
  background: #245e49;
}

.profile-bio-save.is-saving {
  animation: savePulse 0.5s ease;
  pointer-events: none;
}

@keyframes savePulse {
  0%   { transform: scale(1); }
  30%  { transform: scale(0.92); }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.profile-bio-saved {
  display: inline-block;
  margin-left: 0.75rem;
  font-size: 0.8rem;
  color: #1a4d3a;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.profile-bio-saved.is-visible {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 768px) {
  .profile-overlay-panel {
    width: 100%;
    border-radius: 16px;
  }

  .profile-header {
    padding: 2rem 1.25rem 1.25rem;
  }

  .profile-avatar {
    width: 72px;
    height: 72px;
  }

  .profile-name {
    font-size: 1.25rem;
  }

  .profile-stats {
    padding: 1.25rem 1.25rem;
    gap: 1.5rem;
  }

  .profile-bio-section {
    padding: 1.25rem;
  }
}

/* =====================================================================
   ADMIN INLINE EDIT STYLES
   ===================================================================== */

.edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.65;
  margin-left: 7px;
  padding: 0;
  line-height: 1;
  vertical-align: middle;
  transition: opacity 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}

.edit-btn-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.edit-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.07);
}

/* When .is-editing is on a field wrapper, hide display content, show edit form */
.is-editing .edit-field-display {
  display: none;
}

.is-editing .edit-btn {
  display: none;
}

.is-editing .edit-mode {
  display: block;
}

.edit-mode {
  display: none;
  margin-top: 6px;
  position: relative;
}

.edit-fsq-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e0ddd8;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 260px;
  overflow-y: auto;
  z-index: 1500;
  margin-top: 4px;
}

.edit-fsq-dropdown[hidden] {
  display: none;
}

.edit-input,
.edit-textarea,
.edit-select {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.9rem;
  color: #1a1a1a;
  background: #fff;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  padding: 7px 10px;
  outline: none;
  transition: border-color 0.15s ease;
  display: block;
}

.edit-input:focus,
.edit-textarea:focus {
  border-color: #2e7d5e;
}

.edit-input:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  border-color: #e0e0e0;
}

.edit-textarea {
  min-height: 80px;
  resize: vertical;
}

.edit-actions {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}

.edit-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 4px 0;
}

.edit-checkbox-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: #1a1a1a;
  cursor: pointer;
  user-select: none;
}

.edit-checkbox {
  accent-color: #2e7d5e;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.review-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  max-height: 150px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #d4d0c8;
  border-radius: 8px;
  background: #fff;
}

.review-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
}

.review-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.42rem 0.8rem;
  border: 1px solid #d4d0c8;
  border-radius: 999px;
  background: #f8f6f2;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.review-pill:hover {
  border-color: #2e7d5e;
  background: #eef7f2;
}

.review-pill.is-active,
.review-pill[aria-pressed="true"] {
  background: #1a4d3a;
  border-color: #1a4d3a;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(26, 77, 58, 0.18);
}

.review-pill:focus-visible {
  outline: 2px solid rgba(46, 125, 94, 0.35);
  outline-offset: 2px;
}

.edit-save-btn,
.edit-cancel-btn {
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.edit-save-btn {
  background: #2e7d5e;
  color: #fff;
}

.edit-save-btn:hover {
  background: #245e49;
}

.edit-cancel-btn {
  background: #e0e0e0;
  color: #444;
}

.edit-cancel-btn:hover {
  background: #ccc;
}

/* Loading state on save button — stable, non-blinking */
.edit-save-btn.edit-saving {
  pointer-events: none;
  opacity: 0.7;
}

/* Admin photo upload progress bar (rainbow, matches site progress style) */
.admin-upload-progress {
  display: none;
  position: relative;
  width: 100%;
  height: 18px;
  margin-top: 0.5rem;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 9px;
  overflow: hidden;
}
.admin-photo-editor.is-uploading .admin-upload-progress {
  display: block;
}
.admin-upload-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #1a4d3a 0%, #2ecc71 25%, #3498db 50%, #9b59b6 75%, #e91e63 100%);
  background-size: 100% 100%;
  border-radius: 9px;
  transition: width 0.25s ease;
}
.admin-upload-progress-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  color: #000;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
  pointer-events: none;
  letter-spacing: 0.02em;
}

/* Success / error feedback on inputs */
.edit-input.edit-success,
.edit-textarea.edit-success {
  border-color: #4caf50;
  background: #f0fff4;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.edit-input.edit-error,
.edit-textarea.edit-error {
  border-color: #e53935;
  background: #fff5f5;
}

.edit-error-msg {
  color: #e53935;
  font-size: 0.78rem;
  margin-top: 4px;
}

/* Prevent iOS text zoom on inputs */
@media (max-width: 480px) {
  .edit-input,
  .edit-textarea {
    font-size: 16px;
  }
}

.edit-audit-info {
  font-size: 11px;
  color: #888;
  margin-top: 12px;
  padding: 4px 0;
  border-top: 1px solid #eee;
}

/* =====================================================================
   USERS PAGE (Admin panel — full-page view)
   ===================================================================== */

.users-page {
  position: fixed;
  inset: 0;
  z-index: 1250;
  background: #f5f4f0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.users-page[hidden] {
  display: none;
}

.users-page.is-open {
  opacity: 1;
  transform: translateX(0);
}

.users-page.is-open.is-instant {
  transition: none;
}

.users-page.is-closing {
  opacity: 0;
  transform: translateX(40px);
}

body.users-page-active {
  overflow: hidden;
}

body.users-page-active > .site-header,
body.users-page-active > .main-content,
body.users-page-active > #hero-state,
body.users-page-active > .detail-overlay {
  pointer-events: none;
}

.users-page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 2rem;
  background: #ffffff;
  border-bottom: 1px solid #e2dfd6;
  flex-shrink: 0;
  position: relative;
}

.users-back-btn,
.reviews-mgmt-back-btn,
.my-reviews-back-btn,
.restaurants-list-back-btn,
.activity-log-back-btn,
.community-back-btn {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid #e2dfd6;
  background: #ffffff;
  color: #1a4d3a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.users-back-btn:hover,
.reviews-mgmt-back-btn:hover,
.my-reviews-back-btn:hover,
.restaurants-list-back-btn:hover,
.activity-log-back-btn:hover,
.community-back-btn:hover {
  background: #f5f4f0;
  transform: scale(1.05);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

.users-panel-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a4d3a;
  margin: 0;
  white-space: nowrap;
}

.users-search-container {
  flex: 1 1 400px;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.users-search-input {
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #e2dfd6;
  border-radius: 9999px;
  padding: 0.55rem 1.25rem;
  font-family: inherit;
  font-size: 0.88rem;
  color: #1a1a1a;
  background: #faf9f6;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.users-search-input::placeholder {
  color: #9e9b93;
}

.users-search-input:focus {
  border-color: #2e7d5e;
  box-shadow: 0 0 0 3px rgba(46, 125, 94, 0.12);
}

.users-search-input::-webkit-search-cancel-button,
.users-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-input-wrapper .users-search-input {
  width: 100%;
  padding-right: 2.2rem;
}

.search-clear-btn {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  color: #9e9b93;
  padding: 0.15rem 0.3rem;
  border-radius: 50%;
  transition: color 0.15s ease, background 0.15s ease;
}

.search-clear-btn:hover {
  color: #1a1a1a;
  background: rgba(0, 0, 0, 0.06);
}

.users-result-count {
  font-size: 0.82rem;
  color: #1a4d3a;
  font-weight: 700;
  white-space: nowrap;
}

.users-role-filters {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.users-role-filter-btn {
  padding: 0.3rem 0.75rem;
  border: 1px solid #e2dfd6;
  border-radius: 9999px;
  background: #faf9f6;
  color: #555;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}

.users-role-filter-btn:hover {
  border-color: #2e7d5e;
  color: #2e7d5e;
}

.users-role-filter-btn.is-active {
  background: #1a4d3a;
  color: #ffffff;
  border-color: #1a4d3a;
}

.users-role-filter-btn.is-active:hover {
  background: #143527;
  border-color: #143527;
}


.users-id-col {
  width: auto;
}

.users-id-cell {
  font-family: monospace;
  font-size: 0.78rem;
  color: #888;
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.users-date-col {
  white-space: nowrap;
}

.users-date-cell {
  font-size: 0.82rem;
  color: #555;
  white-space: nowrap;
}

.users-superadmin-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: #1a4d3a;
  padding: 0.1rem 0.42rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.users-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2rem 2rem;
}

.users-table {
  width: 100%;
  max-width: 900px;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.users-table th {
  position: relative;
  text-align: left;
  font-weight: 600;
  color: #555;
  padding: 0.7rem 1rem;
  border-bottom: 2px solid #e2dfd6;
  white-space: nowrap;
  background: #faf9f6;
}

.users-table th.users-role-col {
  text-align: center;
  width: 80px;
}

.users-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #f0ede6;
  vertical-align: middle;
}

.users-table td.users-role-cell {
  text-align: center;
}

.users-table tr:last-child td {
  border-bottom: none;
}

.users-table tr:hover td {
  background: #faf9f6;
}

.users-sortable {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.users-sortable:hover {
  background: rgba(26, 77, 58, 0.08);
}

.users-name-col {
  min-width: 150px;
}

.users-name-cell {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.users-email-cell {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.users-role-checkbox {
  accent-color: #2e7d5e;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.users-role-checkbox:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.users-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: #888;
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .users-page-header {
    flex-wrap: wrap;
    padding: 1rem;
    gap: 0.6rem;
  }

  .users-search-container {
    max-width: none;
    order: 10;
    flex-basis: 100%;
    margin: 0;
  }

  .users-content {
    padding: 1rem;
  }

  .users-table {
    font-size: 0.78rem;
  }

  .users-table th,
  .users-table td {
    padding: 0.5rem 0.6rem;
  }
}

/* ===== REVIEW OVERLAY ===== */

.review-overlay {
  position: fixed;
  inset: 0;
  z-index: 1350;
  display: flex;
  align-items: center;
  justify-content: center;
}

.review-overlay[hidden] {
  display: none;
}

.review-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 14, 0.52);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.review-overlay-panel {
  position: relative;
  width: min(860px, 92%);
  max-height: 90vh;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  will-change: transform, opacity;
}

.review-overlay.is-open .review-overlay-backdrop {
  opacity: 1;
}

.review-overlay.is-open .review-overlay-panel {
  transform: scale(1);
  opacity: 1;
}

.review-overlay.is-closing .review-overlay-backdrop {
  opacity: 0;
}

.review-overlay.is-closing .review-overlay-panel {
  transform: scale(0.95);
  opacity: 0;
}

.review-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid #e2dfd6;
  background: rgba(255, 255, 255, 0.94);
  color: #1a4d3a;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.review-close-btn:hover {
  background: #f5f4f0;
  transform: scale(1.05);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.15);
}

.review-overlay-content {
  padding: 2rem;
  overflow-y: auto;
  max-height: calc(90vh - 0px);
}

.review-overlay-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
}

.review-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.review-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.review-field--full {
  grid-column: span 2;
}

.review-field-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.review-group-disabled .edit-checkbox {
  cursor: not-allowed;
}

.review-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a4d3a;
}

.review-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2dfd6;
}

.review-cancel-btn {
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fff;
  color: #555;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.review-cancel-btn:hover {
  background: #f5f4f0;
}

.review-submit-btn {
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  border: none;
  background: #1a4d3a;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.review-submit-btn:hover {
  background: #15412f;
}

.review-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== NOTIFICATION BADGE ===== */

.notification-btn {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #dc3545;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-sizing: border-box;
}

.notification-badge[hidden] {
  display: none;
}

/* ===== NOTIFICATION PANEL ===== */

.notification-panel {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-panel[hidden] {
  display: none;
}

.notification-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 14, 0.52);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.notification-panel-box {
  position: relative;
  width: min(680px, 92%);
  max-height: 80vh;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  will-change: transform, opacity;
}

.notification-panel.is-open .notification-panel-backdrop {
  opacity: 1;
}

.notification-panel.is-open .notification-panel-box {
  transform: scale(1);
  opacity: 1;
}

.notification-panel.is-closing .notification-panel-backdrop {
  opacity: 0;
}

.notification-panel.is-closing .notification-panel-box {
  transform: scale(0.95);
  opacity: 0;
}

.notification-panel-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid #e2dfd6;
  background: rgba(255, 255, 255, 0.94);
  color: #1a4d3a;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.notification-panel-close:hover {
  background: #f5f4f0;
  transform: scale(1.05);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.15);
}

.notification-panel-title {
  padding: 1.5rem 2rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
}

.notification-list {
  padding: 0.5rem 0 0;
  overflow-y: auto;
  max-height: calc(80vh - 80px);
}

.notification-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border-bottom: 1px solid #f0eeea;
  cursor: pointer;
  transition: background 0.15s ease;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background: #f5f4f0;
}

.notification-item.notif-unread {
  background: rgba(26, 77, 58, 0.08);
  position: relative;
}

.notification-item.notif-unread::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1a4d3a;
  flex-shrink: 0;
}

.notification-item.notif-unread:hover {
  background: rgba(26, 77, 58, 0.12);
}

.notif-avatar-wrap {
  flex-shrink: 0;
}

.notif-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-avatar-placeholder {
  background: #1a4d3a;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-message {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.4;
  display: block;
}

.notif-name {
  font-weight: 700;
  color: #1a1a1a;
}

.notif-restaurant {
  font-weight: 600;
  color: #1a4d3a;
}

.notif-city {
  display: block;
  font-size: 0.78rem;
  color: #9ca3af;
  margin-top: 0.15rem;
}

.notif-time {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: #1a4d3a;
  font-weight: 600;
  white-space: nowrap;
}

.notification-item-name {
  font-weight: 600;
  font-size: 1rem;
  color: #1a1a1a;
  margin-bottom: 0.25rem;
}

.notification-item-meta {
  font-size: 0.82rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.reviews-mgmt-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.reviews-mgmt-tabs {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid #e8e5de;
}

.reviews-mgmt-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.65rem 0.25rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: #6b6b6b;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
  margin-bottom: -1px;
  white-space: nowrap;
}

.reviews-mgmt-tab-btn:hover {
  color: #1a1a1a;
}

.reviews-mgmt-tab-btn.active {
  color: #1a1a1a;
  font-weight: 600;
  border-bottom-color: #1a1a1a;
}

.reviews-mgmt-type-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.reviews-mgmt-type-badge--review {
  background: #f0f5f2;
  color: #1a4d3a;
  border: 1px solid #a8c5b5;
}

.reviews-mgmt-type-badge--correction {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #e0c97b;
}

.reviews-mgmt-approve-btn,
.reviews-mgmt-reject-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reviews-mgmt-approve-btn {
  border: none;
  background: #1a4d3a;
  color: #fff;
}

.reviews-mgmt-approve-btn:hover {
  background: #15412f;
}

.reviews-mgmt-reject-btn {
  border: 1px solid #dc3545;
  background: transparent;
  color: #dc3545;
}

.reviews-mgmt-reject-btn:hover {
  background: #dc3545;
  color: #fff;
}

.reviews-mgmt-approve-btn:disabled,
.reviews-mgmt-reject-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.corrections-mgmt-approve-btn,
.corrections-mgmt-reject-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.corrections-mgmt-approve-btn {
  border: none;
  background: #1a4d3a;
  color: #fff;
}

.corrections-mgmt-approve-btn:hover {
  background: #15412f;
}

.corrections-mgmt-reject-btn {
  border: 1px solid #dc3545;
  background: transparent;
  color: #dc3545;
}

.corrections-mgmt-reject-btn:hover {
  background: #dc3545;
  color: #fff;
}

.corrections-mgmt-approve-btn:disabled,
.corrections-mgmt-reject-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.reviews-mgmt-duplicate {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

#reviews-mgmt-content .users-table tbody tr {
  transition: background 0.15s;
}

#reviews-mgmt-content .users-table tbody tr:hover {
  background: rgba(0,0,0,0.03);
}

#reviews-mgmt-content {
  overflow-x: auto;
}

#reviews-mgmt-content .users-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.reviews-mgmt-table th {
  position: relative;
}

.reviews-mgmt-col-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  touch-action: none;
  z-index: 2;
}

.reviews-mgmt-col-resizer::before {
  content: '';
  position: absolute;
  top: 20%;
  bottom: 20%;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(26, 77, 58, 0.18);
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.reviews-mgmt-table th:hover .reviews-mgmt-col-resizer::before,
.reviews-mgmt-resizing .reviews-mgmt-col-resizer::before {
  opacity: 1;
}

.reviews-mgmt-resizing,
.reviews-mgmt-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

#reviews-mgmt-content .users-table th:last-child,
#reviews-mgmt-content .users-table td:last-child {
  min-width: 0;
  white-space: normal;
}

#reviews-mgmt-content .users-table th:nth-child(2),
#reviews-mgmt-content .users-table td:nth-child(2) {
  min-width: 0;
}

#reviews-mgmt-content .users-table th,
#reviews-mgmt-content .users-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

#reviews-mgmt-content .users-table th:nth-child(1),
#reviews-mgmt-content .users-table td:nth-child(1) {
  width: 7%;
}

#reviews-mgmt-content .users-table th:nth-child(2),
#reviews-mgmt-content .users-table td:nth-child(2) {
  width: 15%;
}

#reviews-mgmt-content .users-table th:nth-child(3),
#reviews-mgmt-content .users-table td:nth-child(3) {
  width: 11%;
}

#reviews-mgmt-content .users-table th:nth-child(4),
#reviews-mgmt-content .users-table td:nth-child(4) {
  width: 12%;
}

#reviews-mgmt-content .users-table th:nth-child(5),
#reviews-mgmt-content .users-table td:nth-child(5) {
  width: 9%;
}

#reviews-mgmt-content .users-table th:nth-child(6),
#reviews-mgmt-content .users-table td:nth-child(6) {
  width: 8%;
}

#reviews-mgmt-content .users-table th:nth-child(7),
#reviews-mgmt-content .users-table td:nth-child(7) {
  width: 9%;
}

#reviews-mgmt-content .users-table th:nth-child(8),
#reviews-mgmt-content .users-table td:nth-child(8) {
  width: 8%;
}

#reviews-mgmt-content .users-table th:nth-child(9),
#reviews-mgmt-content .users-table td:nth-child(9) {
  width: 3.5rem;
}

#reviews-mgmt-content .users-table th:nth-child(10),
#reviews-mgmt-content .users-table td:nth-child(10) {
  width: 17.5%;
}

@media (max-width: 900px) {
  #reviews-mgmt-content {
    overflow-x: visible;
  }

  #reviews-mgmt-content .users-table {
    font-size: 0.78rem;
  }

  #reviews-mgmt-content .users-table th,
  #reviews-mgmt-content .users-table td {
    padding: 0.55rem 0.45rem;
  }

  .reviews-mgmt-uid {
    font-size: 0.72rem;
    max-width: 64px;
  }

  .reviews-mgmt-actions {
    gap: 0.35rem;
  }

  .reviews-mgmt-approve-btn,
  .reviews-mgmt-reject-btn,
  .corrections-mgmt-approve-btn,
  .corrections-mgmt-reject-btn {
    padding: 0.45rem 0.55rem;
    font-size: 0.72rem;
  }
}

.review-history-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  font-size: 0.82rem;
}

.review-history-table th,
.review-history-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 8px 5px;
}

.review-history-table th {
  color: #1a4d3a;
  font-size: 0.76rem;
}

.review-history-table tbody tr {
  cursor: default;
}

.review-history-table tbody tr:hover {
  background-color: rgba(26, 77, 58, 0.06);
}

.review-history-docid {
  font-size: inherit;
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-history-view-col {
  width: 3rem;
  overflow: visible;
}

.review-history-view-cell {
  text-align: center;
  overflow: visible;
}

.review-history-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: #1a4d3a;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.1s ease;
  padding: 0;
}

.review-history-view-btn:hover {
  background: #143527;
  transform: scale(1.08);
}

.review-history-view-icon {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.reviews-mgmt-uid {
  font-family: monospace;
  font-size: 0.78rem;
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Truncated ID: show first 5 chars, full on hover via tooltip */
.id-truncated {
  cursor: pointer;
  position: relative;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.id-tooltip {
  display: none;
  position: fixed;
  z-index: 9999;
  background: #23272e;
  color: #f1f1f1;
  font-family: monospace;
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  white-space: nowrap;
  pointer-events: auto;
  gap: 8px;
  align-items: center;
}

.id-tooltip.visible {
  display: inline-flex;
}

.id-tooltip-text {
  user-select: all;
}

.id-tooltip-copy {
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: #f1f1f1;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.id-tooltip-copy:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.5);
}

.id-tooltip-copy.copied {
  color: #6fcf97;
  border-color: #6fcf97;
}

body.users-page-active > .detail-overlay.review-detail-mode {
  pointer-events: auto;
  z-index: 1300;
}

.review-detail-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 20px 16px 8px;
  margin-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.review-detail-approve-btn {
  padding: 10px 32px;
  border-radius: 24px;
  border: none;
  background: #22c55e;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
}

.review-detail-approve-btn:hover {
  background: #16a34a;
  transform: translateY(-1px);
}

.review-detail-reject-btn {
  padding: 10px 32px;
  border-radius: 24px;
  border: 1.5px solid #ef4444;
  background: transparent;
  color: #ef4444;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.12s;
}

.review-detail-reject-btn:hover {
  background: #ef4444;
  color: #fff;
  transform: translateY(-1px);
}

.review-detail-submitter {
  text-align: center;
  padding: 12px 16px 0;
  margin-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.08);
  color: #64748b;
  font-size: 0.88rem;
}

.notification-item-actions {
  display: flex;
  gap: 0.5rem;
}

.notification-approve-btn {
  padding: 0.4rem 1rem;
  border-radius: 6px;
  border: none;
  background: #1a4d3a;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.notification-approve-btn:hover {
  background: #15412f;
}

.notification-reject-btn {
  padding: 0.4rem 1rem;
  border-radius: 6px;
  border: 1px solid #dc3545;
  background: transparent;
  color: #dc3545;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.notification-reject-btn:hover {
  background: #dc3545;
  color: #fff;
}

/* ===== MY REVIEWS PANEL (full-page, reuses .users-page) ===== */

.my-reviews-back-btn {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid #e2dfd6;
  background: #ffffff;
  color: #1a4d3a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.my-reviews-back-btn:hover {
  background: #f5f4f0;
  transform: scale(1.05);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

.my-reviews-list {
  padding: 1rem 2rem 2rem;
  overflow-y: auto;
  flex: 1;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.my-review-card {
  padding: 1rem 1.1rem;
  background: #ffffff;
  border-radius: 12px;
  border: 2px solid transparent;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.my-review-card:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  border-color: #c5ddd2;
}

.my-review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

/* JS renders .my-review-card-nombre — match that class name */
.my-review-card-nombre,
.my-review-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1a1a;
  line-height: 1.3;
}

/* JS renders .my-review-status-badge — match that class name */
.my-review-status-badge,
.my-review-status {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  flex-shrink: 0;
}

.my-review-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: #8a8780;
}

.my-review-card-meta span + span::before {
  content: '·';
  margin-right: 0.5rem;
  color: #c8c5be;
}

.status-pending {
  background: #fef9ec;
  color: #856404;
  border: 1px solid #f5d87a;
}

.status-approved {
  background: #edf7f2;
  color: #1a4d3a;
  border: 1px solid #a8d5bc;
}

.status-rejected {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

/* ===== REJECT REASON OVERLAY ===== */

.reject-reason-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reject-reason-overlay[hidden] {
  display: none;
}

.reject-reason-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 14, 0.52);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.reject-reason-overlay-panel {
  position: relative;
  width: min(480px, 90%);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  will-change: transform, opacity;
  padding: 2rem;
}

.reject-reason-overlay.is-open .reject-reason-overlay-backdrop {
  opacity: 1;
}

.reject-reason-overlay.is-open .reject-reason-overlay-panel {
  transform: scale(1);
  opacity: 1;
}

.reject-reason-overlay.is-closing .reject-reason-overlay-backdrop {
  opacity: 0;
}

.reject-reason-overlay.is-closing .reject-reason-overlay-panel {
  transform: scale(0.95);
  opacity: 0;
}

.reject-reason-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid #e2dfd6;
  background: rgba(255, 255, 255, 0.94);
  color: #1a4d3a;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.reject-reason-close-btn:hover {
  background: #f5f4f0;
  transform: scale(1.05);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.15);
}

.reject-reason-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a4d3a;
}

.reject-reason-subtitle {
  margin: 0 0 1.25rem 0;
  font-size: 0.9rem;
  color: #6b7280;
}

.reject-reason-textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem 1rem;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  color: #1a1a1a;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.reject-reason-textarea:focus {
  outline: none;
  border-color: #1a4d3a;
  box-shadow: 0 0 0 3px rgba(26, 77, 58, 0.12);
}

.reject-reason-char-count {
  text-align: right;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

.reject-reason-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.reject-reason-cancel-btn {
  padding: 0.6rem 1.25rem;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.reject-reason-cancel-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.reject-reason-submit-btn {
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 10px;
  background: #dc3545;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.reject-reason-submit-btn:hover {
  background: #c82333;
  transform: translateY(-1px);
}

.reject-reason-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.my-review-rejection-reason {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #fef2f2;
  border-left: 3px solid #dc3545;
  border-radius: 0 6px 6px 0;
  font-size: 0.82rem;
  color: #721c24;
}

.my-review-rejection-label {
  font-weight: 600;
  margin-right: 0.25rem;
}

.my-review-card-date {
  font-size: 0.8rem;
  color: #6b7280;
}

/* ===== REVIEW EMPTY STATE ===== */

.review-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

.review-empty-state p {
  font-size: 0.95rem;
  margin: 0;
}

/* ===== REVIEW OVERLAYS RESPONSIVE ===== */

@media (max-width: 600px) {
  .review-form-grid {
    grid-template-columns: 1fr;
  }

  .review-field--full {
    grid-column: span 1;
  }

  .review-overlay-panel,
  .notification-panel-box,
  .reject-reason-overlay-panel {
    width: 95%;
    border-radius: 16px;
  }
}

.review-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: #1a1a2e;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10001;
  pointer-events: none;
}

.review-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Achievement Toast */
.achievement-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid #e2dfd6;
  border-left: 3px solid #1a4d3a;
  color: #222;
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateX(110%);
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 10002;
  cursor: pointer;
  max-width: 300px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  pointer-events: none;
}
.achievement-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.achievement-toast-emoji {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}
.achievement-toast-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.achievement-toast-prefix {
  font-size: 0.75rem;
  color: #1a4d3a;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.achievement-toast-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
  line-height: 1.3;
}
@media (max-width: 480px) {
  .achievement-toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
}

/* Achievement Highlight Animation */
.achv-highlight {
  animation: achvHighlightPulse 1.5s ease 2;
}
@keyframes achvHighlightPulse {
  0% { background-color: transparent; }
  30% { background-color: rgba(26, 77, 58, 0.12); box-shadow: 0 0 0 2px rgba(26, 77, 58, 0.25); }
  100% { background-color: transparent; box-shadow: none; }
}

.achievement-gallery {
  padding: 1.5rem 2rem;
  margin: 0.75rem 1rem 0;
  background: #fff;
  border-radius: 14px;
}


.achievement-gallery-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.achievement-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid #f0eeea;
  background: #fff;
  color: #1a1a1a;
  transition: background 0.15s ease;
}
.achievement-row:last-child {
  border-bottom: none;
}
.achievement-row:hover {
  background: #f5f4f0;
}

.achievement-row.locked {
  opacity: 0.5;
}

.achievement-row-icon {
  font-size: 1.6rem;
  line-height: 1;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f5f2;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid #e2dfd6;
}

.achievement-row-info {
  flex: 1;
  min-width: 0;
}

.achievement-row-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

.achievement-row-desc {
  font-size: 0.72rem;
  color: #8a8780;
  line-height: 1.3;
}

.achievement-row-pct {
  font-size: 0.65rem;
  color: #8a8780;
  line-height: 1.3;
  margin-top: 2px;
}

.achievement-row-date {
  font-size: 0.7rem;
  color: #8a8780;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}

.achievement-row-tier {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  text-transform: uppercase;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.achievement-row-tier.bronze { background: #cd7f32; color: #fff; }
.achievement-row-tier.silver { background: #c0c0c0; color: #333; }
.achievement-row-tier.gold { background: #ffd700; color: #333; }

.achievement-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f5f4f0;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  margin-bottom: 0.5rem;
  border: 1px solid #e2dfd6;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.achievement-summary-bar:hover {
  background: #eceae4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.achievement-summary-bar.is-expanded {
  border-radius: 10px;
  margin-bottom: 0.5rem;
}
.achievement-summary-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}
.achievement-summary-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a4d3a;
  white-space: nowrap;
}
.achievement-summary-count {
  font-size: 0.75rem;
  color: #8a8780;
  white-space: nowrap;
}
.achievement-summary-progress {
  flex: 1;
  height: 6px;
  background: #e2dfd6;
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
  max-width: 180px;
}
.achievement-summary-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1a4d3a 0%, #2ecc71 25%, #3498db 50%, #9b59b6 75%, #e91e63 100%);
  background-size: 100% 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.achievement-summary-icons {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  margin-left: 0.75rem;
}
.achievement-summary-icon-box {
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f5f2;
  border-radius: 6px;
  font-size: 0.9rem;
  border: 1px solid #e2dfd6;
}
.achievement-summary-overflow {
  font-size: 0.7rem;
  color: #8a8780;
  padding: 0 0.3rem;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  transition: color 0.18s ease;
}
.achievement-summary-overflow:hover {
  color: #1a4d3a;
}

@media (max-width: 480px) {
  .achievement-row {
    padding: 0.5rem 0.65rem;
    gap: 0.5rem;
  }
  .achievement-row-date {
    font-size: 0.6rem;
  }
  .achievement-summary-bar { flex-wrap: wrap; gap: 0.4rem; }
  .achievement-summary-icons { margin-left: 0; }
  .achievement-summary-progress { max-width: 120px; }
}

.review-form-error {
  color: #e74c3c;
  font-size: 0.875rem;
  margin: 0.5rem 0;
}

.notification-item-error {
  color: #e74c3c;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.notification-duplicate-warn {
  color: #f39c12;
  font-size: 0.85rem;
  cursor: help;
}

.review-field-error[hidden] {
  display: none !important;
}
.review-field-error {
  display: block;
  color: #e74c3c;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.35rem;
  padding: 0.2rem 0.5rem;
  position: relative;
  line-height: 1.3;
}

.review-field-error::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 12px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid #e74c3c;
}

/* ===== FOURSQUARE AUTOCOMPLETE DROPDOWN ===== */

.review-nombre-wrapper,
.review-autocomplete-wrapper {
  position: relative;
}

.review-nombre-dropdown,
.review-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e0ddd8;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 260px;
  overflow-y: auto;
  z-index: 1500;
  margin-top: 4px;
}

.review-nombre-dropdown[hidden],
.review-autocomplete-dropdown[hidden] {
  display: none;
}

.fsq-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid #f0efeb;
  transition: background 0.12s ease;
}

.fsq-item:last-child {
  border-bottom: none;
}

.fsq-item:hover {
  background: #f5f4f0;
}

.fsq-item.is-active {
  background: rgba(26, 77, 58, 0.08);
}

.fsq-item-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1a1a;
}

.fsq-item-detail {
  font-size: 0.8rem;
  color: #6b7280;
}

.fsq-item-category {
  font-size: 0.75rem;
  color: #1a4d3a;
  font-weight: 500;
}

.fsq-no-results {
  padding: 12px 14px;
  font-size: 0.85rem;
  color: #9ca3af;
  text-align: center;
}

#review-nombre.fsq-validated,
#review-ciudad.fsq-validated,
#review-pais.fsq-validated {
  border-color: #1a4d3a;
  background: #f0faf5;
}

#restaurants-list-content {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: none;
  padding-right: 0.5rem;
}

.restaurants-list-table {
  width: calc(100% - 0.5rem);
  max-width: none;
  min-width: max-content;
  table-layout: fixed;
  font-size: 0.82rem;
}

.restaurants-list-table th,
.restaurants-list-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 8px 6px;
  max-width: none;
}

.restaurants-list-table th {
  color: #1a4d3a;
  font-size: 0.76rem;
}

.restaurants-list-sortable {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.restaurants-list-sortable:hover {
  background: rgba(26, 77, 58, 0.08);
}

.restaurants-list-cell-wide {
  max-width: none;
}

.restaurants-list-cell-name {
  min-width: 170px;
}

.restaurants-list-cell-medium {
  min-width: 110px;
}

.restaurants-list-cell-compact {
  min-width: 72px;
}

.restaurants-list-cell-wide {
  min-width: 180px;
}

.restaurants-list-cell-id {
  font-family: monospace;
  font-size: 0.78rem;
  min-width: 120px;
  max-width: 120px;
}

.restaurants-list-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
}

.restaurants-list-pagination button {
  background: #2e7d5e;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.restaurants-list-pagination button:hover:not(:disabled) {
  background: #1a4d3a;
}

.restaurants-list-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.restaurants-list-page-info {
  font-size: 0.85rem;
  color: #555;
  font-weight: 500;
}

@media (max-width: 600px) {
  .restaurants-list-table th,
  .restaurants-list-table td {
    padding: 6px 4px;
    font-size: 0.72rem;
  }

  .restaurants-list-table th {
    font-size: 0.68rem;
  }

  .restaurants-list-pagination {
    gap: 0.5rem;
  }

  .restaurants-list-pagination button {
    padding: 6px 12px;
    font-size: 0.78rem;
  }
}

/* ===== RESTAURANTS LIST INLINE EDITING ===== */
.rl-editable { cursor: pointer; }
.rl-editable:hover { background-color: rgba(26, 77, 58, 0.06); }
tr.rl-editing { background-color: #fffde7 !important; }
tr.rl-editing td { border-color: #e0d97f; }
.rl-editable input[type="text"],
.rl-editable textarea,
.rl-editable select {
  width: 100%;
  min-width: 60px;
  padding: 4px 6px;
  border: 1px solid #1a4d3a;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}
.rl-editable textarea { min-height: 60px; resize: vertical; }
.rl-actions-header { min-width: 7.5rem; width: 7.5rem; overflow: visible; }
.rl-actions-cell {
  white-space: nowrap;
  min-width: 7.5rem;
  width: 7.5rem;
  vertical-align: middle;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-right: 1rem;
  overflow: visible;
}
.rl-save-btn, .rl-cancel-btn {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  margin: 0 2px;
  transition: background 0.15s;
}
.rl-save-btn { background: #1a4d3a; color: #fff; border-color: #1a4d3a; }
.rl-save-btn:hover { background: #153f2f; }
.rl-cancel-btn { background: #fff; color: #666; }
.rl-cancel-btn:hover { background: #f5f5f5; }
.rl-save-btn:disabled,
.rl-save-btn.rl-saving { opacity: 0.5; cursor: not-allowed; }
.rl-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 150px;
  overflow-y: auto;
  padding: 2px 0;
}
.rl-checkbox-list label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
tr.rl-save-success { animation: rl-flash-green 0.6s ease; }
@keyframes rl-flash-green {
  0% { background-color: #e8f5e9; }
  100% { background-color: transparent; }
}
.rl-save-error { color: #d32f2f; font-size: 12px; margin-top: 2px; }
.rl-status-header { width: 44px; text-align: center; cursor: default; }
.rl-status-cell { text-align: center; width: 44px; }
.rl-status-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.rl-status-green { background: #2e7d5e; }
.rl-status-yellow { background: #e6a817; }
.rl-status-red { background: #d32f2f; }
.rl-geo-warn {
  margin-left: 0.3rem;
  cursor: help;
  font-size: 0.85rem;
}

/* Plus Code / placeId warning in detail overlay */
.detail-placeid-group {
  margin-top: 0.5rem;
}
.detail-placeid {
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--text-secondary, #6b6b6b);
  word-break: break-all;
}
.placeid-warn {
  border: 2px solid #e67e22;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  background: #fef5e7;
}
.placeid-warn .detail-placeid {
  color: #e67e22;
}
.placeid-placeholder {
  font-style: italic;
  color: #e67e22;
  opacity: 0.8;
}
.rl-fsq-wrap { position: relative; }
td:has(.rl-fsq-wrap) { overflow: visible !important; position: relative; z-index: 10; }
.rl-fsq-dropdown {
  position: fixed;
  min-width: 320px;
  background: #fff;
  border: 1px solid #e0ddd8;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 220px;
  overflow-y: auto;
  z-index: 1500;
}
.rl-fsq-dropdown[hidden] { display: none; }

.activity-log-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px 16px;
}
.activity-log-item {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.15s;
}
.activity-log-item:hover {
  background: rgba(0,0,0,0.03);
}
.activity-log-icon-col {
  flex-shrink: 0;
  padding-top: 2px;
}
.activity-log-action-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  color: #fff;
  background: #888;
  white-space: nowrap;
}
.activity-action-create { background: #2ea043; }
.activity-action-update { background: #1a7adb; }
.activity-action-delete { background: #cf222e; }
.activity-action-rename { background: #9a6700; }
.activity-log-main {
  flex: 1;
  min-width: 0;
}
.activity-log-summary {
  font-size: 13.5px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.4;
  word-break: break-word;
}
.activity-log-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #666;
  margin-top: 3px;
  flex-wrap: wrap;
}
.activity-log-sep {
  color: #ccc;
}
.activity-log-actor {
  font-weight: 500;
  color: #555;
}
.activity-log-diff {
  margin-top: 6px;
  padding: 6px 10px;
  background: #f6f8fa;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.6;
}
.activity-diff-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.activity-diff-key {
  font-weight: 600;
  color: #555;
}
.activity-diff-from {
  color: #cf222e;
  text-decoration: line-through;
}
.activity-diff-arrow {
  color: #999;
}
.activity-diff-to {
  color: #2ea043;
  font-weight: 500;
}

.community-page {
  background:
    radial-gradient(circle at top left, rgba(46, 125, 94, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(212, 162, 83, 0.12), transparent 28%),
    #f5f4f0;
}

.community-page-header {
  align-items: flex-start;
}

.community-header-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.community-panel-subtitle {
  margin: 0;
  color: #746f65;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 720px;
}

.community-header-meta {
  margin-left: auto;
  padding-top: 0.3rem;
}

.community-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.community-content > * {
  flex-shrink: 0;
}

.community-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
  gap: 1.25rem;
}

.community-hero-card,
.community-section,
.community-feed-card {
  position: relative;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 223, 214, 0.9);
  border-radius: 24px;
  box-shadow: 0 16px 48px rgba(23, 54, 41, 0.08);
  overflow: hidden;
}

.community-hero-card,
.community-feed-card {
  padding: 1.5rem;
}

.community-hero-card::before,
.community-feed-card::before,
.community-section::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent 55%);
}

.community-hero-card {
  background:
    linear-gradient(135deg, rgba(26, 77, 58, 0.96), rgba(17, 50, 38, 0.94)),
    #1a4d3a;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.community-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.76);
}

.community-kicker::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #d4a253;
  box-shadow: 0 0 0 6px rgba(212, 162, 83, 0.14);
}

.community-hero-title {
  margin: 0;
  font-size: clamp(1.7rem, 2.4vw, 2.5rem);
  line-height: 1.04;
  max-width: 14ch;
}

.community-hero-text {
  margin: 0;
  max-width: 56ch;
  color: rgba(255,255,255,0.76);
  line-height: 1.7;
  font-size: 0.95rem;
}

.community-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.community-hero-stat {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
}

.community-hero-stat-value {
  display: block;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
}

.community-hero-stat-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.66);
}

.community-highlights {
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

.community-highlight-card {
  padding: 1.2rem 1.1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,246,240,0.96));
  border: 1px solid rgba(226, 223, 214, 0.96);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.community-highlight-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a7d68;
  margin-bottom: 0.45rem;
}

.community-highlight-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #173629;
  line-height: 1.3;
}

.community-highlight-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.83rem;
  line-height: 1.5;
  color: #706b62;
}

.community-new-members-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.community-new-member-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.2rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.community-new-member-item:hover {
  background: rgba(26, 77, 58, 0.06);
  transform: translateX(2px);
}

.community-new-member-item:focus-visible {
  outline: 3px solid rgba(46, 125, 94, 0.2);
  outline-offset: 2px;
}

.community-new-member-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(26, 77, 58, 0.12);
}

.community-new-member-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a4d3a, #d4a253);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

.community-new-member-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #173629;
  line-height: 1.3;
}

.community-section {
  padding: 1.4rem;
}

.community-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.community-section-title {
  margin: 0;
  font-size: 1.1rem;
  color: #173629;
}

.community-section-copy {
  margin: 0.2rem 0 0;
  color: #7b756b;
  font-size: 0.9rem;
  line-height: 1.5;
}

.community-section-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: #f0ece3;
  color: #1a4d3a;
  font-size: 0.75rem;
  font-weight: 700;
}

.community-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.community-member-card {
  position: relative;
  padding: 1.2rem;
  border-radius: 20px;
  border: 1px solid rgba(226, 223, 214, 0.95);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,248,243,0.98));
  box-shadow: 0 10px 28px rgba(26, 77, 58, 0.08);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.community-member-card:hover {
  transform: translateY(-3px);
  border-color: rgba(26, 77, 58, 0.22);
  box-shadow: 0 16px 36px rgba(26, 77, 58, 0.12);
}

.community-member-card:focus-visible {
  outline: 3px solid rgba(46, 125, 94, 0.2);
  outline-offset: 2px;
}

.community-member-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.community-member-avatar,
.community-member-avatar-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  flex-shrink: 0;
}

.community-member-avatar {
  object-fit: cover;
  border: 2px solid rgba(26, 77, 58, 0.14);
}

.community-member-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a4d3a, #d4a253);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
}

.community-member-name {
  margin: 0;
  font-size: 1rem;
  color: #173629;
}

.community-member-role {
  display: inline-flex;
  margin-top: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(26, 77, 58, 0.08);
  color: #1a4d3a;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.06em;
}

.community-member-bio {
  margin: 0.95rem 0 1rem;
  color: #5b554c;
  font-size: 0.9rem;
  line-height: 1.6;
  min-height: 4.4em;
}

.community-member-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.community-member-stat {
  padding: 0.7rem 0.75rem;
  border-radius: 14px;
  background: #f5f2eb;
}

.community-member-stat-value {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #173629;
}

.community-member-stat-label {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a7d68;
}

.community-leaderboards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.community-leaderboard {
  padding: 1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,247,241,0.96));
  border: 1px solid rgba(226,223,214,0.96);
}

.community-leaderboard-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin: 0 0 0.2rem;
  font-size: 0.96rem;
  color: #173629;
}

.community-leaderboard-caption {
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #7b756b;
}

.community-leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.community-leaderboard-row {
  appearance: none;
  border: 1px solid transparent;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem 0.85rem;
  border-radius: 16px;
  background: #f8f5ef;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.community-leaderboard-row:hover {
  transform: translateY(-2px);
  border-color: rgba(26, 77, 58, 0.18);
  box-shadow: 0 10px 24px rgba(26, 77, 58, 0.08);
}

.community-leaderboard-row:focus-visible {
  outline: 3px solid rgba(46, 125, 94, 0.2);
  outline-offset: 2px;
}

.community-leaderboard-rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #173629;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

.community-leaderboard-row.is-rank-1 .community-leaderboard-rank {
  background: #d4a253;
  color: #173629;
}

.community-leaderboard-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #173629;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.community-leaderboard-meta {
  font-size: 0.78rem;
  color: #7e786f;
  margin-top: 0.2rem;
}

.community-leaderboard-value {
  font-size: 1rem;
  font-weight: 700;
  color: #173629;
}

.community-feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.community-feed-item {
  appearance: none;
  border: 1px solid rgba(226,223,214,0.9);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,248,243,0.96));
  width: 100%;
  text-align: left;
}

.community-feed-item.is-clickable {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.community-feed-item.is-clickable:hover {
  transform: translateY(-2px);
  border-color: rgba(26, 77, 58, 0.18);
  box-shadow: 0 10px 24px rgba(26, 77, 58, 0.08);
}

.community-feed-item.is-clickable:focus-visible {
  outline: 3px solid rgba(46, 125, 94, 0.2);
  outline-offset: 2px;
}

.community-feed-badge {
  align-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  background: rgba(26, 77, 58, 0.08);
  color: #1a4d3a;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.community-feed-summary {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: #2a2824;
}

.community-feed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: #7e786f;
}

.community-feed-sep {
  color: #c1b7a8;
}

.community-empty-state,
.community-loading-state {
  padding: 1.2rem 1.3rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(226,223,214,0.9);
  color: #746f65;
  line-height: 1.6;
}

@media (max-width: 1080px) {
  .community-hero,
  .community-leaderboards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .community-page-header {
    flex-wrap: wrap;
  }

  .community-header-meta {
    margin-left: 0;
    padding-top: 0;
  }

  .community-content {
    padding-left: 0;
    padding-right: 0;
  }

  .community-hero-card,
  .community-feed-card,
  .community-section {
    border-radius: 20px;
  }

  .community-hero-stats,
  .community-member-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Delete Restaurant Button (in table rows) ── */
.rl-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
  padding: 0;
  flex-shrink: 0;
}

.rl-delete-btn:hover {
  color: #dc3545;
  background: rgba(220, 53, 69, 0.08);
}

.rl-delete-btn svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.rl-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: #1a4d3a;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.1s ease;
  padding: 0;
}

.rl-view-btn:hover {
  background: #143527;
  transform: scale(1.08);
}

.rl-view-icon {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

/* ── Delete Restaurant Overlay ── */
.delete-restaurant-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-restaurant-overlay[hidden] {
  display: none;
}

.delete-restaurant-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 14, 0.52);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.delete-restaurant-overlay-panel {
  position: relative;
  width: min(480px, 90%);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  will-change: transform, opacity;
  padding: 2rem;
}

.delete-restaurant-overlay.is-open .delete-restaurant-overlay-backdrop {
  opacity: 1;
}

.delete-restaurant-overlay.is-open .delete-restaurant-overlay-panel {
  transform: scale(1);
  opacity: 1;
}

.delete-restaurant-overlay.is-closing .delete-restaurant-overlay-backdrop {
  opacity: 0;
}

.delete-restaurant-overlay.is-closing .delete-restaurant-overlay-panel {
  transform: scale(0.95);
  opacity: 0;
}

.delete-restaurant-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid #e2dfd6;
  background: rgba(255, 255, 255, 0.94);
  color: #1a4d3a;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.delete-restaurant-close-btn:hover {
  background: #f5f4f0;
  transform: scale(1.05);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.15);
}

.delete-restaurant-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a4d3a;
}

.delete-restaurant-subtitle {
  margin: 0 0 1.25rem 0;
  font-size: 0.9rem;
  color: #6b7280;
}

.delete-restaurant-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}

.delete-restaurant-textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem 1rem;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  color: #1a1a1a;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.delete-restaurant-textarea:focus {
  outline: none;
  border-color: #1a4d3a;
  box-shadow: 0 0 0 3px rgba(26, 77, 58, 0.12);
}

.delete-restaurant-char-count {
  text-align: right;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

.delete-restaurant-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.delete-restaurant-cancel-btn {
  padding: 0.6rem 1.25rem;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.delete-restaurant-cancel-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.delete-restaurant-submit-btn {
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 10px;
  background: #dc3545;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.delete-restaurant-submit-btn:hover {
  background: #c82333;
  transform: translateY(-1px);
}

.delete-restaurant-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Foursquare Address Confirm Overlay ── */
.fsq-address-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fsq-address-confirm-overlay[hidden] {
  display: none;
}

.fsq-address-confirm-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 14, 0.52);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.fsq-address-confirm-overlay-panel {
  position: relative;
  width: min(480px, 90%);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  will-change: transform, opacity;
  padding: 2rem;
}

.fsq-address-confirm-overlay.is-open .fsq-address-confirm-overlay-backdrop {
  opacity: 1;
}

.fsq-address-confirm-overlay.is-open .fsq-address-confirm-overlay-panel {
  transform: scale(1);
  opacity: 1;
}

.fsq-address-confirm-overlay.is-closing .fsq-address-confirm-overlay-backdrop {
  opacity: 0;
}

.fsq-address-confirm-overlay.is-closing .fsq-address-confirm-overlay-panel {
  transform: scale(0.95);
  opacity: 0;
}

.fsq-address-confirm-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid #e2dfd6;
  background: rgba(255, 255, 255, 0.94);
  color: #1a4d3a;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.fsq-address-confirm-close-btn:hover {
  background: #f5f4f0;
  transform: scale(1.05);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.15);
}

.fsq-address-confirm-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a4d3a;
}

.fsq-address-confirm-text {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
}

.fsq-address-confirm-addresses {
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fsq-address-confirm-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.fsq-address-confirm-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fsq-address-confirm-value {
  font-size: 0.95rem;
  color: #1a1a1a;
  padding: 0.5rem 0.75rem;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.fsq-address-confirm-value.fsq-address-proposed {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.fsq-address-confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.fsq-address-confirm-reject-btn {
  padding: 0.6rem 1.25rem;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.fsq-address-confirm-reject-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.fsq-address-confirm-accept-btn {
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 10px;
  background: #1a4d3a;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.fsq-address-confirm-accept-btn:hover {
  background: #143829;
  transform: translateY(-1px);
}

.fsq-address-confirm-accept-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* =============================
   Review Form Photo Upload
   ============================= */
.review-photos-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e8f0eb;
}

.review-photos-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.review-photo-card {
  position: relative;
  width: 140px;
  border: 1px solid #d0e4d7;
  border-radius: 10px;
  overflow: hidden;
  background: #f8faf9;
  display: flex;
  flex-direction: column;
}

.review-photo-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
  border-radius: 10px 10px 0 0;
}

.review-photo-meta {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.review-photo-category-select {
  font-size: 12px;
  padding: 4px 6px;
  border: 1px solid #c5dac9;
  border-radius: 6px;
  background: #fff;
  color: #1a4d3a;
  width: 100%;
  cursor: pointer;
}

.review-photo-custom-title {
  font-size: 12px;
  padding: 4px 6px;
  border: 1px solid #c5dac9;
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
  color: #2d5a3d;
}

.review-photo-custom-title::placeholder {
  color: #9ab8a2;
}

.review-photo-remove-btn {
  font-size: 11px;
  padding: 3px 8px;
  background: transparent;
  border: 1px solid #e57373;
  color: #e57373;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, color 0.15s;
}

.review-photo-remove-btn:hover {
  background: #e57373;
  color: #fff;
}

.review-add-photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1.5px solid #1a4d3a;
  color: #1a4d3a;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.review-add-photo-btn:hover {
  background: #1a4d3a;
  color: #fff;
}

.review-photos-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #7a9e85;
}

.admin-photo-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-photo-editor--compact {
  min-width: 240px;
}

.admin-photo-card {
  width: 150px;
}

.admin-photo-thumb {
  height: 104px;
}

.admin-photo-meta {
  gap: 8px;
}

.admin-photo-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-add-photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1.5px solid #1a4d3a;
  color: #1a4d3a;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.admin-add-photo-btn:hover {
  background: #1a4d3a;
  color: #fff;
}

.admin-photo-hint {
  font-size: 12px;
  color: #7a9e85;
}

.detail-photos-empty {
  margin: 0;
  color: #6b7f72;
}

.rl-photos-cell {
  white-space: normal;
}

.rl-photos-summary {
  display: inline-block;
  color: #1a4d3a;
  font-weight: 600;
}

.rl-photo-manage-btn {
  padding: 6px 10px;
  border: 1px solid #1a4d3a;
  border-radius: 6px;
  background: #fff;
  color: #1a4d3a;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.rl-photo-manage-btn:hover {
  background: #f0faf5;
}

.admin-photo-actions {
  margin-top: 8px;
}

@media (max-width: 480px) {
  .review-photos-preview {
    flex-direction: column;
  }
  .review-photo-card {
    width: 100%;
  }
  .admin-photo-card {
    width: 100%;
  }
}

/* =============================
   Restaurant Detail Photo Carousel
   ============================= */
.detail-photos-section {
  padding: 16px 1rem;
  border-top: 1px solid #e8f0eb;
  margin-top: 8px;
}

.detail-review-photos {
  margin-bottom: 20px;
}

.review-photos-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.review-photos-reviewer {
  font-size: 13px;
  font-weight: 600;
  color: #1a4d3a;
}

.review-photos-date {
  font-size: 12px;
  color: #7a9e85;
}

.review-photos-grid {
  display: grid;
  gap: 4px;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f7f2;
}

.review-photos-grid.grid-count-1 {
  grid-template-columns: 1fr;
}

.review-photos-grid.grid-count-2,
.review-photos-grid.grid-count-3-plus {
  grid-template-columns: 1fr 1fr;
}

.review-photos-grid.grid-count-3 {
  grid-template-columns: 1fr 1fr;
}

.detail-hero .review-photos-grid {
  height: 250px;
  border-radius: 0;
  position: relative;
  background: #102b21;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 20px;
  overflow: hidden;
}

.hero-blur-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(12px) brightness(0.55) saturate(0.9);
  transform: scale(1.15);
  z-index: 0;
  pointer-events: none;
}

.hero-blur-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 22, 18, 0.15) 0%, rgba(10, 22, 18, 0.3) 100%);
  z-index: 1;
  pointer-events: none;
}

.detail-hero .review-photos-grid .photo-grid-item {
  width: 180px;
  height: 180px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

.detail-hero .review-photos-grid.grid-count-1 .photo-grid-item {
  width: 220px;
  height: 220px;
}

.detail-hero .review-photos-grid .photo-grid-item img {
  border-radius: 10px;
}

.photo-grid-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.review-photos-grid.grid-count-1 .photo-grid-item {
  aspect-ratio: 16 / 9;
}

.review-photos-grid.grid-count-3 .photo-grid-item:first-child {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

.photo-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center center;
  transition: transform 0.3s ease;
}

.photo-grid-item:hover img {
  transform: rotate(var(--photo-rotation, 0deg)) scale(1.05);
}

.photo-grid-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px;
  background: rgba(26, 77, 58, 0.8);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.photo-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.photo-lightbox img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  border-radius: 4px;
}

.lightbox-caption {
  color: #fff;
  margin-top: 16px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.4);
}

.lightbox-rotate-btn {
  position: absolute;
  top: 1rem;
  right: 4rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-rotate-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.85);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
  padding: 0;
  z-index: 10001;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.lightbox-nav:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.08);
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
  color: rgba(255,255,255,0.7);
  margin-top: 8px;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 600px) {
  .photo-lightbox img {
    max-height: 80vh;
  }
  .lightbox-nav {
    width: 48px;
    height: 48px;
    font-size: 32px;
    border-width: 2px;
  }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

.hero-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.6);
  color: #333;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 5;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.detail-hero-media:hover .hero-carousel-nav,
.hero-carousel-nav:focus-visible {
  opacity: 1;
}
.hero-carousel-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-50%) scale(1.05);
}
.hero-carousel-nav:disabled {
  opacity: 0;
  cursor: default;
  pointer-events: none;
}
.hero-carousel-prev { left: 10px; }
.hero-carousel-next { right: 10px; }

@media (max-width: 600px) {
  .hero-carousel-nav {
    width: 32px;
    height: 32px;
    font-size: 18px;
    opacity: 1;
    background: rgba(255, 255, 255, 0.7);
  }
  .hero-carousel-prev { left: 8px; }
  .hero-carousel-next { right: 8px; }
}

.correction-flag-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.55rem;
}

.correction-flag-icon {
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background-color: #cf2f2f;
  -webkit-mask-image: url('flag.png');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url('flag.png');
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, filter 0.18s ease;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.correction-flag-icon:hover {
  transform: scale(1.08);
  background-color: #b62525;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.28));
}

.correction-overlay {
  position: fixed;
  inset: 0;
  z-index: 1700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.correction-overlay[hidden] {
  display: none;
}

.correction-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 14, 0.52);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.correction-overlay-panel {
  position: relative;
  width: min(520px, 92%);
  max-height: 85vh;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  will-change: transform, opacity;
}

.correction-overlay.is-open .correction-overlay-backdrop {
  opacity: 1;
}

.correction-overlay.is-open .correction-overlay-panel {
  transform: scale(1);
  opacity: 1;
}

.correction-overlay.is-closing .correction-overlay-backdrop {
  opacity: 0;
}

.correction-overlay.is-closing .correction-overlay-panel {
  transform: scale(0.95);
  opacity: 0;
}

.correction-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid #e2dfd6;
  background: rgba(255, 255, 255, 0.94);
  color: #1a4d3a;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  transition: background 0.18s ease, transform 0.18s ease;
}

.correction-close-btn:hover {
  background: #f5f4f0;
  transform: scale(1.05);
}

.correction-form-scroll {
  padding: 2rem 1.8rem 1.5rem;
  overflow-y: auto;
  max-height: 85vh;
}

.correction-form-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a4d3a;
  margin: 0 0 1.2rem;
}

.correction-form-group {
  margin-bottom: 1rem;
}

.correction-form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.3rem;
}

.correction-form-group--choice label {
  font-weight: 700;
  color: #3b382f;
  margin-bottom: 0.45rem;
}

.correction-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d4d0c8;
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
  background: #fafaf8;
  transition: border-color 0.18s ease;
  box-sizing: border-box;
}

.correction-input:focus {
  outline: none;
  border-color: #1a4d3a;
  box-shadow: 0 0 0 2px rgba(26, 77, 58, 0.12);
}

.correction-form-group .review-pill-group,
.correction-form-group .review-checkbox-group {
  background: #fcfbf8;
  border-color: #d8d2c7;
}

.correction-form-group .review-pill-group {
  min-height: 44px;
  align-items: center;
}

.correction-form-group .review-checkbox-group {
  max-height: 170px;
}

.correction-form-group .review-pill {
  min-height: 36px;
}

.correction-form-group .edit-checkbox-label {
  font-size: 0.88rem;
}

.correction-textarea {
  resize: vertical;
  min-height: 60px;
}

.correction-checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}

.correction-checkbox-group input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #1a4d3a;
}

.correction-form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid #e8e5dd;
}

.correction-cancel-btn {
  background: #f0ede5;
  color: #333;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease;
}

.correction-cancel-btn:hover {
  background: #e5e2d9;
}

.correction-submit-btn {
  background: #1a4d3a;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.correction-submit-btn:hover {
  background: #16402f;
}

.correction-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Permanently closed restaurant styles */
.restaurant-closed-banner {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
}

.restaurant-card--closed {
  opacity: 0.65;
  position: relative;
}

.restaurant-card--closed .card-name,
.restaurant-card--closed .mini-name {
  text-decoration: line-through;
  color: #999;
}

.closed-badge {
  display: inline-block;
  background: #dc3545;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15em 0.5em;
  border-radius: 4px;
  margin-left: 0.4em;
  vertical-align: middle;
  letter-spacing: 0.03em;
}

/* Review History Type Badges */
.review-history-type-badge {
  display: inline-block;
  font-size: 0.78em;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}
.type-review {
  background: #e3f0ff;
  color: #1a6fbf;
}
.type-correction {
  background: #fff3e0;
  color: #b36b00;
}

/* Correction Detail View */
.correction-detail-article {
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,246,240,0.98));
  border: 1px solid rgba(226, 223, 214, 0.95);
  box-shadow: 0 12px 28px rgba(23, 54, 41, 0.08);
}
.correction-detail-changes {
  margin: 0 0 1rem;
}
.correction-detail-changes h3,
.correction-detail-notes h3 {
  font-size: 1.05em;
  margin-bottom: 8px;
  color: #173629;
}
.correction-changes-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(226, 223, 214, 0.88);
}
.correction-changes-table th,
.correction-changes-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #ece7de;
  font-size: 0.97em;
}
.correction-changes-table th {
  background: #f7f4ee;
  font-weight: 700;
  color: #173629;
}
.correction-detail-notes {
  margin: 14px 0;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: rgba(240, 236, 227, 0.75);
}

.correction-detail-meta p {
  margin: 0 0 0.45rem;
}

.correction-detail-meta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e8e5dd;
}

.correction-highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  background: rgba(46, 160, 67, 0.12);
  color: #1f7a36;
  font-weight: 700;
}

.correction-changes-table td .id-truncated {
  max-width: 260px;
  display: inline-block;
  vertical-align: middle;
}

.reviews-mgmt-view-btn {
  display: inline-flex;
}

.review-history-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
}
.review-history-pagination button {
  background: #2e7d5e;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.review-history-pagination button:hover:not(:disabled) {
  background: #1a4d3a;
}
.review-history-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.review-history-page-info {
  font-size: 0.85rem;
  color: #555;
  font-weight: 500;
}

/* === 3-CATEGORY STAR RATING === */
.rating-stars-group { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.rating-star-row { display: flex; align-items: center; gap: 6px; }
.rating-star-label { min-width: 96px; font-weight: 600; font-family: 'Plus Jakarta Sans', sans-serif; color: #1a4d3a; }
.rating-star {
  cursor: pointer; font-size: 28px; line-height: 1; user-select: none;
  color: #d0d0d0; transition: color 120ms ease, transform 80ms ease;
  outline: none;
}
.rating-star:focus-visible { box-shadow: 0 0 0 3px rgba(26,77,58,0.25); border-radius: 4px; }
.rating-star:hover { transform: scale(1.05); }
.rating-star-row .rating-star.filled[data-star-index="1"],
.rating-star-row .rating-star.hover[data-star-index="1"]    { color: #e74c3c; }
.rating-star-row .rating-star.filled[data-star-index="2"],
.rating-star-row .rating-star.hover[data-star-index="2"]    { color: #f39c12; }
.rating-star-row .rating-star.filled[data-star-index="3"],
.rating-star-row .rating-star.hover[data-star-index="3"]    { color: #2ecc71; }
.rating-star-row .rating-star.filled[data-star-index="4"],
.rating-star-row .rating-star.hover[data-star-index="4"]    { color: #3498db; }
.rating-star-row .rating-star.filled[data-star-index="5"],
.rating-star-row .rating-star.hover[data-star-index="5"]    { color: #9b59b6; }
.rating-breakdown { display: flex; flex-direction: column; gap: 6px; margin-top: 0; padding: 0; font-size: 13px; align-items: center; width: 100%; flex-basis: 100%; }
.detail-badges-row { display: flex; gap: 0.5rem; margin-top: 0; align-items: center; width: 100%; flex-basis: 100%; }
.rating-breakdown-row { display: flex; align-items: center; gap: 6px; }
.rating-breakdown-label { min-width: 92px; color: #555; }
.rating-breakdown .rating-star { font-size: 14px; cursor: default; }
.rb-line { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.rb-overall { font-weight: 600; font-size: 14px; color: #1a4d3a; }
.rb-label { min-width: 90px; color: #555; font-size: 15px; font-weight: 600; }
.rb-star { font-size: 22px; }
.is-editing .rb-star { cursor: pointer; font-size: 28px; }
.is-editing .rb-star-row { position: relative; z-index: 2; }
.rb-cat { justify-content: center; }
.rb-star-filled[data-pos="1"], .rb-filled[data-pos="1"] { color: #e74c3c; }
.rb-star-filled[data-pos="2"], .rb-filled[data-pos="2"] { color: #f39c12; }
.rb-star-filled[data-pos="3"], .rb-filled[data-pos="3"] { color: #2ecc71; }
.rb-star-filled[data-pos="4"], .rb-filled[data-pos="4"] { color: #3498db; }
.rb-star-filled[data-pos="5"], .rb-filled[data-pos="5"] { color: #9b59b6; }
.rb-star-empty, .rb-star:not(.rb-filled):not(.rb-star-filled) { color: #d0d0d0; }
@media (max-width: 600px) {
  .rating-star { font-size: 32px; }
  .rating-star-label { min-width: 80px; font-size: 14px; }
}

/* Restaurants List — read-only Rating column */
.rl-readonly { cursor: default; }
.rl-rating-overall { font-weight: 600; text-align: right; min-width: 3rem; max-width: 3.5rem; }

/* Card rating row */
.card-rating-row { padding: 4px 0 2px; }
.card-rating {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: #1a4d3a;
  border-radius: 6px;
  padding: 0.1rem 0.42rem;
  line-height: 1.5;
}

/* Map marker popup */
.rb-map-popup-wrapper .leaflet-popup-content-wrapper { background: #1a1a2e; color: #eee; border-radius: 8px; }
.rb-map-popup-wrapper .leaflet-popup-tip { background: #1a1a2e; }
.rb-map-popup { font-size: 12px; min-width: 140px; }
.rb-map-popup strong { display: block; margin-bottom: 4px; font-size: 13px; }
.rb-breakdown--popup .rb-label { font-size: 11px; min-width: 70px; color: #ccc; }
.rb-breakdown--popup .rb-overall { font-size: 13px; font-weight: 700; margin-bottom: 2px; }

.edit-city-image-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
}
body.is-admin-mode .edit-city-image-btn {
  display: flex;
}
.edit-city-image-btn .edit-btn-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}
.edit-city-image-btn:hover {
  background: rgba(255, 255, 255, 0.45);
}

.edit-city-tile-image-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transition: opacity 0.2s;
}
body.is-admin-mode .edit-city-tile-image-btn {
  display: flex;
}
.suggestion-card:hover .edit-city-tile-image-btn,
.suggestion-card:focus .edit-city-tile-image-btn {
  opacity: 1;
}
.edit-city-tile-image-btn .edit-btn-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

/* Boot-restore flash suppression: hide explore/results until applyAppState restores view. */
html.is-restoring .site-header,
html.is-restoring .main-content,
html.is-restoring .site-footer,
html.is-restoring .auth-area,
html.is-restoring #hero-state,
html.is-restoring #cards-container,
html.is-restoring #split-layout,
html.is-restoring #results-toolbar,
html.is-restoring #empty-state,
html.is-restoring #did-you-mean-state,
html.is-restoring #scroll-loader {
  display: none !important;
}
