/* ==================================================
   TABLE OF CONTENTS

    1.  Variables & Tokens — Light Mode
    2.  Variables & Tokens — Dark Mode
    3.  Base Reset & Typography
    4.  Layout & Containers
    5.  Status Bar
    6.  Navigation & Nav Bar
    7.  Admin Sub-Navigation
    8.  Buttons & Actions
    9.  Forms & Inputs
   10.  Flash Messages, Alerts & Badges
   11.  Tables (General)
   12.  Pills & Tags
   13.  Animations & Keyframes
   14.  Landing Page
   15.  Login Page
   16.  Dashboard
   17.  Profile — Public View (/profile/{name})
   18.  Profile — Edit Page (/profile/edit)
   19.  Profile — Visitors Page (/profile/visitors)
   20.  Messaging — Inbox
   21.  Messaging — Conversation / Chat
   22.  Messaging — Settings Page
   23.  Settings Pages
   24.  Admin — Shared UI Helpers
   25.  Admin — Find User & Block Management
   26.  Admin — Home Dashboard (/admin)
   27.  Admin — Interests Page (/admin/interests)

   ================================================== */


/* ==================================================
   1. VARIABLES & TOKENS — LIGHT MODE
   ================================================== */

:root {
  /* --- Color Hues (The "DNA") --- */
  --h-red: 0;
  --s-red: 68%;
  
  --h-gold: 41;
  --s-gold: 62%;

  --h-surface: 36; /* Warm beige/brown hue */
  --s-surface: 20%;

  --container: 1120px;
  --container-admin: 1280px;
  --container-wide: 1400px;
  --gutter: 1rem;
  --gutter-lg: 1.5rem;
  --radius:8px;

  --bg: hsl(var(--h-surface), 20%, 96%);      /* #f7f4f0 */
  --text: hsl(var(--h-surface), 10%, 11%);    /* #1e1a1a */
  --surface: #ffffff;
  --border: hsla(0, 0%, 0%, 0.12);

  --input-bg: var(--surface);
  --input-border: rgba(0, 0, 0, 0.20);
  --input-text: var(--text);
  --focus: #c9962a;

  --primary: hsl(var(--h-red), var(--s-red), 32%);       /* #8b1a1a */
  --primary-hover: hsl(var(--h-red), var(--s-red), 25%);
  --accent: hsl(var(--h-gold), var(--s-gold), 47%);      /* #c9962a */

  --btn-bg: var(--primary);
  --btn-hover-bg: var(--primary-hover);
  --btn-text: #fff;
   --btn-focus-ring: hsla(var(--h-gold), var(--s-gold), 47%, 0.4);
  --btn-disabled-bg: hsl(var(--h-surface), 15%, 85%);
  --btn-disabled-text: #999;
  --btn-active-scale: 0.98;
  --btn-loading-bg: #4a2020;
  --btn-loading-text: #ddd;
  --btn-spinner: #c9962a;

  --error-h: 0;
  --error: hsl(var(--error-h), 73%, 40%);
  --error-bg: hsl(var(--error-h), 73%, 97%);
  --success-h: 144;
  --success: hsl(var(--success-h), 61%, 26%);
  --success-bg: hsl(var(--success-h), 61%, 95%);

  --flash-error-bg: #fdecea;
  --flash-error-text: #7a1c1c;


  --nav-bg: #2a2630;
  --nav-text: #f0ece4;
  --nav-hover-bg: hsla(var(--h-gold), var(--s-gold), 47%, 0.18);
  --nav-hover-text: #f5dfaa;
  --nav-focus-ring: rgba(201, 150, 42, 0.35);

  --admin-subnav-bg: #7a1818;
  --admin-subnav-border: rgba(255, 255, 255, 0.14);
  --admin-subnav-hover: rgba(255, 255, 255, 0.14);
  --admin-subnav-current: rgba(255, 255, 255, 0.24);

  --table-head-bg: #8b1a1a;
  --table-head-text: #fff;

  --pill-red-bg: rgba(139, 26, 26, 0.10);
  --pill-red-text: #8b1a1a;
  --pill-green-bg: rgba(25, 135, 84, 0.12);
  --pill-green-text: #146c43;

  --profile-card-radius: 12px;
  --profile-section-gap: 2rem;
  --profile-pill-bg: rgba(0, 0, 0, 0.06);
  --profile-pill-text: #444;
  --profile-accent: #8b1a1a;
  --profile-gold: #c9962a;
  --interest-bg: rgba(139, 26, 26, 0.08);
  --interest-text: #6b1414;
  --interest-border: rgba(139, 26, 26, 0.22);
  --interest-active-bg: #8b1a1a;
  --interest-active-text: #fff;
}

/* ==================================================
   2. VARIABLES & TOKENS — DARK MODE
   ================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --bg: hsl(var(--h-surface), 10%, 11%);
    --text: hsl(var(--h-surface), 20%, 92%);
    --surface: hsl(var(--h-surface), 12%, 15%);
    --border: hsla(0, 0%, 100%, 0.1);
    --input-bg: hsl(var(--h-surface), 5%, 23%);
    --input-border: #555;
    --input-text: #ede8e0;
    --primary: hsl(var(--h-red), 68%, 39%);
    --primary-hover: hsl(var(--h-red), 68%, 32%);
    --focus: #c9962a;
    --btn-bg: #a82020;
    --btn-hover-bg: #8b1a1a;
    --btn-text: #fff;
    --btn-focus-ring: rgba(201, 150, 42, 0.50);
    --btn-disabled-bg: #2e2828;
    --btn-disabled-text: #666;
    --btn-loading-bg: #3a2020;
    --btn-loading-text: #aaa;
    --btn-spinner: #c9962a;
    --error: hsl(var(--error-h), 70%, 61%);
    --error-bg: hsl(var(--error-h), 30%, 15%);
    --success: hsl(var(--success-h), 50%, 65%);
    --success-bg: hsl(var(--success-h), 30%, 15%);
    --flash-error-bg: #341a1a;
    --flash-error-text: #f0a0a0;
    --nav-bg: #130f0f;
    --nav-text: #ede8e0;
    --nav-hover-bg: rgba(201, 150, 42, 0.15);
    --nav-hover-text: #f5dfaa;
    --admin-subnav-bg: #5e1212;
    --admin-subnav-border: rgba(255, 255, 255, 0.10);
    --table-head-bg: #6e1414;
    --table-head-text: #fff;
    --pill-red-bg: rgba(200, 60, 60, 0.18);
    --pill-red-text: #e08080;
    --pill-green-bg: rgba(25, 135, 84, 0.18);
    --pill-green-text: #6ed09a;
    --profile-pill-bg: rgba(255, 255, 255, 0.09);
    --profile-pill-text: #ccc;
    --interest-bg: rgba(201, 150, 42, 0.1);
    --interest-text: #d4a84b;
    --interest-border: rgba(201, 150, 42, 0.28);
    --interest-active-bg: #c9962a;
    --interest-active-text: #1a1a1a;
  }

  input:-webkit-autofill,
  input:-webkit-autofill:hover,
  input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset !important;
    -webkit-text-fill-color: var(--text) !important;
    caret-color: #eee;
  }
}


/* ==================================================
   3. BASE RESET & TYPOGRAPHY
   ================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html{
  scrollbar-gutter: stable; 
  scroll-behavior: smooth;
}

html, body { margin: 0; padding: 0;  
  width: 100%;
overflow-x: visible;}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img{
  max-width: 100%;
  height: auto;
  display: block;
}

h1 {  
  text-align: left; 
  margin: 0 0 2rem 0; 
  font-size: clamp(1.75rem, 5vw, 2.5rem); 
  text-wrap: balance;}

h1, h2, h3, h4 {
  line-height: 1.5;
  font-weight: 700;
  color: var(--text);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  display: block;
}

p { margin-block: 0.2rem; line-height: 1; }


/* ==================================================
   4. LAYOUT & CONTAINERS
   ================================================== */

.page {
  width: 100%;
  max-width: var(--container); /* Set this to 1120px or 1200px in :root */
  margin-inline: auto;
  padding-inline: var(--gutter);
  box-sizing: border-box; /* Ensures padding doesn't add to width */

    overflow-x: clip;     /* preferred */
  /* fallback if needed: overflow-x: hidden; */
}

.page.page--admin {
  max-width: var(--container-admin); /* Usually 100% or a larger value like 1440px */
}

/* To this: */
@media (min-width: 900px) {
  .page { padding-inline: var(--gutter-lg); }
}

.main {padding-block: 2rem;}

.full-bleed { width: 100%; margin: 0; padding: 0; }

.card {
  max-width: 100%;
  margin-inline: auto;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.078);
  margin-bottom: 0.5rem;
  box-sizing: border-box;
}

.page--admin .card {
  max-width: 100% !important;
  width: 100%;
}

.card h2 { margin: 0 0 0.75rem; font-size: 1.1rem; }

.page-actions { max-width: 420px; margin: 1rem auto; text-align: center; }

.text-right { text-align: right; }
.muted { color: #666; }


/* ==================================================
   5. STATUS BAR
   Thin bar above the header showing session info.
   ================================================== */

   /* Sticky whole header stack (status + nav + admin subnav) */
.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg); /* or var(--surface) depending on your look */
  box-shadow: 0 2px 10px rgba(0,0,0,0.30);
  border-bottom: 1px solid rgba(10, 5, 5, 0.89);
}

.status-bar {
  width: 100%;
  background: #111;
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  padding-block: 0.4rem;
}

.status-bar__inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.status-bar__divider { opacity: 0.35; }
.status-bar__active { color: #4ade80; font-weight: 600; }

/* ==================================================
   6. NAVIGATION & NAV BAR
   ================================================== */

.nav-bar {
  background-color: var(--nav-bg);
  color: var(--nav-text);
  position: relative;
  z-index: 1001;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  margin-inline: auto;
  padding: 0.6rem var(--gutter);
}

@media (min-width: 900px) { 
  .nav-inner { padding: 0.5rem var(--gutter-lg); } 
}

.nav-left, .nav-right { 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
}

.nav-left {
    margin-left: 0;
}

.nav-right {
    margin-left: auto;
}

.nav-logo { 
  display: inline-flex; 
  align-items: center; 
  transition: opacity 0.2s ease;
}

.nav-logo:hover { opacity: 0.85; }

.nav-logo img { 
  display: block; 
  height: 34px; 
  width: auto; 
}

.nav-inner a {
  color: var(--nav-text);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 44px; /* Essential mobile tap target */
  display: inline-flex;
  align-items: center;
}

.nav-inner a:hover { 
  background-color: var(--nav-hover-bg); 
  color: var(--nav-hover-text); 
}

/* Active State Strategy */
.nav-inner a[aria-current="page"] {
  background-color: var(--nav-hover-bg);
  color: var(--nav-hover-text);
  box-shadow: inset 0 -2px 0 var(--accent);
  font-weight: 700;
}

/* Focus State using your specific Nav Ring */
.nav-inner a:focus-visible {
  outline: none;
  background-color: var(--nav-hover-bg);
  box-shadow: 0 0 0 3px var(--nav-focus-ring);
}

/* Unread message badge in nav */
.nav-messages-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 99px;
  background-color: var(--primary); /* Uses your brand red */
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  border: 2px solid var(--nav-bg); /* Prevents badge blending into background */
}

/* Flex legacy nav */
.nav {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0.5rem 0 1rem;
}

/* Admin Subnav Logic Bridge */
.admin-subnav {
  position: relative;
  background-color: var(--admin-subnav-bg);
  border-bottom: 1px solid var(--admin-subnav-border);
}



/* ==================================================
   7. ADMIN SUB-NAVIGATION
     Only used on /admin/* pages for secondary navigation.
   ================================================== */

.admin-subnav {
  background-color: var(--admin-subnav-bg);
  border-bottom: 1px solid var(--admin-subnav-border);
  position: relative;
  z-index: 1000;
}

.admin-subnav__inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.4rem var(--gutter);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  box-sizing: border-box;
  
  /* Swipe Logic */
  overflow-x: auto; 
  white-space: nowrap; 
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

/* Hides the scrollbar track for a cleaner "app" look */
.admin-subnav__inner::-webkit-scrollbar {
  display: none; 
}

@media (min-width: 900px) { 
  .admin-subnav__inner { padding: 0.5rem var(--gutter-lg); } 
}

.admin-subnav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  opacity: 0.9;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  min-height: 40px; /* Better touch target for admin mobile use */
}

/* Interaction States */
.admin-subnav a:hover { 
  background-color: var(--admin-subnav-hover); 
  opacity: 1; 
}

.admin-subnav a:active {
  transform: scale(var(--btn-active-scale, 0.98));
}

.admin-subnav a[aria-current="page"] { 
  background-color: var(--admin-subnav-current); 
  opacity: 1;
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.5); /* Subtle indicator */
}

.admin-subnav a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}



/* ==================================================
   8. BUTTONS & ACTIONS
   ================================================== */

/* 1. Base Reset & Shared Logic */
button,
.btn,
input[type="submit"],
input[type="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  
  /* Typography */
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  
  /* Visuals */
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  user-select: none;
  position: relative;
  
  /* Interaction */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: manipulation;
}

/* Mobile-First: Buttons are full width on small screens, auto on desktop */
button, .btn, input[type="submit"], input[type="button"] { width: 100%; }

@media (min-width: 600px) {
  button, .btn, input[type="submit"], input[type="button"] { width: auto; }
}

/* 2. Global Interaction States */
button:hover,
.btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  background: var(--btn-hover-bg);
  transform: translateY(-1px);
}

button:active,
.btn:active,
input[type="submit"]:active,
input[type="button"]:active {
  transform: scale(var(--btn-active-scale, 0.98));
}

button:focus-visible,
.btn:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--btn-focus-ring);
}

button:disabled,
.btn:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled {
  background: var(--btn-disabled-bg) !important;
  color: var(--btn-disabled-text) !important;
  cursor: not-allowed;
  transform: none;
  opacity: 0.6;
  border-color: transparent;
}

/* 3. Style Variants */

.btn--primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    background: var(--primary);
    color: var(--btn-text);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    transition: background 0.15s ease;
    width: auto;
}

.btn--primary:hover {
  background: var(--primary-hover);
}

/* Accent - Gold */
.btn--accent {
  background: var(--accent);
  color: #fff;
}
.btn--accent:hover {
  filter: brightness(1.1);
}

/* Secondary - Subtle Red Tint */
.btn--secondary {
  background: hsla(var(--h-red), var(--s-red), 32%, 0.1);
  color: var(--primary);
}
.btn--secondary:hover {
  background: hsla(var(--h-red), var(--s-red), 32%, 0.18);
}

/* Ghost - White/Bordered */
.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  background: var(--bg);
}

/* Profile Context Ghost (Adaptive Gold/Red) */
.btn--profile-ghost {
  background: red !important;
  color: var(--primary);
  border: 2px solid var(--primary);
}

@media (prefers-color-scheme: dark) {
  .btn--profile-ghost {
    color: var(--accent);
    border-color: var(--accent);
  }
}

/* Danger - Outlined Error */
.btn--danger {
  background: transparent;
  color: var(--error);
  border: 2px solid var(--error);
}
.btn--danger:hover {
  background: var(--error-bg);
}

/* 4. Size Modifiers */
.btn--sm {
  min-height: 36px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

.btn--lg {
  min-height: 52px;
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

/* 5. Loading States */
button[aria-busy="true"],
.btn--loading {
  background: var(--btn-loading-bg) !important;
  color: var(--btn-loading-text) !important;
  pointer-events: none;
  cursor: wait;
}

/* Spinner Logic */
button[aria-busy="true"]::after,
.btn--loading::after {
  content: "";
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid transparent;
  border-top-color: var(--btn-spinner);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 4px;
}

/* 6. Icon Buttons */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
}
.btn-icon:hover { 
  background: hsla(var(--h-surface), var(--s-surface), 50%, 0.15); 
}


/* ==================================================
   9. FORMS & INPUTS
   ================================================== */

/* 1. Global Form Layout */
form {
  gap: 1.25rem;
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  padding-block: 1rem;
}

/* THE SUPER-RULE: Force full-width on Admin/Edit pages */
.page--admin .card,
.page--admin form,
.page--admin .card form {
  max-width: 100% !important;
  width: 100% !important;
}

/* 2. Grouping & Labels */
.form-group, .form-field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem; 
  margin-bottom: 1rem;
}

.label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}

/* 3. The Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
  /* Layout */
  width: 100%;
  display: block;
  box-sizing: border-box;
  
  /* Sizing: Chunky feel for better mobile tapping */
  padding: 0.85rem 1rem; 
  min-height: 48px; 
  
  /* Visuals */
  background-color: var(--input-bg);
  color: var(--input-text);
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  
  /* Typography: 1rem prevents iOS auto-zoom */
  font-size: 1rem; 
  font-family: inherit;
  line-height: 1.5;
  
  /* Interaction */
  transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
  padding-top: 1rem;
}

/* 4. Focus & Visibility States */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--focus);
  background-color: var(--surface); /* Ensures brightness when typing */
  box-shadow: 0 0 0 3px var(--btn-focus-ring);
}

/* Placeholder visibility */
::placeholder {
  color: var(--text);
  opacity: 0.5;
}

/* 5. Error Styling */
.has-error input,
.has-error textarea,
.has-error select,
.input--error {
  border-color: var(--error) !important;
  background-color: var(--error-bg) !important;
}

.field-error-msg,
.error-text {
  color: var(--error);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

/* 6. Checkboxes & Radios (Large Hit Area) */
.checkbox-group,
.control-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.5rem;
  cursor: pointer;
  min-height: 44px;
}

input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

/* 7. Select Arrow Customization */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org' fill='none' viewBox='0 0 24 24' stroke='%23666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.1rem;
  padding-right: 2.5rem;
}

/* 8. Disabled States */
input:disabled, 
textarea:disabled,
select:disabled {
  background-color: var(--btn-disabled-bg);
  color: var(--btn-disabled-text);
  cursor: not-allowed;
  opacity: 0.7;
}

/* ==================================================
   10. FLASH MESSAGES, ALERTS & BADGES
   ================================================== */

/* 1. Global Field Errors (The red text under inputs) */
.error, .error-message, .field-error-msg { 
  color: var(--error); 
  font-size: 0.85rem; 
  font-weight: 600;
}

/* 2. Global Success Text */
.success, .success-message { 
  color: var(--success); 
  margin-bottom: 1rem; 
}

/* 3. The Error Summary Box (Usually at the top of a form) */
.form-errors {
  max-width: 420px;
  margin-inline: auto;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  background: var(--error-bg);
  border: 1px solid hsla(var(--error-h), 73%, 40%, 0.2);
  color: var(--error);
  border-radius: var(--radius);
}

.form-errors p { margin: 0; font-weight: 700; }
.form-errors ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }

.flash {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  box-sizing: border-box;
  border: 1px solid transparent;
}

.flash-success {
  background-color: var(--success-bg);
  color: var(--success);
  border-color: hsla(var(--success-h), 61%, 26%, 0.15);
}

.flash-error {
  background-color: var(--error-bg);
  color: var(--error);
  border-color: hsla(var(--error-h), 73%, 40%, 0.15);
}

/* THE SUPER-RULE: Force wide in Admin/Edit view 
.page--admin .flash,
.page--admin .form-errors {
  max-width: 100% !important;
  width: 100%;
} */

/* 6. Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: #fff3cd; color: #664d03; border: 1px solid #ffe69c; }

/* 7. Inline Alerts */
.alert { 
  padding: 1rem; 
  border-radius: var(--radius); 
  margin-bottom: 1rem; 
  border: 1px solid transparent;
}

.alert-warning { 
  background: hsl(45, 100%, 96%); 
  border-color: hsl(45, 100%, 85%); 
  color: hsl(45, 100%, 20%); 
}

/* Adjust Alert Warning for Dark Mode */
@media (prefers-color-scheme: dark) {
  .alert-warning {
    background: hsl(45, 30%, 15%);
    border-color: hsl(45, 50%, 30%);
    color: hsl(45, 100%, 80%);
  }
}

/* ==================================================
   11. TABLES (GENERAL)
   ================================================== */

   /* Mobile Fix: Wrap tables in a div with this class to prevent layout breaking */
.table-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  background: var(--surface);
}

.table {
  width: 100%;
  table-layout: fixed; /* key */
  min-width: 0;        /* remove/override your min-width:600 */
  text-align: left;
  border-collapse: collapse;
  background-color: transparent;
  border: 0;
}

/* Inline forms inside tables should not become grid layouts */
.table td form,
.table th form {
  display: inline;
  padding: 0;
  margin: 0;
  max-width: none;
}


.table th, .table td {
  padding-block: 0.6rem;   /* 👈 vertical space */ 
  padding-inline: 0.75rem; /* keep your horizontal */
  border-bottom: 1px solid var(--input-border);
  vertical-align: middle;
  text-align: left;
  overflow: hidden;           /* THIS prevents painting over neighbours */
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* stop pills forcing weird behaviour */
.table td:nth-child(3) .pill{
  max-width: 100%;
}

.table td pre {
  display: block;
  max-width: 100%;
  white-space: pre-wrap;      /* overrides pre default */
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: auto;             /* if it still gets huge, scroll INSIDE the pre */
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table thead th { 
  background: var(--table-head-bg); 
  color: var(--table-head-text); 
  font-weight: 700;
  border-bottom: 0;
}

.table tbody tr:nth-child(even) { background: rgba(0, 0, 0, 0.03); }

@media (prefers-color-scheme: dark) {
  .table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.03); }
}

/* Interests table: lock column behavior */
.admin-interests-table{
  width: 100%;
  min-width: 0;          /* override global .table min-width */
  table-layout: fixed;   /* makes widths predictable */
}

/* Column widths */
.admin-interests-table th:nth-child(2),
.admin-interests-table td:nth-child(2){
  width: 90px;           /* Profiles */
  text-align: center;
}

.admin-interests-table th:nth-child(3),
.admin-interests-table td:nth-child(3){
  width: 220px;          /* Actions */
}

/* Interest column gets the rest */
.admin-interests-table th:nth-child(1),
.admin-interests-table td:nth-child(1){
  width: auto;
}

/* Prevent long interest names from blowing it up */
.admin-interests-table td:nth-child(1){
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inbox-table{
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* IMPORTANT: makes column widths behave */
}

.inbox-table__col--avatar  { width: 44px; }
.inbox-table__col--name    { width: 20%; }
.inbox-table__col--time    { width: 90px; }
.inbox-table__col--actions { width: 44px; }
/* preview gets the remaining space automatically */

.inbox-table td{
  overflow: hidden;          /* prevents spill */
  overflow-wrap: anywhere;   /* protects against long unbroken strings */
}

/* usually nicer as a single-line preview */
.inbox-table__preview{
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.table-mini {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  overflow: hidden;
}

.table-mini th, .table-mini td {
  padding: 0.35rem 0.45rem;
  border-bottom: 1px solid var(--input-border);
  font-size: 0.9rem;
}

.table-mini thead th { background: rgba(0, 0, 0, 0.06); font-weight: 800; }
.table-mini tbody tr:nth-child(odd)  { background: rgba(0, 0, 0, 0.02); }
.table-mini tbody tr:nth-child(even) { background: rgba(0, 0, 0, 0.05); }

@media (prefers-color-scheme: dark) {
  .table-mini tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.03); }
}

/* ==================================================
   PATCH A: Make forms safe by default (no global grid)
   ================================================== */

/* 1) Reset: forms are normal by default */
form{
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* 2) Re-apply your "stacked form" layout only where intended.
   This preserves your current look on login + cards + settings etc. */
:where(
  .card form,
  .login-form-wrap form,
  .profile-edit-form,
  .settings-section__body form,
  .msg-settings form,
  .profile-edit-page form
){
  display: grid;
  gap: 1.25rem;
  max-width: 420px;
  margin-inline: auto;
  padding-block: 1rem;
}

/* 3) Admin/edit wide forms still stay wide (your existing “SUPER-RULE” intent) */
.page--admin :where(.card form, form){
  max-width: 100% !important;
  width: 100% !important;
}

/* 4) Inline / special-case forms that must NOT become grids */
.table td form,
.table th form,
.chat-compose__form,
.chat-action-form,
.quick-form,
.inbox-delete-form,
.unblock-inline{
  display: inline;
  gap: 0;
  padding: 0;
  margin: 0;
  max-width: none;
  width: auto;
}

/* If any of those should remain flex (chat compose), restore it explicitly */
.chat-compose__form{
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: none;
}


/* ==================================================
   PATCH B: Scope "audit-like" column width assumptions
   ================================================== */

/* Remove/disable the global nth-child widths:
   (Delete or comment out your current global rules)
   .table th:nth-child(1)... etc
*/

/* Replace with a modifier class for the specific table that needs fixed columns */
.table.table--audit{
  table-layout: fixed;
}

.table.table--audit th:nth-child(1),
.table.table--audit td:nth-child(1){ width: 200px; } /* Date */

.table.table--audit th:nth-child(2),
.table.table--audit td:nth-child(2){ width: 170px; } /* Admin */

.table.table--audit th:nth-child(3),
.table.table--audit td:nth-child(3){ width: 290px; } /* Action */

.table.table--audit th:nth-child(5),
.table.table--audit td:nth-child(5){ width: 140px; } /* IP */

/* Member gets remaining space */
.table.table--audit th:nth-child(4),
.table.table--audit td:nth-child(4){ width: auto; }

.table.table--audit td pre{
  display: block;
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: auto;
}

.admin-interests-table .interest-row__rename-input:focus{
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px hsla(var(--h-gold), var(--s-gold), 47%, 0.25);
}

/* ==================================================
   12. PILLS & TAGS
   ================================================== */

.pill {
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 600;
  justify-content: center;
  line-height: 1;
  padding: 0.25rem 0.75rem;
  border-radius: 99px; /* Fully rounded ends */
  border: 1px solid transparent;
  white-space: nowrap;
}

.pill.blocked { background: var(--pill-red-bg);   color: var(--pill-red-text); }
.pill.clear   { background: var(--pill-green-bg);  color: var(--pill-green-text); }

/* Membership tier pills */
.pill--free      { background: rgba(224, 224, 224, 0.92); color: #555; }
.pill--sub       { background: rgb(99, 171, 226);          color: #fff; }
.pill--vip {
  background-color: hsla(var(--h-gold), var(--s-gold), 47%, 0.1);
  color: var(--accent); 
  border-color: hsla(var(--h-gold), var(--s-gold), 47%, 0.2);
  transition: all 0.2s ease;
  cursor: default;
}

.meta-pill--free { background: rgba(224, 224, 224, 0.92); color: #555; }
.meta-pill--sub  { background: rgba(99, 171, 226, 1);     color: #fff; }
.meta-pill--vip  { background: black;                      color: #fff; }

/* Unread badge */
.unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 0.72rem;
  font-weight: 700;
}


/* ==================================================
   13. ANIMATIONS & KEYFRAMES
   ================================================== */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ==================================================
   14. LANDING PAGE  (/)
   ================================================== */

.landing { max-width: 860px; margin: 0 auto; padding: 0 0 3rem; }

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-block: clamp(0.2rem, 8vw, 0.5rem);
  text-align: center;
  align-items: center;
}

.hero h1{line-height: 1.2}

/* Switch to 2 columns on desktop */
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.2fr 1fr;
    text-align: left;
  }
}

.hero__content h1 {
  text-align: inherit;

  color: var(--primary);
}

.hero__content p {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text);
  max-width: 540px;
  margin-inline: auto;
  opacity: 0.9;
}

@media (min-width: 900px) {
  .hero__content p { margin-inline: 0; }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  text-align: left;
  justify-content: center;
}

@media (min-width: 900px) {
  .hero__actions { justify-content: flex-start; }
}

.hero__image img {
  border-radius: var(--radius);
  box-shadow: 0 20px 40px hsla(0, 0%, 0%, 0.1);
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid var(--input-border);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-secondary:hover { border-color: var(--focus); background: rgba(0,0,0,0.03); }

@media (prefers-color-scheme: dark) { .btn-secondary:hover { background: rgba(255,255,255,0.05); } }

.landing-divider { border: none; border-top: 1px solid var(--border); margin: 0 1rem; }

/* How it works */
.how-it-works { padding: 2.5rem 1rem; text-align: center; }
.how-it-works h2 { font-size: 1.5rem; margin: 0 0 2rem; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; text-align: left; }

.step {
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 1.25rem 1.25rem 1.5rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--btn-bg);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.step h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.step p  { margin: 0; font-size: 0.95rem; color: #666; line-height: 1.5; }

@media (prefers-color-scheme: dark) { .step p { color: #aaa; } }

/* Privacy block */
.privacy {
  margin: 0 1rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.privacy-icon { font-size: 2rem; flex-shrink: 0; line-height: 1; }
.privacy-text h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.privacy-text p  { margin: 0; font-size: 0.95rem; color: #666; line-height: 1.5; }

@media (prefers-color-scheme: dark) { .privacy-text p { color: #aaa; } }

/* Membership tiers */
.tiers { padding: 1rem 1rem 1rem; text-align: center; }
.tiers h2 { font-size: 1.5rem; margin: 0 0 1rem 0; padding: 0}
.tiers__subtitle { font-size: 0.95rem; color: #666; margin: 0 0 2rem; }

@media (prefers-color-scheme: dark) { .tiers__subtitle { color: #aaa; } }

.tier-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  text-align: left;
}

.tier-card {
  border-radius: 14px;
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tier-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.12); }

.tier-card--free { background: rgba(0,0,0,.04);        border-color: rgba(0,0,0,.10); }
.tier-card--sub  { background: rgba(37, 99, 235, .06); border-color: rgba(37, 99, 235, .25); }
.tier-card--vip  { background: rgba(161, 98, 7, .07);  border-color: rgba(161, 98, 7, .30); }

.tier-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  align-self: flex-start;
}

.tier-card--free .tier-card__badge { background: rgba(0,0,0,.08);        color: #444; }
.tier-card--sub  .tier-card__badge { background: rgba(37, 99, 235, .14); color: #1d4ed8; }
.tier-card--vip  .tier-card__badge { background: rgb(205, 102, 0);  color: #573000; }

.tier-card__name { font-size: 1.3rem; font-weight: 800; margin: 0; line-height: 1.2; }
.tier-card--free .tier-card__name { color: #333; }
.tier-card--sub  .tier-card__name { color: #1d4ed8; }
.tier-card--vip  .tier-card__name { color: #613400; }

.tier-card__price { font-size: 0.9rem; opacity: 0.6; margin: -0.5rem 0 0; }

.tier-card__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.tier-card__features li {
  font-size: 0.92rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.4;
}

.tier-card__features li .feat-icon { flex-shrink: 0; font-size: 0.85rem; margin-top: 0.05rem; }

.feat-icon--yes  { color: #16a34a; }
.feat-icon--no   { color: #9ca3af; }
.feat-icon--star { color: #d97706; }

.tier-card__cta {
  display: inline-block;
  text-align: center;
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  margin-top: auto;
}

.tier-card__cta:hover { opacity: 0.88; transform: translateY(-1px); }
.tier-card--sub .tier-card__cta { background: #1d4ed8; color: #fff; }
.tier-card--vip .tier-card__cta { background: linear-gradient(135deg, #d97706, #92400e); color: #fff; }

.tier-card__popular {
  position: absolute;
  top: -0.65rem;
  right: 1rem;
  background: linear-gradient(135deg, #d97706, #92400e);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (prefers-color-scheme: dark) {
  .tier-card--free { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.10); }
  .tier-card--free .tier-card__name  { color: #e5e7eb; }
  .tier-card--free .tier-card__badge { background: rgba(255,255,255,.10); color: #d1d5db; }
}


/* ==================================================
   15. LOGIN PAGE  (/login)
   ================================================== */

.main:has(.login-split) { 
  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 2rem 0; }

.login-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 120px);
}

/* Left branded panel */
.login-panel {
  background: #1a0a0f;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(123, 45, 66, 0.45) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(161, 98, 7, 0.20) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(123, 45, 66, 0.25) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 4rem 3.5rem;
  position: relative;
  overflow: hidden;
}

.login-panel::before {
  content: '';
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
  top: -100px; right: -150px;
  pointer-events: none;
}

.login-panel::after {
  content: '';
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(161, 98, 7, 0.15);
  bottom: -60px; left: -80px;
  pointer-events: none;
}

.login-panel__logo { margin-bottom: 3rem; }

.login-panel__logo img {
  height: 56px; width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.login-panel__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #d97706;
  margin: 0 0 0.75rem;
}

.login-panel__headline {
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  max-width: 340px;
}

.login-panel__headline em { font-style: normal; color: #f59e0b; }

.login-panel__sub {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  max-width: 300px;
  margin: 0 0 2.5rem;
}

.login-panel__tiers { display: flex; flex-direction: row; gap: 0.6rem; flex-wrap: wrap; }

.login-panel__tier {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  width: fit-content;
}

.login-panel__tier--free { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.65); border: 1px solid rgba(255,255,255,0.12); }
.login-panel__tier--sub  { background: rgba(37, 99, 235, 0.2);  color: #93c5fd;               border: 1px solid rgba(37, 99, 235, 0.3); }
.login-panel__tier--vip  { background: rgba(161, 98, 7, 0.25);  color: #fcd34d;               border: 1px solid rgba(161, 98, 7, 0.35); }

/* Right form panel */
.login-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4rem 3rem;
  background: var(--bg);
}

.login-form-wrap { width: 100%; max-width: 380px; }

.login-form-wrap h1 { font-size: 1.6rem; font-weight: 800; margin: 0 0 0.4rem; color: var(--text); }

.login-form-wrap__sub { font-size: 0.92rem; color: #888; margin: 0 0 2rem; }

.login-form-wrap form { display: flex; flex-direction: column; gap: 1.1rem; }

.login-form-wrap label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.9rem; font-weight: 600; color: var(--text); }

.login-form-wrap input[type="email"],
.login-form-wrap input[type="password"] {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1.5px solid var(--input-border);
  background: var(--input-bg, var(--surface));
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-form-wrap input[type="email"]:focus,
.login-form-wrap input[type="password"]:focus {
  outline: none;
  border-color: #7b2d42;
  box-shadow: 0 0 0 3px rgba(123, 45, 66, 0.15);
}

.login-form-wrap input[type="submit"] {
  margin-top: 0.5rem;
  padding: 0.85rem;
  background: #7b2d42;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.login-form-wrap input[type="submit"]:hover  { background: #9b3a55; transform: translateY(-1px); }
.login-form-wrap input[type="submit"]:active { transform: translateY(0); }

.login-form-footer { margin-top: 1.5rem; font-size: 0.9rem; color: #888; text-align: center; }

.login-form-footer a { color: #7b2d42; font-weight: 600; text-decoration: none; }
.login-form-footer a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .login-split { grid-template-columns: 1fr; min-height: unset; }
  .login-panel { padding: 2.5rem 1.75rem; align-items: center; text-align: center; }
  .login-panel__logo { margin-bottom: 1.5rem; }
  .login-panel__headline { font-size: 1.4rem; }
  .login-panel__sub { display: none; }
  .login-panel__tiers { justify-content: center; }
  .login-form-panel { padding: 2.5rem 1.5rem; }
}

@media (prefers-color-scheme: dark) {
  .login-form-wrap input[type="email"],
  .login-form-wrap input[type="password"] { background: rgba(255,255,255,0.05); }
}


/* ==================================================
   16. DASHBOARD  (/dashboard)
   ================================================== */

/* Ensure the Grid in Section 16/17 uses the full width */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: var(--gutter-lg);
  width: 100%;
}

.dashboard-col--left  { padding-right: 0.75rem; }
.dashboard-col--right { padding-left:  0.75rem; }

@media (max-width: 700px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-col--left, .dashboard-col--right { padding: 0; }
}

/* Profile activity card */


.activity-views { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }

.activity-count { font-size: 2.5rem; font-weight: 800; line-height: 1; color: var(--btn-bg); }

@media (prefers-color-scheme: dark) { .activity-count { color: #f87171; } }

a.activity-count { text-decoration: none; border-bottom: 3px solid rgba(199, 22, 16, 0.3); transition: border-color 0.15s ease; }
a.activity-count:hover { border-bottom-color: rgba(199, 22, 16, 0.8); }

.activity-label { font-size: 1rem; opacity: 0.75; }

.activity-trend { font-size: 0.9rem; font-weight: 600; padding: 0.2rem 0.55rem; border-radius: 999px; }

.trend-up      { background: rgba(25, 135, 84, 0.12);  color: #146c43; }
.trend-down    { background: rgba(220, 53, 69, 0.12);  color: #b02a37; }
.trend-neutral { background: rgba(0, 0, 0, 0.07);      color: #555; }

@media (prefers-color-scheme: dark) {
  .trend-up      { background: rgba(25, 135, 84, 0.2);  color: #6ee7a0; }
  .trend-down    { background: rgba(220, 53, 69, 0.2);  color: #f87171; }
  .trend-neutral { background: rgba(255,255,255,0.08);  color: #aaa; }
}

.activity-link { font-size: 0.9rem; font-weight: 600; color: var(--focus); text-decoration: none; }
.activity-link:hover { text-decoration: underline; }

.dashboard-unread-link {
  color: #fff;
  background: #e63946;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-block;
}

.dashboard-unread-link:hover { background: #c1121f; }

/* Completeness bar */
.dash-progress-bar { height: 10px; background: var(--border); border-radius: 999px; overflow: hidden; margin: 0.5rem 0 0.25rem; }
.dash-progress-bar__fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; background: #e67e22; }
.dash-progress-bar__fill--complete { background: #2e7d32; }
.dash-progress-label { font-size: 0.85rem; opacity: 0.7; margin: 0; }
.dash-missing-list { margin: 0.5rem 0 0; padding-left: 1.2rem; font-size: 0.9rem; color: var(--error); }
.dash-missing-list li { margin-bottom: 0.2rem; }

@media (prefers-color-scheme: dark) { .dash-progress-bar__fill { background: #f87171; } }

/* Recent visitors */
.dash-visitors-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.dash-visitor { display: flex; align-items: center; gap: 0.6rem; }

.dash-visitor__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.dash-visitor__name  { color: var(--text); text-decoration: none; font-weight: 600; }
.dash-visitor__name:hover { text-decoration: underline; }
.dash-visitor__time  { font-size: 0.78rem; opacity: 0.55; }

/* Quick links */
.dash-quick-links { display: flex; flex-direction: column; gap: 0.5rem; }

.dash-quick-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  background: rgba(0,0,0,0.03);
  border: 1px solid var(--border);
  transition: background 0.15s;
}

.dash-quick-links a:hover { background: rgba(139, 26, 26, 0.07); border-color: rgba(139, 26, 26, 0.2); }

@media (prefers-color-scheme: dark) {
  .dash-quick-links a       { background: rgba(255,255,255,0.03); }
  .dash-quick-links a:hover { background: rgba(255,100,100,0.08); }
}

/* Unread messages list */
.dash-unread-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }

.dash-unread-item {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.dash-unread-item:last-child { border-bottom: none; }
.dash-unread-item__sender  { font-weight: 700; color: #e67e22; flex-shrink: 0; }
.dash-unread-item__preview { flex: 1; opacity: 0.8; }
.dash-unread-item__time    { font-size: 0.78rem; opacity: 0.5; flex-shrink: 0; }

@media (prefers-color-scheme: dark) { .dash-unread-item__sender { color: #f0a84e; } }

/* Inbox preview prefixes */
.inbox-preview-prefix { font-weight: 700; opacity: 0.65; font-size: 0.85rem; }
.inbox-preview-prefix--you  { color: #2e7d32; }
.inbox-preview-prefix--them { color: #e67e22; }

@media (prefers-color-scheme: dark) {
  .inbox-preview-prefix--you  { color: #6ee7a0; }
  .inbox-preview-prefix--them { color: #f0a84e; }
}


/* ==================================================
   17. PROFILE — PUBLIC VIEW  (/profile/{name})
   ================================================== */

.profile-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
  display: flex;
  flex-direction: column;
  gap: var(--profile-section-gap);
}

@media (min-width: 900px) { .profile-page { padding: 2rem var(--gutter-lg); } }

/* Hero card */
.profile-card {
  display: flex;
  gap: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--profile-card-radius);
  padding: 1.15rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.profile-card__photo-col { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; flex-shrink: 0; }

.profile-card__photo {
  width: 150px; height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--profile-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-card__photo--placeholder {
  background: var(--profile-pill-bg);
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--profile-pill-text);
}

.profile-card__photo-icon { font-size: 3rem; line-height: 1; }

.profile-card__info { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 0.9rem; }

.profile-card__name { margin: 0; font-size: 1.8rem; font-weight: 700; text-align: left; color: var(--text); line-height: 1.2; }

.profile-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--profile-pill-bg);
  color: var(--profile-pill-text);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.meta-pill__icon { font-style: normal; font-size: 1em; line-height: 1; }

.profile-looking-for { padding: 0; display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; }
.profile-looking-for__label { color: var(--profile-pill-text); }
.profile-looking-for__value { color: var(--profile-accent); }

@media (prefers-color-scheme: dark) { .profile-looking-for__value { color: var(--profile-gold); } }

.profile-card__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.profile-card__actions .btn,
.profile-card__actions .inline-form .btn {
    flex: 1 1 auto;
    text-align: center;
    white-space: nowrap;
    font-size: 0.85rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}
.profile-card__edit-btn { background: rgb(139, 43, 43);  color: #fff !important; width: 100%; }

@media (max-width: 540px) {
  .profile-card { flex-direction: column; align-items: center; text-align: center; }
  .profile-card__name { text-align: center; }
  .profile-meta, .profile-looking-for, .profile-card__actions { justify-content: center; }
}

/* Section blocks */
.profile-section-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--profile-card-radius);
  padding: 1.5rem 1.75rem;
}

.profile-section-block__title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: left;
  color: var(--profile-accent);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

@media (prefers-color-scheme: dark) { .profile-section-block__title { color: var(--profile-gold); } }

/* Interests (read-only) */
.profile-interests { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.interest-display-tag {
  display: inline-block;
  background: rgba(25, 135, 84, 0.12);
  color: #146c43;
  border: 1px solid rgba(25, 135, 84, 0.226);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Bio */
.profile-bio { line-height: 1.7; color: var(--text); }
.profile-bio p { margin: 0 0 1rem; }
.profile-bio p:last-child { margin-bottom: 0; }

/* Viewers section */
.profile-viewers__count {
  background: var(--profile-pill-bg);
  color: var(--profile-pill-text);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.profile-viewers__empty { color: var(--profile-pill-text); font-style: italic; margin: 0; }

.viewers-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.viewer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  transition: background 0.1s ease;
}

.viewer-row:last-child { border-bottom: none; }
.viewer-row:nth-child(even) { background: rgba(0, 0, 0, 0.02); }
.viewer-row:hover { background: var(--profile-pill-bg); }

.viewer-row__name a { color: var(--profile-accent); text-decoration: none; font-weight: 600; }
.viewer-row__name a:hover { text-decoration: underline; }
.viewer-row__time { color: var(--profile-pill-text); font-size: 0.82rem; white-space: nowrap; margin-left: 1rem; }

@media (prefers-color-scheme: dark) {
  .viewer-row:nth-child(even) { background: rgba(255, 255, 255, 0.03); }
  .viewer-row__name a { color: var(--profile-gold); }
  .profile-meta .pill { background: rgba(199, 22, 16, 0.2); color: #f87171; border-color: rgba(199, 22, 16, 0.35); }
  .viewers-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.03); }
  .viewers-table tbody tr:hover           { background: rgba(199, 22, 16, 0.1); }
}

/* Legacy styles */
.page--profile { max-width: 720px; margin: 0 auto; padding: 2rem var(--gutter); }
.profile-views { margin-top: 1.5rem; font-size: 0.9rem; text-align: right; opacity: 0.65; }
.profile-edit-action { text-align: center; margin-top: 1rem; margin-bottom: 2rem; }

.profile-edit-action a {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.15s ease;
}

.profile-edit-action a:hover { background: var(--btn-hover-bg); }

/*
  Displays Height, Body, Ethnicity, Drinking, Tattoos, Smoker
  as a responsive definition list grid.
*/
.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}

.profile-details-grid__item {
  background: var(--profile-pill-bg, rgba(0,0,0,.04));
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.profile-details-grid__item dt {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--profile-pill-text, #888);
}

.profile-details-grid__icon {
  font-style: normal;
  font-size: 1rem;
  line-height: 1;
}

.profile-details-grid__item dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.profile-card__name {
    margin-bottom: 0;
}

@media (prefers-color-scheme: dark) {
  .profile-details-grid__item {
    background: rgba(255, 255, 255, 0.06);
  }
}


/* ==================================================
   18. PROFILE — EDIT PAGE  (/profile/edit)
   ================================================== */

.profile-edit-page { max-width: 680px; margin: 0 auto; padding: 1.5rem var(--gutter); }

@media (min-width: 900px) { .profile-edit-page { padding: 2rem var(--gutter-lg); } }

.profile-edit-header { text-align: center; margin-bottom: 1.5rem; }
.profile-edit-header h1 { margin-bottom: 0.25rem; }
.profile-edit-subtitle { color: var(--profile-pill-text); margin-top: 0; }

.profile-edit-form { max-width: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.5rem; }

.profile-completeness { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.25rem; }

.profile-completeness__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--profile-pill-text);
}

.profile-completeness__label strong { color: var(--text); font-size: 1rem; }

.profile-completeness__track { height: 8px; background: var(--profile-pill-bg); border-radius: 999px; overflow: hidden; }

.profile-completeness__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--profile-accent), var(--profile-gold));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.profile-completeness__hint { margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--profile-pill-text); }

.profile-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--profile-card-radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.profile-section__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: left;
  color: var(--profile-accent);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) { .profile-section__title { color: var(--profile-gold); } }

.profile-section__desc { margin: -0.5rem 0 0; font-size: 0.9rem; color: var(--profile-pill-text); }

.profile-field { display: flex; flex-direction: column; gap: 0.35rem; }
.profile-field label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text); gap: 0; }

.profile-field--readonly .profile-field__static {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.5rem 0;
}

.required    { color: var(--profile-accent); font-size: 0.8rem; }
.field-error { color: var(--error); font-size: 0.875rem; margin: 0; }
.field-hint  { color: var(--profile-pill-text); font-size: 0.82rem; margin: 0; }

.photo-upload-area { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }

.photo-upload-preview {
  width: 110px; height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--profile-gold);
  flex-shrink: 0;
  background: var(--profile-pill-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-upload-preview__img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-upload-preview__placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  color: var(--profile-pill-text); font-size: 0.75rem; text-align: center; padding: 0.5rem;
}

.photo-upload-preview__icon { font-size: 2rem; line-height: 1; }

.photo-upload-controls { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; min-width: 160px; }

.photo-upload-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--profile-accent);
  border: 2px solid var(--profile-accent);
  transition: background 0.15s ease;
  width: fit-content;
}

.photo-upload-label:hover { background: rgba(139, 26, 26, 0.08); }

@media (prefers-color-scheme: dark) {
  .photo-upload-label { color: var(--profile-gold); border-color: var(--profile-gold); }
  .photo-upload-label:hover { background: rgba(201, 150, 42, 0.1); }
}

.photo-upload-input { width: 0.1px; height: 0.1px; opacity: 0; overflow: hidden; position: absolute; z-index: -1; }

.interests-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.interest-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--interest-bg);
  color: var(--interest-text);
  border: 1px solid var(--interest-border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease, transform 0.05s ease;
  user-select: none;
}

.interest-tag:hover { border-color: var(--profile-accent); }
.interest-tag:active { transform: scale(0.97); }

.interest-tag--active,
.interest-tag:has(.interest-tag__input:checked) {
  background: var(--interest-active-bg);
  color: var(--interest-active-text);
  border-color: var(--interest-active-bg);
}

.interest-tag__input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }

.profile-edit-submit { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding: 0.5rem 0 1.5rem; }
.profile-edit-submit input[type="submit"] { width: auto; }

/* Card wrapper */
/* Card wrapper */
.edit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--profile-card-radius, 12px);
  overflow: hidden;
}

/* Card title bar */
.edit-card__title {
  margin: 0;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--profile-accent, #8b1a1a);
  border-bottom: 1px solid var(--border);
  background: rgba(139, 26, 26, 0.04);
}

@media (prefers-color-scheme: dark) {
  .edit-card__title {
    color: var(--profile-gold, #c9962a);
    background: rgba(201, 150, 42, 0.06);
  }
}

/* Card body */
.edit-card__body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* Two-column grid inside a card body (About You, Location, Appearance, Lifestyle) */
.edit-card__body--two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}

/* Span both columns — used for bio textarea and username row */
.edit-card__span-two {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .edit-card__body--two-col {
    grid-template-columns: 1fr;
  }
  /* Span is implicit on single column but keep for clarity */
  .edit-card__span-two {
    grid-column: 1;
  }
}

/* Static (non-editable) field display */
.field-static {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.4rem 0;
  margin: 0;
  font-size: 0.95rem;
}

/* Short input (postcode) */
.input--short {
  max-width: 180px;
}

/* Field hint text */
.field-hint {
  display: block;
  font-size: 0.82rem;
  color: var(--profile-pill-text, #888);
  margin-top: 0.2rem;
}

/* Required field asterisk */
.required-mark {
  display: inline-block;
  color: var(--error, #b01c1c);
  font-size: 0.85em;
  margin-left: 0.1em;
}

/* Prevents asterisk for required fields on profile edit view dropping below labels */
label[for="location"],
label[for="postcode"],
label[for="gender"],
label[for="bio"],
label[for="relationship_status"],
label[for="looking_for"],
label[for="sexuality"],
label[for="height_cm"],
label[for="ethnicity"],
label[for="body_type"],
label[for="smoker"],
label[for="drinker"],
label[for="tattoos"]
{
  display: flex;
  flex-direction: row; /* Forces children to stay side-by-side */
  align-items: center;  /* Vertically aligns the asterisk with the text */
  gap: 0.2em;           /* Replaces margin-left for cleaner spacing */
  margin-bottom:0.5em;
}

/* Current photo thumbnail on edit page */
.current-photo-wrap {
  margin-bottom: 0.5rem;
}

.current-photo-thumb {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--profile-gold, #c9962a);
  display: block;
}

/* Save button row */
.edit-form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.5rem 0 1.5rem;
}

.edit-form-actions input[type="submit"] {
  width: auto;
}

/* Page header above the form */
.page-header {
  margin-bottom: 1.25rem;
}

.page-header h1 {
  margin: 0 0 0.25rem;
}

.page-header .muted {
  margin: 0;
  color: var(--profile-pill-text, #888);
  font-size: 0.95rem;
}



/* ==================================================
   19. PROFILE — VISITORS PAGE  (/profile/visitors)
   ================================================== */

.visitors-page-header { margin-bottom: 1.5rem; }
.visitors-page-subtitle { opacity: 0.7; margin: 0.25rem 0 0; }
.visitors-empty { text-align: center; padding: 2rem; opacity: 0.7; }

.visitor-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }

.visitor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(123, 45, 66, 0.06);
  border: 1px solid rgba(123, 45, 66, 0.15);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.visitor-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.12); background: rgba(123, 45, 66, 0.10); }

.visitor-card__photo-wrap { margin-bottom: 0.75rem; }

.visitor-card__photo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }

.visitor-card__photo--placeholder {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #7b2d42;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visitor-card__initial { color: #fff; font-size: 1.75rem; font-weight: 800; line-height: 1; }
.visitor-card__name    { display: block; font-size: 1rem; font-weight: 700; margin-bottom: 0.35rem; }

.visitor-card__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin-bottom: 0.5rem; }
.visitor-card__meta-item { font-size: 0.85rem; opacity: 0.75; }
.visitor-card__time { font-size: 0.8rem; opacity: 0.55; }

.visitors-pagination { display: flex; align-items: center; gap: 0.5rem; margin: 0.75rem 0; }
.visitors-pagination__info { font-size: 0.9rem; opacity: 0.75; }


/* ==================================================
   20. MESSAGING — INBOX  (/messages)
   ================================================== */

.msg-inbox { padding: 1.5rem 0; }

.msg-inbox__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; gap: 1rem; }
.msg-inbox__header h1 { margin: 0; text-align: left; }
.msg-inbox__header-actions { display: flex; align-items: center; gap: 0.5rem; }
.msg-inbox__empty { text-align: center; opacity: 0.65; margin-top: 3rem; }

.inbox-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.inbox-table thead th {
  background: var(--table-head-bg);
  color: var(--table-head-text);
  font-weight: 700;
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.inbox-table thead th.inbox-table__col--time { text-align: right; padding-right: 0.75rem; }

.inbox-table__col--avatar  { width: 44px; }
.inbox-table__col--name    { width: 22%; }
.inbox-table__col--actions { width: 44px; }

.inbox-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s ease; }
.inbox-table tbody tr:nth-child(odd)  { background: var(--surface); }
.inbox-table tbody tr:nth-child(even) { background: rgba(0,0,0,0.035); }
.inbox-table tbody tr:last-child      { border-bottom: none; }
.inbox-table tbody tr:hover           { background: rgba(139, 26, 26, 0.07); }

.inbox-table__row--unread td { font-weight: 600; }
.inbox-table__row--unread    { background: rgba(139, 26, 26, 0.04) !important; }

.inbox-table td { padding: 0.35rem 0.75rem; vertical-align: middle; line-height: 1.2; }

@media (prefers-color-scheme: dark) {
  .inbox-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.04); }
  .inbox-table tbody tr:hover           { background: rgba(255,100,100,0.08); }
  .inbox-table__row--unread             { background: rgba(255,80,80,0.06) !important; }
}

/* Avatar uses CSS background-image when a photo URL exists (see .avatar-initial rules) */

.avatar-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  line-height: 1;
}

@media (prefers-color-scheme: dark) {
  .avatar-initial, .chat-header__avatar { background: #8b0000; color: #fff; }
}

.inbox-table__name { vertical-align: middle; }
.inbox-table__name-wrap { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.inbox-table__name-link { color: var(--text); text-decoration: none; font-weight: inherit; }
.inbox-table__name-link:hover { text-decoration: underline; }
.inbox-table__username { font-size: 0.8rem; opacity: 0.6; }
.inbox-table__preview  { color: var(--text); opacity: 0.7; font-size: 0.9rem; }

.inbox-table__time {
  font-size: 0.8rem; opacity: 0.55;
  text-align: right !important;
  width: 90px; white-space: nowrap;
  padding-right: 0.75rem;
}

.inbox-table__col--avatar,
.inbox-table__avatar {
  width: 56px;
}

.inbox-table__time time { display: block; text-align: right; }
.inbox-table__actions { text-align: center; }
.inbox-delete-form { display: inline; margin: 0; padding: 0; }


/* ==================================================
   21. MESSAGING — CONVERSATION / CHAT
   ================================================== */

.chat-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
  max-width: 820px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}

.main:has(.chat-page) { padding-bottom: 0; }

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--nav-bg);
  color: var(--nav-text);
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.chat-back { color: var(--nav-text); text-decoration: none; font-size: 1.25rem; opacity: 0.8; line-height: 1; }
.chat-back:hover { opacity: 1; }

.chat-header__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.chat-header__info { flex: 1; min-width: 0; }

.chat-header__name {
  color: var(--nav-text);
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-header__name:hover { text-decoration: underline; }
.chat-header__username   { font-size: 0.78rem; opacity: 0.6; }
.chat-header__actions    { flex-shrink: 0; display: flex; align-items: center; gap: 0.5rem; }

.chat-action-form { display: contents; margin: 0; padding: 0; }
.chat-action-form .btn--ghost { color: var(--nav-text); border-color: rgba(255, 255, 255, 0.3); }
.chat-action-form .btn--ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.5); }

.chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: #fdfaf6;
}

/* ==================================================
   45b. INBOX HERO ACTIONS
   ================================================== */

.settings-hero {
    position: relative;
}

.msg-inbox__hero-actions {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

@media (prefers-color-scheme: dark) { .chat-thread { background: #1a1515; } }

.chat-thread__empty { text-align: center; opacity: 0.5; margin: auto; }

.chat-date-sep {
  display: flex; align-items: center; gap: 0.6rem;
  margin: 0.75rem 0;
  color: var(--text); opacity: 0.45; font-size: 0.78rem;
}

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

.chat-msg { display: flex; flex-direction: column; max-width: 70%; gap: 0.15rem; }
.chat-msg--mine   { align-self: flex-end;   align-items: flex-end; }
.chat-msg--theirs { align-self: flex-start; align-items: flex-start; }

.chat-msg__bubble {
  padding: 0.55rem 0.85rem;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-msg--mine .chat-msg__bubble   { background: #c8e6c9; color: #1b3a1f; border-bottom-right-radius: 4px; }
.chat-msg--theirs .chat-msg__bubble { background: #bbdefb; color: #0d2a47; border-bottom-left-radius: 4px; }

@media (prefers-color-scheme: dark) {
  .chat-msg--mine .chat-msg__bubble   { background: #2e5c30; color: #d4f0d6; }
  .chat-msg--theirs .chat-msg__bubble { background: #1a3a5c; color: #cce3f8; }
}

.chat-msg__meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: nowrap;
}

.chat-msg__time    { 
  font-size: 0.72rem; 
  opacity: 0.5; 
  white-space: nowrap;
  flex: 0 0 auto;
}

.chat-msg__receipt { font-size: 0.72rem; opacity: 0.5; }
.chat-msg__receipt--read { opacity: 0.9; color: #1e90ff; }

.chat-msg__del-form { display: inline; margin: 0; padding: 0; line-height: 0; }

.chat-msg__del {
  background: none; border: none; cursor: pointer;
  font-size: 0.85rem; opacity: 0; color: #c00;
  padding: 0; line-height: 1; width: auto; height: auto;
  display: inline-block; transition: opacity 0.15s;
}

.chat-msg--mine:hover .chat-msg__del       { opacity: 0.6; }
.chat-msg--mine:hover .chat-msg__del:hover { opacity: 1; }

.chat-emoji-bar {
  display: flex; flex-wrap: nowrap; overflow-x: auto;
  gap: 0.15rem; padding: 0.35rem 0.75rem 0.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface); scrollbar-width: thin;
}

.emoji-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1.25rem; padding: 0.1rem 0.25rem;
  border-radius: 4px; width: auto; flex-shrink: 0; transition: background 0.1s;
}

.emoji-btn:hover { background: rgba(0,0,0,0.08); }

@media (prefers-color-scheme: dark) { .emoji-btn:hover { background: rgba(255,255,255,0.1); } }

.chat-compose { flex-shrink: 0; background: var(--surface); border-top: 1px solid var(--border); }
.chat-compose__blocked { padding: 0.85rem 1rem; font-size: 0.9rem; opacity: 0.7; margin: 0; }

.chat-compose__form {
  display: flex; align-items: flex-end; gap: 0.5rem;
  padding: 0.65rem 0.75rem; max-width: none;
}

.chat-compose__input {
  flex: 1; resize: none; border-radius: 20px;
  padding: 0.55rem 0.9rem; font-size: 0.95rem;
  min-height: 40px; max-height: 160px; overflow-y: auto; line-height: 1.4;
  border: 1px solid var(--input-border);
  background: var(--input-bg); color: var(--input-text); width: auto;
}

.chat-compose__input:focus {
  outline: none; border-color: var(--focus);
  box-shadow: 0 0 0 1px rgba(236,151,67,0.36);
}

.chat-compose__send {
  flex-shrink: 0; width: 42px; height: 42px;
  border-radius: 50%; background: var(--btn-bg); color: var(--btn-text);
  border: none; cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  padding: 0; transition: background 0.15s, transform 0.08s;
}

.chat-compose__send:hover  { background: var(--btn-hover-bg); }
.chat-compose__send:active { transform: scale(0.95); }

/* In-chat flash messages (renders inside .chat-thread) */
.chat-flash {
    margin: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.chat-flash--error {
    background: var(--error-bg);
    color: var(--error);
    border-color: hsla(var(--error-h), 73%, 40%, 0.15);
}

.chat-flash--success {
    background: var(--success-bg);
    color: var(--success);
    border-color: hsla(var(--success-h), 61%, 26%, 0.15);
}


/* ==================================================
   22. MESSAGING — SETTINGS PAGE  (/messages/settings)
   ================================================== */

.msg-settings { max-width: 640px; margin: 0 auto; padding: 2rem var(--gutter) 4rem; }
.msg-settings__header { margin-bottom: 2rem; }
.msg-settings__title { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 0.35rem; text-align: left; }
.msg-settings__subtitle { color: #888; margin: 0; font-size: 0.95rem; }
.msg-settings__actions { margin-top: 0.5rem; display: flex; justify-content: flex-end; }

.settings-section { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 1.25rem; overflow: hidden; }
.settings-section--standalone { margin-top: 2rem; }

.settings-section__label {
  display: flex; align-items: flex-start; gap: 0.85rem;
  padding: 1.1rem 1.25rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.settings-section__icon    { font-size: 1.4rem; line-height: 1; margin-top: 0.1rem; flex-shrink: 0; }
.settings-section__heading { font-size: 1rem; font-weight: 700; margin: 0 0 0.2rem; letter-spacing: -0.01em; }
.settings-section__desc    { font-size: 0.85rem; color: #888; margin: 0; line-height: 1.4; }
.settings-section__body    { padding: 1.1rem 1.25rem; }

.settings-radio-group { display: grid; gap: 0.6rem; }

.settings-radio-group__legend {
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: #999; margin: 0 0 0.5rem;
}

.settings-radio {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.8rem 1rem;
  border: 2px solid var(--border); border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  position: relative;
}

.settings-radio:hover      { border-color: var(--focus); background: rgba(232, 122, 31, 0.04); }
.settings-radio--selected  { border-color: var(--focus); background: rgba(232, 122, 31, 0.06); }

.settings-radio input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }

.settings-radio__icon { font-size: 1.4rem; flex-shrink: 0; }
.settings-radio__text { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; }
.settings-radio__text strong { font-size: 0.95rem; font-weight: 700; }
.settings-radio__sub  { font-size: 0.8rem; color: #888; }

.settings-radio__check {
  width: 20px; height: 20px;
  border: 2px solid var(--border); border-radius: 50%;
  flex-shrink: 0; transition: border-color 0.15s, background 0.15s; position: relative;
}

.settings-radio--selected .settings-radio__check { border-color: var(--focus); background: var(--focus); }
.settings-radio--selected .settings-radio__check::after,
.settings-radio:has(input:checked) .settings-radio__check::after {
  content: ''; position: absolute;
  top: 4px; left: 4px; width: 8px; height: 8px;
  border-radius: 50%; background: #fff;
}

.settings-radio:has(input:checked) { border-color: var(--focus); background: rgba(232, 122, 31, 0.06); }
.settings-radio:has(input:checked) .settings-radio__check { border-color: var(--focus); background: var(--focus); }

.settings-toggle { display: flex; align-items: center; gap: 1rem; cursor: pointer; }
.settings-toggle__text { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }
.settings-toggle__text strong { font-size: 0.95rem; font-weight: 700; }
.settings-toggle__sub  { font-size: 0.82rem; color: #888; }
.settings-toggle__input { position: absolute; opacity: 0; width: 0; height: 0; }

.settings-toggle__track {
  width: 46px; height: 26px;
  background: var(--border); border-radius: 999px;
  position: relative; flex-shrink: 0;
  transition: background 0.2s ease;
  border: 1px solid rgba(0,0,0,0.1);
}

.settings-toggle__thumb {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.2s ease;
}

.settings-toggle:has(.settings-toggle__input:checked) .settings-toggle__track { background: var(--focus); }
.settings-toggle:has(.settings-toggle__input:checked) .settings-toggle__thumb { transform: translateX(20px); }
.settings-toggle:has(.settings-toggle__input:focus-visible) .settings-toggle__track {
  outline: 3px solid rgba(232, 122, 31, 0.45); outline-offset: 2px;
}

.settings-empty { color: #888; font-size: 0.9rem; font-style: italic; margin: 0; }

/* Blocked users within message settings */
.blocked-list { display: grid; gap: 0.5rem; }

.blocked-row {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.7rem 0.85rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px;
}

.blocked-row__avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--admin-subnav-bg); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem; flex-shrink: 0;
}

.blocked-row__info     { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.blocked-row__name     { font-size: 0.95rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blocked-row__username { font-size: 0.8rem; color: #888; }
.blocked-row__date     { font-size: 0.78rem; color: #aaa; }
.blocked-row__unblock  { margin: 0; padding: 0; display: inline-flex; max-width: none; }

@media (prefers-color-scheme: dark) {
  .settings-radio:hover, .settings-radio--selected { background: rgba(232, 122, 31, 0.08); }
  .settings-toggle__track { background: #444; border-color: rgba(255,255,255,0.12); }
  .settings-toggle__thumb { background: #ccc; box-shadow: 0 1px 3px rgba(0,0,0,0.5); }
  .msg-settings__subtitle, .settings-section__desc, .settings-radio__sub,
  .settings-toggle__sub, .blocked-row__username, .blocked-row__date,
  .settings-empty { color: #777; }
}


/* ==================================================
   23. SETTINGS PAGES  (/settings/*)
   Reuses global form + card styles. Add overrides below.
   ================================================== */


/* ==================================================
   24. ADMIN — SHARED UI HELPERS
   ================================================== */

.status-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

.unblock-inline { display: inline-flex; margin: 0; }
.unblock-inline button { width: auto; padding: 0.35rem 0.6rem; border-radius: 8px; font-weight: 700; }

.quick-blocks { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.quick-blocks button { width: auto; padding: 0.45rem 0.65rem; border-radius: 8px; font-weight: 800; }
.quick-blocks button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.quick-form { margin: 0; display: contents; }

.custom-block { display: grid; gap: 0.5rem; }
.custom-block label { display: grid; gap: 0.35rem; }

.page--admin .admin-intro{
  max-width: none;
  margin: 0 0 1.5rem;
}

.history { margin-top: 0.35rem; }
.history details { display: inline-block; }
.history summary { cursor: pointer; font-weight: 700; opacity: 0.85; }
.history summary:hover { opacity: 1; }
.history-empty { margin-top: 0.35rem; opacity: 0.75; }

/* Membership inline form */
.membership-form { display: grid; gap: .5rem; margin-top: .75rem; padding-top: .75rem; border-top: 1px solid rgba(0,0,0,.08); }
.membership-form label { display: grid; gap: .35rem; }


/* ==================================================
   25. ADMIN — FIND USER & BLOCK MANAGEMENT
   ================================================== */

.admin-table-wrap { width: 100%; max-width: none; margin: 0 auto 2rem; padding: 0; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; border-radius: 6px; }

@media (prefers-color-scheme: dark) {
  table.admin-table { background: #2a2424; border-color: rgba(255, 255, 255, 0.08); }
  .admin-table thead th                 { background: #6e1414; }
  .admin-table tbody tr:nth-child(odd)  { background: rgba(255, 255, 255, 0.02); }
  .admin-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.05); }
  .admin-table tbody tr:hover           { background: rgba(201, 150, 42, 0.08); }
}

.audit-pagination { margin: 1rem 0; }


/* ==================================================
   26. ADMIN — HOME DASHBOARD  (/admin)
   ================================================== */

.admin-home { display: flex; flex-direction: column; gap: 1.75rem; padding: 1.5rem 0; }

.admin-home__header {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem;
}

.admin-home__header h1 { margin: 0; text-align: left; }
.admin-home__date { color: var(--profile-pill-text); font-size: 0.9rem; margin: 0; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  transition: transform 0.2s ease;
}


.stat-card--accent  { border-color: var(--profile-gold); background: rgba(201, 150, 42, 0.05); }
.stat-card--warning { border-color: #c0392b;             background: rgba(192, 57, 43, 0.05); }

.stat-card__label {
  font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--profile-pill-text);
}

.stat-card__value { font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--text); }
.stat-card__sub   { font-size: 0.82rem; color: var(--profile-pill-text); margin-top: 0.15rem; }
.stat-card__sub a { color: var(--profile-accent); text-decoration: none; }
.stat-card__sub a:hover { text-decoration: underline; }

@media (prefers-color-scheme: dark) {
  .stat-card--accent  { background: rgba(201, 150, 42, 0.08); }
  .stat-card--warning { background: rgba(192, 57, 43, 0.08); }
  .stat-card__sub a   { color: var(--profile-gold); }
}

.stat-mini-bar { height: 5px; background: var(--profile-pill-bg); border-radius: 999px; overflow: hidden; margin-bottom: 0.3rem; }
.stat-mini-bar__fill { height: 100%; background: linear-gradient(90deg, var(--profile-accent), var(--profile-gold)); border-radius: 999px; }

/* Two-column panels */
.admin-home__panels { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

@media (max-width: 700px) { .admin-home__panels { grid-template-columns: 1fr; } }

.admin-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem 1.5rem; }
.admin-panel--full { grid-column: 1 / -1; }

.admin-panel__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border);
}

.admin-panel__header h2 { margin: 0; font-size: 1rem; font-weight: 700; text-align: left; color: var(--profile-accent); }

@media (prefers-color-scheme: dark) { .admin-panel__header h2 { color: var(--profile-gold); } }

.admin-panel__link { font-size: 0.85rem; color: var(--profile-accent); text-decoration: none; font-weight: 600; }
.admin-panel__link:hover { text-decoration: underline; }

@media (prefers-color-scheme: dark) { .admin-panel__link { color: var(--profile-gold); } }

.admin-panel__empty { color: var(--profile-pill-text); font-style: italic; font-size: 0.9rem; margin: 0; }

.admin-panel__table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

.admin-panel__table th {
  text-align: left; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--profile-pill-text);
  padding: 0 0.5rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.admin-panel__table th.text-right,
.admin-panel__table td.text-right { text-align: right; }

.admin-panel__table td { padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-panel__table tbody tr:last-child td { border-bottom: none; }
.admin-panel__table a { color: var(--profile-accent); text-decoration: none; font-weight: 600; }
.admin-panel__table a:hover { text-decoration: underline; }

@media (prefers-color-scheme: dark) { .admin-panel__table a { color: var(--profile-gold); } }

.admin-panel__row-link { font-size: 0.82rem; color: var(--profile-pill-text) !important; font-weight: normal !important; }

/* Popular interests bar chart */
.interest-bars { display: flex; flex-direction: column; gap: 0.6rem; }

.interest-bar-row {
  display: grid; grid-template-columns: 160px 1fr 36px;
  align-items: center; gap: 0.6rem; font-size: 0.875rem;
}

.interest-bar-row__name  { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.interest-bar-row__track { height: 8px; background: var(--profile-pill-bg); border-radius: 999px; overflow: hidden; }
.interest-bar-row__fill  { height: 100%; background: linear-gradient(90deg, var(--profile-accent), var(--profile-gold)); border-radius: 999px; transition: width 0.3s ease; }
.interest-bar-row__count { text-align: right; font-weight: 700; color: var(--profile-pill-text); font-size: 0.82rem; }


/* ==================================================
   27. ADMIN — INTERESTS PAGE  (/admin/interests)
   ================================================== */

.admin-interests-table { width: 100%; }
.admin-interests-table .col-usage   { width: 90px; text-align: center; }
.admin-interests-table .col-actions { width: 180px; }

.usage-badge {
  display: inline-block; padding: 0.2rem 0.6rem;
  border-radius: 999px; font-size: 0.85rem; font-weight: 700;
  text-align: center; min-width: 2rem;
}

.usage-badge--active { background: rgba(139, 26, 26, 0.1); color: #8b1a1a; }
.usage-badge--zero   { background: rgba(0, 0, 0, 0.06);    color: #888; }

@media (prefers-color-scheme: dark) {
  .usage-badge--active { background: rgba(201, 150, 42, 0.15); color: #c9962a; }
  .usage-badge--zero   { background: rgba(255, 255, 255, 0.07); color: #666; }
}

.interest-row__rename-input {
  width: auto; 
  flex: 1 1 220px;    /* let it take remaining space */
  min-width: 180px; 
  padding: 0.4rem 0.6rem; 
  font-size: 0.9rem; 

}

.interest-row__actions {
  display: flex; 
  align-items: center; 
  gap: 0.5rem; 
}

.interests-add-input { flex: 1; min-width: 0; }

.page--admin .card.interests-add-card{
  width: 100%;
  max-width: 100%;
  margin: 0 0 2rem;
}

/* =========================
   Admin Interests: Add form card
   ========================= */

.interests-add-card h2{
  margin-bottom: 1rem;           /* breathing room under the heading */
}

.interests-add-card .interests-add-form{
  padding: 0;                    /* card already has padding */
  margin: 0;
}

/* input grows, button stays sized */
/* grid-friendly: just keep the shrink safety */
.interests-add-card .interests-add-input{
  min-width: 0;
  width: 100%;
}



/* make the Add button feel less “squashed” in a tight row */
/* only the Add button in the add-row */
.interests-add-card .interests-add-row .btn,
.interests-add-card .interests-add-row button{
  min-height: 40px;
  padding: 0.55rem 0.95rem;
}

/* =========================
   Admin Interests table row spacing
   ========================= */

/* More vertical padding ONLY for the interests table */
.admin-interests-table th,
.admin-interests-table td{
  padding-block: 0.65rem;     /* increase row height */
  padding-inline: 0.75rem;
  vertical-align: middle;
}

/* Slightly taller small buttons ONLY in the interests actions cell */
.admin-interests-table td.col-actions .btn--sm{
  min-height: 38px;
  padding: 0.5rem 0.9rem;
  line-height: 1;
}

/* Rename form: don’t look squashed */
.admin-interests-table .interest-row__rename-form{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;        /* space below the label when toggled */
}

.admin-interests-table .interest-row__rename-input{
  flex: 1 1 240px;
  min-width: 180px;
  min-height: 40px;          /* match button feel */
  padding: 0.55rem 0.75rem;
}

.admin-interests-table .interest-row__rename-form .btn--sm{
  min-height: 38px;
  padding: 0.5rem 0.9rem;
}

/* =========================
   Add Interest form row — mobile first (canonical)
   ========================= */

.interests-add-form{
  max-width: none;
  margin: 0;
  padding: 0;
  display: block;
}

.interests-add-row{
  display: grid;
  grid-template-columns: 1fr;   /* mobile: stacked */
  gap: 0.75rem;
  align-items: stretch;
  width: 100%;
}

.interests-add-input{
  width: 100%;
  min-width: 0;
}

/* mobile: full width button */
.interests-add-row .btn,
.interests-add-row button{
  width: 100%;
}

/* tablet/desktop: inline input + button */
@media (min-width: 600px){
  .interests-add-row{
    grid-template-columns: 1fr auto;
    align-items: center;}
  }

  .interests-add-row .btn,
  .interests-add-row button{
    width: auto;
  }

  .btn-icon--danger{color: red;}

/* ==================================================
   18b. PROFILE — EDIT PAGE ADDITIONS
   New classes for the updated edit.php form.
   Mobile-first throughout.
   ================================================== */

/* Page-level width override (edit page is wider than default 420px forms) */
.page--edit-profile form,
.page--edit-profile .card {
  max-width: 100%;
  width: 100%;
  margin-inline: 0;
}

/* Section card title */
.profile-edit-section {
  margin-bottom: 1.25rem;
}

.profile-edit-section__title {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: left;
  color: var(--profile-accent);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  .profile-edit-section__title { color: var(--profile-gold); }
}

/* Username display row (name + change button) */
.edit-username-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.4rem 0;
}

/* Two-column form grid — stacks on mobile, 2 cols on tablet+ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 600px) {
  .form-grid--2col {
    grid-template-columns: 1fr 1fr;
    gap: 0 1.5rem;
  }
}

/* Smoker / tri-state radio group */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-block: 0.25rem;
}

@media (min-width: 480px) {
  .radio-group {
    flex-direction: row;
    gap: 1.25rem;
  }
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 44px; /* touch target */
}

.radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

/* Interests checkbox grid — pill-style toggles */
.interests-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.interest-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--interest-bg);
  color: var(--interest-text);
  border: 1px solid var(--interest-border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  min-height: 36px; /* comfortable tap target */
}

.interest-checkbox-label:hover {
  border-color: var(--profile-accent);
}

.interest-checkbox-label--checked {
  background: var(--interest-active-bg);
  color: var(--interest-active-text);
  border-color: var(--interest-active-bg);
}

/* Hide the native checkbox visually — label acts as the toggle */
.interest-checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Profile photo preview on edit page */
.edit-photo-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.edit-photo-preview__img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--profile-gold);
  display: block;
  flex-shrink: 0;
}

.edit-photo-preview__label {
  font-size: 0.85rem;
  color: var(--profile-pill-text);
  font-style: italic;
}

/* File input — visible on all devices */
.input-file {
  display: block;
  width: 100%;
  padding: 0.6rem 0;
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
}

/* Flash error list */
.flash__list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
}

.flash__list li {
  margin-bottom: 0.2rem;
}

/* Save button row — full width on mobile, auto on desktop */
.profile-edit-submit {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.5rem 0 1.5rem;
}

.profile-edit-submit .btn {
  width: 100%;
}

@media (min-width: 600px) {
  .profile-edit-submit .btn {
    width: auto;
  }
}

/* ============================================================
   28. ADMIN — FIND USER
   ============================================================ */

.admin-table-wrap {
    max-width: 960px;
    margin: 0 auto 2rem;
    overflow-x: auto;
}

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 10px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 0.8rem 0.9rem;
    vertical-align: top;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.admin-table thead th {
    background: #111;
    color: #fff;
    font-weight: 700;
    border-bottom: none;
}

.admin-table tbody tr:nth-child(odd)  { background: rgba(0, 0, 0, .02); }
.admin-table tbody tr:nth-child(even) { background: rgba(0, 0, 0, .05); }
.admin-table tbody tr:hover           { background: rgba(244, 182, 58, 0.10); }

.admin-username {
    display: block;
    font-weight: 800;
    margin-bottom: 2px;
}

.admin-sub {
    display: block;
    font-size: 0.9rem;
    opacity: 0.75;
    margin-top: 2px;
    white-space: normal;
}

.membership-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}

.membership-inline {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

.membership-select {
    padding: 0.25rem 0.4rem;
    font-size: 0.85rem;
    border-radius: 6px;
    width: auto;
}

.membership-btn {
    width: auto;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 6px;
    font-weight: 700;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.unblock-inline {
    display: inline-flex;
    margin: 0;
}

.unblock-inline button {
    width: auto;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    font-weight: 800;
}

.quick-blocks {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.quick-form {
    margin: 0;
    display: contents;
}

.quick-form button {
    width: auto;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    font-weight: 800;
}

.quick-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.custom-block {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.custom-block label {
    display: grid;
    gap: 0.35rem;
}

.table-mini {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.table-mini th,
.table-mini td {
    padding: 0.35rem 0.45rem;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.table-mini thead th {
    background: rgba(0, 0, 0, .06);
    font-weight: 800;
}

.history {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.75;
}

.history-empty {
    margin-top: 0.35rem;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    table.admin-table {
        background: var(--color-surface);
        border-color: var(--color-border);
    }

    .admin-table thead th {
        background: rgba(255, 255, 255, .06);
        color: var(--color-text);
    }

    .admin-table tbody tr:nth-child(odd)  { background: rgba(255, 255, 255, .02); }
    .admin-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .04); }
    .admin-table tbody tr:hover           { background: rgba(244, 182, 58, 0.08); }

    .table-mini thead th {
        background: rgba(255, 255, 255, .06);
    }

    .table-mini th,
    .table-mini td {
        border-color: var(--color-border);
    }
}

/* ============================================================
   29. ONLINE / LAST SEEN INDICATOR
   ============================================================ */

.last-seen {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--color-text-muted, #888);
    margin: 0.25rem 0 0.5rem;
}

.last-seen--online {
    color: #2e9e5b;
    font-weight: 600;
}

.online-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2e9e5b;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(46, 158, 91, 0.3);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(46, 158, 91, 0.6); }
    50%  { box-shadow: 0 0 0 6px rgba(46, 158, 91, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 158, 91, 0); }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .last-seen {
        color: #999;
    }

    .last-seen--online {
        color: #4cbb7f;
    }

    .online-dot {
        background: #4cbb7f;
        box-shadow: 0 0 0 2px rgba(76, 187, 127, 0.3);
        animation: pulse-dot-dark 1.5s ease-in-out infinite;
    }
}

@keyframes pulse-dot-dark {
    0%   { box-shadow: 0 0 0 0 rgba(76, 187, 127, 0.6); }
    50%  { box-shadow: 0 0 0 6px rgba(76, 187, 127, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 187, 127, 0); }
}

/* ============================================================
   30. STATUS BAR BELL
   ============================================================ */

.status-bar__bell {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    color: #fff;
}

.status-bar__bell:hover {
    color: #fff;
}

.status-bar__bell-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    border-radius: 9px;
    background: #c3423f;
    color: #fff;
}

/* ============================================================
   31. VISITORS PAGE
   ============================================================ */

.visitors-page-header {
    margin-bottom: 1.5rem;
}

.visitors-page-subtitle {
    opacity: 0.7;
    margin: 0.25rem 0 0;
}

.visitors-empty {
    text-align: center;
    padding: 2rem;
    opacity: 0.7;
}

.visitor-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
}

.visitor-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(123, 45, 66, 0.06);
    border: 1px solid rgba(123, 45, 66, 0.15);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.visitor-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
    background: rgba(123, 45, 66, 0.10);
}

.visitor-card__photo-wrap {
    margin-bottom: 0.75rem;
}

.visitor-card__photo,
.visitor-card__photo--placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.visitor-card__photo--placeholder {
    background: var(--primary, #7b2d42);
    display: flex;
    align-items: center;
    justify-content: center;
}

.visitor-card__initial {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.visitor-card__name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.visitor-card__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.visitor-card__meta-item {
    font-size: 0.85rem;
    opacity: 0.75;
}

.visitor-card__time {
    font-size: 0.8rem;
    opacity: 0.55;
}

.visitors-pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.visitors-pagination__info {
    font-size: 0.9rem;
    opacity: 0.75;
}

@media (prefers-color-scheme: dark) {
    .visitor-card {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .visitor-card:hover {
        background: rgba(255, 255, 255, 0.06);
    }
}

.inline-form {
    display: inline !important;
    width: auto !important;
    margin: 0;
    padding: 0;
    max-width: none !important;
}

/* ==================================================
   VERIFICATIONS
   ================================================== */

/* Profile section header with actions alongside title */
.verif-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.verif-profile-header .profile-section-block__title {
  margin-bottom: 0;
}

.verif-profile-header__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Collapse animation */
.verif-collapse {
  overflow: hidden;
}

.verif-collapse[hidden] {
  display: none;
}

/* Count badge */
.verif-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--error-bg);
  color: var(--error);
  vertical-align: middle;
  margin-left: 0.35rem;
}

.verif-count-badge--approved {
  background: var(--success-bg);
  color: var(--success);
}

/* Verification card list */
.verif-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.verif-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--surface);
}

.verif-card--pending {
  border-left: 3px solid var(--focus);
}

.verif-card--approved {
  border-left: 3px solid var(--success);
}

/* Card header row */
.verif-card__header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.6rem;
}

.verif-card__name {
  font-weight: 700;
}

.verif-card__name a {
  color: var(--text);
  text-decoration: none;
}

.verif-card__name a:hover {
  text-decoration: underline;
}

.verif-card__type {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.verif-card__type--in_person {
  background: hsla(220, 70%, 50%, 0.12);
  color: hsl(220, 70%, 35%);
}

.verif-card__type--webcam {
  background: hsla(280, 60%, 50%, 0.12);
  color: hsl(280, 60%, 35%);
}

@media (prefers-color-scheme: dark) {
  .verif-card__type--in_person {
    background: hsla(220, 70%, 50%, 0.2);
    color: hsl(220, 80%, 75%);
  }
  .verif-card__type--webcam {
    background: hsla(280, 60%, 50%, 0.2);
    color: hsl(280, 70%, 75%);
  }
}

.verif-card__date {
  font-size: 0.85rem;
  margin-left: auto;
}

/* Attribute tags row */
.verif-card__attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

/* Comment blockquote */
.verif-card__comment {
  margin: 0.6rem 0 0;
  padding: 0.6rem 0.9rem;
  border-left: 3px solid var(--border);
  background: var(--bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text);
}

/* Approve/reject actions */
.verif-card__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

/* Page layouts */
.page--verify,
.page--verifications {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
}

/* ==================================================
   34. GALLERY UPLOAD FORM
   ================================================== */

.page--gallery-upload {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
}

/* Limit bar card */
.upload-limit-bar-card {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
}

.upload-limit-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.upload-limit-label {
  font-size: 0.9rem;
  color: var(--text);
}

.upload-limit-warning {
  color: var(--error);
  font-weight: 700;
}

.upload-limit-bar {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.upload-limit-bar__fill {
  height: 100%;
  background: var(--success);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.upload-limit-bar__fill--warn {
  background: var(--error);
}

/* Blocked / limit-reached card */
.upload-limit-card {
  text-align: center;
  padding: 2.5rem 2rem;
}

.upload-limit-card--blocked {
  border: 2px solid var(--border);
}

.upload-limit-card__icon {
  font-size: 2.5rem;
  margin: 0 0 0.5rem;
  line-height: 1;
}

.upload-limit-card h2 {
  margin: 0 0 0.75rem;
}

/* Upload form card */
.gallery-upload-form {
  padding: 1.5rem;
  display: grid;
  gap: 1.25rem;
}

/* Subject radio group */
.subject-radio-group {
  border: none;
  padding: 0;
  margin: 0;
}

.subject-radio-group legend {
  font-weight: 700;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  padding: 0;
}

.subject-radio-option {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0.6rem 0.5rem 0;
  font-size: 0.95rem;
  cursor: pointer;
}

.subject-radio-option input[type="radio"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

/* Tag toggle pill grid */
.tag-toggle-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  user-select: none;
  background: var(--surface);
  color: var(--text);
}

.tag-toggle input[type="checkbox"] {
  display: none; /* visually hidden — pill handles the state */
}

.tag-toggle:hover {
  border-color: var(--focus);
  background: rgba(232, 122, 31, 0.06);
}

.tag-toggle--selected,
.tag-toggle:has(input:checked) {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: var(--btn-text);
}

/* Misc */
.field-required {
  color: var(--error);
  margin-left: 0.1rem;
}

.field-hint {
  font-size: 0.88rem;
  color: var(--text);
  opacity: 0.7;
  margin: 0.2rem 0 0.5rem;
}

.field-hint-inline {
  font-size: 0.88rem;
  font-weight: 400;
  opacity: 0.7;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn--ghost {
  background: transparent;
  color: var(--btn-bg);
  border: 1.5px solid var(--btn-bg);
}

.btn--ghost:hover {
  background: rgba(199, 22, 16, 0.07);
}

.upload-approval-notice {
  font-size: 0.88rem;
  color: var(--text);
  opacity: 0.75;
  margin: 0;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .upload-limit-bar {
    background: rgba(255, 255, 255, 0.12);
  }

  .tag-toggle {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
  }

  .tag-toggle:hover {
    background: rgba(232, 122, 31, 0.12);
    border-color: var(--focus);
  }
}

/* Mobile */
@media (max-width: 480px) {
  .upload-limit-row {
    flex-direction: column;
    gap: 0.25rem;
  }

  .subject-radio-option {
    display: flex;
    width: 100%;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* ==================================================
   35. GALLERY MANAGE PAGE
   ================================================== */

.page--gallery-manage {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
}

/* Header row: title + upload button inline */
.gallery-manage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.gallery-manage-header h1 {
  margin: 0;
  text-align: left;
}

.gallery-manage-summary {
  font-size: 0.9rem;
  opacity: 0.75;
  margin: 0 0 1.25rem;
}

/* Tab bar */
.gallery-manage-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.gallery-manage-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.gallery-manage-tab:hover {
  color: var(--focus);
}

.gallery-manage-tab--active {
  color: #8B1A1A;
  border-bottom-color: #8B1A1A;
}

.gallery-manage-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  padding: 0 0.3em;
  height: 1.4em;
  border-radius: 999px;
  background: var(--border);
  font-size: 0.8rem;
  font-weight: 700;
}

.gallery-manage-tab--active .gallery-manage-tab__count {
  background: #8B1A1A;
  color: #fff;
}

/* Notices */
.gallery-manage-notice {
  font-size: 0.9rem;
  padding: 0.6rem 0.9rem;
  background: rgba(0,0,0,0.04);
  border-left: 3px solid var(--border);
  border-radius: 0 4px 4px 0;
  margin-bottom: 1rem;
}

/* Empty state */
.gallery-manage-empty {
  text-align: center;
  padding: 3rem 1rem;
  opacity: 0.7;
}

/* Photo grid */
.gallery-manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

/* Individual manage card */
.gallery-manage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gallery-manage-card__thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(0,0,0,0.08);
}

.gallery-manage-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Status badge overlaid on thumb */
.gallery-status-badge {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  pointer-events: none;
}

.gallery-status-badge--approved {
  background: rgba(25, 135, 84, 0.88);
  color: #fff;
}

.gallery-status-badge--pending {
  background: rgba(201, 150, 42, 0.9);
  color: #fff;
}

.gallery-status-badge--rejected {
  background: rgba(190, 30, 30, 0.88);
  color: #fff;
}

/* Card body */
.gallery-manage-card__body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.gallery-manage-card__subject {
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0;
}

.gallery-manage-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.82rem;
  opacity: 0.75;
  margin: 0;
}

.gallery-manage-card__date {
  font-size: 0.78rem;
}

/* Tag pills on manage card */
.gallery-manage-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.gallery-tag-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(139, 26, 26, 0.1);
  color: #8B1A1A;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Rejection reason */
.rejection-reason-card {
  background: rgba(190, 30, 30, 0.07);
  border: 1px solid rgba(190, 30, 30, 0.2);
  border-radius: 5px;
  padding: 0.5rem 0.65rem;
  font-size: 0.85rem;
}

.rejection-reason-card__label {
  font-weight: 700;
  margin: 0 0 0.2rem;
  color: #8B1A1A;
}

.rejection-reason-card__text {
  margin: 0;
  line-height: 1.4;
}

/* Delete button — pushed to bottom of card */
.gallery-manage-card__delete-form {
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Small button variant */
.btn--sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.88rem;
}

/* Danger button variant */
.btn--danger {
  background: rgba(190, 30, 30, 0.85);
  color: #fff;
}

.btn--danger:hover {
  background: rgba(190, 30, 30, 1);
}

/* Dark mode overrides */
@media (prefers-color-scheme: dark) {
  .gallery-manage-tab--active {
    color: #e07070;
    border-bottom-color: #e07070;
  }

  .gallery-manage-tab--active .gallery-manage-tab__count {
    background: #8B1A1A;
  }

  .gallery-manage-notice {
    background: rgba(255,255,255,0.04);
  }

  .gallery-tag-pill {
    background: rgba(224, 112, 112, 0.15);
    color: #e07070;
  }

  .rejection-reason-card {
    background: rgba(190, 30, 30, 0.12);
    border-color: rgba(190, 30, 30, 0.3);
  }

  .rejection-reason-card__label {
    color: #e07070;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .gallery-manage-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-manage-header h1 {
    font-size: 1.4rem;
  }
}

@media (max-width: 360px) {
  .gallery-manage-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================================================
   36. ADMIN GALLERY QUEUE
   ================================================== */

.page--admin-gallery h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.admin-gallery-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6em;
  padding: 0 0.4em;
  height: 1.6em;
  border-radius: 999px;
  background: #8B1A1A;
  color: #fff;
  font-size: 0.65em;
  font-weight: 800;
  vertical-align: middle;
}

.admin-gallery-intro {
  max-width: 680px;
  margin: 0 auto 1.5rem;
  text-align: center;
  opacity: 0.8;
  font-size: 0.95rem;
}

.admin-gallery-empty {
  text-align: center;
  padding: 2.5rem;
  max-width: 420px;
}

/* Queue grid — one card per photo */
.admin-gallery-queue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  max-width: var(--container-admin);
  margin: 0 auto;
}

/* Individual queue card */
.admin-gallery-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Preview image */
.admin-gallery-card__preview {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(0,0,0,0.08);
}

.admin-gallery-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Meta section */
.admin-gallery-card__meta {
  padding: 0.75rem 0.9rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.admin-gallery-card__uploader {
  font-weight: 700;
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.admin-gallery-card__uploader a {
  color: #8B1A1A;
  text-decoration: none;
}

.admin-gallery-card__uploader a:hover {
  text-decoration: underline;
}

.admin-gallery-card__detail {
  font-size: 0.85rem;
  margin: 0.15rem 0 0;
  opacity: 0.85;
}

/* Actions section */
.admin-gallery-card__actions {
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Approve button */
.btn--approve {
  background: rgba(25, 135, 84, 0.9);
  color: #fff;
  width: 100%;
}

.btn--approve:hover {
  background: rgba(25, 135, 84, 1);
}

/* Reject toggle button */
.btn--reject-toggle {
  background: rgba(190, 30, 30, 0.1);
  color: #8B1A1A;
  border: 1.5px solid rgba(190, 30, 30, 0.3);
  width: 100%;
}

.btn--reject-toggle:hover {
  background: rgba(190, 30, 30, 0.18);
}

/* Reject form (collapsed by default) */
.admin-gallery-reject-form {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.admin-gallery-reject-form.is-open {
  display: flex;
}

.admin-gallery-reject-form label {
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-gallery-reason-hint {
  font-weight: 400;
  opacity: 0.7;
}

.admin-gallery-reject-form textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  font-size: 0.88rem;
  padding: 0.5rem;
  border: 1px solid var(--input-border);
  border-radius: 5px;
  background: var(--input-bg);
  color: var(--input-text);
  font-family: inherit;
}

/* Confirm rejection button */
.btn--reject-confirm {
  background: #8B1A1A;
  color: #fff;
}

.btn--reject-confirm:hover {
  background: #a02020;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .admin-gallery-card__uploader a {
    color: #e07070;
  }

  .btn--reject-toggle {
    color: #e07070;
    border-color: rgba(224, 112, 112, 0.3);
    background: rgba(190, 30, 30, 0.15);
  }

  .btn--reject-toggle:hover {
    background: rgba(190, 30, 30, 0.25);
  }
}

/* Mobile */
@media (max-width: 600px) {
  .admin-gallery-queue {
    grid-template-columns: 1fr;
  }
}

/* ==================================================
   37. USER GALLERY PAGE  (/gallery/{username})
   ================================================== */

.page--user-gallery {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
}

.user-gallery-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.user-gallery-header h1 {
  margin-bottom: 0.35rem;
}

.user-gallery-count {
  font-size: 0.95rem;
  opacity: 0.75;
  margin: 0 0 0.4rem;
}

.user-gallery-locked-notice {
  color: var(--error);
  font-size: 0.9rem;
}

.user-gallery-profile-link {
  font-size: 0.9rem;
  margin: 0;
}

.user-gallery-comments-off {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
  margin: 0 0 1rem;
}

.user-gallery-empty {
  text-align: center;
  padding: 3rem 1rem;
  opacity: 0.7;
}

.user-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

/* ugc = user gallery card */
.ugc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ugc__thumb {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(0,0,0,0.08);
}

.ugc__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.ugc:hover .ugc__thumb img {
  transform: scale(1.03);
}

.ugc__body {
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.ugc__subject {
  font-weight: 700;
  font-size: 0.88rem;
  margin: 0;
}

.ugc__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.ugc__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.2rem;
}

.ugc__love-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
  transition: background 0.15s;
  width: auto;
  line-height: 1;
}

.ugc__love-btn:hover {
  background: rgba(139, 26, 26, 0.08);
  transform: none;
}

.ugc__love-btn--loved {
  color: #c0392b;
}

.ugc__love-count {
  font-size: 0.85rem;
  font-weight: 600;
}

.ugc__comments {
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
  margin-top: 0.25rem;
}

.ugc__comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ugc__comment-input {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  font-size: 0.85rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--input-border);
  border-radius: 5px;
  background: var(--input-bg);
  color: var(--input-text);
  font-family: inherit;
  min-height: 3.5rem;
}

.ugc__comment-noperm {
  font-size: 0.85rem;
  opacity: 0.75;
  margin: 0;
}

.user-gallery-upgrade-nudge {
  margin-top: 1.5rem;
  padding: 0.9rem 1rem;
  background: rgba(139, 26, 26, 0.06);
  border: 1px solid rgba(139, 26, 26, 0.18);
  border-radius: 7px;
  text-align: center;
  font-size: 0.92rem;
}

@media (prefers-color-scheme: dark) {
  .ugc__love-btn:hover {
    background: rgba(224, 112, 112, 0.1);
  }

  .user-gallery-upgrade-nudge {
    background: rgba(139, 26, 26, 0.12);
    border-color: rgba(224, 112, 112, 0.2);
  }
}

@media (max-width: 600px) {
  .user-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 360px) {
  .user-gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================================================
   32. GALLERY EXPLORE PAGE
   ================================================== */

.page--explore {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

/* Header */
.explore-header {
    margin-bottom: 1.25rem;
}

.explore-subhead {
    margin-top: 0.25rem;
    opacity: 0.7;
    font-size: 0.95rem;
}

/* Filter bar */
.explore-filters {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    padding: 0.85rem 1rem;
    background: var(--card-bg, rgba(255,255,255,0.05));
    border: 1px solid var(--card-border, rgba(0,0,0,0.08));
    border-radius: 10px;
}

.explore-filter-group {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.explore-filter-label {
    font-size: 0.85rem;
    font-weight: 700;
    opacity: 0.65;
    white-space: nowrap;
    padding-top: 0.3rem;
    min-width: 3rem;
}

.explore-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.explore-filter-pill {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--pill-bg, rgba(0,0,0,0.06));
    color: var(--text);
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}

.explore-filter-pill:hover {
    background: var(--pill-hover-bg, rgba(0,0,0,0.12));
}

.explore-filter-pill--active {
    background: var(--burgundy, #6b1d2e);
    color: #fff;
    border-color: var(--burgundy, #6b1d2e);
}

/* Upsell notice */
.explore-upsell-notice {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

/* Empty state */
.explore-empty {
    text-align: center;
    padding: 3rem 1rem;
    opacity: 0.7;
}

/* Photo grid — responsive masonry-style */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* ==================================================
   44. MEMBER BROWSE & SEARCH
   ================================================== */

.page--members {
    max-width: 1100px;
    margin: 0 auto;
}

/* Header */
.members-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.members-header h1 {
    margin: 0;
}

.members-header__count {
    font-size: 0.88rem;
    opacity: 0.6;
}

/* Filter panel */
.members-filters {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.members-filters__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.members-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.members-filter-label {
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.members-filter-select,
.members-filter-input {
    font-size: 0.88rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    width: 100%;
}

.members-filter-range {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.members-filter-range input {
    width: 70px;
    flex-shrink: 0;
}

.members-filter-no-postcode {
    font-size: 0.82rem;
    opacity: 0.7;
    padding: 0.35rem 0;
}

/* Checkboxes */
.members-filters__checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-bottom: 0.75rem;
}

.members-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    cursor: pointer;
}

.members-check input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

/* Submit row */
.members-filters__submit {
    display: flex;
    gap: 0.5rem;
}

/* Upgrade notice */
.members-upgrade-notice {
    font-size: 0.88rem;
    padding: 0.6rem 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    margin-bottom: 1rem;
}

/* Empty state */
.members-empty {
    text-align: center;
    padding: 3rem 1rem;
    opacity: 0.7;
}

/* Results grid */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Member card */
.member-card {
    display: flex;
    flex-direction: column;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.15s;
}

.member-card:hover {
    border-color: var(--focus);
    transform: translateY(-2px);
}

.member-card__avatar-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: var(--nav-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-card__avatar-wrap .avatar-initial--lg {
    width: 100%;
    height: 100%;
    border-radius: 0;
    font-size: 3rem;
}

.member-card__online-dot {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 14px;
    height: 14px;
    background: #22c55e;
    border: 2px solid var(--input-bg);
    border-radius: 50%;
}

.member-card__body {
    padding: 0.65rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.member-card__name {
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.member-card__meta {
    font-size: 0.8rem;
    opacity: 0.65;
}

.member-card__location {
    font-size: 0.8rem;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-card__distance {
    opacity: 0.55;
    font-size: 0.75rem;
}

.member-card__badges {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.2rem;
    flex-wrap: wrap;
}

.member-card__badge {
    font-size: 0.85rem;
}

.member-card__seen {
    font-size: 0.75rem;
    opacity: 0.55;
}

/* Pagination */
.members-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    padding: 1rem 0;
}

.members-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: 6px;
    font-size: 0.88rem;
    text-decoration: none;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text);
    transition: background 0.15s;
}

.members-page-btn:hover {
    background: var(--btn-bg);
    color: var(--btn-text);
    border-color: var(--btn-bg);
}

.members-page-btn--active {
    background: var(--btn-bg);
    color: var(--btn-text);
    border-color: var(--btn-bg);
    font-weight: 700;
    pointer-events: none;
}

.members-page-ellipsis {
    opacity: 0.4;
    padding: 0 0.25rem;
}

/* Mobile */
@media (max-width: 768px) {
    .members-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }

    .members-filters__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .explore-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
}

/* Individual card */
.explore-card {
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg, rgba(255,255,255,0.05));
    border: 1px solid var(--card-border, rgba(0,0,0,0.08));
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s;
}

.explore-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* Thumbnail */
.explore-card__thumb-link {
    display: block;
    text-decoration: none;
}

.explore-card__thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--input-bg, #f5f5f5);
}

.explore-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}

.explore-card:hover .explore-card__thumb img {
    transform: scale(1.04);
}

/* Subscriber badge */
.explore-card__sub-badge {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    background: var(--gold, #b8960c);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    line-height: 1;
}

/* Card footer */
.explore-card__footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    flex-wrap: wrap;
}

.explore-card__uploader {
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.explore-card__uploader:hover {
    text-decoration: underline;
}

.explore-card__subject {
    font-size: 0.75rem;
    opacity: 0.6;
    white-space: nowrap;
}

/* Love button */
.explore-love-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem 0.3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--text);
    opacity: 0.6;
    transition: opacity 0.15s, transform 0.15s;
    flex-shrink: 0;
}

.explore-love-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}

.explore-love-btn--loved {
    opacity: 1;
    color: #c0392b;
}

.explore-love-count {
    font-size: 0.78rem;
    font-weight: 700;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .explore-filter-pill {
        background: rgba(255,255,255,0.08);
    }

    .explore-filter-pill:hover {
        background: rgba(255,255,255,0.15);
    }

    .explore-card__thumb {
        background: #1a1a1a;
    }
}

/* ==================================================
   33. USER GALLERY PAGE
   ================================================== */

.page--user-gallery {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

/* Header */
.user-gallery-header {
    margin-bottom: 1.5rem;
}

.user-gallery-header__name-link {
    color: inherit;
    text-decoration: none;
}

.user-gallery-header__name-link:hover {
    text-decoration: underline;
}

.user-gallery-header__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.9rem;
    opacity: 0.75;
    margin-top: 0.25rem;
}

.user-gallery-locked-notice {
    color: var(--gold, #b8960c);
    opacity: 1;
}

/* Empty state */
.user-gallery-empty {
    text-align: center;
    padding: 3rem 1rem;
    opacity: 0.7;
}

/* Photo grid */
.user-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 480px) {
    .user-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
}

/* Individual card */
.ugallery-card {
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg, rgba(255,255,255,0.05));
    border: 1px solid var(--card-border, rgba(0,0,0,0.08));
    display: flex;
    flex-direction: column;
}

/* Thumbnail */
.ugallery-card__thumb {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--input-bg, #f5f5f5);
}

.ugallery-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}

.ugallery-card:hover .ugallery-card__thumb img {
    transform: scale(1.04);
}

/* Card footer */
.ugallery-card__footer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.6rem;
    flex-wrap: wrap;
}

.ugallery-card__subject {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-left: auto;
    white-space: nowrap;
}

/* Love button */
.ugallery-love-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem 0.3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--text);
    opacity: 0.6;
    transition: opacity 0.15s, transform 0.15s;
    flex-shrink: 0;
}

.ugallery-love-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}

.ugallery-love-btn--loved {
    opacity: 1;
    color: #c0392b;
}

.ugallery-love-count {
    font-size: 0.78rem;
    font-weight: 700;
}

/* Comment toggle button */
.ugallery-cmt-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.2rem 0.3rem;
    color: var(--text);
    opacity: 0.6;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.ugallery-cmt-toggle:hover,
.ugallery-cmt-toggle[aria-expanded="true"] {
    opacity: 1;
}

/* Comment panel — hidden until toggled */
.ugallery-cmt-panel {
    display: none;
    padding: 0.75rem;
    border-top: 1px solid var(--card-border, rgba(0,0,0,0.08));
    background: var(--input-bg, rgba(0,0,0,0.03));
}

.ugallery-cmt-panel.is-open {
    display: block;
}

/* Comment list */
.ugallery-cmt-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.ugallery-cmt {
    font-size: 0.85rem;
}

.ugallery-cmt__header {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.15rem;
}

.ugallery-cmt__author {
    font-weight: 700;
    text-decoration: none;
    color: var(--burgundy, #6b1d2e);
}

.ugallery-cmt__author:hover {
    text-decoration: underline;
}

.ugallery-cmt__time {
    font-size: 0.75rem;
    opacity: 0.55;
}

.ugallery-cmt__delete-form {
    margin-left: auto;
}

.ugallery-cmt__delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.2rem;
    opacity: 0.4;
    color: var(--text);
    transition: opacity 0.15s;
}

.ugallery-cmt__delete-btn:hover {
    opacity: 1;
    color: #c0392b;
}

.ugallery-cmt__body {
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
}

.ugallery-cmt-empty {
    font-size: 0.85rem;
    opacity: 0.55;
    margin: 0 0 0.75rem;
}

/* Add comment form */
.ugallery-cmt-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ugallery-cmt-form textarea {
    width: 100%;
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
    border: 1px solid var(--input-border, #ccc);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text);
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.ugallery-cmt-submit {
    align-self: flex-end;
    padding: 0.3rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--burgundy, #6b1d2e);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.ugallery-cmt-submit:hover {
    opacity: 0.85;
}

.ugallery-cmt-upgrade {
    font-size: 0.82rem;
    opacity: 0.7;
    margin: 0;
}

/* Explore page comment badge */
.explore-cmt-badge {
    font-size: 0.82rem;
    opacity: 0.6;
    text-decoration: none;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.2rem 0.2rem;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.explore-cmt-badge:hover {
    opacity: 1;
}

.explore-cmt-badge--empty {
    opacity: 0.3;
    pointer-events: none;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .ugallery-card__thumb {
        background: #1a1a1a;
    }

    .ugallery-cmt-panel {
        background: rgba(255,255,255,0.03);
    }
}

.user-gallery-manage-link {
    font-size: 0.85rem;
    opacity: 0.65;
    text-decoration: none;
    color: var(--text);
    transition: opacity 0.15s;
}

.user-gallery-manage-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ==================================================
   34. GALLERY LOVED FEED PAGE
   ================================================== */

.page--loved-feed {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

/* Header */
.loved-feed-header {
    margin-bottom: 1.5rem;
}

.loved-feed-subhead {
    margin-top: 0.25rem;
    opacity: 0.7;
    font-size: 0.95rem;
}

/* Empty state */
.loved-feed-empty {
    text-align: center;
    padding: 3rem 1rem;
    opacity: 0.7;
}

/* Feed list */
.loved-feed-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Individual item */
.loved-feed-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem;
    background: var(--card-bg, rgba(255,255,255,0.05));
    border: 1px solid var(--card-border, rgba(0,0,0,0.08));
    border-radius: 10px;
}

/* Avatar */
.loved-feed-item__avatar-link {
    flex-shrink: 0;
    text-decoration: none;
}

.loved-feed-item__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.loved-feed-item__avatar--placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--burgundy, #6b1d2e);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

/* Info */
.loved-feed-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem;
    font-size: 0.9rem;
}

.loved-feed-item__name {
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
}

.loved-feed-item__name:hover {
    text-decoration: underline;
}

.loved-feed-item__action {
    opacity: 0.75;
}

.loved-feed-item__time {
    font-size: 0.78rem;
    opacity: 0.5;
    white-space: nowrap;
}

/* Photo thumbnail */
.loved-feed-item__thumb-link {
    flex-shrink: 0;
    text-decoration: none;
}

.loved-feed-item__thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    transition: opacity 0.15s;
}

.loved-feed-item__thumb:hover {
    opacity: 0.85;
}

@media (max-width: 480px) {
    .loved-feed-item {
        gap: 0.6rem;
        padding: 0.6rem;
    }

    .loved-feed-item__avatar,
    .loved-feed-item__avatar--placeholder {
        width: 36px;
        height: 36px;
    }

    .loved-feed-item__thumb {
        width: 44px;
        height: 44px;
    }
}

/* ==================================================
   35. GALLERY LOVERS PAGE
   ================================================== */

.page--lovers {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

/* Header with photo thumbnail + info side by side */
.lovers-header {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--card-bg, rgba(255,255,255,0.05));
    border: 1px solid var(--card-border, rgba(0,0,0,0.08));
    border-radius: 10px;
}

.lovers-header__photo img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    flex-shrink: 0;
}

.lovers-header__info {
    flex: 1;
    min-width: 0;
}

.lovers-header__info h1 {
    font-size: 1.2rem;
    margin: 0 0 0.25rem;
}

.lovers-subhead {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0 0 0.6rem;
}

.lovers-back-link {
    font-size: 0.85rem;
    text-decoration: none;
    opacity: 0.65;
    color: var(--text);
    transition: opacity 0.15s;
}

.lovers-back-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Empty state */
.lovers-empty {
    text-align: center;
    padding: 2rem 1rem;
    opacity: 0.6;
}

/* Lovers list */
.lovers-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Individual item */
.lovers-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    background: var(--card-bg, rgba(255,255,255,0.05));
    border: 1px solid var(--card-border, rgba(0,0,0,0.08));
    border-radius: 8px;
}

.lovers-item__avatar-link {
    flex-shrink: 0;
    text-decoration: none;
}

.lovers-item__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.lovers-item__avatar--placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--burgundy, #6b1d2e);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.lovers-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.lovers-item__name {
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
}

.lovers-item__name:hover {
    text-decoration: underline;
}

.lovers-item__time {
    font-size: 0.78rem;
    opacity: 0.5;
    white-space: nowrap;
}

a.ugallery-love-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none;
    color: #c0392b;
    opacity: 1;
}

a.ugallery-love-btn:hover {
    opacity: 0.75;
    transform: none;
}

/* ==================================================
   36. PROFILE GALLERY TEASER
   ================================================== */

.profile-section-block__more {
    font-size: 0.85rem;
    font-weight: 400;
    margin-left: 0.75rem;
    text-decoration: none;
    opacity: 0.7;
    color: var(--text);
}

.profile-section-block__more:hover {
    opacity: 1;
    text-decoration: underline;
}

.profile-gallery-teaser {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

@media (min-width: 480px) {
    .profile-gallery-teaser {
        grid-template-columns: repeat(6, 1fr);
    }
}

.profile-gallery-teaser__thumb {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 6px;
    background: var(--input-bg);
}

.profile-gallery-teaser__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}

.profile-gallery-teaser__thumb:hover img {
    transform: scale(1.06);
}

.profile-gallery-teaser__link {
    display: inline-block;
    margin-top: 0.6rem;
    font-size: 0.88rem;
    opacity: 0.7;
    text-decoration: none;
    color: var(--text);
}

.profile-gallery-teaser__link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ==================================================
   37. MOBILE NAV AND STATUS BAR
   ================================================== */

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    border-radius: 6px;
    flex-shrink: 0;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--nav-text, #fff);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.nav-hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-active span:nth-child(2) { opacity: 0; }
.nav-hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--nav-bg, #1a0a0f);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 0.5rem 0 1rem;
}

.nav-mobile-menu.is-open { display: flex; }

.nav-mobile-menu a {
    color: var(--nav-text, #fff);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.15s;
}

.nav-mobile-menu a:hover {
    background: var(--nav-hover-bg, rgba(255,255,255,0.08));
}

.nav-mobile-menu__divider {
    padding: 0.6rem 1.25rem 0.3rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.45;
    color: var(--nav-text, #fff);
    margin-top: 0.5rem;
}

.nav-mobile-menu__logout {
    margin-top: 0.5rem;
    opacity: 0.7;
}

.nav-desktop-link { display: inline-block; }
.status-bar__desktop-only { display: inline-flex; }



.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none !important;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    border-radius: 6px;
    flex-shrink: 0;
    color: var(--nav-text, #fff);
}

/* ==================================================
   38. ADMIN MEMBERSHIP BREAKDOWN
   ================================================== */

.membership-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0;
}

.membership-tier {
    display: grid;
    grid-template-columns: 140px 1fr 180px;
    align-items: center;
    gap: 0.75rem;
}

.membership-tier__label {
    font-weight: 600;
    font-size: 0.95rem;
}

.membership-tier__bar-wrap {
    background: var(--input-border);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.membership-tier__bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.tier--free       { background: #888; }
.tier--sub        { background: #7c4dff; }
.tier--vip        { background: #f5b800; }

.membership-tier__stats {
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.8;
}

/* ==================================================
   39. INBOX CARD LAYOUT
   ================================================== */

.inbox-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    overflow: hidden;
}

.inbox-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--input-border);
    background: var(--input-bg);
    position: relative;
    transition: background 0.15s;
}

.inbox-card:last-child {
    border-bottom: none;
}

.inbox-card--unread {
    background: rgba(var(--accent-rgb, 180, 100, 40), 0.06);
}

.inbox-card:hover {
    background: rgba(0,0,0,0.03);
}

/* Avatar */
.inbox-card__avatar-link {
    position: relative;
    flex-shrink: 0;
    text-decoration: none;
}

.avatar-initial--lg {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
}

.inbox-card__online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 11px;
    height: 11px;
    background: #22c55e;
    border: 2px solid var(--input-bg);
    border-radius: 50%;
}

/* Body — the clickable area */
.inbox-card__body {
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

/* Top row: name + time */
.inbox-card__top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.inbox-card__name {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.inbox-card__time {
    font-size: 0.78rem;
    opacity: 0.55;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Meta: gender, age, location */
.inbox-card__meta {
    font-size: 0.8rem;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Preview */
.inbox-card__preview {
    font-size: 0.85rem;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Delete button */
.inbox-card__delete {
    flex-shrink: 0;
    opacity: 0.35;
    transition: opacity 0.15s;
    width: auto;
    padding: 0.3rem 0.5rem;
    background: none;
    font-size: 1.1rem;
    line-height: 1;
}

.inbox-card__delete:hover {
    opacity: 1;
}

/* Unread badge sits inline in name */
.inbox-card .unread-badge {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
}

.inbox-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 1.2rem;
    text-decoration: none;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    transition: background 0.15s;
}

.inbox-icon-btn:hover {
    background: var(--nav-hover-bg);
}

/* ==================================================
   40. GALLERY MANAGE — TAGS, VISIBILITY, COMMENTS
   ================================================== */

/* Visibility form */
.manage-visibility-form {
    margin: 0 0 0.5rem;
    padding: 0;
    max-width: none;
    display: block;
}

.manage-visibility-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.manage-visibility-select {
    font-size: 0.85rem;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    width: auto;
}

/* Tag pills (clickable checkboxes) */
.manage-tags-form {
    margin: 0 0 0.5rem;
    padding: 0;
    max-width: none;
    display: block;
}

.manage-tags__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.manage-tag-pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    cursor: pointer;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    user-select: none;
}

.manage-tag-pill:hover {
    border-color: var(--focus);
}

.manage-tag-pill--active {
    background: var(--btn-bg);
    color: var(--btn-text);
    border-color: var(--btn-bg);
}

/* Comments toggle */
.manage-comments {
    margin: 0.5rem 0;
}

.manage-comments__toggle {
    background: none;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    font-size: 0.83rem;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    width: auto;
    color: var(--text);
    transition: background 0.15s;
}

.manage-comments__toggle:hover {
    background: var(--input-bg);
}

/* Comment panel */
.manage-comments__panel {
    display: none;
    margin-top: 0.5rem;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    overflow: hidden;
}

.manage-comments__panel.is-open {
    display: block;
}

.manage-comments__empty {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    opacity: 0.6;
    margin: 0;
}

/* Individual comment rows */
.manage-comment-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--input-border);
}

.manage-comment-row:last-child {
    border-bottom: none;
}

.manage-comment-row__body {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
}

.manage-comment-row__body strong {
    font-size: 0.83rem;
}

.manage-comment-row__body p {
    margin: 0.2rem 0 0;
    word-break: break-word;
}

.manage-comment-row__time {
    font-size: 0.75rem;
    opacity: 0.55;
    margin-left: 0.4rem;
}

.manage-comment-row__delete {
    margin: 0;
    padding: 0;
    max-width: none;
    display: flex;
    flex-shrink: 0;
}

.manage-comment-row__delete button {
    width: auto;
    padding: 0.2rem 0.4rem;
}

/* ==================================================
   41. DASHBOARD QUICK BAR
   ================================================== */

.dash-quickbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
}

.dash-quickbar a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text);
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.dash-quickbar a:hover {
    background: var(--btn-bg);
    color: var(--btn-text);
    border-color: var(--btn-bg);
}

.status-bar__bell-badge--inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #e53e3e;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
    margin-left: 0.25rem;
}

/* ==================================================
   42. TAG SUGGESTION FORM
   ================================================== */

.tag-suggest {
    margin-top: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tag-suggest__toggle {
    background: none;
    border: 1px dashed var(--input-border);
    border-radius: 999px;
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
    width: auto;
    align-self: flex-start;
    color: var(--text);
    opacity: 0.7;
    transition: opacity 0.15s, border-color 0.15s;
}

.tag-suggest__toggle:hover {
    opacity: 1;
    border-color: var(--focus);
}

.tag-suggest__form {
    display: none;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag-suggest__form.is-open {
    display: flex;
}

.tag-suggest__input {
    width: 200px;
    font-size: 0.88rem;
    padding: 0.35rem 0.6rem;
}

.tag-suggestion-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag-suggestion-actions form {
    margin: 0;
    padding: 0;
    max-width: none;
}

.btn--success {
    background: #22c55e;
    color: #fff;
    border-color: #22c55e;
}

.btn--success:hover {
    background: #16a34a;
    border-color: #16a34a;
}

/* ==================================================
   43. GALLERY LIGHTBOX
   ================================================== */

   .page--wide {
    max-width: 1400px;
}

/* Thumb hover */
.ugallery-card__thumb {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.ugallery-card__thumb img {
    display: block;
    width: 100%;
    transition: transform 0.2s ease;
}

.ugallery-card__thumb:hover img {
    transform: scale(1.04);
}

.ugallery-card__zoom {
    position: absolute;
    bottom: 6px;
    right: 6px;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.ugallery-card__thumb:hover .ugallery-card__zoom {
    opacity: 1;
}

/* Lightbox overlay */
.glb {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glb__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}

/* Content container */
.glb__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
}

.glb__img-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 80vh;
}

.glb__img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 0.2s ease;
    display: block;
}

/* Spinner */
.glb__spinner {
    position: absolute;
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Upgrade overlay */
.glb__upgrade {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.glb__upgrade-inner {
    text-align: center;
    color: #fff;
    padding: 1.5rem;
}

.glb__upgrade-inner p {
    margin: 0 0 1rem;
    font-size: 1rem;
}

/* Caption bar */
.glb__caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.5rem 0.25rem 0;
    color: rgba(255,255,255,0.8);
    font-size: 0.88rem;
}

.glb__counter {
    white-space: nowrap;
    opacity: 0.6;
}

/* Control buttons */
.glb__close,
.glb__prev,
.glb__next {
    position: fixed;
    z-index: 2;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
    transition: background 0.15s;
    padding: 0;
}

.glb__close,
.glb__prev,
.glb__next {
    width: 44px !important;
}

.glb__close:hover,
.glb__prev:hover,
.glb__next:hover {
    background: rgba(255,255,255,0.2);
}

.glb__close {
    top: 1rem;
    right: 1rem;
}

.glb__prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    border-radius: 50%;
}

.glb__next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    border-radius: 50%;
}

@media (max-width: 768px) {
    .glb__prev { left: 0.25rem; }
    .glb__next { right: 0.25rem; }

    .glb__img {
        max-width: 95vw;
        max-height: 75vh;
    }
}

@media (max-width: 768px) {
    .membership-tier {
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }
}

@media (max-width: 768px) {

    .nav-hamburger { display: flex; }
    .nav-desktop-link { display: none !important; }

    .nav-inner {
        flex-wrap: nowrap;
        justify-content: space-between;
        padding: 0.5rem 1rem;
        display: flex;
      align-items: center;
    }

.nav-right {
    display: none;
}

    .nav-logo img { height: 48px; }

    .status-bar__desktop-only { display: none !important; }

    .status-bar__inner {
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
        padding: 0.3rem 0.75rem;
    }

    .status-bar__divider { display: none; }
    .status-bar__item { padding: 0; }
    .status-bar__bell { font-size: 1.1rem; }

    .admin-subnav__inner {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding: 0.4rem 0.75rem;
        gap: 0.5rem;
    }

    .admin-subnav a {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 0.3rem 0.5rem;
    }
}

/* ==================================================
   45. SETTINGS PAGE
   ================================================== */

/* Hero header */
.settings-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.settings-hero__icon {
    font-size: 2.5rem;
    line-height: 1;
}

.settings-hero__title {
    margin: 0 0 0.2rem;
    font-size: 1.6rem;
}

.settings-hero__sub {
    margin: 0;
    opacity: 0.6;
    font-size: 0.9rem;
}

/* Section grouping */
.settings-section {
    margin-bottom: 2rem;
}

.settings-section__label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.5;
    margin-bottom: 0.6rem;
    padding-left: 0.25rem;
}

.settings-section__icon {
    font-size: 1rem;
}

/* Settings card */
.settings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 2px 6px -1px rgba(0,0,0,0.07);
    margin-bottom: 1rem;
    overflow: hidden;
}

.settings-card__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--btn-bg) 0%, color-mix(in srgb, var(--btn-bg) 80%, #000) 100%);
    border-bottom: 1px solid var(--border);
}

.settings-card__header-icon {
    font-size: 1.75rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.settings-card__title {
    margin: 0 0 0.15rem;
    font-size: 1rem;
    color: var(--btn-text);
}

.settings-card__subtitle {
    margin: 0;
    font-size: 0.8rem;
    color: var(--btn-text);
    opacity: 0.8;
}

.settings-card__body {
    padding: 1.25rem;
}

.settings-card__body .muted {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    opacity: 0.7;
}

/* Toggle rows for privacy settings */
.settings-toggles {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.settings-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
}

.settings-toggle-row:last-child {
    border-bottom: none;
}

.settings-toggle-row__icon {
    font-size: 1.25rem;
    width: 2rem;
    text-align: center;
    flex-shrink: 0;
}

.settings-toggle-row__content {
    flex: 1;
}

.settings-toggle-row__label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.settings-toggle-row__desc {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-switch__slider {
    position: absolute;
    inset: 0;
    background: var(--input-border);
    border-radius: 24px;
    transition: background 0.2s;
}

.toggle-switch__slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-switch__slider {
    background: var(--btn-bg);
}

.toggle-switch input:checked + .toggle-switch__slider::before {
    transform: translateX(20px);
}

/* Footer nav */
.settings-footer-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

.settings-card__header--toggle {
    cursor: pointer;
    user-select: none;
}

.settings-card__header--toggle:hover {
    opacity: 0.9;
}

.settings-card__toggle-hint {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--btn-text);
    opacity: 0.8;
}

.settings-card--collapsed .settings-card__body {
    display: none;
}

.settings-footer-nav a {
    font-size: 0.88rem;
    opacity: 0.7;
    text-decoration: none;
    transition: opacity 0.15s;
}

.settings-footer-nav a:hover {
    opacity: 1;
}

/* ==================================================
   MEMBERS FILTER — PILL TOGGLES (meet_options / interests)
   Add to Section 45 or wherever your members filter CSS lives
   ================================================== */

.members-filter-pills-group {
    margin-top: 1rem;
}

.members-filter-pills-group .members-filter-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted, #888);
}

.members-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.members-pill-toggle {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border, rgba(0,0,0,0.15));
    background: transparent;
    color: var(--text, inherit);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
    width: auto;                /* override global button width rules */
    margin: 0;
}

.members-pill-toggle:hover {
    border-color: var(--btn-bg, #8b1a1a);
    color: var(--btn-bg, #8b1a1a);
    transform: none;            /* override global button hover transform */
}

.members-pill-toggle--active {
    background: var(--btn-bg, #8b1a1a);
    border-color: var(--btn-bg, #8b1a1a);
    color: var(--btn-text, #fff);
}

.members-pill-toggle--active:hover {
    opacity: 0.88;
    color: var(--btn-text, #fff);
}

/* ==================================================
   MEMBERS FILTER — PILL TOGGLES (meet_options / interests)
   Add to Section 45 or wherever your members filter CSS lives
   ================================================== */

.members-filter-pills-group {
    margin-top: 1rem;
}

.members-filter-pills-group .members-filter-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted, #888);
}

.members-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.members-pill-toggle {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border, rgba(0,0,0,0.15));
    background: transparent;
    color: var(--text, inherit);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
    width: auto;                /* override global button width rules */
    margin: 0;
}

.members-pill-toggle:hover {
    border-color: var(--btn-bg, #8b1a1a);
    color: var(--btn-bg, #8b1a1a);
    transform: none;            /* override global button hover transform */
}

.members-pill-toggle--active {
    background: var(--btn-bg, #8b1a1a);
    border-color: var(--btn-bg, #8b1a1a);
    color: var(--btn-text, #fff);
}

.members-pill-toggle--active:hover {
    opacity: 0.88;
    color: var(--btn-text, #fff);
}

/* Distance cap notice for free users */
.members-filter-cap-notice {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--muted, #888);
}

.members-filter-cap-notice a {
    color: var(--btn-bg, #8b1a1a);
    font-weight: 600;
    text-decoration: none;
}

.members-filter-cap-notice a:hover {
    text-decoration: underline;
}

/* ============================================================
   46. Notifications feed
   ============================================================ */

.page--notifications {
    max-width: 960px;  /* was 680px */
    margin: 0 auto;
}

.notifications-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--card-border, #e0e0e0);
    border-radius: 0.5rem;
    overflow: hidden;
}

.notification-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--card-bg, #fff);
    border-bottom: 1px solid var(--card-border, #e0e0e0);
    transition: background 0.15s;
}

.notification-row:last-child {
    border-bottom: none;
}

.notification-row--unread {
    background: var(--notification-unread-bg, rgba(139, 26, 26, 0.05));
}

.notification-row__icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 1.75rem;    /* was 2rem */
    text-align: center;
}

.notification-row__body {
    flex: 1;
    min-width: 0;
}

.notification-row__text {
    font-size: 0.9rem;
    color: var(--text, #222);
    line-height: 1.4;
}

.notification-row__text a {
    color: var(--btn-bg, #8b1a1a);
    font-weight: 600;
    text-decoration: none;
}

.notification-row__text a:hover {
    text-decoration: underline;
}

.notification-row__time {
    font-size: 0.75rem;
    color: var(--muted, #888);
    margin-top: 0.2rem;
}

.notification-row__read-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;    /* was 2rem */
    height: 1.75rem;
    border-radius: 50%;
    border: none;
    background: var(--btn-bg, #8b1a1a);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s;
}

.notification-row__read-btn:hover {
    opacity: 0.85;
}

.notification-row__read-btn--read {
    background: var(--muted, #ccc);
}

.notification-row__read-form {
    flex-shrink: 0;
}

/* ============================================================
   47. Identity verified badge + admin queue
   ============================================================ */

/* Gold ✓ badge — inline next to display name */
.badge--identity-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: linear-gradient(135deg, #c9a84c, #e8c96a);
    color: #3a2400;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 0.9rem;
    letter-spacing: 0.02em;
    vertical-align: middle;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Settings verify page */
.verify-instructions {
    background: var(--card-bg-alt, #f9f5f0);
    border-left: 3px solid #c9a84c;
    border-radius: 0.25rem;
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
}

.verify-instructions ul {
    margin: 0.5rem 0 0.5rem 1.2rem;
}

.verify-instructions li {
    margin-bottom: 0.25rem;
}

.verify-form {
    max-width: 420px;
}

/* Admin queue */
.admin-iv-queue {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.admin-iv-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, #e0e0e0);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
}

.admin-iv-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.admin-iv-card__user {
    font-weight: 600;
    font-size: 1rem;
}

.admin-iv-card__time {
    font-size: 0.8rem;
    opacity: 0.65;
}

.admin-iv-card__photo {
    margin-bottom: 1rem;
}

.admin-iv-card__img {
    max-width: 320px;
    max-height: 320px;
    width: 100%;
    border-radius: 0.35rem;
    object-fit: cover;
    border: 1px solid var(--card-border, #ddd);
    display: block;
}

.admin-iv-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.admin-iv-card__actions form {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-input--sm {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
    width: 180px;
}

/* ============================================================
   47. Identity verified badge + admin queue
   ============================================================ */

/* Gold ✓ badge — inline next to display name */
.badge--identity-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: linear-gradient(135deg, #c9a84c, #e8c96a);
    color: #3a2400;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 0.9rem;
    letter-spacing: 0.02em;
    vertical-align: middle;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Settings verify page */
.verify-instructions {
    background: var(--card-bg-alt, #f9f5f0);
    border-left: 3px solid #c9a84c;
    border-radius: 0.25rem;
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
}

.verify-instructions ul {
    margin: 0.5rem 0 0.5rem 1.2rem;
}

.verify-instructions li {
    margin-bottom: 0.25rem;
}

.verify-form {
    max-width: 420px;
}

/* Admin queue */
.admin-iv-queue {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.admin-iv-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, #e0e0e0);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
}

.admin-iv-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.admin-iv-card__user {
    font-weight: 600;
    font-size: 1rem;
}

.admin-iv-card__time {
    font-size: 0.8rem;
    opacity: 0.65;
}

.admin-iv-card__photo {
    margin-bottom: 1rem;
}

.admin-iv-card__img {
    max-width: 320px;
    max-height: 320px;
    width: 100%;
    border-radius: 0.35rem;
    object-fit: cover;
    border: 1px solid var(--card-border, #ddd);
    display: block;
}

.admin-iv-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.admin-iv-card__actions form {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-input--sm {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
    width: 180px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .verify-instructions {
        background: rgba(201, 168, 76, 0.08);
    }
    .admin-iv-card {
        background: var(--card-bg);
    }
}

/* Profile page — owner verification nudge */
.profile-verify-nudge {
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.profile-verify-nudge__link {
    display: inline-block;
    color: #c9a84c;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #c9a84c;
    border-radius: 1rem;
    padding: 0.25rem 0.75rem;
    transition: background 0.15s, color 0.15s;
}

.profile-verify-nudge__link:hover {
    background: #c9a84c;
    color: #3a2400;
}

.profile-verify-nudge__pending {
    color: var(--muted, #888);
    font-style: italic;
}

.profile-verify-nudge__blocked {
    color: var(--error, #c0392b);
}

.badge--identity-verified {
    animation: verified-pulse 2.5s ease-in-out infinite;
}

@keyframes verified-pulse {
    0%, 100% { box-shadow: 0 0 4px 1px rgba(201, 168, 76, 0.4); }
    50%       { box-shadow: 0 0 10px 4px rgba(201, 168, 76, 0.8); }
}
/* Dark mode */
@media (prefers-color-scheme: dark) {
    .verify-instructions {
        background: rgba(201, 168, 76, 0.08);
    }
    .admin-iv-card {
        background: var(--card-bg);
    }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .notification-row {
        background: var(--card-bg);
    }
    .notification-row--unread {
        background: rgba(180, 60, 60, 0.1);
    }
}

@media (max-width: 768px) {
    .settings-hero {
        gap: 0.75rem;
    }

    .settings-hero__icon {
        font-size: 2rem;
    }

    .settings-hero__title {
        font-size: 1.3rem;
    }

    .settings-card__body {
        padding: 1rem;
    }
}