/* =========================================================
   LinkUp - Design System
   No gradients. Editorial elegance. Premium and intentional.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Palette */
  --bg:           #FAFAF7;   /* warm off-white */
  --bg-elev:     #FFFFFF;    /* cards */
  --bg-subtle:   #F5F4EF;    /* subtle alt */
  --ink:         #18181B;    /* primary text */
  --ink-2:       #3F3F46;    /* secondary text */
  --ink-3:       #71717A;    /* tertiary text */
  --ink-4:       #A1A1AA;    /* placeholder */
  --line:        #E7E5E0;    /* hairline */
  --line-2:      #D6D3CC;    /* stronger line */

  --accent:      #9F1239;    /* deep wine - signature */
  --accent-ink:  #FFFFFF;
  --accent-soft: #FDF2F5;    /* faint wine background */
  --accent-deep: #7F0F2D;

  --gold:        #B8965A;    /* secondary accent for featured/premium */
  --gold-soft:   #FAF5EB;

  --success:     #15803D;
  --danger:      #B91C1C;
  --warning:     #B45309;

  /* Type */
  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --radius:      14px;
  --radius-sm:   10px;
  --radius-lg:   20px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(24,24,27,.04);
  --shadow-sm: 0 1px 3px rgba(24,24,27,.05), 0 1px 2px rgba(24,24,27,.03);
  --shadow-md: 0 4px 12px rgba(24,24,27,.06), 0 2px 4px rgba(24,24,27,.04);
  --shadow-lg: 0 16px 40px rgba(24,24,27,.10);

  --header-h:    72px;
  --bottomnav-h: 64px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 15px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Type ---------- */
.font-display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 18px; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); font-weight: 600; }
.muted { color: var(--ink-3); }
.muted-2 { color: var(--ink-2); }

/* ---------- Layout ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 32px 0; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.tight { gap: 4px; }

/* ---------- Header ---------- */
.lu-header {
  position: sticky; top: 0; z-index: 80;
  background: rgba(250,250,247,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
}
.lu-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.lu-logo {
  display: flex; align-items: center; gap: 10px;
}
.lu-logo-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.04em;
}
.lu-logo-text {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.lu-logo-text em { font-style: italic; color: var(--accent); }

.lu-nav-pills { display: none; gap: 4px; }
.lu-nav-pills a {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background .15s;
}
.lu-nav-pills a:hover { background: var(--bg-subtle); color: var(--ink); }
.lu-nav-pills a.active { background: var(--ink); color: var(--bg); }
@media (min-width: 880px){ .lu-nav-pills { display: flex; } }

.lu-nav-actions { display: flex; align-items: center; gap: 8px; }
.lu-icon-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  display: grid; place-items: center;
  color: var(--ink-2);
  position: relative;
  transition: border-color .15s, color .15s;
}
.lu-icon-btn:hover { border-color: var(--line-2); color: var(--ink); }
.lu-icon-btn .badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--accent); color: #fff;
  border-radius: var(--radius-pill);
  font-size: 10px; font-weight: 600;
  display: grid; place-items: center;
  border: 2px solid var(--bg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 11px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 500;
  border: 1px solid transparent;
  background: var(--ink); color: var(--bg);
  transition: transform .08s, opacity .15s;
  white-space: nowrap;
}
.btn:hover  { opacity: .92; }
.btn:active { transform: translateY(1px); }
.btn-block  { width: 100%; }
.btn-sm     { padding: 8px 14px; font-size: 13px; }
.btn-lg     { padding: 14px 22px; font-size: 15px; }
.btn-secondary {
  background: var(--bg-elev); color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--ink-3); }
.btn-accent {
  background: var(--accent); color: #fff;
}
.btn-ghost {
  background: transparent; color: var(--ink-2); border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-subtle); color: var(--ink); }
.btn-danger {
  background: var(--danger); color: #fff;
}

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label {
  font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.input, .select, .textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(24,24,27,.06);
}
.textarea { resize: vertical; min-height: 100px; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.checkbox-row input { margin-top: 2px; }

.input-icon-wrap { position: relative; }
.input-icon-wrap .lu-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.input-icon-wrap .input { padding-left: 42px; }

.tabs {
  display: inline-flex; background: var(--bg-subtle);
  padding: 4px; border-radius: var(--radius-pill);
  border: 1px solid var(--line);
}
.tabs button {
  background: transparent; border: 0;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.tabs button.active {
  background: var(--ink); color: var(--bg);
}

/* ---------- Cards (the heart of the listing) ---------- */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
@media (min-width: 640px) { .grid-cards { gap: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } }
@media (min-width: 1024px) { .grid-cards { gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--line-2); }

.card-image {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--bg-subtle);
  overflow: hidden;
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.card:hover .card-image img { transform: scale(1.02); }
.card-image.blurred img { filter: blur(20px); transform: scale(1.1); }
.card-image .lock-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(24,24,27,.18);
}
.lock-pill {
  background: rgba(255,255,255,.92);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--ink);
  backdrop-filter: blur(8px);
}

.card-badges {
  position: absolute; top: 10px; left: 10px;
  display: flex; gap: 6px;
}
.badge-pill {
  background: rgba(255,255,255,.95);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--ink);
}
.badge-pill.featured { background: var(--ink); color: var(--bg); }
.badge-pill.verified { background: var(--accent); color: #fff; }
.badge-pill.new      { background: var(--gold); color: #fff; }

.card-like-btn {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.92);
  border: 0; display: grid; place-items: center;
  color: var(--ink-2);
  backdrop-filter: blur(8px);
}
.card-like-btn.liked { color: var(--accent); }

.card-body { padding: 14px 16px 16px; }
.card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 2px;
}
.card-name .age { color: var(--ink-3); font-weight: 400; }
.card-meta {
  font-size: 12px; color: var(--ink-3);
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 10px;
}
.card-goal {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

/* ---------- Hero / landing ---------- */
.hero {
  padding: 36px 0 24px;
  text-align: left;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 12px; color: var(--ink-2);
  margin-bottom: 14px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 800px;
}
.hero h1 em { color: var(--accent); font-style: italic; }
.hero-sub {
  max-width: 540px;
  font-size: 16px;
  color: var(--ink-3);
  margin: 12px 0 0;
}

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  margin: 20px 0 22px;
  flex-wrap: wrap;
}
.filter-bar .tabs { flex-shrink: 0; }
.filter-bar .select {
  width: auto; min-width: 140px;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-elev);
  font-size: 13px;
}
.filter-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--ink-3);
}

/* ---------- Profile page ---------- */
.profile-grid {
  display: grid; gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .profile-grid { grid-template-columns: 1.4fr 1fr; }
}

.profile-gallery {
  display: grid; gap: 8px;
  grid-template-columns: repeat(2, 1fr);
}
.profile-gallery .main { grid-column: 1 / -1; aspect-ratio: 4/3; }
.profile-gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); background: var(--bg-subtle); }

.detail-list {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 8px 0;
}
.detail-list .row {
  display: flex; justify-content: space-between;
  padding: 12px 18px; gap: 12px;
  border-bottom: 1px solid var(--line);
}
.detail-list .row:last-child { border-bottom: 0; }
.detail-list .k { color: var(--ink-3); font-size: 13px; }
.detail-list .v { font-weight: 500; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(24,24,27,.45);
  display: none;
  z-index: 200;
  align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  max-width: 460px; width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.modal h3 { margin-bottom: 6px; font-size: 22px; font-family: var(--font-display); font-weight: 400; }
.modal p { color: var(--ink-3); margin: 0 0 18px; }

/* ---------- Toast ---------- */
.toast-stack {
  position: fixed; bottom: calc(var(--bottomnav-h) + 16px); left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px;
  z-index: 1000;
}
.toast {
  background: var(--ink); color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  box-shadow: var(--shadow-md);
  animation: slideIn .25s ease;
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }
@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-around;
  height: var(--bottomnav-h);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 90;
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px;
  color: var(--ink-3);
  flex: 1;
  padding: 4px;
  position: relative;
}
.bottom-nav a .lu-icon { width: 22px; height: 22px; }
.bottom-nav a.active { color: var(--ink); }
.bottom-nav a.active::before {
  content: '';
  position: absolute; top: 6px;
  width: 28px; height: 3px;
  border-radius: 3px;
  background: var(--accent);
}
.bottom-nav .nav-fab {
  width: 48px; height: 48px;
  margin-top: -18px;
  border-radius: 50%;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  box-shadow: var(--shadow-md);
}
.bottom-nav .nav-fab .lu-icon { width: 22px; height: 22px; }
@media (min-width: 900px) {
  .bottom-nav { display: none; }
}

.has-bottom-nav { padding-bottom: calc(var(--bottomnav-h) + 12px); }
@media (min-width: 900px) {
  .has-bottom-nav { padding-bottom: 40px; }
}

/* ---------- Support widget ---------- */
.support-fab {
  position: fixed; bottom: calc(var(--bottomnav-h) + 16px); right: 16px;
  width: 52px; height: 52px;
  background: var(--ink); color: var(--bg);
  border-radius: 50%;
  border: 0;
  box-shadow: var(--shadow-lg);
  display: grid; place-items: center;
  z-index: 95;
}
@media (min-width: 900px) {
  .support-fab { bottom: 24px; }
}

.support-panel {
  position: fixed; bottom: calc(var(--bottomnav-h) + 80px); right: 16px;
  width: 320px; max-width: calc(100vw - 32px);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 95;
  overflow: hidden;
}
.support-panel.show { display: block; }
.support-panel header {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.support-panel .body { padding: 16px; }
@media (min-width: 900px) {
  .support-panel { bottom: 90px; }
}

/* ---------- PWA install widget ---------- */
.pwa-install {
  position: fixed; bottom: calc(var(--bottomnav-h) + 80px); left: 16px;
  background: var(--ink); color: var(--bg);
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  display: none; align-items: center; gap: 10px;
  z-index: 95;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
}
.pwa-install.show { display: flex; }
.pwa-install button {
  background: var(--bg); color: var(--ink);
  border: 0; padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600;
}
.pwa-install .close-x {
  background: transparent; color: var(--bg); border: 0; padding: 0 4px;
  opacity: .7;
}

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-3);
}
.empty .lu-icon { width: 48px; height: 48px; margin: 0 auto 12px; opacity: .4; }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

/* ---------- Tables (admin) ---------- */
.table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-elev);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.table th, .table td {
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.table th {
  font-weight: 500;
  color: var(--ink-3);
  background: var(--bg-subtle);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(159,18,57,.02); }

.status-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 500;
  background: var(--bg-subtle);
}
.status-pill.active { background: #DCFCE7; color: #166534; }
.status-pill.pending { background: #FEF9C3; color: #854D0E; }
.status-pill.banned, .status-pill.rejected, .status-pill.failed { background: #FEE2E2; color: #991B1B; }
.status-pill.completed, .status-pill.approved { background: #DCFCE7; color: #166534; }
.status-pill.suspended { background: #FFEDD5; color: #9A3412; }

/* ---------- Admin layout ---------- */
.admin-shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
@media (min-width: 880px) {
  .admin-shell { grid-template-columns: 240px 1fr; }
}
.admin-sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--line);
  padding: 20px 16px;
}
@media (max-width: 879px) {
  .admin-sidebar { display: none; }
}
.admin-sidebar .brand {
  font-family: var(--font-display);
  font-size: 24px;
  padding: 4px 8px 18px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.admin-sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.admin-sidebar nav a {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink-2);
  display: flex; align-items: center; gap: 10px;
}
.admin-sidebar nav a:hover { background: var(--bg-subtle); color: var(--ink); }
.admin-sidebar nav a.active { background: var(--ink); color: var(--bg); }
.admin-main { padding: 24px; }
@media (min-width: 880px){ .admin-main { padding: 32px; } }

.stat-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.stat-card .label { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-card .value {
  font-family: var(--font-display);
  font-size: 36px;
  margin-top: 6px;
  letter-spacing: -0.03em;
}
.stat-card .delta { font-size: 12px; color: var(--success); margin-top: 4px; }
.stat-card .delta.down { color: var(--danger); }

/* ---------- Pricing cards ---------- */
.pricing-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.price-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
}
.price-card.featured {
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-md);
}
.price-card .ribbon {
  position: absolute; top: -10px; right: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}
.price-card .name { font-size: 18px; font-weight: 600; }
.price-card .price {
  font-family: var(--font-display);
  font-size: 44px;
  letter-spacing: -0.03em;
  margin: 8px 0 4px;
}
.price-card .duration { color: var(--ink-3); font-size: 13px; margin-bottom: 16px; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 20px; }
.price-card ul li {
  padding: 6px 0;
  font-size: 13px;
  color: var(--ink-2);
  display: flex; gap: 8px;
}
.price-card ul li::before { content: ''; width: 4px; height: 4px; background: var(--accent); border-radius: 50%; margin-top: 9px; flex-shrink: 0; }

/* ---------- Misc utilities ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-lg { font-size: 17px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* ---------- Auth pages ---------- */
.auth-shell {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 40px 20px;
  background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
}
.auth-card .brand-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 22px;
}
.auth-card h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 6px;
}
.auth-card .sub { color: var(--ink-3); margin-bottom: 22px; font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--ink-3); }
.auth-footer a { color: var(--ink); font-weight: 500; }

/* ---------- Notification dropdown ---------- */
.notif-panel {
  position: absolute; top: calc(var(--header-h) - 4px); right: 16px;
  width: 360px; max-width: calc(100vw - 32px);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 100;
  max-height: 480px;
  overflow-y: auto;
}
.notif-panel.show { display: block; }
.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.notif-item:last-child { border-bottom: 0; }
.notif-item.unread { background: rgba(159,18,57,.03); }
.notif-item .t { color: var(--ink-3); font-size: 11px; margin-top: 2px; }

/* ---------- Featured rail (horizontal scroll) ---------- */
.featured-rail {
  display: flex; gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
}
.featured-rail::-webkit-scrollbar { display: none; }
.featured-card {
  flex: 0 0 auto;
  width: 130px;
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  transition: border-color .2s, transform .2s;
}
.featured-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.featured-img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-subtle);
  overflow: hidden;
}
.featured-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-img.blurred img { filter: blur(16px); transform: scale(1.1); }
.lock-mini {
  position: absolute; bottom: 6px; right: 6px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  display: grid; place-items: center;
  color: var(--ink);
}
.featured-meta { padding: 8px 10px 10px; }
.featured-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.featured-town { font-size: 11px; color: var(--ink-3); display: flex; align-items: center; gap: 3px; }

/* Pagination */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  margin: 32px 0 8px;
}

/* Site footer */
.site-footer { margin-top: 40px; }
.site-footer a:hover { color: var(--ink); }

/* Profile page additions */
.profile-name-head {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  margin: 0 0 8px;
}
.profile-name-head em { color: var(--accent); font-style: italic; }

/* Avatar circle */
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-subtle); border: 1px solid var(--line);
  overflow: hidden; flex-shrink: 0;
  display: grid; place-items: center; color: var(--ink-3);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 84px; height: 84px; }
.avatar.sm { width: 32px; height: 32px; }

/* Form layouts */
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }

/* Photo upload tile */
.photo-tile {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--bg-subtle);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid; place-items: center;
  color: var(--ink-3);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.photo-tile:hover { border-color: var(--ink-3); color: var(--ink-2); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile .primary-mark, .photo-tile .status-mark {
  position: absolute; bottom: 6px; left: 6px;
  background: var(--ink); color: var(--bg);
  padding: 3px 8px; border-radius: 6px;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.photo-tile .status-mark { right: 6px; left: auto; }
.photo-tile .status-mark.pending { background: #B45309; }
.photo-tile .status-mark.rejected { background: var(--danger); }
.photo-tile .remove-btn {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,.95); border:0;
  display: grid; place-items: center; color: var(--ink);
}
.photo-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

/* Chat */
.chat-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  min-height: 70vh;
}
@media (min-width: 800px) { .chat-shell { grid-template-columns: 280px 1fr; } }
.chat-sidebar {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  max-height: 70vh; overflow-y: auto;
}
.chat-thread-item {
  padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.chat-thread-item:last-child { border-bottom: 0; }
.chat-thread-item.active { background: var(--accent-soft); }
.chat-thread-item .name { font-size: 14px; font-weight: 500; }
.chat-thread-item .preview { font-size: 12px; color: var(--ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.chat-main {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  max-height: 70vh; overflow: hidden;
}
.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.msg-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.4;
}
.msg-bubble.mine { background: var(--ink); color: var(--bg); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-bubble.theirs { background: var(--bg-subtle); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-bubble .t { font-size: 10px; opacity: .6; display:block; margin-top: 4px; }
.chat-composer {
  padding: 12px; border-top: 1px solid var(--line);
  display: flex; gap: 8px;
}
.chat-composer .input { flex: 1; }

/* Connection list rows */
.list-row {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 10px;
}
.list-row .meta { flex: 1; }
.list-row .meta .name { font-weight: 600; font-size: 15px; }
.list-row .meta .sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; }

/* Section title (small) */
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}
.section-title em { color: var(--accent); font-style: italic; }

/* Banners */
.banner {
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
  font-size: 14px;
}
.banner.accent { background: var(--accent-soft); border-color: rgba(159,18,57,.18); color: var(--accent-deep); }
.banner.warn { background: #FEF9C3; border-color: #FDE68A; color: #854D0E; }
.banner.success { background: #DCFCE7; border-color: #BBF7D0; color: #166534; }
.banner.error { background: #FEE2E2; border-color: #FECACA; color: #991B1B; }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0;
  background: var(--line-2); border-radius: 24px;
  transition: .2s;
}
.switch .slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* Show desktop nav above 900px */
@media (min-width: 900px) {
  .lu-nav-pills { display: flex; }
}

/* Hide bottom nav on desktop */
@media (min-width: 900px) {
  .bottom-nav { display: none; }
  .has-bottom-nav { padding-bottom: 0; }
}

/* Admin small adjustments */
@media (min-width: 900px) {
  .admin-shell { grid-template-columns: 240px 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
