/* ══════════════════════════════════════════════
   Social Mapia — Master Style Sheet
   ══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Anybody:wght@700;900&family=Nunito:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Brand */
  --red:        #D42B2B;
  --red-dark:   #A81F1F;
  --red-light:  #F5E0E0;
  --cream:      #FAF0EC;
  --cream-dark: #F2E4DC;
  --black:      #1A1A1A;
  --white:      #FFFFFF;

  /* UI */
  --surface:    #FFFFFF;
  --surface2:   #FDF5F0;
  --surface3:   #F7EBE4;
  --border:     rgba(212,43,43,.12);
  --border2:    rgba(212,43,43,.22);
  --muted:      #8A6A6A;
  --muted2:     #C4A89E;

  /* Dark UI (admin/dashboard) */
  --d-bg:       #0F0A0A;
  --d-s1:       #1A0F0F;
  --d-s2:       #221414;
  --d-s3:       #2E1A1A;
  --d-s4:       #3A2020;
  --d-s5:       #4A2828;
  --d-bd:       rgba(212,43,43,.15);
  --d-bd2:      rgba(212,43,43,.25);
  --d-txt:      #F5EAEA;
  --d-muted:    #9A7070;
  --d-muted2:   #5A3535;

  /* Typography */
  --font-display: 'Anybody', 'Impact', sans-serif;
  --font-body:    'Nunito', system-ui, sans-serif;

  /* Spacing / Radius */
  --r:    10px;
  --r2:   14px;
  --r3:   20px;
  --r4:   28px;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--black); background: var(--cream); }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); }
img { max-width: 100%; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--red-light); border-radius: 4px; }

/* ══════════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════════ */
.font-display { font-family: var(--font-display); }
h1,h2,h3,h4 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.5px; }

/* ══════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--r); border: none;
  font-family: var(--font-body); font-size: 13px; font-weight: 700;
  transition: all .2s; white-space: nowrap; line-height: 1;
}
.btn-primary   { background: var(--red);   color: var(--white); }
.btn-primary:hover  { background: var(--red-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(212,43,43,.35); }
.btn-secondary { background: var(--red-light); color: var(--red); }
.btn-secondary:hover { background: var(--red); color: var(--white); }
.btn-outline   { background: transparent; color: var(--red); border: 2px solid var(--red); }
.btn-outline:hover   { background: var(--red); color: var(--white); }
.btn-ghost     { background: var(--surface3); color: var(--black); border: 1px solid var(--border2); }
.btn-ghost:hover     { background: var(--red-light); color: var(--red); }
.btn-danger    { background: rgba(212,43,43,.1); color: var(--red); }
.btn-danger:hover    { background: var(--red); color: var(--white); }
.btn-sm  { padding: 6px 13px; font-size: 11px; border-radius: 8px; }
.btn-lg  { padding: 14px 28px; font-size: 15px; border-radius: var(--r2); }
.btn-xl  { padding: 16px 36px; font-size: 17px; border-radius: var(--r3); }
.btn-full { width: 100%; justify-content: center; }

/* Dark theme buttons */
.btn-d-primary  { background: var(--red); color: #fff; }
.btn-d-primary:hover { background: var(--red-dark); }
.btn-d-ghost    { background: var(--d-s4); color: var(--d-txt); border: 1px solid var(--d-bd2); }
.btn-d-ghost:hover   { background: var(--d-s5); }
.btn-d-danger   { background: rgba(212,43,43,.15); color: #ff7070; }
.btn-d-danger:hover  { background: var(--red); color: #fff; }
.btn-d-success  { background: rgba(0,200,120,.12); color: #00c878; }
.btn-d-success:hover { background: #00c878; color: #000; }
.btn-d-warn     { background: rgba(255,183,49,.12); color: #ffb731; }
.btn-d-warn:hover    { background: #ffb731; color: #000; }
.btn-d-info     { background: rgba(79,163,255,.12); color: #4fa3ff; }
.btn-d-info:hover    { background: #4fa3ff; color: #fff; }

/* ══════════════════════════════════════════════
   FORM ELEMENTS
   ══════════════════════════════════════════════ */
.field { margin-bottom: 16px; }
.field label {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .7px; margin-bottom: 6px;
}
.field label .req { color: var(--red); }
.input-wrap { position: relative; }
.input-wrap .input-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 13px; pointer-events: none;
}
.input-wrap .input-icon-right {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 13px; cursor: pointer; background: none; border: none;
  transition: color .2s; padding: 2px;
}
.input-wrap .input-icon-right:hover { color: var(--red); }
.finput {
  width: 100%; background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--r); padding: 11px 12px 11px 36px;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  color: var(--black); outline: none; transition: all .2s;
}
.finput.no-icon { padding-left: 12px; }
.finput:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(212,43,43,.1); }
.finput::placeholder { color: var(--muted2); }
textarea.finput { resize: none; height: 80px; padding-top: 11px; line-height: 1.5; }
select.finput { cursor: pointer; }
select.finput option { background: var(--surface); }

/* Dark theme inputs */
.d-field label { color: var(--d-muted); }
.d-finput {
  width: 100%; background: var(--d-s3); border: 1px solid var(--d-bd2);
  border-radius: var(--r); padding: 9px 12px 9px 34px;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  color: var(--d-txt); outline: none; transition: all .2s;
}
.d-finput.no-icon { padding-left: 12px; }
.d-finput:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(212,43,43,.15); }
.d-finput::placeholder { color: var(--d-muted2); }
textarea.d-finput { resize: none; height: 70px; padding-top: 9px; line-height: 1.5; }
select.d-finput { cursor: pointer; }
select.d-finput option { background: var(--d-s3); }

/* ══════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700;
}
.badge-active   { background: rgba(0,200,120,.12); color: #00a860; }
.badge-inactive { background: rgba(212,43,43,.1);  color: var(--red); }
.badge-pending  { background: rgba(255,183,49,.12); color: #c8820a; }
.badge-approved { background: rgba(0,200,120,.12); color: #00a860; }
.badge-rejected { background: rgba(212,43,43,.1);  color: var(--red); }
.badge-converted{ background: rgba(79,163,255,.12);color: #2a7fcf; }
.badge-verified { background: rgba(79,163,255,.12);color: #2a7fcf; }
.badge-red      { background: var(--red);           color: #fff; }

/* ══════════════════════════════════════════════
   ALERT / NOTIFICATION BOXES
   ══════════════════════════════════════════════ */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: var(--r); font-size: 13px; font-weight: 600;
  margin-bottom: 18px; line-height: 1.5;
}
.alert-error   { background: rgba(212,43,43,.08); border: 1px solid rgba(212,43,43,.2); color: var(--red); }
.alert-success { background: rgba(0,200,120,.08); border: 1px solid rgba(0,200,120,.2); color: #007a45; }
.alert-warn    { background: rgba(255,183,49,.08); border: 1px solid rgba(255,183,49,.2); color: #8a5e00; }
.alert-info    { background: rgba(79,163,255,.08); border: 1px solid rgba(79,163,255,.2); color: #1a5fa0; }

/* ══════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════ */
.card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--r3); overflow: hidden;
}
.card-head {
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.card-title { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.card-title i { color: var(--red); }
.card-body { padding: 20px 22px; }

/* Dark cards */
.d-card { background: var(--d-s1); border: 1px solid var(--d-bd2); border-radius: var(--r3); overflow: hidden; }
.d-card-head { padding: 14px 20px; border-bottom: 1px solid var(--d-bd); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.d-card-title { font-size: 13px; font-weight: 800; color: var(--d-txt); display: flex; align-items: center; gap: 7px; }
.d-card-title i { color: var(--red); }
.d-card-body { padding: 18px 20px; }

/* ══════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════ */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  font-size: 10px; font-weight: 700; color: var(--d-muted);
  text-transform: uppercase; letter-spacing: .6px;
  padding: 0 12px 12px; text-align: left; white-space: nowrap;
}
.tbl td { padding: 11px 12px; border-top: 1px solid var(--d-bd); vertical-align: middle; color: var(--d-txt); }
.tbl tr:hover td { background: rgba(212,43,43,.04); }
.tbl-pl { padding-left: 20px !important; }
.tbl-pr { padding-right: 20px !important; }

/* ══════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px); z-index: 2000;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--d-s2); border: 1px solid var(--d-bd2); border-radius: var(--r4);
  width: 480px; max-width: 100%; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: 0 28px 70px rgba(0,0,0,.7);
}
.modal-head {
  padding: 16px 22px; border-bottom: 1px solid var(--d-bd);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 15px; font-weight: 800; color: var(--d-txt); display: flex; align-items: center; gap: 8px; }
.modal-title i { color: var(--red); }
.modal-close {
  background: var(--d-s4); border: none; color: var(--d-muted);
  width: 28px; height: 28px; border-radius: 7px; font-size: 14px;
  display: flex; align-items: center; justify-content: center; transition: all .2s;
}
.modal-close:hover { background: rgba(212,43,43,.2); color: #ff7070; }
.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.modal-body::-webkit-scrollbar { width: 3px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--d-bd); display: flex; gap: 8px; justify-content: flex-end; }

/* ══════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════ */
#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--d-s3); border: 1px solid var(--d-bd2);
  border-radius: 30px; padding: 10px 22px; font-size: 13px; font-weight: 700;
  color: var(--d-txt); z-index: 9999; display: none; gap: 8px; align-items: center;
  white-space: nowrap; box-shadow: 0 8px 28px rgba(0,0,0,.4); backdrop-filter: blur(8px);
}
#toast.show { display: flex; }
#toast.toast-success { border-color: rgba(0,200,120,.4); color: #00c878; }
#toast.toast-error   { border-color: rgba(212,43,43,.4);  color: #ff7070; }

/* ══════════════════════════════════════════════
   DASHBOARD LAYOUT (dark)
   ══════════════════════════════════════════════ */
.dash-layout { display: flex; min-height: 100vh; background: var(--d-bg); color: var(--d-txt); font-family: var(--font-body); }

/* Sidebar */
.dash-sidebar {
  width: 230px; min-width: 230px; background: var(--d-s1);
  border-right: 1px solid var(--d-bd); display: flex; flex-direction: column;
  height: 100vh; position: sticky; top: 0; overflow-y: auto;
}
.dash-sidebar::-webkit-scrollbar { width: 0; }
.sb-logo { padding: 20px 18px 16px; border-bottom: 1px solid var(--d-bd); }
.sb-logo-text { font-family: var(--font-display); font-size: 22px; color: var(--d-txt); letter-spacing: -0.5px; }
.sb-logo-text span { color: var(--red); }
.sb-logo-sub { font-size: 10px; color: var(--d-muted); margin-top: 3px; display: flex; align-items: center; gap: 5px; }
.sb-nav { flex: 1; padding: 10px 10px; }
.sb-section { font-size: 9px; font-weight: 700; color: var(--d-muted2); text-transform: uppercase; letter-spacing: .9px; padding: 12px 10px 5px; }
.sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r); color: var(--d-muted);
  font-size: 13px; font-weight: 600; transition: all .2s; margin-bottom: 2px;
  border: none; background: none; width: 100%; text-align: left; font-family: var(--font-body);
}
.sb-item:hover  { background: var(--d-s3); color: var(--d-txt); }
.sb-item.active { background: var(--d-s4); color: var(--d-txt); }
.sb-item.active i { color: var(--red); }
.sb-item i { width: 16px; text-align: center; font-size: 13px; flex-shrink: 0; }
.sb-badge { margin-left: auto; background: var(--red); color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 10px; font-weight: 700; }
.sb-bottom { padding: 12px 10px; border-top: 1px solid var(--d-bd); }
.sb-user { display: flex; align-items: center; gap: 9px; padding: 9px 10px; background: var(--d-s3); border-radius: var(--r); margin-bottom: 8px; }
.sb-user-ava { width: 32px; height: 32px; border-radius: 50%; background: var(--red); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 12px; color: #fff; flex-shrink: 0; }
.sb-user-name { font-size: 12px; font-weight: 700; color: var(--d-txt); }
.sb-user-role { font-size: 10px; color: var(--d-muted); }

/* Main content area */
.dash-main { flex: 1; overflow-y: auto; }
.dash-topbar {
  height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; background: var(--d-s1); border-bottom: 1px solid var(--d-bd);
  position: sticky; top: 0; z-index: 100; gap: 12px;
}
.dash-topbar-title { font-size: 16px; font-weight: 800; color: var(--d-txt); display: flex; align-items: center; gap: 8px; }
.dash-topbar-title i { color: var(--red); font-size: 14px; }
.dash-topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.dash-content { padding: 24px; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat-card { background: var(--d-s1); border: 1px solid var(--d-bd2); border-radius: var(--r2); padding: 16px 18px; }
.stat-label { font-size: 10px; font-weight: 700; color: var(--d-muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.stat-num { font-size: 28px; font-weight: 900; font-family: var(--font-display); line-height: 1; }
.stat-sub { font-size: 11px; color: var(--d-muted); margin-top: 4px; }
.stat-trend { font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; }
.stat-trend.up   { color: #00c878; }
.stat-trend.down { color: var(--red); }

/* ══════════════════════════════════════════════
   PUBLIC MAP PAGE
   ══════════════════════════════════════════════ */
.pub-layout { display: flex; height: 100vh; overflow: hidden; background: var(--cream); font-family: var(--font-body); }

.pub-sidebar {
  width: 340px; min-width: 300px; background: var(--surface); display: flex;
  flex-direction: column; overflow: hidden; border-right: 2px solid var(--border2);
}
.pub-sidebar::-webkit-scrollbar { width: 0; }

.pub-profile-head { padding: 18px 18px 14px; background: var(--cream); border-bottom: 2px solid var(--border2); }
.pub-avatar {
  width: 54px; height: 54px; border-radius: 50%; background: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 20px; color: #fff; flex-shrink: 0;
  border: 3px solid var(--cream-dark);
}
.pub-creator-name { font-family: var(--font-display); font-size: 18px; color: var(--black); }
.pub-creator-tag  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pub-stats-row { display: flex; gap: 8px; margin: 12px 0 0; }
.pub-stat { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r); padding: 7px 10px; text-align: center; flex: 1; }
.pub-stat-num { font-family: var(--font-display); font-size: 17px; color: var(--red); font-weight: 700; }
.pub-stat-lbl { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 1px; }

.pub-links-section { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.pub-links-title { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .7px; margin-bottom: 8px; }
.pub-link-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: var(--r); border: 1px solid var(--border); background: var(--surface2);
  transition: all .2s; margin-bottom: 5px; cursor: pointer;
}
.pub-link-item:hover { border-color: var(--red); background: var(--red-light); transform: translateX(2px); }
.pub-link-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.pub-link-label { font-size: 13px; font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-link-url { font-size: 10px; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-link-arrow { color: var(--muted); font-size: 11px; flex-shrink: 0; }

.pub-filter-bar { padding: 10px 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.pub-search-box { display: flex; align-items: center; gap: 8px; background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--r); padding: 8px 12px; }
.pub-search-box input { background: none; border: none; outline: none; font-family: var(--font-body); font-size: 13px; flex: 1; color: var(--black); font-weight: 500; }
.pub-search-box input::placeholder { color: var(--muted2); }
.chips-row { display: flex; gap: 5px; overflow-x: auto; }
.chips-row::-webkit-scrollbar { height: 0; }
.chip {
  white-space: nowrap; padding: 5px 13px; border-radius: 20px;
  font-size: 11px; font-weight: 700; cursor: pointer;
  border: 1.5px solid var(--border2); background: transparent;
  color: var(--muted); transition: all .2s; font-family: var(--font-body);
}
.chip.active { background: var(--red); color: #fff; border-color: var(--red); }
.chip.food.active    { background: #ff8c00; border-color: #ff8c00; }
.chip.tourist.active { background: #0a84ff; border-color: #0a84ff; }
.chip.event.active   { background: var(--red); border-color: var(--red); }
.chip.hidden.active  { background: #7c3aed; border-color: #7c3aed; }

.pub-sort-row { display: flex; gap: 5px; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.sort-btn { padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; border: 1px solid var(--border); background: none; color: var(--muted); font-family: var(--font-body); cursor: pointer; transition: all .2s; }
.sort-btn.active { background: var(--surface3); color: var(--black); border-color: var(--border2); }

.pub-nearby-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted); transition: all .2s; font-family: var(--font-body); }
.pub-nearby-row:hover, .pub-nearby-row.active { border-color: var(--red); color: var(--red); background: var(--red-light); }
.pub-radius-row { display: none; align-items: center; gap: 8px; padding: 4px 2px 0; }
.pub-radius-row.show { display: flex; }
.pub-radius-row label { font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.pub-radius-row input[type=range] { flex: 1; accent-color: var(--red); }
.pub-radius-row span { font-size: 11px; color: var(--red); font-weight: 700; min-width: 38px; text-align: right; }

.pub-pins-list { flex: 1; overflow-y: auto; padding: 12px; }

/* Public pin card */
.pub-pin-card {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--r2); overflow: hidden; margin-bottom: 10px;
  cursor: pointer; transition: all .2s;
}
.pub-pin-card:hover, .pub-pin-card.highlighted { border-color: var(--red); box-shadow: 0 4px 16px rgba(212,43,43,.15); }
.pub-pin-thumb { height: 90px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pub-pin-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pub-pin-thumb .pin-icon { position: relative; z-index: 1; font-size: 36px; }
.pub-pin-cat-badge { position: absolute; top: 7px; left: 7px; z-index: 2; padding: 2px 9px; border-radius: 6px; font-size: 10px; font-weight: 700; }
.pub-pin-reel-badge { position: absolute; top: 7px; right: 7px; z-index: 2; background: rgba(0,0,0,.65); border-radius: 6px; padding: 2px 8px; font-size: 10px; color: #fff; display: flex; align-items: center; gap: 3px; }
.pub-pin-body { padding: 10px 12px 10px; }
.pub-pin-name { font-weight: 800; font-size: 13px; margin-bottom: 2px; }
.pub-pin-toprow { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.dist-badge { font-size: 10px; color: var(--red); background: var(--red-light); padding: 2px 8px; border-radius: 10px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.pub-pin-desc { font-size: 11px; color: var(--muted); line-height: 1.45; margin: 4px 0 8px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pub-pin-actions { display: flex; gap: 5px; }
.pin-action-btn {
  padding: 5px 11px; border-radius: 8px; font-size: 11px; font-weight: 700;
  border: none; font-family: var(--font-body); cursor: pointer; transition: all .2s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.pin-btn-dir  { background: var(--red-light); color: var(--red); }
.pin-btn-dir:hover  { background: var(--red); color: #fff; }
.pin-btn-reel { background: rgba(212,43,43,.1); color: var(--red); }
.pin-btn-reel:hover { background: var(--red); color: #fff; }

/* Public map */
.pub-map-wrap { flex: 1; position: relative; overflow: hidden; }
.pub-map-el { width: 100%; height: 100%; }
.pub-map-ctrl {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 700; display: flex; gap: 5px;
  background: rgba(255,245,240,.92); backdrop-filter: blur(10px);
  padding: 4px; border-radius: 30px; border: 1px solid var(--border2);
  box-shadow: 0 2px 12px rgba(212,43,43,.15);
}
.pub-map-btn { padding: 6px 14px; border-radius: 20px; font-size: 11px; font-weight: 700; cursor: pointer; border: none; background: none; color: var(--muted); font-family: var(--font-body); transition: all .2s; }
.pub-map-btn.active { background: var(--red); color: #fff; }

/* Leaflet popup skin */
.sm-popup .leaflet-popup-content-wrapper { background: var(--surface); border: 2px solid var(--border2); border-radius: var(--r2); box-shadow: 0 8px 32px rgba(212,43,43,.2); color: var(--black); padding: 0; overflow: hidden; min-width: 220px; }
.sm-popup .leaflet-popup-tip-container { display: none; }
.sm-popup .leaflet-popup-content { margin: 0 !important; width: auto !important; }
.pop-img { height: 72px; display: flex; align-items: center; justify-content: center; font-size: 30px; position: relative; overflow: hidden; }
.pop-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pop-img .pop-icon { position: relative; z-index: 1; }
.pop-body { padding: 11px 14px; }
.pop-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.pop-name { font-weight: 800; font-size: 14px; margin-bottom: 3px; }
.pop-desc { font-size: 11px; color: var(--muted); line-height: 1.4; margin-bottom: 9px; }
.pop-acts { display: flex; gap: 5px; }

/* Creator map toolbar */
.cmap-search-bar {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 700; width: 300px;
  background: rgba(255,245,240,.95); backdrop-filter: blur(12px);
  border: 2px solid var(--border2); border-radius: 30px; padding: 9px 16px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(212,43,43,.2);
}
.cmap-search-bar input { background: none; border: none; outline: none; font-family: var(--font-body); font-size: 13px; flex: 1; color: var(--black); font-weight: 500; }
.cmap-search-bar input::placeholder { color: var(--muted2); }
.cmap-drop-msg {
  position: absolute; top: 12px; right: 14px; z-index: 700;
  background: var(--red); color: #fff; border-radius: 30px;
  padding: 8px 18px; font-size: 12px; font-weight: 700;
  display: none; align-items: center; gap: 7px;
}
.cmap-drop-msg.show { display: flex; animation: glow-red 1.5s infinite; }
@keyframes glow-red { 0%,100%{box-shadow:0 0 0 0 rgba(212,43,43,.5)}50%{box-shadow:0 0 0 10px rgba(212,43,43,0)} }
.cmap-fabs { position: absolute; bottom: 18px; right: 16px; z-index: 700; display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }
.cmap-fab {
  padding: 11px 18px; border-radius: 30px; font-weight: 800; font-size: 13px;
  cursor: pointer; border: none; display: flex; align-items: center; gap: 7px;
  transition: all .2s; font-family: var(--font-body); white-space: nowrap;
}
.cmap-fab-main { background: var(--red); color: #fff; box-shadow: 0 4px 20px rgba(212,43,43,.4); }
.cmap-fab-main:hover { transform: scale(1.04); box-shadow: 0 6px 28px rgba(212,43,43,.55); }
.cmap-fab-pick { background: rgba(255,245,240,.92); backdrop-filter: blur(8px); border: 2px solid var(--border2); color: var(--black); font-size: 12px; padding: 9px 14px; }
.cmap-fab-pick:hover { background: var(--red-light); }

/* Creator sidebar pin card */
.cpin-card {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--r2); overflow: hidden; margin-bottom: 9px;
  transition: all .2s; cursor: pointer;
}
.cpin-card:hover { border-color: var(--red); box-shadow: 0 3px 14px rgba(212,43,43,.15); }
.cpin-card.inactive { opacity: .45; }
.cpin-thumb { height: 80px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cpin-thumb img.pin-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.cpin-thumb .pin-icon { position: relative; z-index: 2; font-size: 32px; }
.cpin-body { padding: 9px 11px 8px; }
.cpin-name { font-weight: 800; font-size: 12px; margin-bottom: 2px; }
.cpin-desc { font-size: 11px; color: var(--muted); line-height: 1.4; margin-bottom: 8px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cpin-acts { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }

/* Toggle switch */
.sw-wrap { display: flex; align-items: center; gap: 5px; cursor: pointer; margin-left: auto; flex-shrink: 0; }
.sw { width: 32px; height: 18px; border-radius: 9px; background: var(--cream-dark); border: 2px solid var(--border2); position: relative; transition: all .2s; flex-shrink: 0; }
.sw.on { background: var(--red); border-color: var(--red); }
.sw-knob { width: 10px; height: 10px; border-radius: 50%; background: #fff; position: absolute; top: 2px; left: 2px; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.sw.on .sw-knob { left: 16px; }
.sw-lbl { font-size: 10px; color: var(--muted); font-weight: 700; }

/* ══════════════════════════════════════════════
   ANALYTICS CHARTS
   ══════════════════════════════════════════════ */
.chart-wrap { position: relative; height: 260px; }
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.analytics-num { font-family: var(--font-display); font-size: 32px; color: var(--red); }

/* ══════════════════════════════════════════════
   LANDING PAGE
   ══════════════════════════════════════════════ */
.landing-body { background: var(--cream); font-family: var(--font-body); min-height: 100vh; overflow-x: hidden; }

.landing-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  padding: 14px 32px; display: flex; align-items: center; justify-content: space-between;
  background: rgba(250,240,236,.92); backdrop-filter: blur(14px);
  border-bottom: 2px solid var(--border);
}
.landing-logo { display: flex; align-items: center; gap: 10px; }
.landing-logo img { height: 36px; }
.landing-nav-right { display: flex; align-items: center; gap: 10px; }

.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 100px 20px 60px; position: relative;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(212,43,43,.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: 760px; position: relative; z-index: 1; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red-light); border: 1.5px solid var(--border2);
  border-radius: 30px; padding: 6px 16px; font-size: 12px; font-weight: 700; color: var(--red);
  margin-bottom: 28px;
}
.hero-pill .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{box-shadow:0 0 0 0 rgba(212,43,43,.5)}50%{box-shadow:0 0 0 8px rgba(212,43,43,0)} }
.hero h1 { font-size: clamp(44px,8vw,88px); color: var(--black); margin-bottom: 22px; }
.hero h1 .red { color: var(--red); }
.hero-sub { font-size: clamp(16px,2.5vw,20px); color: var(--muted); line-height: 1.6; max-width: 540px; margin: 0 auto 40px; }
.hero-cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat-num { font-family: var(--font-display); font-size: 30px; color: var(--red); }
.hero-stat-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

/* Features section */
.section { padding: 80px 20px; max-width: 1100px; margin: 0 auto; }
.section-tag { font-size: 11px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 1.5px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.section-tag::before { content: ''; width: 24px; height: 2px; background: var(--red); }
.section h2 { font-size: clamp(28px,4vw,44px); color: var(--black); margin-bottom: 12px; }
.section-sub { font-size: 15px; color: var(--muted); max-width: 480px; line-height: 1.6; margin-bottom: 48px; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.feat-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--r3); padding: 26px; transition: all .3s; }
.feat-card:hover { border-color: var(--red); transform: translateY(-3px); box-shadow: 0 8px 28px rgba(212,43,43,.12); }
.feat-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--red-light); display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--red); margin-bottom: 16px; }
.feat-title { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.feat-desc { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* Waitlist form */
.form-card { background: var(--surface); border: 2px solid var(--border2); border-radius: var(--r4); overflow: hidden; max-width: 560px; margin: 0 auto; box-shadow: 0 20px 60px rgba(212,43,43,.1); }
.form-card-head { padding: 24px 28px 18px; background: var(--cream); border-bottom: 2px solid var(--border); }
.form-card-head h3 { font-family: var(--font-display); font-size: 22px; color: var(--black); margin-bottom: 5px; }
.form-card-head p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.form-card-body { padding: 24px 28px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.success-card { text-align: center; padding: 52px 28px; background: var(--surface); border: 2px solid var(--border2); border-radius: var(--r4); max-width: 460px; margin: 0 auto; }
.success-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--red-light); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 28px; color: var(--red); }
.share-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* ══════════════════════════════════════════════
   LOGIN PAGES
   ══════════════════════════════════════════════ */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--cream); font-family: var(--font-body); }
.login-card { background: var(--surface); border: 2px solid var(--border2); border-radius: var(--r4); width: 100%; max-width: 400px; overflow: hidden; box-shadow: 0 16px 50px rgba(212,43,43,.1); }
.login-card-head { padding: 24px 26px 18px; background: var(--cream); border-bottom: 2px solid var(--border); }
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.login-logo img { height: 40px; }
.login-card-head h2 { font-family: var(--font-display); font-size: 20px; color: var(--black); margin-bottom: 4px; }
.login-card-head p { font-size: 12px; color: var(--muted); }
.login-card-body { padding: 22px 26px; }
.login-footer { text-align: center; margin-top: 16px; font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ══════════════════════════════════════════════
   EMPTY STATES
   ══════════════════════════════════════════════ */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-icon { font-size: 44px; color: var(--red); opacity: .3; margin-bottom: 12px; }
.empty-text { font-size: 13px; font-weight: 600; color: var(--d-muted); }

/* ══════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════ */
.text-red   { color: var(--red); }
.text-muted { color: var(--muted); }
.text-small { font-size: 12px; }
.fw-900     { font-weight: 900; }
.fw-700     { font-weight: 700; }
.gap-8      { gap: 8px; }
.d-flex     { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap  { flex-wrap: wrap; }
.mb-0 { margin-bottom: 0; }
.mt-12 { margin-top: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .dash-sidebar { display: none; }
  .pub-sidebar { width: 280px; min-width: 260px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-row { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pub-sidebar { position: fixed; left: -100%; top: 0; bottom: 0; z-index: 800; transition: left .3s; box-shadow: 4px 0 20px rgba(0,0,0,.2); }
  .pub-sidebar.open { left: 0; }
  .pub-layout { flex-direction: column; }
  .pub-map-wrap { flex: 1; }
  .landing-nav { padding: 12px 18px; }
  .hero { padding: 80px 18px 50px; }
  .form-card-head, .form-card-body { padding: 18px 20px; }
}
