/* Bttr Nghts business portal — tokens from Better-Nights-iOS ColorExtensions (dark). */

:root {
  /* darkNavy / page */
  --bg: #141414;
  --deep-blue: #222222;
  --steel: #2a2a2a;
  /* lavenderGray / primary text */
  --ink: #eeeeee;
  /* lightGray / secondary */
  --muted: #d2d2d2;
  --input: #fafafa;
  --action-ink: #141414;
  /* surfaces */
  --card: #242424;
  --chip: #2e2e2e;
  --chip-selected: #3a3a3a;
  --stroke: #5e5e5e;
  --field-stroke: #7b7b7b;
  /* accents from app */
  --accent-pink: #d7a8da;
  --party-pink: #c89bd4;
  --safety-green: #32d74b;
  --safety-red: #ff453a;
  --status-pending: #f5d76e;
  --status-unverified: #f5a623;
  --pin-fill: #eeeeee;
  --radius: 15px;
  --radius-lg: 18px;
  --nav-h: 64px;
  --sidebar-w: 220px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --hairline: rgba(94, 94, 94, 0.45);
  /* SF Pro / system — match betternights.app marketing + iOS */
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font: var(--font-body);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { min-height: 100vh; }
a { color: var(--accent-pink); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
}
img { max-width: 100%; display: block; }

.shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 1rem 1.1rem 2rem;
}

/* —— Dashboard (Stripe-style full-bleed) —— */
.app-body {
  height: 100dvh;
  overflow: hidden;
}
.app-frame {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}
.app-workspace {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.app-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.15rem;
  border-bottom: 1px solid var(--hairline);
  flex-shrink: 0;
  background: var(--bg);
}
.app-top-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
}
.app-top-text {
  flex: 1;
  min-width: 0;
}
.app-top h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.venue-sub {
  margin: 0.15rem 0 0;
}
.app-main {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 1.15rem 1.15rem calc(var(--nav-h) + var(--safe-bottom) + 0.75rem);
}
.app-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 0;
  padding: 0.2rem 0.35rem calc(0.2rem + var(--safe-bottom));
  background: var(--deep-blue);
  border-top: 1px solid var(--hairline);
}
.app-nav .nav-brand {
  display: none;
}
.app-nav button {
  border: 0;
  background: transparent;
  color: rgba(238, 238, 238, 0.4);
  flex: 1;
  min-width: 0;
  max-width: 5.5rem;
  height: 52px;
  border-radius: 0;
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0.2rem 0.15rem;
  line-height: 1.1;
}
.app-nav button .ico {
  display: flex;
  line-height: 1;
}
.app-nav button .ico svg {
  display: block;
  width: 20px;
  height: 20px;
}
.app-nav button.active {
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 -2px 0 var(--ink);
}
.app-body .btn {
  border-radius: 6px;
}
.app-body .field input,
.app-body .field select,
.app-body .field textarea {
  border-radius: 6px;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.brand-logo {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 16px;
}
.brand-logo-nav {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.brand-lockup .brand {
  font-size: clamp(1.9rem, 5.5vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink);
}
.brand-lockup .brand span {
  color: var(--accent-pink);
}
.brand-lockup .tag {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  max-width: 28rem;
  line-height: 1.45;
}

.panel {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}

.shell-onboard {
  display: block;
  padding-bottom: 2.5rem;
}
.brand-lockup-wide {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.tabs-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
  background: var(--chip);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 0.28rem;
}
.tabs-auth button {
  border: 0;
  background: transparent;
  color: rgba(238, 238, 238, 0.45);
  padding: 0.7rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 650;
  font-size: 0.95rem;
}
.tabs-auth button.active {
  background: var(--chip-selected);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--stroke);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}
.field label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 650;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--field-stroke);
  background: var(--deep-blue);
  color: var(--input);
  border-radius: 12px;
  padding: 0.78rem 0.9rem;
  outline: none;
}
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(210, 210, 210, 0.45);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(238, 238, 238, 0.12);
}
.field textarea { min-height: 110px; resize: vertical; }
.hint {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 560px) {
  .row-2 { grid-template-columns: 1fr; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0.88rem 1rem;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: var(--ink);
  color: var(--action-ink);
}
.btn-ghost {
  background: var(--chip);
  color: var(--ink);
  border: 1px solid var(--stroke);
}
.btn-danger {
  background: rgba(255, 69, 58, 0.16);
  color: #ffb4af;
  border: 1px solid rgba(255, 69, 58, 0.4);
}
.btn-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.msg {
  margin: 0.75rem 0 0;
  padding: 0.55rem 0;
  border-radius: 0;
  font-size: 0.86rem;
  line-height: 1.4;
  display: none;
  border: 0;
  background: transparent;
}
.msg.show { display: block; }
.msg.error {
  background: transparent;
  border: 0;
  border-left: 2px solid rgba(255, 69, 58, 0.7);
  padding-left: 0.65rem;
  color: #ffb4af;
}
.msg.ok {
  background: transparent;
  border: 0;
  border-left: 2px solid rgba(50, 215, 75, 0.7);
  padding-left: 0.65rem;
  color: #b8f5c2;
}

.chip-status {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.5rem;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(94, 94, 94, 0.5);
  white-space: nowrap;
  flex-shrink: 0;
}
.chip-status.verified {
  background: transparent;
  color: var(--safety-green);
  border-color: rgba(50, 215, 75, 0.45);
}
.chip-status.pending {
  background: transparent;
  color: var(--status-pending);
  border-color: rgba(245, 215, 110, 0.45);
}
.chip-status.unverified {
  background: transparent;
  color: var(--status-unverified);
  border-color: rgba(245, 166, 35, 0.45);
}

.tab-panel { display: none; }
.tab-panel.active {
  display: block;
  animation: fadeIn 0.18s ease;
  max-width: 52rem;
}
.app-main:has(.tab-panel-map.active) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom));
}
@media (min-width: 900px) {
  .app-main:has(.tab-panel-map.active) {
    padding-bottom: 0;
  }
}
.tab-panel-map.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 0;
  max-width: none;
  animation: none;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.toolbar {
  margin-top: 1rem;
}
.section-block {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
}
.section-spaced {
  margin-top: 1.35rem;
}
.section-lead {
  margin-top: 0;
}
.btn-inline {
  width: auto;
  min-width: 0;
}
.btn-row-inline {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
}
.btn-row-inline .btn {
  width: auto;
  flex: 0 0 auto;
}

/* Desktop: full-height sidebar + content */
@media (min-width: 900px) {
  .app-frame {
    flex-direction: row;
  }
  .app-nav {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: var(--sidebar-w);
    flex-shrink: 0;
    height: 100dvh;
    padding: 1rem 0.65rem;
    gap: 0.15rem;
    border-top: 0;
    border-right: 1px solid var(--hairline);
    background: var(--deep-blue);
  }
  .app-nav .nav-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.55rem 1rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid var(--hairline);
  }
  .app-top-logo {
    display: none;
  }
  .app-nav button {
    width: 100%;
    max-width: none;
    height: auto;
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.65rem;
    padding: 0.55rem 0.7rem;
    font-size: 0.84rem;
    font-weight: 550;
    border-radius: 6px;
    color: rgba(238, 238, 238, 0.5);
  }
  .app-nav button .ico svg {
    width: 18px;
    height: 18px;
  }
  .app-nav button.active {
    color: var(--ink);
    background: rgba(238, 238, 238, 0.08);
    box-shadow: none;
  }
  .app-nav button:hover {
    color: var(--ink);
    background: rgba(238, 238, 238, 0.05);
  }
  .app-workspace {
    flex: 1;
  }
  .app-top {
    padding: 0.85rem 1.75rem;
  }
  .app-top h1 {
    font-size: 1.1rem;
    font-weight: 650;
  }
  .app-main {
    padding: 1.35rem 1.75rem 2rem;
  }
  .section-title {
    font-size: 0.95rem;
    font-weight: 650;
    margin-bottom: 0.75rem;
  }
  .stat-grid { gap: 0; }
  .stat-row {
    padding: 0.85rem 0;
  }
  .stat-row .label { font-size: 0.85rem; }
  .stat-row .value { font-size: 1.05rem; font-weight: 650; }
  .field { margin-bottom: 0.7rem; gap: 0.28rem; }
  .field label { font-size: 0.74rem; font-weight: 600; }
  .field input,
  .field select,
  .field textarea {
    border-radius: 6px;
    padding: 0.55rem 0.7rem;
    font-size: 0.9rem;
  }
  .btn {
    border-radius: 6px;
    padding: 0.55rem 0.85rem;
    font-size: 0.86rem;
    font-weight: 600;
  }
  .btn:not(.btn-inline) {
    width: auto;
  }
  .btn-row { gap: 0.45rem; }
  .chip-status {
    padding: 0.2rem 0.45rem;
    font-size: 0.58rem;
  }
}

/* Auth pages keep full-width primary buttons */
.auth-wrap .btn,
.shell-onboard .btn {
  width: 100%;
}

/* Auth / login — denser solid form on large screens */
.auth-wrap {
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 2rem 1.1rem 2.5rem;
}
@media (min-width: 768px) {
  .auth-wrap {
    width: min(440px, 100%);
    padding-top: 3.25rem;
  }
  .auth-wrap .brand-logo {
    width: 80px;
    height: 80px;
  }
  .auth-wrap .brand-lockup .tag {
    font-size: 0.9rem;
  }
}
@media (min-width: 900px) {
  .auth-wrap {
    width: min(460px, 100%);
    padding: 3.75rem 1.25rem 3rem;
  }
  .auth-wrap .panel {
    border-radius: 10px;
    padding: 1.15rem 1.2rem 1.25rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.38);
  }
  .auth-wrap .tabs-auth {
    border-radius: 8px;
    padding: 0.22rem;
    gap: 0.25rem;
  }
  .auth-wrap .tabs-auth button {
    border-radius: 6px;
    padding: 0.55rem 0.65rem;
    font-size: 0.88rem;
    font-weight: 600;
  }
  .auth-wrap .field { margin-bottom: 0.75rem; }
  .auth-wrap .field label { font-size: 0.74rem; }
  .auth-wrap .field input {
    border-radius: 8px;
    padding: 0.62rem 0.8rem;
    font-size: 0.92rem;
  }
  .auth-wrap .btn {
    border-radius: 8px;
    padding: 0.68rem 0.95rem;
    font-size: 0.9rem;
    font-weight: 650;
  }
}

.stat-grid {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--hairline);
  max-width: 36rem;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--hairline);
  background: transparent;
  border-radius: 0;
}
.stat-row .label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.stat-row .value {
  font-size: 1.15rem;
  font-weight: 650;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.live-block {
  padding: 0 0 1rem;
  border-left: 3px solid var(--safety-green);
  padding-left: 1rem;
  margin-bottom: 0.5rem;
}
.live-headline {
  margin-top: 0.35rem;
}
.live-body {
  margin: 0.75rem 0;
  line-height: 1.45;
}
.stats-box {
  margin-top: 0.75rem;
}
.live-badge {
  display: inline-block;
  background: transparent;
  color: var(--safety-green);
  border: 1px solid rgba(50, 215, 75, 0.45);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  margin-bottom: 0.35rem;
}

#map,
#map-pick,
#map-event {
  width: 100%;
  height: 100%;
  background: var(--steel);
}
.map-frame-pick #map-pick,
.map-frame-pick #map-event,
.map-frame-pick { height: 260px; }

.map-frame {
  position: relative;
  width: 100%;
  height: min(58vh, 480px);
  border-radius: 0;
  border: 1px solid var(--hairline);
  overflow: hidden;
  background: var(--steel);
  isolation: isolate;
}
.map-frame-pick {
  height: 260px;
  margin: 0.55rem 0 0.35rem;
  border-radius: 0;
}
.map-frame-fill {
  flex: 1;
  min-height: 240px;
  height: auto;
  border: 0;
  border-top: 1px solid var(--hairline);
}
.map-toolbar {
  flex-shrink: 0;
  padding: 0.28rem 0.75rem;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
}
.map-toolbar-title {
  display: none;
}
.map-toolbar-compact .map-toolbar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 0;
}
.map-toolbar-compact .map-locate-btn {
  margin-left: auto;
  padding: 0.22rem 0.6rem;
  min-height: 0;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.map-live-stats {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
}
.map-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.18rem 0.48rem 0.18rem 0.32rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(46, 46, 46, 0.85);
  line-height: 1;
}
.map-stat-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85);
}
.map-stat-swatch-party {
  background: var(--party-pink);
}
.map-stat-swatch-hazard {
  background: var(--safety-red);
}
.map-stat-label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--muted);
}
.map-stat-value {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  min-width: 0.7rem;
  line-height: 1;
}
.map-stat-parties .map-stat-value {
  color: #e8c8ef;
}
.map-stat-hazards .map-stat-value {
  color: #ffb4af;
}
.map-live-stats .live-feed-status {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin: 0;
  margin-left: 0.15rem;
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted);
  white-space: nowrap;
}
.live-feed-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8a8a8a;
  flex-shrink: 0;
}
.map-live-stats .live-feed-status.is-live {
  color: var(--safety-green);
}
.map-live-stats .live-feed-status.is-live .live-feed-dot {
  background: var(--safety-green);
  box-shadow: 0 0 0 2px rgba(50, 215, 75, 0.22);
}
.map-live-stats .live-feed-status.is-live .live-feed-label {
  display: none;
}
@media (min-width: 480px) {
  .map-live-stats .live-feed-status.is-live .live-feed-label {
    display: inline;
  }
}
.map-msg-compact {
  margin: 0.2rem 0 0;
  min-height: 0;
  padding: 0.2rem 0;
  font-size: 0.78rem;
}
.map-msg-compact:empty,
.map-msg-compact:not(.show) {
  display: none;
}
.map-overview-msg {
  display: none;
}
.map-overview-msg.show {
  display: block;
  margin: 0.2rem 0 0;
  padding: 0.2rem 0;
  font-size: 0.78rem;
}
@media (max-width: 560px) {
  .map-toolbar-compact .map-toolbar-row {
    flex-wrap: nowrap;
    gap: 0.35rem;
  }
  .map-live-stats {
    flex: 1 1 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .map-live-stats::-webkit-scrollbar {
    display: none;
  }
  .map-toolbar-compact .map-locate-btn {
    margin-left: 0;
    flex-shrink: 0;
  }
  .map-stat-label {
    font-size: 0.64rem;
  }
}
@media (min-width: 900px) {
  .map-toolbar {
    padding: 0.32rem 1rem;
  }
}
/* Map tab: keep chrome above the map tight */
.app-frame:has(.tab-panel-map.active) .app-top {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}
.app-frame:has(.tab-panel-map.active) .venue-sub {
  display: none;
}
/* Never show MapLibre “use ⌘ + scroll” overlay */
.map-frame .maplibregl-cooperative-gesture-screen {
  display: none !important;
  pointer-events: none !important;
}
.map-frame #map,
.map-frame #map-pick,
.map-frame #map-event {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  z-index: 0;
}
/* Matches iOS BusinessMapToneOverlay — visual only, no hit testing */
.map-tone {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%),
    rgba(0, 0, 0, 0.28);
}
.map-frame .maplibregl-ctrl-top-right,
.map-frame .maplibregl-ctrl-bottom-right,
.map-frame .maplibregl-ctrl-bottom-left,
.map-frame .maplibregl-ctrl-top-left {
  z-index: 3;
}
.map-frame .maplibregl-ctrl-attrib {
  z-index: 3;
  background: rgba(20, 20, 20, 0.72) !important;
  color: var(--muted) !important;
  font-size: 10px;
}
.map-frame .maplibregl-ctrl-attrib a {
  color: var(--accent-pink) !important;
}
.map-frame .maplibregl-ctrl-group {
  background: var(--card) !important;
  border: 1px solid var(--stroke) !important;
  box-shadow: none !important;
}
.map-frame .maplibregl-ctrl-group button {
  background: transparent !important;
  border-color: var(--stroke) !important;
}
.map-frame .maplibregl-ctrl-group button + button {
  border-top-color: var(--stroke) !important;
}
.map-actions {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0;
  margin-bottom: 0.55rem;
}
.map-actions .btn {
  width: auto;
  flex: 0 0 auto;
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  line-height: 1.35;
  margin: 0.35rem 0 0;
}
.map-legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  margin-right: 0.28rem;
  vertical-align: middle;
}
.map-legend-business { background: #34c759; }
.map-legend-party { background: #c89bd4; }
.map-legend-user { background: #007aff; }

/* iOS-style MapLibre pins */
.bn-map-pin {
  position: relative;
  width: 22px;
  height: 22px;
  pointer-events: auto;
}
.bn-map-pin-halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--bn-pin, #34c759);
  opacity: 0.28;
  transform: scale(1.55);
}
.bn-map-pin-user .bn-map-pin-halo {
  opacity: 0.35;
  transform: scale(1.85);
}
.bn-map-pin-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--bn-pin, #34c759);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.bn-map-pin-user .bn-map-pin-core {
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  max-width: 240px;
  margin: 0.85rem 0 0;
}
.pin-pad button {
  aspect-ratio: 1.4;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 650;
  cursor: pointer;
}
.pin-pad button:hover {
  background: rgba(238, 238, 238, 0.06);
}
.pin-dots {
  display: flex;
  justify-content: flex-start;
  gap: 0.65rem;
  margin: 0.65rem 0 0.85rem;
}
.pin-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  background: transparent;
}
.pin-dots span.filled {
  background: var(--pin-fill);
  border-color: var(--pin-fill);
}

.list-actions {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--hairline);
  max-width: 36rem;
}
.list-actions button,
.list-actions a {
  text-align: left;
  padding: 0.85rem 0;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 550;
  text-decoration: none;
  font-size: 0.92rem;
  width: 100%;
}
.list-actions button:hover,
.list-actions a:hover {
  background: transparent;
  color: var(--accent-pink);
  text-decoration: none;
}

.hidden { display: none !important; }

.section-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.75rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.check-row input { margin-top: 0.2rem; accent-color: var(--accent-pink); }

.auth-wrap .panel {
  animation: fadeIn 0.28s ease;
}

.banner-file {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(245, 166, 35, 0.14);
  border: 1px solid rgba(245, 166, 35, 0.45);
  color: #ffe0a8;
  font-size: 0.88rem;
  line-height: 1.45;
}
.banner-file code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.8em;
}

/* Schedule ahead + calendar */
.schedule-box {
  margin-top: 1rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
}
.schedule-box-title {
  margin-top: 0;
}
.schedule-box-hint {
  margin-top: 0;
}
.schedule-preview {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.55rem;
  max-height: 11rem;
  overflow: auto;
  border-top: 1px solid var(--hairline);
}
.schedule-preview .sched-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.82rem;
  color: var(--muted);
}
.schedule-preview .sched-row strong {
  color: var(--ink);
  font-weight: 650;
}
#schedule-price-hint {
  margin: 0.35rem 0 0;
  color: var(--accent-pink);
  font-weight: 650;
}

.live-feed-status {
  margin-top: 0.65rem;
}
.live-feed-status.is-live {
  color: var(--safety-green);
}

.sched-pill-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.65rem 0.15rem 0.25rem;
  border-top: 1px solid var(--hairline);
}
.sched-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: transparent;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}
.sched-pill-more {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--muted);
}

.custom-dates-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.45rem 0 0.55rem;
}
.custom-date-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.custom-date-row input[type="date"] {
  flex: 1;
  min-width: 0;
}

.scheduled-collapse {
  margin-top: 1.25rem;
  border-top: 1px solid var(--hairline);
  padding-top: 0.35rem;
}
.scheduled-collapse.hidden {
  display: none;
}
.scheduled-collapse-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-align: left;
}
.scheduled-collapse-label {
  flex: 0 0 auto;
}
.scheduled-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  font-size: 0.7rem;
  font-weight: 700;
}
.scheduled-chevron {
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.18s ease;
}
.scheduled-collapse-bar.is-open .scheduled-chevron {
  transform: rotate(180deg);
}
.scheduled-collapse-body.hidden {
  display: none;
}

.cal-cell {
  aspect-ratio: 1;
  border-radius: 0;
  border: 0;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 550;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0.2rem;
  cursor: default;
}
.cal-cell .cal-day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  min-height: 1.85rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1;
}
.cal-cell.today .cal-day-num {
  border-color: rgba(255, 255, 255, 0.85);
}
.cal-cell.mark-live .cal-day-num {
  border-color: var(--safety-green);
  color: var(--ink);
}
.cal-cell.mark-scheduled .cal-day-num {
  border-color: var(--accent-pink);
  color: var(--ink);
}
.cal-cell.mark-done .cal-day-num {
  border-color: #8e8e93;
}
.cal-cell.today {
  box-shadow: none;
}
.cal-nav {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 0.5rem;
  margin: 0.85rem 0 0.65rem;
  max-width: 28rem;
}
.cal-nav-btn {
  width: 100%;
  min-height: 40px;
  padding: 0.35rem;
  font-size: 1.25rem;
  line-height: 1;
}
.cal-month-label {
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  max-width: 28rem;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.cal-dow {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.4rem 0;
  background: var(--bg);
}
.cal-cell.in-month {
  background: var(--bg);
  color: var(--ink);
}
.cal-cell.has-events {
  cursor: pointer;
}
.cal-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--stroke);
}
.cal-dot.live { background: var(--safety-green); }
.cal-dot.scheduled { background: var(--accent-pink); }
.cal-dot.done { background: #8e8e93; }
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.65rem;
}
.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--hairline);
  max-width: 36rem;
}
.schedule-item {
  padding: 0.9rem 0;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  background: transparent;
}
.schedule-item .si-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}
.schedule-item .si-title {
  font-weight: 650;
  font-size: 0.92rem;
}
.schedule-item .si-status {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-pink);
}
.schedule-item .si-status.live { color: var(--safety-green); }
.schedule-item .si-status.completed,
.schedule-item .si-status.cancelled { color: #8e8e93; }
.schedule-item .si-meta {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}
.schedule-item .si-actions {
  margin-top: 0.55rem;
}
