/* ============================================================
   MAPY — APP STYLESHEET
   Design tokens from brand.html
   ============================================================ */

:root {
  /* Primary — Deep Ocean */
  --ocean-900: #0c2d48;
  --ocean-800: #103b5c;
  --ocean-700: #145074;
  --ocean-600: #1a6896;
  --ocean-500: #2185b8;
  --ocean-400: #3a9fd4;
  --ocean-300: #62b8e6;
  --ocean-200: #98d3f2;
  --ocean-100: #cce9f9;
  --ocean-50:  #e8f5fc;

  /* Secondary — Terrain Green */
  --terrain-900: #0d3b2a;
  --terrain-800: #145a3f;
  --terrain-700: #1a7a55;
  --terrain-600: #239b6c;
  --terrain-500: #2ebd84;
  --terrain-400: #52d09d;
  --terrain-300: #7ee0b8;
  --terrain-200: #b0edd4;
  --terrain-100: #d8f7ea;
  --terrain-50:  #edfcf4;

  /* Accent — Sunset Amber */
  --sunset-900: #6b3200;
  --sunset-800: #8a4100;
  --sunset-700: #a85200;
  --sunset-600: #c76500;
  --sunset-500: #e57a0a;
  --sunset-400: #f59636;
  --sunset-300: #f8b068;
  --sunset-200: #fbd0a0;
  --sunset-100: #fde8cf;
  --sunset-50:  #fef6ec;

  /* Signal — Coral */
  --coral-500: #e05a5a;
  --coral-400: #e87c7c;
  --coral-100: #fce4e4;

  /* Neutral — Warm Stone */
  --stone-950: #1a1814;
  --stone-900: #2d2a24;
  --stone-800: #44403a;
  --stone-700: #5c5850;
  --stone-600: #78726a;
  --stone-500: #948d84;
  --stone-400: #b0a99f;
  --stone-300: #ccc7bf;
  --stone-200: #e5e1da;
  --stone-100: #f2f0ec;
  --stone-50:  #faf9f7;

  /* Functional */
  --white: #ffffff;
  --bg: var(--stone-50);
  --text-primary: var(--stone-950);
  --text-secondary: var(--stone-600);
  --text-muted: var(--stone-400);
  --border: var(--stone-200);
  --border-subtle: var(--stone-100);

  /* Typography */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 128px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(26, 24, 20, 0.04), 0 1px 3px rgba(26, 24, 20, 0.06);
  --shadow-md: 0 2px 4px rgba(26, 24, 20, 0.03), 0 4px 12px rgba(26, 24, 20, 0.06);
  --shadow-lg: 0 4px 8px rgba(26, 24, 20, 0.03), 0 8px 24px rgba(26, 24, 20, 0.08);
  --shadow-xl: 0 8px 16px rgba(26, 24, 20, 0.04), 0 16px 48px rgba(26, 24, 20, 0.1);

  /* Motion */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* App layout */
  --topbar-height: 56px;
  --sidebar-width: 260px;
}

/* ============================================================
   RESET
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  height: 100%;
}

::selection {
  background: var(--ocean-200);
  color: var(--ocean-900);
}

img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; }
a { color: inherit; }
ul, ol { list-style: none; }
input, select, textarea { font: inherit; }

/* ============================================================
   UTILITIES
   ============================================================ */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.link {
  color: var(--ocean-600);
  text-decoration: underline;
  text-decoration-color: var(--ocean-200);
  text-underline-offset: 3px;
  transition: color var(--duration-fast) ease, text-decoration-color var(--duration-fast) ease;
}
.link:hover {
  color: var(--ocean-700);
  text-decoration-color: var(--ocean-400);
}

.code-inline {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--stone-100);
  color: var(--ocean-700);
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 9px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
  user-select: none;
}
.btn:focus-visible {
  outline: 2px solid var(--ocean-400);
  outline-offset: 2px;
}
.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-primary {
  background: var(--ocean-600);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--ocean-700);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn-secondary {
  background: var(--white);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--stone-50);
  border-color: var(--stone-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-secondary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 7px 12px;
}
.btn-ghost:hover {
  background: var(--stone-100);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--coral-500);
  color: var(--white);
}
.btn-danger:hover {
  background: #c94e4e;
  transform: translateY(-1px);
}

.btn-google {
  background: var(--white);
  color: var(--stone-900);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 15px;
  padding: 12px 20px;
}
.btn-google:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--stone-300);
}
.btn-google__icon { flex-shrink: 0; }

.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-xs { padding: 4px 8px; font-size: 12px; }

.btn-spinner { display: none; }
.htmx-request .btn-spinner { display: inline-flex; }
.htmx-request .btn-label { opacity: 0.6; }

/* ============================================================
   BADGES & CHIPS
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-full);
  line-height: 1.5;
  white-space: nowrap;
}

.category-badge {
  background: var(--stone-100);
  color: var(--stone-700);
  border: 1px solid var(--stone-200);
}
.category-badge--restaurant { background: var(--sunset-50); color: var(--sunset-700); border-color: var(--sunset-100); }
.category-badge--cafe { background: var(--sunset-50); color: var(--sunset-700); border-color: var(--sunset-100); }
.category-badge--park { background: var(--terrain-50); color: var(--terrain-700); border-color: var(--terrain-100); }
.category-badge--beach { background: var(--ocean-50); color: var(--ocean-700); border-color: var(--ocean-100); }
.category-badge--hotel { background: var(--ocean-50); color: var(--ocean-700); border-color: var(--ocean-100); }
.category-badge--mosque { background: var(--terrain-50); color: var(--terrain-700); border-color: var(--terrain-100); }
.category-badge--museum { background: var(--sunset-50); color: var(--sunset-700); border-color: var(--sunset-100); }

.label-badge {
  background: color-mix(in srgb, var(--label-color) 12%, transparent);
  color: color-mix(in srgb, var(--label-color) 80%, var(--stone-950));
  border: 1px solid color-mix(in srgb, var(--label-color) 25%, transparent);
}
.label-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--label-color);
  flex-shrink: 0;
}

/* ============================================================
   FORMS
   ============================================================ */

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.form-required { color: var(--coral-500); }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--ocean-400);
  box-shadow: 0 0 0 3px var(--ocean-50);
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}
.form-input--mono { font-family: var(--font-mono); font-size: 13px; }
.form-input--sm { padding: 6px 10px; font-size: 13px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23948d84' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-select--sm { padding: 6px 32px 6px 10px; font-size: 13px; }
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

.form-color-input {
  width: 40px;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: transparent;
}

.form-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-md);
}

/* ============================================================
   FLASH MESSAGES
   ============================================================ */

.flash-container {
  position: fixed;
  top: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  min-width: 280px;
  max-width: 480px;
  animation: slideDown var(--duration-normal) var(--ease-spring) both;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.flash {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 16px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  font-size: 14px;
}
.flash--success { border-color: var(--terrain-200); }
.flash--success .flash__icon { color: var(--terrain-600); }
.flash--error { border-color: var(--coral-100); }
.flash--error .flash__icon { color: var(--coral-500); }
.flash--info .flash__icon { color: var(--ocean-500); }
.flash__icon { flex-shrink: 0; display: flex; }
.flash__message { flex: 1; }
.flash__close {
  color: var(--text-muted);
  padding: 2px;
  border-radius: var(--radius-sm);
  display: flex;
  transition: color var(--duration-fast) ease;
}
.flash__close:hover { color: var(--text-primary); }

/* ============================================================
   APP LAYOUT
   ============================================================ */

.app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ── Top Bar ── */
.top-bar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--space-md);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  z-index: 100;
  flex-shrink: 0;
}

.top-bar__left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.top-bar__center {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 var(--space-md);
  max-width: 480px;
  margin: 0 auto;
}

.top-bar__right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
  margin-left: auto;
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--duration-fast) ease;
}
.sidebar-toggle:hover {
  background: var(--stone-100);
  color: var(--text-primary);
}

.app-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--ocean-700);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: -0.02em;
}
.logo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sunset-500);
  display: inline-block;
  flex-shrink: 0;
}

/* ── Search ── */
.search-wrapper {
  position: relative;
  width: 100%;
}
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 8px 36px 8px 34px;
  background: var(--stone-100);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: 14px;
  color: var(--text-primary);
  transition: all var(--duration-fast) ease;
}
.search-input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--ocean-300);
  box-shadow: 0 0 0 3px var(--ocean-50);
}
.search-input::placeholder { color: var(--text-muted); }
.search-spinner {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ocean-400);
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
}
.htmx-request .search-spinner { opacity: 1; }

/* ── View Toggle ── */
.view-toggle {
  display: flex;
  background: var(--stone-100);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}
.view-toggle__btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) ease;
}
.view-toggle__btn:hover { color: var(--text-primary); }
.view-toggle__btn--active {
  background: var(--white);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ── User Menu ── */
.user-menu {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  position: relative;
  transition: background var(--duration-fast) ease;
}
.user-menu:hover { background: var(--stone-100); }

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
}
.user-avatar--placeholder {
  background: var(--ocean-100);
  color: var(--ocean-700);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  overflow: hidden;
  animation: dropdownIn var(--duration-normal) var(--ease-out) both;
  display: none;
}
.user-menu--open .user-menu__dropdown { display: block; }

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.user-menu__info {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.user-menu__info strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.user-menu__info span {
  font-size: 12px;
  color: var(--text-muted);
}
.user-menu__divider { height: 1px; background: var(--border-subtle); }
.user-menu__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: left;
  transition: background var(--duration-fast) ease;
}
.user-menu__item:hover { background: var(--stone-50); color: var(--text-primary); }
.user-menu__item--danger:hover { background: var(--coral-100); color: var(--coral-500); }

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-right: 1px solid var(--border);
  overflow: hidden;
  transition: width var(--duration-normal) var(--ease-out), opacity var(--duration-normal) ease;
}

.sidebar.sidebar--collapsed {
  width: 0;
  opacity: 0;
  overflow: hidden;
}

.sidebar__inner {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-md) 0;
  scrollbar-width: thin;
  scrollbar-color: var(--stone-200) transparent;
}
.sidebar__inner::-webkit-scrollbar { width: 4px; }
.sidebar__inner::-webkit-scrollbar-track { background: transparent; }
.sidebar__inner::-webkit-scrollbar-thumb { background: var(--stone-200); border-radius: 2px; }

.sidebar__divider { height: 1px; background: var(--border-subtle); margin: var(--space-sm) var(--space-md); }

.sidebar__footer {
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.sidebar__footer-count {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* ── Sidebar sections ── */
.sidebar-section { padding: 0 var(--space-sm); }
.sidebar-section__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 var(--space-sm);
  margin-bottom: var(--space-xs);
  margin-top: var(--space-sm);
}

/* ── Label items ── */
.sidebar-labels { padding: 0 var(--space-sm); }

.label-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 7px var(--space-sm);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
  text-align: left;
  transition: all var(--duration-fast) ease;
  cursor: pointer;
}
.label-item:hover { background: var(--stone-100); color: var(--text-primary); }
.label-item--active { background: var(--ocean-50); color: var(--ocean-700); font-weight: 500; }

.label-item__icon { color: var(--text-muted); display: flex; flex-shrink: 0; }
.label-item__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.5);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}
.label-item__dot--none {
  background: var(--stone-300);
  border-color: transparent;
}
.label-item__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.label-item__count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--stone-100);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.label-item-wrapper { display: flex; align-items: center; gap: 2px; }
.label-item-wrapper .label-item { flex: 1; min-width: 0; }

.label-item__controls {
  display: none;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.label-item-wrapper:hover .label-item__controls { display: flex; }

.label-control-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--duration-fast) ease;
}
.label-control-btn:hover { background: var(--stone-100); color: var(--text-secondary); }
.label-control-btn--danger:hover { background: var(--coral-100); color: var(--coral-500); }

.sidebar-empty-hint {
  font-size: 12px;
  color: var(--text-muted);
  padding: var(--space-sm);
  text-wrap: balance;
}

.add-label-btn {
  width: 100%;
  justify-content: flex-start;
  color: var(--ocean-600);
  margin-top: 2px;
}
.add-label-btn:hover {
  background: var(--ocean-50);
  color: var(--ocean-700);
}

/* ── Category chips ── */
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px var(--space-sm) var(--space-sm);
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  font-size: 12px;
  background: var(--stone-100);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}
.category-chip:hover { background: var(--ocean-50); color: var(--ocean-600); border-color: var(--ocean-100); }
.category-chip--active { background: var(--ocean-100); color: var(--ocean-700); border-color: var(--ocean-200); font-weight: 500; }

/* ── Sidebar skeleton ── */
.sidebar-skeleton { padding: var(--space-sm); }
.skeleton-item {
  height: 32px;
  background: linear-gradient(90deg, var(--stone-100) 25%, var(--stone-50) 50%, var(--stone-100) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xs);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Sidebar actions ── */
.sidebar-actions {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.sidebar-action-btn { width: 100%; justify-content: flex-start; }

.export-menu { position: relative; }
.export-menu__dropdown {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 50;
  animation: dropdownIn var(--duration-fast) var(--ease-out) both;
}
.export-menu__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background var(--duration-fast) ease;
}
.export-menu__item:hover { background: var(--stone-50); color: var(--text-primary); }

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

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

/* ── Map ── */
.map-container {
  flex: 1;
  position: relative;
}
#map {
  width: 100%;
  height: 100%;
}

/* ── List ── */
.list-container {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
  scrollbar-width: thin;
  scrollbar-color: var(--stone-200) transparent;
}
.list-container::-webkit-scrollbar { width: 6px; }
.list-container::-webkit-scrollbar-track { background: transparent; }
.list-container::-webkit-scrollbar-thumb { background: var(--stone-200); border-radius: 3px; }

/* ============================================================
   PLACE CARDS
   ============================================================ */

.place-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
  align-content: start;
}

.place-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: box-shadow var(--duration-fast) ease, transform var(--duration-fast) ease, border-color var(--duration-fast) ease;
  position: relative;
}
.place-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--stone-300);
  transform: translateY(-2px);
}
.place-card.is-selected {
  border-color: var(--ocean-300);
  box-shadow: 0 0 0 3px var(--ocean-50), var(--shadow-md);
}

/* Drag-and-drop ghost */
.place-card.sortable-ghost { opacity: 0.4; }
.place-card.sortable-chosen { box-shadow: var(--shadow-xl); transform: rotate(1.5deg); }

.place-card__header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.place-card__check {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.place-card__check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-custom {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--stone-300);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.place-card__check input:checked + .check-custom {
  background: var(--ocean-500);
  border-color: var(--ocean-500);
}
.place-card__check input:checked + .check-custom::after {
  content: '';
  display: block;
  width: 9px;
  height: 6px;
  border-left: 1.5px solid white;
  border-bottom: 1.5px solid white;
  transform: rotate(-45deg) translateY(-1px);
}
.place-card__check:hover .check-custom { border-color: var(--ocean-400); }

.place-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.place-card__actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
  flex-shrink: 0;
}
.place-card:hover .place-card__actions,
.place-card:focus-within .place-card__actions { opacity: 1; }

.place-card__action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--duration-fast) ease;
}
.place-card__action-btn:hover { background: var(--stone-100); color: var(--text-primary); }
.place-card__action-btn--danger:hover { background: var(--coral-100); color: var(--coral-500); }

.place-card__body { display: flex; flex-direction: column; gap: 4px; }

.place-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.place-card__address {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.place-card__notes {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

/* ── Place card skeleton ── */
.loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}
.place-card-skeleton {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.skeleton-line {
  height: 12px;
  background: linear-gradient(90deg, var(--stone-100) 25%, var(--stone-50) 50%, var(--stone-100) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-full);
  animation: shimmer 1.4s infinite;
}
.skeleton-line--title { height: 16px; width: 70%; }
.skeleton-line--subtitle { width: 90%; }
.skeleton-line--badge { height: 20px; width: 40%; border-radius: var(--radius-full); }

/* ── Empty state ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl) var(--space-xl);
  text-align: center;
  grid-column: 1 / -1;
}
.empty-state__icon {
  color: var(--stone-300);
  margin-bottom: var(--space-lg);
}
.empty-state__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}
.empty-state__desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 320px;
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 24, 20, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: overlayIn var(--duration-normal) ease both;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-panel {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: panelIn var(--duration-normal) var(--ease-spring) both;
  overflow: hidden;
}

.modal-panel--compact { max-width: 400px; }
.modal-panel--wide { max-width: 640px; }

.modal-panel--slide {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  max-width: 440px;
  width: 100%;
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
  max-height: none;
  margin: 0;
  animation: slideIn var(--duration-normal) var(--ease-out) both;
}

@keyframes panelIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  transition: all var(--duration-fast) ease;
}
.modal-close:hover { background: var(--stone-100); color: var(--text-primary); }

.modal-footer {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

/* Scrollable form content */
.place-edit-form,
.label-edit-form {
  padding: var(--space-lg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex: 1;
}

/* ============================================================
   COLOR PICKER (label form)
   ============================================================ */

.color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
}

.color-swatch { display: flex; align-items: center; cursor: pointer; }
.color-swatch__input { position: absolute; opacity: 0; width: 0; height: 0; }
.color-swatch__circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--swatch-color, var(--stone-200));
  border: 2px solid transparent;
  transition: all var(--duration-fast) ease;
  position: relative;
}
.color-swatch__input:checked + .color-swatch__circle {
  border-color: var(--stone-950);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.8), 0 0 0 5px var(--stone-400);
  transform: scale(1.1);
}
.color-swatch__circle:hover { transform: scale(1.1); }
.color-swatch__circle--custom {
  background: var(--stone-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.custom-color-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

/* ============================================================
   IMPORT MODAL
   ============================================================ */

.import-steps {
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
  overflow-y: auto;
  max-height: 220px;
}

.import-step {
  display: flex;
  gap: var(--space-md);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.import-step strong { color: var(--text-primary); display: block; margin-bottom: 2px; }
.import-step__number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ocean-100);
  color: var(--ocean-700);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Dropzone ── */
.dropzone {
  margin: var(--space-md) var(--space-lg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all var(--duration-fast) ease;
}
.dropzone:hover,
.dropzone.dragover {
  border-color: var(--ocean-400);
  background: var(--ocean-50);
}
.dropzone.dragover { background: var(--ocean-50); }
.dropzone__icon { color: var(--stone-300); transition: color var(--duration-fast) ease; }
.dropzone:hover .dropzone__icon,
.dropzone.dragover .dropzone__icon { color: var(--ocean-400); }
.dropzone__label { font-size: 15px; font-weight: 500; color: var(--text-primary); }
.dropzone__sublabel { font-size: 13px; color: var(--text-muted); }
.dropzone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* ── Import file list ── */
.import-file-list {
  padding: 0 var(--space-lg) var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.import-file-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 12px;
  background: var(--stone-100);
  border-radius: var(--radius-md);
  font-size: 13px;
}
.import-file-item__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); color: var(--text-secondary); }
.import-file-item__size { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.import-file-item__status { flex-shrink: 0; }
.import-file-item--done .import-file-item__status { color: var(--terrain-500); }
.import-file-item--error .import-file-item__status { color: var(--coral-500); }

/* ── Import progress ── */
.import-progress { padding: 0 var(--space-lg) var(--space-md); }
.import-progress__bar-track {
  height: 6px;
  background: var(--stone-100);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}
.import-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--ocean-500), var(--terrain-500));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}
.import-progress__label { font-size: 13px; color: var(--text-muted); }

/* ── Import results ── */
.import-results { padding: 0 var(--space-lg) var(--space-md); }
.import-results__summary {
  padding: var(--space-md);
  background: var(--terrain-50);
  border: 1px solid var(--terrain-100);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--terrain-700);
}

/* ============================================================
   BULK TOOLBAR
   ============================================================ */

.bulk-toolbar {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  animation: bulkBarIn var(--duration-normal) var(--ease-spring) both;
}

@keyframes bulkBarIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.bulk-toolbar__inner {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 14px;
  background: var(--stone-900);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  flex-wrap: wrap;
}

.bulk-toolbar__info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.bulk-toolbar__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
}
.bulk-toolbar__info .btn-ghost {
  color: var(--stone-400);
  padding: 4px 8px;
  font-size: 12px;
}
.bulk-toolbar__info .btn-ghost:hover { color: var(--white); background: var(--stone-700); }

.bulk-toolbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.bulk-select-wrap .form-select {
  background-color: var(--stone-800);
  border-color: var(--stone-700);
  color: var(--stone-200);
  font-size: 13px;
  padding: 6px 28px 6px 10px;
}
.bulk-select-wrap .form-select:focus {
  border-color: var(--ocean-400);
  box-shadow: none;
  background-color: var(--stone-700);
}

/* ============================================================
   LANDING PAGE
   ============================================================ */

.landing-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: var(--space-md) 0;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background: rgba(250, 249, 247, 0.88);
  border-bottom: 1px solid var(--border-subtle);
}
.landing-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.landing-nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--ocean-700);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: -0.02em;
}
.nav-logo--sm { font-size: 18px; }
.nav-link-subtle {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) ease;
}
.nav-link-subtle:hover { color: var(--text-primary); background: var(--stone-100); }

/* ── Hero ── */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--topbar-height) + var(--space-3xl)) var(--space-lg) var(--space-3xl);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--stone-200) 1px, transparent 1px),
    linear-gradient(90deg, var(--stone-200) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.4;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 70%);
}

.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 5px 14px;
  background: var(--ocean-50);
  color: var(--ocean-600);
  border: 1px solid var(--ocean-100);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xl);
}
.hero-eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terrain-500);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  text-wrap: balance;
}
.hero-title--accent {
  background: linear-gradient(135deg, var(--ocean-600) 0%, var(--terrain-500) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto var(--space-xl);
  line-height: 1.65;
  text-wrap: pretty;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}
.hero-cta__note {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Hero visual ── */
.hero-visual {
  position: absolute;
  bottom: var(--space-2xl);
  right: var(--space-2xl);
  display: none;
}

.hero-map-preview {
  width: 200px;
  height: 180px;
  background: linear-gradient(135deg, var(--ocean-50) 0%, var(--terrain-50) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--ocean-100);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}
.map-preview__pin { position: absolute; }
.map-preview__pin--1 { top: 40%; left: 50%; }
.map-preview__pin--2 { top: 25%; left: 30%; }
.map-preview__pin--3 { top: 55%; left: 70%; }
.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ocean-500);
  border: 2px solid var(--white);
  box-shadow: var(--shadow-md);
  animation: float 3s ease-in-out infinite;
}
.pin-dot--terrain { background: var(--terrain-500); animation-delay: 0.8s; }
.pin-dot--sunset  { background: var(--sunset-500);  animation-delay: 1.6s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.map-preview__card {
  position: absolute;
  bottom: 20px;
  left: 16px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  box-shadow: var(--shadow-md);
  font-size: 12px;
}
.preview-card-name { font-weight: 600; color: var(--text-primary); }
.preview-card-cat { color: var(--text-muted); margin-top: 2px; }

/* ── Features ── */
.features-section {
  padding: var(--space-5xl) 0;
  background: var(--white);
  border-top: 1px solid var(--border);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-3xl);
}

.feature-card {
  padding: var(--space-xl);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg);
  transition: all var(--duration-normal) var(--ease-out);
}
.feature-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--stone-300);
  transform: translateY(-4px);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
}
.feature-card__icon--ocean { background: var(--ocean-100); color: var(--ocean-600); }
.feature-card__icon--terrain { background: var(--terrain-100); color: var(--terrain-600); }
.feature-card__icon--sunset { background: var(--sunset-100); color: var(--sunset-600); }

.feature-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}
.feature-card__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  text-wrap: pretty;
}

/* ── Steps ── */
.steps-section {
  padding: var(--space-5xl) 0;
  border-top: 1px solid var(--border);
}
.steps-list {
  margin-top: var(--space-3xl);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.step {
  display: flex;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
}
.step-divider {
  height: 1px;
  background: var(--border-subtle);
}

.step__number {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  color: var(--stone-200);
  line-height: 1;
  min-width: 60px;
  flex-shrink: 0;
  letter-spacing: -0.04em;
}
.step__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}
.step__desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  text-wrap: pretty;
  max-width: 540px;
}

/* ── CTA section ── */
.cta-section {
  padding: var(--space-5xl) 0;
  background: var(--ocean-900);
  border-top: none;
}
.cta-section__inner {
  text-align: center;
}
.cta-section__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: var(--white);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}
.cta-section__sub {
  font-size: 17px;
  color: var(--ocean-300);
  margin-bottom: var(--space-xl);
}

/* ── Footer ── */
.landing-footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border);
}
.landing-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.landing-footer__links {
  display: flex;
  gap: var(--space-md);
}

/* ── Section labels (shared with brand) ── */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ocean-500);
  margin-bottom: var(--space-sm);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  text-wrap: balance;
}

/* ── Animations ── */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s var(--ease-out) forwards;
  }
  .fade-in:nth-child(2) { animation-delay: 100ms; }
  .fade-in:nth-child(3) { animation-delay: 200ms; }
  .fade-in:nth-child(4) { animation-delay: 300ms; }

  @keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ============================================================
   MAP POPUP (Google Maps InfoWindow)
   ============================================================ */

.map-popup {
  font-family: var(--font-body);
  padding: 4px 2px;
  min-width: 180px;
  max-width: 240px;
}
.map-popup strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--stone-950);
  margin-bottom: 4px;
  line-height: 1.3;
}
.map-popup p {
  font-size: 12px;
  color: var(--stone-500);
  margin-bottom: 6px;
  line-height: 1.4;
}
.map-popup .category-badge { margin-bottom: 8px; }
.map-popup a {
  font-size: 12px;
  color: var(--ocean-600);
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  margin-top: 4px;
}
.map-popup a:hover { color: var(--ocean-700); }

/* ============================================================
   HTMX INDICATORS
   ============================================================ */

.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-flex; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (min-width: 1024px) {
  .hero-visual { display: block; }
}

@media (max-width: 1024px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  :root { --sidebar-width: 220px; }
}

@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
  .steps-section .step { flex-direction: column; gap: var(--space-md); }
  .step__number { font-size: 28px; min-width: auto; }

  /* Mobile: sidebar becomes a bottom sheet overlay */
  .sidebar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100% !important;
    height: auto;
    max-height: 70vh;
    border-right: none;
    border-top: 1px solid var(--border);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: var(--shadow-xl);
    z-index: 200;
    transform: translateY(100%);
    transition: transform var(--duration-normal) var(--ease-out);
  }
  .sidebar.sidebar--open {
    transform: translateY(0);
  }

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

  .top-bar__center { max-width: 100%; }
  .user-name { display: none; }
  .view-toggle__btn span { display: none; }
  .view-toggle__btn { padding: 5px 8px; }

  .landing-footer__inner { flex-direction: column; gap: var(--space-md); text-align: center; }
}

@media (max-width: 480px) {
  .modal-panel { max-width: 100%; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .modal-panel--slide {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .bulk-toolbar { left: var(--space-md); right: var(--space-md); transform: none; }
  .bulk-toolbar__inner { flex-direction: column; align-items: stretch; }
}

/* ========================================
   GOOGLE FETCH CARD
   ======================================== */

.fetch-google-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--ocean-50);
  border: 1.5px solid var(--ocean-200);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
}

.fetch-google-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.fetch-google-card__content {
  flex: 1;
  min-width: 0;
}

.fetch-google-card__content strong {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 650;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.fetch-google-card__content p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.fetch-progress {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--stone-50);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
}

.fetch-progress__text strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.fetch-progress__text p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.fetch-results {
  margin-top: var(--space-md);
}

.fetch-results__message {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
}

.fetch-results__message.success {
  background: var(--terrain-50);
  border: 1px solid var(--terrain-200);
  color: var(--terrain-800);
}

.fetch-results__message.error {
  background: var(--coral-100);
  border: 1px solid var(--coral-400);
  color: #7f1d1d;
}

.import-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  color: var(--text-muted);
  font-size: 13px;
}

.import-divider::before,
.import-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.manual-import-details {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.manual-import-summary {
  padding: var(--space-md) var(--space-lg);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
  list-style: none;
}

.manual-import-summary::-webkit-details-marker { display: none; }

.manual-import-summary::before {
  content: '▸ ';
  display: inline;
}

.manual-import-details[open] .manual-import-summary::before {
  content: '▾ ';
}

.manual-import-summary:hover {
  color: var(--text-primary);
}

.manual-import-details[open] .manual-import-summary {
  border-bottom: 1px solid var(--border-subtle);
}

.manual-import-details .import-steps,
.manual-import-details .dropzone,
.manual-import-details .import-file-list,
.manual-import-details .import-progress,
.manual-import-details .import-results {
  margin-left: var(--space-lg);
  margin-right: var(--space-lg);
}

@media (max-width: 640px) {
  .fetch-google-card {
    flex-direction: column;
    text-align: center;
  }
  .fetch-google-card .btn { width: 100%; }
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

.toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  z-index: 10000;
  opacity: 0;
  transition:
    opacity var(--duration-normal) var(--ease-out),
    transform var(--duration-normal) var(--ease-out);
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  max-width: calc(100vw - var(--space-xl) * 2);
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.toast--success {
  background: var(--terrain-700);
  color: var(--white);
}

.toast--error {
  background: var(--coral-500);
  color: var(--white);
}

/* ============================================================
   QUICK ADD — sidebar inputs
   ============================================================ */

.add-place-input-group {
  margin-bottom: var(--space-xs);
}

.add-place-input-group:last-child {
  margin-bottom: 0;
}

.add-place-input-group .input--sm {
  width: 100%;
  height: 32px;
  padding: 0 var(--space-sm);
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  outline: none;
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.add-place-input-group .input--sm::placeholder {
  color: var(--text-muted);
}

.add-place-input-group .input--sm:focus {
  border-color: var(--ocean-400);
  box-shadow: 0 0 0 3px rgba(33, 133, 184, 0.12);
}

.add-place-url-row {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
}

.add-place-url-row .input--sm {
  flex: 1;
  min-width: 0;
}

.add-place-url-row .btn-sm {
  flex-shrink: 0;
  height: 32px;
  padding: 0 var(--space-sm);
  font-size: 12px;
}

/* Google Places Autocomplete dropdown */
.pac-container {
  font-family: var(--font-body) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  margin-top: 4px;
  z-index: 10001 !important;
  overflow: hidden;
}

.pac-item {
  padding: var(--space-sm) var(--space-md) !important;
  font-size: 12px !important;
  cursor: pointer;
  border-top: 1px solid var(--border-subtle) !important;
  color: var(--text-primary) !important;
  transition: background var(--duration-fast);
}

.pac-item:first-child {
  border-top: none !important;
}

.pac-item:hover,
.pac-item-selected {
  background: var(--ocean-50) !important;
}

.pac-item-query {
  font-weight: 600;
  font-size: 12px !important;
  color: var(--text-primary) !important;
}

.pac-matched {
  font-weight: 700;
  color: var(--ocean-600) !important;
}

.pac-icon {
  margin-top: 3px !important;
}
