/* ==========================================================================
   Wobbla design system
   Airbnb / OpenTable inspired: white cards, soft shadows, generous spacing,
   rounded corners, one confident accent color, clean sans-serif type.
   No build step -- plain CSS, custom properties for theming.
   ========================================================================== */

:root {
  --accent: #ff385c;
  --accent-dark: #e0244a;
  --accent-light: #ffe4e9;
  --ink: #222222;
  --ink-soft: #6a6a6a;
  --border: #e7e7e7;
  --bg: #ffffff;
  --bg-muted: #f7f7f7;
  --success: #0a8a3f;
  --success-bg: #e6f6ec;
  --warn: #b3651c;
  --warn-bg: #fdf1e3;
  --danger: #d0343d;
  --danger-bg: #fbe9ea;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.12);
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 8px 0; line-height: 1.2; }
p { margin: 0 0 12px 0; color: var(--ink-soft); }

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

/* --- Top nav -------------------------------------------------------------- */
.nav {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 50;
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand-logo {
  font-weight: 800;
  font-size: 20px;
  color: var(--accent);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-links a {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.nav-links a:hover { background: var(--bg-muted); }
.nav-links a.active { background: var(--accent-light); color: var(--accent-dark); }
.nav-badge {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}
.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
}
.nav-cta:hover { background: var(--accent-dark) !important; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle:hover { background: var(--bg-muted); }

/* --- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow .15s ease, transform .05s ease;
}
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: scale(0.98); }
.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-secondary:hover { background: var(--bg-muted); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-muted); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #ad272f; }
.btn-sm { padding: 7px 14px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* --- Cards ------------------------------------------------------------------ */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
}
.card-tight { padding: 16px; }

.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

.listing-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  transition: box-shadow .15s ease, transform .1s ease;
  display: flex;
  flex-direction: column;
}
.listing-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.listing-card .thumb {
  aspect-ratio: 4/3;
  background: var(--bg-muted) center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 13px;
}
.listing-card .body { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.listing-card .title { font-weight: 700; font-size: 15.5px; }
.listing-card .meta { font-size: 13.5px; color: var(--ink-soft); }
.listing-card .price { font-weight: 700; margin-top: 6px; }
.listing-card .price span { font-weight: 400; color: var(--ink-soft); }

/* --- Badges / pills ---------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}
.badge-pending { background: var(--warn-bg); color: var(--warn); }
.badge-accepted { background: var(--success-bg); color: var(--success); }
.badge-completed { background: #e7effd; color: #1a56db; }
.badge-declined, .badge-cancelled { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: var(--bg-muted); color: var(--ink-soft); }
.chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink);
  background: #fff;
}

/* --- Forms -------------------------------------------------------------------- */
label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; margin-top: 14px; }
label:first-child { margin-top: 0; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=url], input[type=search], textarea, select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}
.field-hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.checkbox-row input { width: auto; }
.checkbox-row label { margin: 0; font-weight: 500; }
fieldset { border: none; padding: 0; margin: 14px 0 0 0; }

.form-narrow { max-width: 440px; margin: 0 auto; }
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-info { background: #e7effd; color: #1a56db; }

/* --- Search bar (Airbnb-style pill) ------------------------------------------- */
.search-pill {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  padding: 6px;
  gap: 4px;
  background: #fff;
  flex-wrap: wrap;
}
.search-pill .seg {
  padding: 8px 18px;
  flex: 1;
  min-width: 140px;
}
.search-pill .seg label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 2px 0;
  color: var(--ink-soft);
}
.search-pill .seg input, .search-pill .seg select {
  border: none;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
}
.search-pill .seg input:focus, .search-pill .seg select:focus { box-shadow: none; }
.more-filters { margin-top: 12px; }
.more-filters summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.more-filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 10px; }
.more-filters-grid label { margin-top: 0; }
.search-pill .go {
  border-radius: 999px;
  width: 46px;
  height: 46px;
  padding: 0;
  font-size: 18px;
}

/* --- Hero ---------------------------------------------------------------------- */
.hero {
  background: linear-gradient(180deg, #fff6f2 0%, #ffffff 100%);
  padding: 64px 0 48px;
  text-align: center;
}
.hero h1 { font-size: 42px; letter-spacing: -0.02em; max-width: 780px; margin: 0 auto 12px; }
.hero p.lead { font-size: 18px; max-width: 620px; margin: 0 auto 32px; }

.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.section-title { font-size: 26px; margin-bottom: 4px; }
.section-sub { color: var(--ink-soft); margin-bottom: 28px; }

.footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
  padding: 32px 0;
  color: var(--ink-soft);
  font-size: 13.5px;
}
.footer a { color: var(--ink-soft); }
.footer a:hover { color: var(--ink); }

/* --- Tables -------------------------------------------------------------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--ink-soft); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.03em; }
tr:last-child td { border-bottom: none; }

/* --- Tabs ------------------------------------------------------------------------ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 28px; flex-wrap: wrap; }
.tabs a {
  padding: 12px 4px;
  margin-right: 20px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
}
.tabs a.active { color: var(--ink); border-bottom-color: var(--ink); }

/* --- Stat cards -------------------------------------------------------------------- */
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 20px; }
.stat-card .value { font-size: 26px; font-weight: 800; }
.stat-card .label { font-size: 13px; color: var(--ink-soft); font-weight: 600; }

/* --- Avatars / thumbs ---------------------------------------------------------------- */
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-muted) center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--ink-soft); flex-shrink: 0;
}
.avatar-lg { width: 88px; height: 88px; font-size: 22px; }

.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.divider { height: 1px; background: var(--border); margin: 20px 0; border: none; }

.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--ink-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

/* --- Star ratings ------------------------------------------------------------------- */
.stars { color: var(--accent); letter-spacing: 1px; font-size: 14px; }

/* --- Beta notice modal ---------------------------------------------------------------- */
.beta-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.beta-modal-overlay.open { display: flex; }
.beta-modal { max-width: 420px; width: 100%; }

/* --- Admin "view as" dropdown (top right of the nav) ---------------------------------- */
.viewas-menu { position: relative; margin-left: 6px; }
.viewas-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.viewas-trigger:hover { background: var(--bg-muted); }
.viewas-caret { font-size: 11px; color: var(--ink-soft); }
.viewas-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  z-index: 60;
}
.viewas-menu.open .viewas-dropdown { display: block; }
.viewas-dropdown form { margin: 0; }
.viewas-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.viewas-option:hover { background: var(--bg-muted); }
.viewas-option.active { background: var(--accent-light); color: var(--accent-dark); }

/* --- Photo gallery strip + lightbox --------------------------------------------------- */
.photo-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.photo-strip-item {
  position: relative;
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.photo-strip-item img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; display: block; }
.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1100;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 100%; max-height: 90vh; border-radius: var(--radius-md); }

/* --- Simple calendar widget ----------------------------------------------------------- */
.cal-widget { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-header button { background: none; border: 1px solid var(--border); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 15px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--ink-soft); font-weight: 700; padding-bottom: 4px; }
.cal-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
}
.cal-day.blank { visibility: hidden; }
.cal-day.past, .cal-day.blocked { color: #c7c7c7; text-decoration: line-through; cursor: not-allowed; }
.cal-day.available:hover { background: var(--bg-muted); }
.cal-day.selected { background: var(--accent); color: #fff; font-weight: 700; }
.cal-day.in-range { background: var(--accent); color: #fff; font-weight: 700; }
.cal-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 12.5px; color: var(--ink-soft); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

@media (max-width: 720px) {
  .hero h1 { font-size: 30px; }
  .nav-inner { flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
    order: 3;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    margin-top: 10px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .viewas-menu { margin-left: 0; }
  .viewas-trigger { width: 100%; justify-content: space-between; }
  .viewas-dropdown { position: static; margin-top: 6px; box-shadow: none; }

  /* iOS Safari auto-zooms the page when a focused input's font-size is
     under 16px -- bump form fields up on small screens so tapping into
     a field doesn't yank the whole page in and out of zoom. */
  input[type=text], input[type=email], input[type=password], input[type=number],
  input[type=date], input[type=url], input[type=search], textarea, select {
    font-size: 16px;
  }
  .search-pill .seg input, .search-pill .seg select { font-size: 16px; }
}

/* Messages */
.convo { display: block; text-decoration: none; color: inherit; }
.convo:hover { border-color: var(--accent); }
.convo.unread { border-left: 4px solid var(--accent); }
.thread { display: flex; flex-direction: column; gap: 10px; }
.bubble-row { display: flex; }
.bubble-row.mine { justify-content: flex-end; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 16px; background: var(--bg-muted, #f3f4f6); border-bottom-left-radius: 4px; word-wrap: break-word; }
.bubble.mine { background: var(--accent); color: #fff; border-bottom-left-radius: 16px; border-bottom-right-radius: 4px; }
.bubble-meta { font-size: 0.72rem; opacity: 0.7; margin-top: 4px; }
.attach-card { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: #fff; color: #111; text-decoration: none; border: 1px solid rgba(0,0,0,0.1); }
.attach-card:hover { border-color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
