/* ========== RESET & TOKENS ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --yn-bg: #f4faf9;
  --yn-card: #ffffff;
  --yn-yellow: #ffd86b;
  --yn-mint: #89f0cf;
  --yn-teal: #2563eb;
  --yn-teal-2: #3b82f6;
  --yn-green: #39c088;
  --yn-pink: #ff9bb3;
  --yn-red: #ff6b6b;
  --yn-gray-1: #0f172a;
  --yn-gray-2: #334155;
  --yn-gray-3: #94a3b8;

  --yn-border: rgba(31, 129, 117, toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(-8px);
    }

    /* ===== UNIT TOOLTIP ===== */
    .leaflet-tooltip.custom-tooltip {
      background: transparent;
      border: 0;
      box-shadow: none;
      padding: 0;
    }

    .unit-tooltip {
      background: #ffffff;
      border-radius: 10px;
      box-shadow: 0 6px 18px rgba(15, 118, 110, 0.22);
      min-width: 210px;
      max-width: 240px;
      border: 1px solid rgba(15, 118, 110, 0.18);
      overflow: hidden;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      font-size: 12px;
    }

    .unit-tooltip .tooltip-header {
      background: linear-gradient(135deg, #0ea5e9 0%, #0f766e 100%);
      padding: 8px 10px;
      color: #ffffff;
    }

    .unit-tooltip .tooltip-title {
      font-size: 13px;
      font-weight: 700;
      margin: 0;
      line-height: 1.3;
    }

    .unit-tooltip .tooltip-body {
      padding: 8px 10px;
    }

    .unit-tooltip .density-indicator {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 8px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 600;
      margin-top: 6px;
      color: #ffffff;
    }

    .unit-tooltip .tooltip-info-grid {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 6px 10px;
      margin: 8px 0;
      font-size: 12px;
      line-height: 1.4;
    }

    .unit-tooltip .info-label {
      color: #64748b;
      font-weight: 500;
    }

    .unit-tooltip .info-value {
      color: #0f172a;
      font-weight: 600;
      text-align: right;
    }

    .unit-tooltip .tooltip-divider {
      height: 1px;
      background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
      margin: 8px 0;
    }

    .unit-tooltip .tooltip-stats {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 6px;
      margin-top: 4px;
    }

    .unit-tooltip .stat-item {
      text-align: center;
      padding: 6px 4px;
      border-radius: 8px;
      font-size: 11px;
    }

    .unit-tooltip .stat-icon {
      font-size: 16px;
      display: block;
      margin-bottom: 2px;
    }

    .unit-tooltip .stat-number {
      font-size: 14px;
      font-weight: 700;
      color: #0f172a;
    }

    .unit-tooltip .stat-label {
      font-size: 9px;
      color: #64748b;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.4px;
    }

    .unit-tooltip .stat-tour {
      background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    }

    .unit-tooltip .stat-service {
      background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    }

    .unit-tooltip .stat-event {
      background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    }

    /* ===== SCROLLBAR ===== */
    ::-webkit-scrollbar {
      height: 8px;
      width: 8px;
    }

    ::-webkit-scrollbar-thumb {
      background: linear-gradient(180deg, var(--yn-mint), var(--yn-teal));
      border-radius: 999px;
    }

    ::-webkit-scrollbar-track {
      background: #eaf7f4;
      border-radius: 999px;
    }

    .leaflet-interactive:focus {
      outline: none;
    }

    /* ===== RESPONSIVE ===== */
    @media (max-width: 768px) {
      :root {
        --rail-h: 140px;
      }

      .cards-container {
        height: var(--rail-h);
        padding: 6px 8px;
        gap: 6px;
      }

      .card-mini {
        width: 240px;
      }

      .card {
        height: auto;
        min-height: 80px;
        padding: 8px;
      }

      .card .thumb {
        width: 80px;
        height: 80px;
      }

      .card .line {
        -webkit-line-clamp: 2;
      }

      /* FAB positioning on mobile */
      body:not(.sidebar-collapsed) .fab-right {
        left: auto !important;
        right: 16px !important;
      }

      body.sidebar-collapsed .fab-right {
        left: 16px !important;
        right: auto !important;
      }

      /* Hide bottom buttons when sidebar is open on mobile */
      body:not(.sidebar-collapsed) .sb-bottom {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
        visibility: hidden !important;
      }

      /* Show bottom buttons when sidebar is collapsed */
      body.sidebar-collapsed .sb-bottom {
        display: flex !important;
        position: fixed !important;
        top: 110px !important;
        right: 12px !important;
        left: auto !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        visibility: visible !important;
        z-index: 2300 !important;
      }

      /* Ensure sidebar is on top */
      #sidebar {
        z-index: 5000 !important;
      }

      /* FAB above sidebar */
      body:not(.sidebar-collapsed) .fab-right {
        z-index: 6000 !important;
      }
    }

    14);
  --yn-shadow: 0 10px 30px rgba(31, 129, 117, .12);
  --yn-radius: 18px;
  --sidebar-w: 400px;
  --rail-h: 140px;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--yn-bg);
  color: var(--yn-gray-1);
}

/* Only hide overflow on map page (index.html) */
body.map-page {
  overflow: hidden;
}

/* ========== SIDEBAR ========== */
#sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  overflow-y: auto;
  width: var(--sidebar-w);
  max-width: 92vw;
  background: #8bc5fc;
  border-right: 1px solid var(--yn-border);
  box-shadow: var(--yn-shadow);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  z-index: 2500;
  transform: translateX(0);
  transition: transform .28s ease, opacity .28s ease;
  scrollbar-width: thin;
  scrollbar-color: #1469CF #e3f0fd;
}

#sidebar::-webkit-scrollbar {
  width: 8px;
  background: #e3f0fd;
}

#sidebar::-webkit-scrollbar-thumb {
  background: #1469CF;
  border-radius: 999px;
}

#sidebar::-webkit-scrollbar-track {
  background: #e3f0fd;
  border-radius: 999px;
}

#sidebar.collapsed,
body.sidebar-collapsed #sidebar {
  transform: translateX(calc(-1 * var(--sidebar-w)));
}

/* ===== SIDEBAR HEADER ===== */
.sb-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 8px;
  background: transparent;
  box-shadow: none;
}

.sb-logo {
  width: 1000px;
  height: 110px;
  overflow: hidden;
  background: transparent;
  padding: 0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .08);
  display: grid;
  place-items: center;
}

.sb-logo img {
  display: block;
  background: transparent;
  max-height: 106px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.sb-title {
  flex: 1;
}

.sb-title h1 {
  font-size: 20px;
  color: #E3002C;
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.2;
}

.sb-title p {
  color: var(--yn-gray-3);
  font-size: 12px;
}

.sb-burger {
  margin-left: auto;
  border: 0;
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--yn-teal);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .08);
  transition: transform .15s;
}

.sb-burger:hover {
  transform: translateY(-1px);
}

.sb-burger .dots {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  gap: 3px;
}

.sb-burger .dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--yn-teal);
}

/* ===== SEARCH BOX ===== */
.sb-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  margin: 12px 16px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--yn-border);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .04);
  transition: all .2s;
}

.sb-search:focus-within {
  border-color: var(--yn-teal);
  box-shadow: 0 0 0 3px rgba(31, 129, 117, .08);
}

.sb-search .material-icons {
  color: #1469CF;
  font-size: 20px;
}

.sb-search input {
  border: none;
  outline: none;
  width: 100%;
  background: transparent;
  color: #0b1220;
  font-size: 14px;
}

.sb-search input::placeholder {
  color: var(--yn-gray-3);
}

/* ===== FILTER PILLS ===== */
.sb-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 8px 16px 10px;
  margin: 0 12px 8px;
  border-radius: 14px;
  background:
    radial-gradient(500px 140px at 15% 0%, rgba(20, 105, 207, 0.08), transparent 60%),
    linear-gradient(140deg, #f3f8fd 0%, #eaf3fb 100%);
  border: 1px solid #d0e3fa;
}

.pill {
  border: 1px solid #b3d3f7;
  cursor: pointer;
  white-space: nowrap;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 13px;
  color: #1469CF;
  background: #f0f6fd;
  border-radius: 999px;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
}

.pill.active {
  background:
    radial-gradient(220px 80px at 30% 20%, rgba(20, 105, 207, 0.12), transparent 60%),
    linear-gradient(145deg, #e3f0fd 0%, #cbe2fa 100%);
  color: #1469CF;
  border-color: #b3d3f7;
  box-shadow: 0 10px 24px rgba(31, 129, 117, .25);
}

/* ===== STATS ===== */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  margin: 12px 0;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: white;
  border-radius: 20px;
  font-size: 13px;
  color: #475569;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 500;
}

.stat-badge b {
  color: #0077C8;
  font-weight: 700;
  font-size: 15px;
}

.stat-section {
  background: #fff;
  border: 1px solid var(--yn-border);
  border-radius: 14px;
  margin: 8px 0;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .04);
}

.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  background: linear-gradient(180deg, #ffffff 0%, #f7fffd 100%);
  transition: all .2s;
}

.stat-head:hover {
  background: linear-gradient(180deg, #f7fffd 0%, #eefaf7 100%);
}

.stat-head h4 {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-head h4::after {
  content: '▶';
  font-size: 10px;
  margin-left: 4px;
  color: var(--yn-teal);
}

.stat-section.open .stat-head h4::after {
  content: '▼';
}

.stat-list {
  display: none;
  border-top: 1px solid #eef2f7;
  background: #fff;
}

.stat-section.open .stat-list {
  display: block;
}

.stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px dashed #eef2f7;
  transition: background .15s;
}

.stat-item:hover {
  background: #f8fbfa;
}

.stat-item:last-child {
  border-bottom: 0;
}

.stat-item span {
  font-size: 13px;
  color: #334155;
}

.stat-item b {
  font-size: 13px;
  color: #0f172a;
  background: #f1fcf8;
  border: 1px solid rgba(33, 163, 154, .18);
  padding: 4px 8px;
  border-radius: 8px;
  min-width: 44px;
  text-align: center;
}

/* ===== LIST ===== */
.sb-list {
  padding: 8px 12px 120px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 220px);
  flex: 1 1 auto;
  scrollbar-width: thin;
  scrollbar-color: #1469CF #e3f0fd;
}

.sb-list::-webkit-scrollbar {
  width: 8px;
  background: #e3f0fd;
  border-radius: 999px;
}

.sb-list::-webkit-scrollbar-thumb {
  background: #1469CF;
  border-radius: 999px;
}

.sb-list::-webkit-scrollbar-track {
  background: #e3f0fd;
  border-radius: 999px;
}

.sb-list .sb-loading {
  padding: 18px 12px;
  color: #1e3a8a;
  font-weight: 700;
  text-align: center;
}

.spot-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.spot-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 119, 200, 0.12);
  border-color: rgba(0, 119, 200, 0.2);
}

.spot-card img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.spot-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.spot-info h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spot-meta {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(0, 119, 200, 0.1);
  color: #0077C8;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  width: fit-content;
}

.spot-meta[data-cat="service"],
.spot-meta[data-cat="svc"] {
  background: rgba(0, 191, 166, 0.1);
  color: #00BFA6;
}

.spot-meta[data-cat="event"],
.spot-meta[data-cat="evt"] {
  background: rgba(255, 138, 101, 0.1);
  color: #FF8A65;
}

.spot-info p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ===== FAB (SIDEBAR TOGGLE) ===== */
.fab-right {
  position: fixed;
  top: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: #0C2E63;
  color: #fff;
  z-index: 2600;
  box-shadow: 0 10px 28px rgba(12, 46, 99, 0.22);
  cursor: pointer;
  transition: all 0.35s ease;
}

body:not(.sidebar-collapsed) .fab-right {
  left: calc(var(--sidebar-w) - 64px);
  right: auto;
}

body.sidebar-collapsed .fab-right {
  left: 16px;
  right: auto;
}

.burger-white,
.burger-white::before,
.burger-white::after {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all .25s;
}

.burger-white::before {
  content: "";
  position: relative;
  top: -6px;
}

.burger-white::after {
  content: "";
  position: relative;
  top: 6px;
}

.fab.active .burger-white {
  background: transparent;
}

.fab.active .burger-white::before {
  transform: rotate(45deg);
  top: 0;
}

.fab.active .burger-white::after {
  transform: rotate(-45deg);
  top: 0;
}

.fab-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
  border-radius: 50%;
}

/* ===== MAP ===== */
#mapid {
  position: fixed;
  inset: 0 0 var(--rail-h) 0;
  z-index: 1;
  transition: left .3s ease;
  background: #ffffff;
}

body.sidebar-collapsed #mapid {
  left: 0;
}

.leaflet-control-zoom.leaflet-bar.leaflet-control {
  display: none !important;
}

.province-flag-icon img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  display: block;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.18);
  border: 4px solid rgba(255, 255, 255, 0.9);
  opacity: 0.92;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* ===== CARDS CONTAINER ===== */
.cards-container {
  position: fixed;
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  height: 130px;
  background: #8bc5fc;
  border-top: 1px solid #e2e8f0;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  z-index: 999;
  transition: all .3s ease;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}

.cards-container::-webkit-scrollbar {
  height: 6px;
}

.cards-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.cards-container::-webkit-scrollbar-thumb {
  background: rgba(0, 119, 200, 0.3);
  border-radius: 3px;
}

.cards-container::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 119, 200, 0.5);
}

body.sidebar-collapsed .cards-container {
  left: 0;
}

.cards-container.collapsed {
  height: 58px;
}

.cards-container.collapsed .card {
  opacity: 0;
  pointer-events: none;
}

.sheet-handle {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 28px;
  background: transparent;
  border: 0;
  cursor: grab;
  z-index: 1000;
}

.sheet-handle:active {
  cursor: grabbing;
}

.sheet-handle .grabber {
  width: 36px;
  height: 4px;
  margin: 6px auto 0;
  background: #cbd5e1;
  border-radius: 999px;
  box-shadow: 0 6px 0 0 #cbd5e1, 0 12px 0 0 #cbd5e1;
}

.card-mini {
  flex-shrink: 0;
  width: 280px;
  height: auto;
  transition: transform .2s ease;
}

.card-mini:hover {
  transform: translateY(-4px);
}

.card {
  display: flex;
  gap: 12px;
  background: white;
  border-radius: 12px;
  padding: 10px;
  height: auto;
  min-height: 90px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 119, 200, 0.15);
  transition: all 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 119, 200, 0.15);
  border-color: rgba(0, 119, 200, 0.3);
}

.card .thumb {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.card>div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.card h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card .meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #1469CF;
  background: #eaf6ff;
  padding: 4px 8px;
  border-radius: 6px;
  width: fit-content;
}

.card .meta .material-icons {
  font-size: 16px;
  color: #1469CF;
}

.card .line {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ===== BOTTOM BUTTONS ===== */
.sb-bottom {
  position: fixed;
  top: 16px;
  right: 10px;
  bottom: auto;
  display: flex;
  gap: 10px;
  padding: 0;
  background: transparent;
  z-index: 900;
}

body:not(.sidebar-collapsed) .sb-bottom {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.sidebar-collapsed .sb-bottom {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 2300;
}

.btn-primary,
.btn-ghost {
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid var(--yn-border);
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(145deg, #1469CF 0%, #1E7BFF 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(20, 105, 207, 0.22);
}

.btn-primary:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.btn-ghost {
  background: #fff;
  color: var(--yn-teal);
}

.btn-ghost:hover {
  background: #f3fffb;
}

/* ===== POPUP ===== */
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}

.leaflet-popup-content {
  margin: 0;
  width: 280px !important;
}

.popup-card {
  display: flex;
  flex-direction: column;
}

.popup-media {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.popup-carousel {
  position: relative;
  height: 140px;
}

.carousel-nav {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
}

.carousel-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .95);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
  transition: all .2s;
}

.carousel-btn:hover:not(:disabled) {
  background: #fff;
  transform: scale(1.05);
}

.carousel-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.popup-body {
  padding: 14px;
}

.popup-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.popup-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
}

.badge-eat {
  background: #e3f0fd;
  color: #1469CF;
}

.badge-play {
  background: #d7efec;
  color: #125e55;
}

.badge-stay {
  background: #dbeafe;
  color: #1e40af;
}

.popup-desc {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 12px;
}

.popup-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-cta {
  padding: 8px 13px;
  border-radius: 8px;
  border: 1px solid var(--yn-teal);
  background: var(--yn-teal);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all .2s;
}

.btn-cta:hover {
  background: #1a6b61;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(31, 129, 117, .2);
}

.btn-cta.btn-ghost {
  background: #fff;
  color: var(--yn-teal);
}

.btn-cta.btn-ghost:hover {
  background: #f0fdfa;
}

/* ===== MODAL ===== */
.modal {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: 460px;
  width: 90%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .2);
}

.modal::backdrop {
  background: rgba(0, 0, 0, .4);
  backdrop-filter: blur(3px);
}

.modal form {
  padding: 24px;
}

.modal h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 20px;
}

.modal label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
}

.modal input,
.modal select,
.modal textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  margin-top: 6px;
  transition: all .2s;
}

.modal input:focus,
.modal select:focus,
.modal textarea:focus {
  outline: none;
  border-color: var(--yn-teal);
  box-shadow: 0 0 0 3px rgba(31, 129, 117, .08);
}

.modal textarea {
  min-height: 70px;
  resize: vertical;
  font-family: inherit;
}

.latlng {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal menu {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.modal button {
  padding: 10px 18px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.modal button:hover {
  background: #f8fafc;
}

.modal .btn-primary {
  background: var(--yn-teal) !important;
  border-color: var(--yn-teal) !important;
  color: #fff !important;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  background: rgba(2, 6, 23, 0.95);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 2000;
}

/* ===== DESKTOP: BOTTOM BUTTONS ALWAYS VISIBLE ===== */
@media (min-width: 769px) {
  .sb-bottom {
    position: fixed !important;
    top: 16px !important;
    right: 10px !important;
    bottom: auto !important;
    left: auto !important;
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 2300 !important;
  }

  /* Override mobile behavior on desktop */
  body:not(.sidebar-collapsed) .sb-bottom,
  body.sidebar-collapsed .sb-bottom {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}