/* ============================================
   CONFESSR - Soft Minimalist Design System
   Inspired by clean floating card UI
   ============================================ */

:root,
[data-theme="light"] {
  --bg: #F7F8FA;
  --card: #FFFFFF;
  --card-2: #F3F4F6;
  --text: #111827;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --border: rgba(17, 24, 39, 0.08);
  --primary: #8B5CF6;
  --primary-hover: #7C3AED;
  --secondary: #7C3AED;
  --secondary-soft: #A78BFA;
  --accent: #8B5CF6;
  --accent-muted: #E5E7EB;
  --success: #16A34A;
  --danger: #EF4444;
  --warning: #D97706;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-lg: 28px;
  --shadow: 0 4px 24px rgba(17, 24, 39, 0.08);
  --shadow-hover: 0 8px 32px rgba(17, 24, 39, 0.12);
  --shadow-soft: 0 2px 12px rgba(17, 24, 39, 0.06);
  --nav-height: 48px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --overlay: rgba(17, 24, 39, 0.4);
  --input-bg: #FFFFFF;
  --nav-pill-bg: #FFFFFF;
  --body-grad-1: rgba(124, 58, 237, 0.06);
  --body-grad-2: rgba(124, 58, 237, 0.04);
  --body-base-0: #FFFFFF;
  --body-base-1: #F8FAFC;
  --body-base-2: #F7F8FA;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0F1115;
  --card: #1A1D24;
  --card-2: #222630;
  --text: #F3F4F6;
  --text-muted: #9CA3AF;
  --text-light: #6B7280;
  --border: rgba(255, 255, 255, 0.08);
  --primary: #A78BFA;
  --primary-hover: #8B5CF6;
  --secondary: #8B5CF6;
  --secondary-soft: #A78BFA;
  --accent: #A78BFA;
  --accent-muted: #2A2638;
  --success: #22C55E;
  --danger: #F87171;
  --warning: #F59E0B;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 2px 16px rgba(0, 0, 0, 0.25);
  --overlay: rgba(0, 0, 0, 0.65);
  --input-bg: #12141A;
  --nav-pill-bg: rgba(26, 29, 36, 0.95);
  --body-grad-1: rgba(139, 92, 246, 0.14);
  --body-grad-2: rgba(91, 33, 182, 0.10);
  --body-base-0: #050506;
  --body-base-1: #0c0c10;
  --body-base-2: #0F1115;
  color-scheme: dark;
}

html {
  color-scheme: light;
}
html[data-theme="dark"] {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Top nav offset only when nav is visible (no extra gap) */
body.has-top-nav {
  padding-top: var(--nav-height);
}
body.has-top-nav .top-nav {
  margin-bottom: 0;
}

body {
  padding-top: 0;
  padding-bottom: 24px;
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--body-grad-1), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, var(--body-grad-2), transparent 50%),
    linear-gradient(160deg, var(--body-base-0) 0%, var(--body-base-1) 45%, var(--body-base-2) 100%);
  background-attachment: fixed;
  transition: background-color 220ms ease, color 180ms ease;
}

@media (prefers-reduced-motion: reduce) {
  body { transition: none; }
}

/* ========== Loading ========== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ========== Cards ========== */
.soft-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 1.15rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease, background-color 220ms ease, color 180ms ease, border-color 180ms ease;
  color: var(--text);
  backdrop-filter: blur(12px);
}

.soft-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(124, 58, 237, 0.18);
}

.soft-card-sm {
  padding: 1.25rem;
  border-radius: var(--radius-sm);
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-light {
  color: var(--text-light) !important;
}

.page-title {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ========== Buttons ========== */
.btn {
  border-radius: 14px;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-hover);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.btn-outline-dark {
  border: 1.5px solid var(--border);
  color: var(--text);
  background: transparent;
}

.btn-outline-dark:hover {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
}

.btn-ghost:hover {
  background: rgba(0,0,0,0.04);
  color: var(--text);
}

.btn-lg {
  padding: 0.9rem 1.75rem;
  font-size: 1.05rem;
  border-radius: 16px;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  border-radius: 12px;
}

/* ========== Forms ========== */
.form-control, .form-select {
  border-radius: 14px;
  border: 1.5px solid var(--border);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.input-group-text {
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: #fff;
}

/* ========== Bottom Navigation (floating pill) ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: auto;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 1000;
  padding: 0 1rem 8px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  pointer-events: none;
}

.nav-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  background: #FFFFFF;
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 5px 6px;
  max-width: 640px;
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #9CA3AF;
  font-size: 0.6rem;
  font-weight: 500;
  padding: 4px 6px;
  border-radius: 999px;
  transition: all 0.22s ease;
  position: relative;
  flex: 1;
  min-width: 0;
  gap: 1px;
}

.nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  transition: all 0.22s ease;
}

.nav-item .nav-icon i {
  font-size: 1.1rem;
  line-height: 1;
  margin: 0;
}

.nav-item .nav-label {
  font-size: 0.58rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
  white-space: nowrap;
}

.nav-item.active {
  color: #7C3AED;
}

.nav-item.active .nav-icon {
  background: #8B5CF6;
  color: #fff;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.nav-item.active .nav-icon i {
  color: #fff;
}

.nav-item:hover:not(.active) {
  color: #6B7280;
}

.nav-item:hover:not(.active) .nav-icon {
  background: rgba(0, 0, 0, 0.04);
}

.badge-dot {
  position: absolute;
  top: 4px;
  right: calc(50% - 22px);
  width: 8px;
  height: 8px;
  background: #EF4444;
  border-radius: 50%;
  border: 2px solid #fff;
  z-index: 2;
}

/* ========== Avatar ========== */
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  background: #6B7280;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  font-size: 0.95rem;
}

.avatar-lg {
  width: 80px;
  height: 80px;
  font-size: 2rem;
}

.avatar-xl {
  width: 100px;
  height: 100px;
  font-size: 2.5rem;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========== Auth Pages ========== */
.auth-container {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: transparent;
  box-sizing: border-box;
}
body.has-top-nav .auth-container {
  min-height: calc(100dvh - var(--nav-height));
  min-height: calc(100vh - var(--nav-height));
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
}

.auth-logo {
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-tagline {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 0.85rem;
}

/* ========== Dashboard & Pages ========== */
.page-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0.5rem 1rem 1.25rem;
}

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

.greeting {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

/* ========== Stats ========== */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem;
  text-align: center;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========== Message Cards ========== */
.message-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 0.85rem 1rem;
  margin-bottom: 10px;
  transition: box-shadow 0.2s;
}

.message-card:hover {
  box-shadow: var(--shadow);
}

.message-card.unread {
  border-left: 3px solid var(--primary);
}

.message-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.message-sender {
  font-weight: 600;
  font-size: 0.82rem;
}

.message-time {
  font-size: 0.75rem;
  color: var(--text-light);
}

.message-content {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 0.75rem;
}

/* ========== Settings List ========== */
.settings-section {
  margin-bottom: 1.75rem;
}

.settings-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 0.6rem;
  padding-left: 4px;
}

.settings-list {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.settings-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.15rem;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.15s;
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item:hover {
  background: rgba(0,0,0,0.02);
  color: var(--text);
}

.settings-item i.icon {
  font-size: 1.2rem;
  width: 28px;
  color: var(--text-muted);
  margin-right: 12px;
}

.settings-item .label {
  flex: 1;
  font-weight: 500;
  font-size: 0.88rem;
}

.settings-item .chevron {
  color: var(--text-light);
  font-size: 1rem;
}

/* ========== Search ========== */
.search-box {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-box .form-control {
  padding-left: 2.75rem;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  border: none;
}

.search-box i {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.1rem;
}

/* ========== User List Item ========== */
.user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  text-decoration: none;
  color: inherit;
}

.user-item:last-child {
  border-bottom: none;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-username {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========== Empty State ========== */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
}

.empty-state i {
  font-size: 3rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========== Premium Badge ========== */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #111827, #374151);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}
.premium-badge i { display: none; }

/* Light gray copy-link with outline */
.btn-copy-link,
.btn-light-gray {
  background: #F3F4F6 !important;
  color: #111827 !important;
  border: 1.5px solid #E5E7EB !important;
  box-shadow: none !important;
}
.btn-copy-link:hover,
.btn-light-gray:hover {
  background: #E5E7EB !important;
  color: #111827 !important;
  border-color: #D1D5DB !important;
}

/* Message reactions — single trigger + popup */
.msg-react-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.msg-react-trigger {
  min-width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #9CA3AF;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0 8px;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.msg-react-trigger:hover,
.msg-react-trigger.open {
  background: #F3F4F6;
  color: #111827;
}
.msg-react-trigger {
  gap: 6px;
}
.msg-react-total {
  font-size: 0.8rem;
  font-weight: 700;
  color: #A1A1AA;
  min-width: 0.9rem;
  line-height: 1;
}
.msg-react-trigger.has-reaction .msg-react-total {
  color: #C4B5FD;
}
.msg-react-trigger.has-reaction {
  color: #111827;
}
.msg-react-trigger .react-current {
  font-size: 0.95rem;
  filter: grayscale(1);
  line-height: 1;
}
.msg-react-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(0.92);
  display: flex;
  align-items: center;
  gap: 2px;
  background: #fff;
  border-radius: 999px;
  padding: 6px 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.06);
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}
.msg-react-popup.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}
.msg-react-popup .msg-reaction-btn {
  appearance: none;
  border: none;
  background: transparent;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  filter: grayscale(1);
  opacity: 0.65;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, opacity 0.15s, background 0.15s;
  padding: 0;
}
.msg-react-popup .msg-reaction-btn:hover {
  opacity: 1;
  background: rgba(0,0,0,0.05);
  transform: scale(1.18);
}
.msg-react-popup .msg-reaction-btn.active {
  opacity: 1;
  background: rgba(0,0,0,0.08);
  transform: scale(1.1);
}
.msg-reaction-count {
  font-size: 0.6rem;
  color: #9CA3AF;
  font-weight: 600;
  margin-left: 1px;
}

/* Stats grid 2x2 for streak/badges */
.stats-row-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1.25rem;
}
.stat-card .stat-sub {
  font-size: 0.65rem;
  color: var(--text-light);
  margin-top: 2px;
}
.badge-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #4B5563;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: 999px;
  padding: 2px 8px;
}
.badge-chip.empty {
  color: #9CA3AF;
  font-weight: 500;
}

/* Profile header horizontal layout */
.profile-header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
}
.profile-header-row .profile-meta {
  flex: 1;
  min-width: 0;
}
.profile-header-row .profile-meta h2 {
  margin: 0 0 0.15rem;
  font-size: 1.2rem;
}
.dashboard-brand {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.15rem;
}
.dashboard-intro {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.45;
}

/* ========== Toast ========== */
.toast {
  border-radius: 14px;
  box-shadow: var(--shadow-hover);
  border: none;
}

/* ========== Modal Soft (light) ========== */
.modal-content {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-hover);
  background: #FFFFFF !important;
  color: #111827 !important;
}
.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  color: #111827;
}
.modal-title { color: #111827 !important; }
.modal-body {
  padding: 1.5rem;
  color: #374151 !important;
}
.modal-body p { color: #374151 !important; }
.modal-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
}
.btn-close { filter: none; opacity: 0.6; }

/* Confirm dialog above sender modal */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(17, 24, 39, 0.4);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.confirm-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.confirm-modal-card {
  width: 100%;
  max-width: 380px;
  background: #FFFFFF;
  color: #111827;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.15), 0 0 0 1px rgba(124, 58, 237, 0.08);
  padding: 1.35rem 1.25rem 1.2rem;
}
.confirm-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.5rem;
}
.confirm-modal-msg {
  font-size: 0.9rem;
  color: #6B7280;
  margin: 0 0 1.15rem;
  line-height: 1.45;
}
.confirm-modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}
.confirm-modal-actions .btn { min-width: 96px; }


/* ========== Utilities ========== */
.cursor-pointer {
  cursor: pointer;
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== Desktop adjustments ========== */
@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
  
  .bottom-nav {
    display: none !important;
  }
  
  .page-container {
    max-width: 720px;
    padding-top: 2rem;
  }
  
  /* Simple top nav for desktop */
  .desktop-nav {
    display: flex !important;
  }
}

.desktop-nav {
  display: none;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  justify-content: space-between;
  align-items: center;
}

.desktop-nav .brand {
  font-weight: 800;
  font-size: 1.45rem;
  text-decoration: none;
  color: var(--text);
}

.desktop-nav .nav-links {
  display: flex;
  gap: 8px;
}

.desktop-nav .nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  transition: all 0.15s;
}

.desktop-nav .nav-links a:hover,
.desktop-nav .nav-links a.active {
  background: rgba(0,0,0,0.05);
  color: var(--text);
}

/* ========== Share Preview ========== */
.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.share-overlay.open { opacity: 1; }

.share-sheet {
  background: #fff;
  width: 100%;
  max-width: 480px;
  max-height: 96vh;
  border-radius: 24px 24px 0 0;
  padding: 0.75rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  transform: translateY(24px);
  transition: transform 0.25s ease;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.12);
}
.share-overlay.open .share-sheet { transform: translateY(0); }

@media (min-width: 576px) {
  .share-overlay { align-items: center; }
  .share-sheet {
    border-radius: 24px;
    max-height: 90vh;
    transform: translateY(12px) scale(0.98);
  }
  .share-overlay.open .share-sheet { transform: translateY(0) scale(1); }
}

.share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.share-header-title {
  font-weight: 600;
  font-size: 0.95rem;
}
.share-icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent !important;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7280 !important;
  cursor: pointer;
}
.share-icon-btn:hover { color: #111827; background: transparent; }
.share-icon-btn:active { background: transparent; color: #9CA3AF; }

.share-ratio-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 0.85rem;
}
.share-ratio-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1.5px solid #E5E7EB;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.15s ease;
}
.share-ratio-btn.active {
  background: #8B5CF6;
  border-color: #8B5CF6;
  color: #fff;
}

.share-preview-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0 1rem;
  overflow: hidden;
}

.share-canvas-frame {
  background: #E5E7EB;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
  transition: width 0.25s ease, height 0.25s ease, aspect-ratio 0.25s ease;
}
.share-canvas-frame.portrait {
  width: min(260px, 58vw);
  aspect-ratio: 9 / 16;
}
.share-canvas-frame.landscape {
  width: min(360px, 88vw);
  aspect-ratio: 16 / 9;
}

.share-art {
  width: 100%;
  height: 100%;
  background: #F4F5F7;
  display: flex;
  flex-direction: column;
  padding: 12%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}
.share-art > .share-art-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
}
.share-art-logo {
  font-weight: 800;
  font-size: clamp(11px, 3.2vw, 14px);
  color: #111827;
  letter-spacing: -0.02em;
  align-self: flex-start;
}
.share-art-link {
  font-size: clamp(8px, 2.2vw, 10px);
  color: #9CA3AF;
  font-weight: 500;
  align-self: flex-start;
  margin-top: 2px;
  letter-spacing: 0.01em;
}
.share-art.theme-black .share-art-link { color: #8E8E93; }
.share-art.theme-pink .share-art-link { color: #C4A0A8; }
.share-art.theme-brown .share-art-link { color: #A89888; }
.share-art-message {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 600;
  color: #1A1A1A;
  line-height: 1.35;
  overflow: hidden;
  word-break: break-word;
  white-space: pre-wrap;
  padding: 8% 0;
}
.share-art-footer {
  font-size: clamp(9px, 2.4vw, 11px);
  color: #9CA3AF;
  text-align: center;
  font-weight: 500;
}

.share-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.share-ig-btn {
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  flex-shrink: 0;
}

.share-fallback-hint {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  z-index: 2100;
  max-width: 90vw;
  width: 320px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  font-size: 0.85rem;
}
.share-fallback-hint p {
  margin: 0.35rem 0 0.75rem;
  opacity: 0.85;
  font-size: 0.8rem;
}

.message-share-btn {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #9CA3AF;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.message-share-btn:hover,
.message-share-btn:active {
  background: #F3F4F6;
  color: #111827;
}
.message-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 0.65rem;
}

/* Share theme swatches */
.share-theme-bar {
  gap: 8px;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0.85rem;
}
.share-theme-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.12);
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.share-theme-swatch.active {
  box-shadow: 0 0 0 2px #111827;
  border-color: transparent;
}
.share-theme-swatch:active { transform: scale(0.96); }

/* Background photo picker for message cards */
.share-bg-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 0.85rem;
}
.share-bg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.7);
  color: #374151;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.share-bg-btn.has-bg {
  border-color: #7c3aed;
  color: #5b21b6;
  background: rgba(124, 58, 237, 0.08);
}
.share-bg-clear {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.25rem 0.4rem;
}
.share-art-bg {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(16px) brightness(0.55);
  transform: scale(1.08);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.share-art.has-photo-bg .share-art-bg {
  opacity: 1;
}
.share-art-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.share-art.has-photo-bg {
  /* keep theme card readable over photo */
}

/* Equal height action buttons */
.share-action-btn {
  height: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 0.9rem;
}
.share-ig-btn {
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0 !important;
}

/* Message inside soft card in live preview */
.share-art-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.9) 100%);
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  margin: 10% 0;
  padding: 12% 10%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.04);
}
.share-art.theme-black .share-art-card {
  background: linear-gradient(165deg, rgba(40,40,44,0.98) 0%, rgba(22,22,24,0.95) 100%);
}
.share-art.theme-gray .share-art-card {
  background: linear-gradient(165deg, rgba(248,248,252,0.95) 0%, rgba(236,236,242,0.9) 100%);
}
.share-art.theme-pink .share-art-card {
  background: linear-gradient(165deg, rgba(255,255,255,0.95) 0%, rgba(252,234,237,0.88) 100%);
}
.share-art.theme-brown .share-art-card {
  background: linear-gradient(165deg, rgba(255,252,250,0.95) 0%, rgba(245,236,226,0.9) 100%);
}
.share-art-message {
  flex: none;
  width: 100%;
  padding: 0;
  font-size: 14px;
}

/* Theme variants for live preview */
.share-art.theme-white { background: linear-gradient(160deg, #F8F9FB 0%, #EEF1F5 50%, #E8ECF2 100%); color: #1A1A1A; }
.share-art.theme-white .share-art-logo { color: #111827; }
.share-art.theme-white .share-art-card { background: rgba(255,255,255,0.92); }
.share-art.theme-white .share-art-footer { color: #9CA3AF; }

.share-art.theme-black { background: linear-gradient(160deg, #0a0a0c 0%, #141416 50%, #1f1f23 100%); color: #F5F5F5; }
.share-art.theme-black .share-art-logo { color: #FFFFFF; }
.share-art.theme-black .share-art-card { background: rgba(28,28,30,0.95); box-shadow: 0 6px 24px rgba(0,0,0,0.35); border-color: rgba(255,255,255,0.06); }
.share-art.theme-black .share-art-message { color: #F5F5F5; }
.share-art.theme-black .share-art-footer { color: #8E8E93; }

.share-art.theme-brown { background: linear-gradient(160deg, #2a211c 0%, #5c4a3d 50%, #c4a882 100%); color: #F5EDE4; }
.share-art.theme-brown .share-art-logo { color: #F5EDE4; }
.share-art.theme-brown .share-art-card { background: rgba(62,50,41,0.92); border-color: rgba(255,255,255,0.08); box-shadow: 0 6px 24px rgba(0,0,0,0.3); }
.share-art.theme-brown .share-art-message { color: #F5EDE4; }
.share-art.theme-brown .share-art-footer { color: #C4B5A5; }

.share-art.theme-gray { background: linear-gradient(160deg, #3f3f46 0%, #71717a 50%, #d4d4d8 100%); color: #1C1C1E; }
.share-art.theme-gray .share-art-logo { color: #18181B; }
.share-art.theme-gray .share-art-card { background: rgba(250,250,252,0.95); }
.share-art.theme-gray .share-art-footer { color: #52525B; }

.share-art.theme-pink { background: linear-gradient(160deg, #4a2030 0%, #c0849a 45%, #fce7ef 100%); color: #4A3038; }
.share-art.theme-pink .share-art-logo { color: #5C3A42; }
.share-art.theme-pink .share-art-card { background: rgba(255,255,255,0.92); }
.share-art.theme-pink .share-art-message { color: #4A3038; }
.share-art.theme-pink .share-art-footer { color: #C4A0A8; }

.share-art.theme-white { background: linear-gradient(160deg, #E8ECF2 0%, #F4F6F9 50%, #FFFFFF 100%); color: #1A1A1A; }
.share-art.theme-white .share-art-logo { color: #111827; }
.share-art.theme-white .share-art-card { background: rgba(255,255,255,0.95); }
.share-art.theme-white .share-art-footer { color: #9CA3AF; }

.share-art.theme-violet {
  background: linear-gradient(160deg, #0a0a0c 0%, #1a1030 45%, #2e1065 100%);
  color: #F5F5F5;
}
.share-art.theme-violet .share-art-logo { color: #E9D5FF; }
.share-art.theme-violet .share-art-link { color: #A78BFA; }
.share-art.theme-violet .share-art-card {
  background: linear-gradient(165deg, rgba(30,16,48,0.95) 0%, rgba(12,12,16,0.98) 100%);
  box-shadow: 0 8px 28px rgba(91, 33, 182, 0.35);
  border-color: rgba(139, 92, 246, 0.25);
}
.share-art.theme-violet .share-art-message { color: #FAFAFA; }
.share-art.theme-violet .share-art-footer { color: #A78BFA; }
.share-art.theme-violet .share-art-reply-label { color: #A78BFA; }
.share-art.theme-violet .share-art-reply-text { color: #E9D5FF; }

.share-theme-swatch.active {
  box-shadow: 0 0 0 2px #A78BFA;
  border-color: transparent;
}



/* ========== Soft Toasts (reference design) ========== */
#toast-container {
  top: 1rem !important;
  right: 1rem !important;
  left: auto !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 2rem));
}
.soft-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
  background: #F3F4F6;
}
.soft-toast.show {
  opacity: 1;
  transform: translateY(0);
}
.soft-toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  background: rgba(255,255,255,0.7);
}
.soft-toast-body { flex: 1; min-width: 0; }
.soft-toast-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #111827;
  line-height: 1.25;
}
.soft-toast-msg {
  font-size: 0.78rem;
  color: #6B7280;
  margin-top: 2px;
  line-height: 1.35;
}
.soft-toast-close {
  border: none;
  background: transparent;
  color: #9CA3AF;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
}
.soft-toast-close:hover { color: #111827; }

.soft-toast-neutral { background: #F3F4F6; }
.soft-toast-neutral .soft-toast-icon { color: #6B7280; }
.soft-toast-info { background: #EEF2FF; }
.soft-toast-info .soft-toast-icon { color: #4F46E5; background: #E0E7FF; }
.soft-toast-success { background: #ECFDF5; }
.soft-toast-success .soft-toast-icon { color: #059669; background: #D1FAE5; }
.soft-toast-warning { background: #FFF7ED; }
.soft-toast-warning .soft-toast-icon { color: #D97706; background: #FFEDD5; }
.soft-toast-error { background: #FEF2F2; }
.soft-toast-error .soft-toast-icon { color: #DC2626; background: #FEE2E2; }

/* ========== Ticket-style message cards ========== */
.message-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  padding: 1rem 1.1rem;
  margin-bottom: 12px;
  border: 1px solid rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}
.message-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.07); }
.message-card.unread {
  border-left: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05), inset 3px 0 0 #111827;
}
.message-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0.45rem;
}
.message-id-label {
  font-size: 0.72rem;
  color: #9CA3AF;
  font-weight: 500;
}
.message-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}
.message-tag.anon { background: #F3F4F6; color: #6B7280; }
.message-tag.revealed { background: #EEF2FF; color: #4F46E5; }
.message-tag.guest { background: #F3F4F6; color: #9CA3AF; }
.message-tag.unread-tag { background: #8B5CF6; color: #fff; }
.message-content {
  font-size: 0.92rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
  margin-bottom: 0.55rem;
}
.message-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 0.75rem;
  color: #9CA3AF;
  margin-bottom: 0.35rem;
}
.message-meta-row i { margin-right: 3px; }

/* ========== Streak card ========== */
.streak-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-radius: 20px;
  padding: 1rem 1.15rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
  margin-bottom: 1rem;
}
.streak-card-info { flex: 1; min-width: 0; }
.streak-card-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 2px;
}
.streak-card-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111827;
}
.streak-card-value span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #9CA3AF;
  margin-left: 4px;
}
.streak-flame {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  color: #F97316;
  flex-shrink: 0;
  animation: streakFlameBlink 1.7s ease-in-out infinite;
}
@keyframes streakFlameBlink {
  0%, 100% { color: #F97316; opacity: 1; }
  50% { color: #FDBA74; opacity: 0.4; }
}
.streak-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.streak-dots-track {
  display: flex;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #F3F4F6;
}
.streak-dots-track.active {
  background: #FFF7ED;
}
.streak-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #D1D5DB;
  transition: background 0.25s ease, transform 0.25s ease;
}
.streak-dot.is-filled {
  background: #FDBA74;
}
/* Loading-style sequential fill animation across filled dots */
.streak-dots-track.animating .streak-dot.is-filled {
  animation: streakDotWave 1.8s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.18s);
}
@keyframes streakDotWave {
  0%, 12% { background: #D1D5DB; transform: scale(0.85); opacity: 0.55; }
  28%, 55% { background: #FDBA74; transform: scale(1.2); opacity: 1; }
  70%, 100% { background: #FDBA74; transform: scale(1); opacity: 0.9; }
}
.streak-dots-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #D1D5DB;
}

/* ========== Admin metric grid ========== */
.admin-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 1.5rem;
}
.metric-card {
  background: #F9FAFB;
  border-radius: 18px;
  padding: 1.1rem 1rem;
  border: 1px solid rgba(0,0,0,0.03);
}
.metric-card-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6B7280;
  margin-bottom: 0.5rem;
}
.metric-card-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111827;
  line-height: 1.1;
}
.metric-card-sub {
  font-size: 0.72rem;
  color: #9CA3AF;
  margin-top: 4px;
}

/* ========== Upload profile picture ========== */
.upload-card {
  background: #fff;
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.04);
}
.upload-drop {
  border: 1.5px dashed rgba(17, 24, 39, 0.15);
  border-radius: 16px;
  background: #F9FAFB;
  padding: 1.75rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 1rem;
}
.upload-drop:hover,
.upload-drop.dragover {
  border-color: rgba(124, 58, 237, 0.45);
  background: #F3F4F6;
}
.upload-drop-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #111827;
}
.upload-drop-sub {
  font-size: 0.75rem;
  color: #9CA3AF;
  margin-top: 4px;
}
.upload-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  background: #fff;
  margin-bottom: 8px;
}
.upload-file-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: #EF4444;
  flex-shrink: 0;
}
.upload-file-icon.img { background: #3B82F6; }
.upload-file-info { flex: 1; min-width: 0; }
.upload-file-name {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upload-file-size {
  font-size: 0.7rem;
  color: #9CA3AF;
}
.upload-file-remove {
  border: none;
  background: transparent;
  color: #9CA3AF;
  cursor: pointer;
  padding: 4px;
}
.upload-file-remove:hover { color: #EF4444; }

/* ========== Public profile brand header ========== */
.public-brand-bar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1rem;
  padding: 0.35rem 0.15rem 0;
}
/* Centered public send / guest pages */
.public-send-wrap {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem 1rem 1.5rem;
  box-sizing: border-box;
}
body.has-top-nav .public-send-wrap {
  min-height: calc(100dvh - var(--nav-height));
  min-height: calc(100vh - var(--nav-height));
  padding-top: 0.5rem;
}
.public-send-wrap > .page-container {
  width: 100%;
  margin: 0 auto;
}
.public-brand-logo {
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
}
.public-brand-desc {
  font-size: 0.78rem;
  color: #9CA3AF;
  line-height: 1.35;
  margin-top: 2px;
}

/* Verified / blue badge — inline with name baseline */
.blue-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05em;
  height: 1.05em;
  border-radius: 50%;
  background: transparent;
  color: #1D9BF0;
  flex-shrink: 0;
  vertical-align: -0.12em;
  margin-left: 0.08em;
  margin-right: 0;
  line-height: 1;
  position: relative;
  top: 0;
}
.blue-badge svg,
.blue-badge img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.name-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  line-height: 1.25;
}
.name-with-badge .blue-badge {
  align-self: center;
}
.social-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.75rem;
}
.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #F3F4F6;
  color: #374151;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #E5E7EB;
  transition: background 0.15s;
}
.social-chip:hover { background: #E5E7EB; color: #111827; }
.pinned-card {
  background: #fff;
  border-radius: 18px;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  margin-bottom: 1rem;
}
.pinned-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9CA3AF;
  margin-bottom: 0.4rem;
}
.pinned-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
  margin-bottom: 0.65rem;
  white-space: pre-wrap;
}

.admin-select {
  border-radius: 14px;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 0.9rem;
}
.admin-select optgroup {
  font-weight: 700;
  color: #6B7280;
  font-size: 0.75rem;
}
.admin-select option {
  font-weight: 500;
  color: #111827;
  padding: 8px;
}

.share-reply-field {
  margin-bottom: 0.75rem;
}
.share-reply-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #6B7280;
  margin-bottom: 6px;
}
.share-reply-input {
  width: 100%;
  border: 1.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  background: #fff;
  outline: none;
}
.share-reply-input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17,24,39,0.06);
}
.share-art-reply {
  align-self: stretch;
  margin: 0 8% 6%;
  text-align: left;
}
.share-art-reply-label {
  font-size: clamp(9px, 2.2vw, 11px);
  font-weight: 600;
  color: #9CA3AF;
  text-transform: lowercase;
  margin-bottom: 2px;
}
.share-art-reply-text {
  font-size: clamp(11px, 2.8vw, 13px);
  font-weight: 600;
  color: #1A1A1A;
  line-height: 1.3;
  word-break: break-word;
}
.share-art.theme-black .share-art-reply-label { color: #8E8E93; }
.share-art.theme-black .share-art-reply-text { color: #F5F5F5; }
.share-art.theme-pink .share-art-reply-text { color: #4A3038; }
.share-art.theme-brown .share-art-reply-text { color: #3E3229; }

/* Small clean toggle switch */
.settings-toggle-row {
  cursor: default;
}
.settings-toggle-row .chevron { display: none; }
.switch-sm {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  margin-left: auto;
  flex-shrink: 0;
}
.switch-sm input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-sm-slider {
  position: absolute;
  inset: 0;
  background: #D1D5DB;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.switch-sm-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}
.switch-sm input:checked + .switch-sm-slider {
  background: #8B5CF6;
}
.switch-sm input:checked + .switch-sm-slider::before {
  transform: translateX(18px);
}
html.dark .switch-sm input:checked + .switch-sm-slider {
  background: #60A5FA;
}

/* Consistent 4 stat cards */
.stats-row-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1.25rem;
}
.stats-row-4 .stat-card {
  background: var(--card-bg, #fff);
  border-radius: 16px;
  padding: 1rem 0.85rem;
  text-align: center;
  border: 1px solid var(--border, rgba(0,0,0,0.05));
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.stats-row-4 .stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text, #111827);
  line-height: 1.2;
}
.stats-row-4 .stat-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted, #9CA3AF);
  margin-top: 4px;
}

/* Share preview group: image + reply below */
.share-preview-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}
.share-preview-group .share-reply-field {
  margin-bottom: 0;
}

/* ===== Dark mode ===== */
html.dark,
html.dark body,
body.dark {
  --bg: #0F1115;
  --card-bg: #1A1D24;
  --text: #F3F4F6;
  --muted: #9CA3AF;
  --border: rgba(255,255,255,0.08);
  --soft-shadow: 0 2px 16px rgba(0,0,0,0.35);
  background-color: #0F1115 !important;
  color: #F3F4F6;
}
html.dark .soft-card,
html.dark .message-card,
html.dark .stat-card,
html.dark .streak-card,
html.dark .settings-list,
html.dark .pinned-card,
html.dark .upload-card,
html.dark .auth-card,
html.dark .metric-card {
  background: #1A1D24 !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: #F3F4F6;
}
html.dark .page-title,
html.dark h1, html.dark h2, html.dark h3, html.dark h5, html.dark h6,
html.dark .fw-bold, html.dark .user-name, html.dark .stat-value,
html.dark .streak-card-value, html.dark .message-content {
  color: #F3F4F6 !important;
}
html.dark .text-muted,
html.dark .stat-label,
html.dark .page-subtitle,
html.dark .settings-section-title,
html.dark .user-username,
html.dark .streak-card-label {
  color: #9CA3AF !important;
}
html.dark .bottom-nav,
html.dark .desktop-nav {
  background: #1A1D24 !important;
  border-color: rgba(255,255,255,0.08) !important;
}
html.dark .form-control,
html.dark .form-select,
html.dark .input-group-text {
  background: #12141A !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #F3F4F6 !important;
}
html.dark .btn-outline-dark {
  color: #E5E7EB;
  border-color: rgba(255,255,255,0.2);
}
html.dark .btn-outline-dark:hover {
  background: #2A2F3A;
  color: #fff;
}
html.dark .btn-copy-link {
  background: #2A2F3A !important;
  color: #F3F4F6 !important;
  border-color: rgba(255,255,255,0.12) !important;
}
html.dark .settings-item {
  border-color: rgba(255,255,255,0.06) !important;
  color: #F3F4F6;
}
html.dark .settings-item:hover {
  background: rgba(255,255,255,0.04);
}
html.dark .share-sheet {
  background: #1A1D24 !important;
  color: #F3F4F6;
}
html.dark .share-reply-input {
  background: #12141A !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #F3F4F6 !important;
}
html.dark .toast-item {
  background: #1A1D24 !important;
  color: #F3F4F6;
}
html.dark .loading-overlay {
  background: rgba(15,17,21,0.75) !important;
}
html.dark .public-brand-logo,
html.dark .dashboard-brand,
html.dark .auth-logo,
html.dark .desktop-nav .brand {
  color: #FAFAFA !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: none !important;
}
html.dark .social-chip {
  background: #2A2F3A;
  border-color: rgba(255,255,255,0.1);
  color: #E5E7EB;
}

/* PWA install card */
.install-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.06));
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.install-card.compact { padding: 0.85rem 1rem; }
.install-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: #F3F4F6;
  border: 1px solid rgba(17, 24, 39, 0.08);
}
.install-card-text { flex: 1; min-width: 0; }
.install-card-title { font-weight: 700; font-size: 0.95rem; color: var(--text, #111827); }
.install-card-desc { font-size: 0.78rem; color: var(--muted, #9CA3AF); margin-top: 2px; }
.install-badge-ok {
  font-size: 0.78rem;
  font-weight: 600;
  color: #059669;
  white-space: nowrap;
}
.settings-install-row { cursor: default; gap: 10px; }

/* iOS install modal */
.ios-install-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 2000; display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.ios-install-overlay.open { opacity: 1; }
.ios-install-sheet {
  background: #fff; width: 100%; max-width: 420px;
  border-radius: 20px 20px 0 0; padding: 1.25rem 1.25rem 1.5rem;
  position: relative; transform: translateY(20px); transition: transform 0.2s;
}
.ios-install-overlay.open .ios-install-sheet { transform: translateY(0); }
.ios-install-close {
  position: absolute; top: 12px; right: 14px; border: none; background: transparent !important;
  font-size: 1.4rem; color: #9CA3AF !important; line-height: 1; cursor: pointer;
}
.ios-install-close:hover { color: #111827 !important; }
html.dark .ios-install-sheet { background: #1A1D24; color: #F3F4F6; }


/* ========== Sender info centered card modal ========== */
.sender-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(17, 24, 39, 0.4);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.sender-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.sender-modal-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: min(85vh, 560px);
  overflow-y: auto;
  padding: 1.35rem 1.25rem 1.25rem;
  border-radius: 20px;
  margin: 0;
  background: #FFFFFF;
  color: #111827;
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.15), 0 0 0 1px rgba(124, 58, 237, 0.08);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.2s ease;
}
.sender-modal-overlay.open .sender-modal-card {
  transform: translateY(0) scale(1);
}
.sender-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent !important;
  font-size: 1.45rem;
  line-height: 1;
  color: #9CA3AF !important;
  cursor: pointer;
  padding: 4px 8px;
}
.sender-modal-close:hover { color: #111827 !important; background: transparent !important; }

/* Premium price highlight in contact modal */
.premium-price-box {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(17, 24, 39, 0.03));
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  text-align: center;
}
.premium-price-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7C3AED;
  margin-bottom: 0.2rem;
}
.premium-price-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
}
.premium-price-value span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #6B7280;
}
.premium-price-note {
  font-size: 0.72rem;
  color: #9CA3AF;
  margin-top: 0.25rem;
}
.settings-premium-activate-row {
  display: block;
  padding: 0.65rem 1rem 0.9rem !important;
  cursor: default !important;
}
.settings-premium-activate-row:hover {
  background: transparent !important;
}
.settings-premium-activate-row .btn {
  border-radius: 12px;
  font-weight: 600;
}

/* Auth buttons — black, slightly larger */
.btn-auth-primary {
  background: #8B5CF6 !important;
  border: 1.5px solid #8B5CF6 !important;
  color: #fff !important;
  border-radius: 14px !important;
  font-weight: 600 !important;
  padding: 0.9rem 1.15rem !important;
  min-height: 54px !important;
  font-size: 1rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.btn-auth-primary:hover {
  background: #7C3AED !important;
  border-color: #7C3AED !important;
  color: #fff !important;
}
.auth-tabs .nav-link {
  border-radius: 12px !important;
  font-weight: 600;
  color: #6B7280;
  padding: 0.65rem 1rem !important;
  font-size: 0.95rem !important;
  min-height: 44px;
}
.auth-tabs .nav-link.active {
  background: #8B5CF6 !important;
  color: #fff !important;
}

.message-card.highlight-msg {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}

/* Flaticon nav icons */
.nav-icon .fi {
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-item.active .nav-icon .fi {
  font-weight: 600;
}
.bottom-nav .nav-icon i {
  font-size: 1.25rem;
}

.ios-save-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.ios-save-overlay.open { opacity: 1; }
.ios-save-sheet {
  background: #fff; width: 100%; max-width: 420px;
  border-radius: 20px 20px 0 0; padding: 1.25rem;
  max-height: 90vh; overflow: auto;
}
.ios-save-img {
  width: 100%; border-radius: 12px; display: block;
  touch-action: manipulation;
}
html.dark .ios-save-sheet { background: #1A1D24; color: #F3F4F6; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0.75rem 0;
  color: #9CA3AF;
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #E5E7EB;
}
html.dark .auth-divider::before,
html.dark .auth-divider::after { background: rgba(255,255,255,0.12); }
.auth-card #google-btn { margin-top: 0; }
.auth-form-container + .auth-divider { margin-top: 0.5rem; }

.admin-users-wrap {
  overflow-x: auto;
  max-height: 420px;
  overflow-y: auto;
}
.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.admin-users-table th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9CA3AF;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  background: var(--card-bg, #fff);
}
.admin-users-table td {
  padding: 0.65rem 0.4rem;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  vertical-align: middle;
}
.plan-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}
.plan-pill.premium { background: #8B5CF6; color: #fff; }
.plan-pill.free { background: #F3F4F6; color: #6B7280; }
html.dark .plan-pill.free { background: #2A2F3A; color: #D1D5DB; }
html.dark .admin-users-table th { background: #1A1D24; }

/* Ensure Flaticon icons render in nav */
.nav-icon .fi {
  font-size: 1.35rem !important;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.status-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: capitalize;
}
.status-pill.active { background: #D1FAE5; color: #065F46; }
.status-pill.inactive { background: #FEE2E2; color: #991B1B; }
html.dark .status-pill.active { background: #064E3B; color: #A7F3D0; }
.nav-icon .nav-svg {
  display: block;
  width: 22px;
  height: 22px;
}
.nav-item.active .nav-svg {
  stroke-width: 2;
}

/* Inbox message soft cards + 3-dot menu */
.inbox-msg-card {
  margin-bottom: 0.75rem;
  padding: 1rem 1.1rem;
  position: relative;
}
.inbox-msg-card.unread {
  box-shadow: 0 0 0 1px rgba(17,24,39,0.12), 0 2px 12px rgba(0,0,0,0.04);
}
.inbox-msg-card.is-pinned {
  border-color: rgba(249, 115, 22, 0.35);
}
.inbox-msg-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0.65rem;
}
.inbox-msg-body {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text, #111827);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 0.85rem;
}
.inbox-msg-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 0.15rem;
  min-height: 32px;
}
.inbox-msg-clue {
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #A1A1AA;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  align-self: flex-end;
  padding-bottom: 4px;
}
.inbox-msg-clue:empty {
  display: none;
}
.inbox-msg-footer .share-msg-btn,
.inbox-msg-footer .share-msg-icon-btn {
  margin-left: auto;
  flex-shrink: 0;
  align-self: flex-end;
}
.message-tag.pinned-tag {
  background: #FFF7ED;
  color: #C2410C;
}
.msg-menu-wrap {
  position: relative;
  flex-shrink: 0;
  z-index: 5;
}
.msg-menu-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: #9CA3AF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.msg-menu-btn:hover,
.msg-menu-btn.open {
  background: rgba(0,0,0,0.06);
  color: #111827;
}
.msg-menu-popup {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.28);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 6px;
  z-index: 500;
}
.msg-menu-popup.open { display: block; }
.inbox-msg-card.menu-open {
  z-index: 40;
  position: relative;
}
.msg-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #111827;
}
.msg-menu-item:hover { background: #F3F4F6; }
.msg-menu-item.text-danger { color: #DC2626; }
.msg-menu-item i { font-size: 0.95rem; opacity: 0.85; width: 1.1rem; }

.sender-info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 0.9rem;
}
.sender-info-row .label { color: #9CA3AF; font-weight: 500; }
.sender-info-row .value { font-weight: 600; text-align: right; color: #111827; }

/* About meta rows — left label, right value */
.about-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.about-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  font-size: 0.92rem;
}
.about-meta-row:last-child { border-bottom: none; }
.about-meta-label {
  color: #9CA3AF !important;
  font-weight: 500;
}
.about-meta-value {
  font-weight: 700;
  text-align: right;
  color: #111827 !important;
}
html.dark .msg-menu-popup { background: #1A1D24; border-color: rgba(255,255,255,0.08); }
html.dark .msg-menu-item { color: #F3F4F6; }
html.dark .msg-menu-item:hover { background: #2A2F3A; }
html.dark .sender-info-row .value { color: #F3F4F6; }
html.dark .msg-menu-btn:hover,
html.dark .msg-menu-btn.open { background: rgba(255,255,255,0.08); color: #F3F4F6; }

.share-msg-icon-btn {
  width: 36px;
  height: 36px;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 10px !important;
}
.share-msg-icon-btn svg {
  display: block;
}
.share-theme-bar {
  justify-content: center;
  padding: 0.25rem 0 0.5rem;
}

/* App color: primary dark, secondary violet, light surfaces */
.btn-primary,
.btn-dark,
.btn-auth-primary {
  background: #8B5CF6 !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.25);
}
.btn-primary:hover,
.btn-dark:hover,
.btn-auth-primary:hover {
  background: #7C3AED !important;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
}
.btn-outline-dark {
  color: #7C3AED !important;
  border-color: rgba(124, 58, 237, 0.35) !important;
  background: transparent !important;
}
.btn-outline-dark:hover {
  background: #8B5CF6 !important;
  border-color: #8B5CF6 !important;
  color: #fff !important;
}
.auth-tabs .nav-link.active {
  background: #8B5CF6 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
}
.nav-pill, .desktop-nav {
  background: #FFFFFF !important;
  border-color: rgba(17, 24, 39, 0.08) !important;
  backdrop-filter: blur(16px);
}
.bottom-nav {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.nav-item.active .nav-icon,
.nav-item.active .nav-label {
  color: #7C3AED !important;
}
.premium-badge {
  background: linear-gradient(135deg, #7C3AED, #4C1D95) !important;
  color: #fff !important;
}
.text-muted, .page-subtitle, .stat-label { color: var(--text-muted) !important; }
.page-title, h1, h2, h3, h5 { color: var(--text) !important; }
.form-control, .form-select, .input-group-text {
  background: #FFFFFF !important;
  border-color: rgba(17, 24, 39, 0.12) !important;
  color: #111827 !important;
}
.form-control:focus {
  border-color: var(--secondary) !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15) !important;
}
.settings-list, .settings-item {
  background: transparent;
  color: #111827;
  border-color: rgba(17, 24, 39, 0.06) !important;
}
.stat-card, .metric-card, .streak-card {
  background: #FFFFFF !important;
  border: 1px solid rgba(17, 24, 39, 0.08) !important;
  color: #111827;
}
.loading-overlay { background: var(--bg) !important; }

/* Profile theme picker */
.profile-theme-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.profile-theme-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1.5px solid rgba(17, 24, 39, 0.1);
  background: #F9FAFB;
  border-radius: 12px;
  padding: 8px 4px;
  color: #6B7280;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
}
.profile-theme-opt.active {
  border-color: var(--secondary);
  color: #111827;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.3);
}
.theme-preview {
  width: 100%;
  height: 28px;
  border-radius: 8px;
  display: block;
}
.theme-preview.theme-default {
  background: linear-gradient(135deg, #F3F4F6, #E5E7EB);
}
.theme-preview.theme-pink {
  background: linear-gradient(135deg, #831843, #9d174d, #be185d);
}
.theme-preview.theme-red {
  background: linear-gradient(135deg, #7f1d1d, #991b1b, #b91c1c);
}
.theme-preview.theme-gray {
  background: linear-gradient(135deg, #27272a, #3f3f46, #18181b);
}
.theme-preview.theme-brown {
  background: linear-gradient(135deg, #44403c, #78716c, #292524);
}

/* Public profile card animated backgrounds */
.public-profile-card {
  position: relative;
  overflow: hidden;
  color: #fff;
}
.public-profile-card.theme-default {
  background: rgba(20, 20, 24, 0.92);
}
.public-profile-card.theme-pink {
  background: linear-gradient(135deg, #4c0519, #9d174d, #831843, #500724);
  background-size: 200% 200%;
  animation: gradientFlow 10s ease infinite;
  border-color: rgba(251, 113, 133, 0.25) !important;
}
.public-profile-card.theme-red {
  background: linear-gradient(135deg, #450a0a, #b91c1c, #7f1d1d, #450a0a);
  background-size: 200% 200%;
  animation: gradientFlow 10s ease infinite;
  border-color: rgba(248, 113, 113, 0.25) !important;
}
.public-profile-card.theme-gray {
  background: linear-gradient(135deg, #09090b, #3f3f46, #27272a, #18181b);
  background-size: 200% 200%;
  animation: gradientFlow 12s ease infinite;
  border-color: rgba(161, 161, 170, 0.2) !important;
}
.public-profile-card.theme-brown {
  background: linear-gradient(135deg, #1c1917, #78716c, #44403c, #292524);
  background-size: 200% 200%;
  animation: gradientFlow 12s ease infinite;
  border-color: rgba(168, 162, 158, 0.2) !important;
}
.public-profile-card.theme-pink .text-muted,
.public-profile-card.theme-red .text-muted,
.public-profile-card.theme-gray .text-muted,
.public-profile-card.theme-brown .text-muted {
  color: rgba(255,255,255,0.75) !important;
}
@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Kill dark-mode toggle remnants */
html.dark body, body.dark { /* no-op kept for safety */ }


/* =========================================================
   GLOBAL LIGHT THEME — clean, readable, premium
   Primary dark · Secondary violet · Soft light surfaces
   ========================================================= */
html, body {
  background-color: var(--bg) !important;
  color: var(--text) !important;
}

body {
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--body-grad-1), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, var(--body-grad-2), transparent 50%),
    linear-gradient(160deg, var(--body-base-0) 0%, var(--body-base-1) 45%, var(--body-base-2) 100%) !important;
  background-attachment: fixed !important;
  color: var(--text) !important;
}

h1, h2, h3, h4, h5, h6,
.page-title,
.fw-bold, .fw-semibold, .user-name, .stat-value, .metric-card-value,
.streak-card-value, .message-content, .inbox-msg-body, .pinned-text,
.label, .settings-item .label, .install-card-title {
  color: var(--text) !important;
}

.auth-logo,
.dashboard-brand,
.public-brand-logo,
.desktop-nav .brand {
  color: var(--text) !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: none !important;
}

.text-muted, .page-subtitle, .stat-label, .metric-card-sub, .metric-card-label,
.form-text, .user-username, .streak-card-label, .public-brand-desc,
.auth-tagline, .install-card-desc, .settings-section-title,
.message-id-label, .message-meta-row, small, .small {
  color: var(--text-muted) !important;
}

a:not(.btn):not(.nav-item):not(.settings-item):not(.user-item) {
  color: #7C3AED !important;
}

.soft-card, .auth-card, .upload-card, .pinned-card, .install-card,
.stat-card, .metric-card, .streak-card, .inbox-msg-card,
.settings-list, .message-card, .share-sheet, .ios-install-sheet,
.ios-save-sheet, .public-profile-card {
  background: var(--card) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  animation: none !important;
  background-size: auto !important;
}

.form-control, .form-select, .input-group-text, .share-reply-input {
  background: var(--input-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
.form-control::placeholder, .share-reply-input::placeholder {
  color: var(--text-light) !important;
  opacity: 1 !important;
}
.form-control:focus, .form-select:focus {
  border-color: #7C3AED !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15) !important;
  color: #111827 !important;
}
.form-label { color: #374151 !important; font-weight: 600; }

.btn-primary, .btn-dark, .btn-auth-primary {
  background: #8B5CF6 !important;
  border: 1px solid transparent !important;
  color: #FFFFFF !important;
}
.btn-primary:hover, .btn-dark:hover, .btn-auth-primary:hover {
  background: #7C3AED !important;
  border-color: transparent !important;
  color: #fff !important;
}
.btn-outline-dark, .btn-copy-link {
  background: #FFFFFF !important;
  border: 1px solid rgba(124, 58, 237, 0.3) !important;
  color: #7C3AED !important;
}
.btn-outline-dark:hover, .btn-copy-link:hover {
  background: #8B5CF6 !important;
  border-color: #8B5CF6 !important;
  color: #fff !important;
}
.btn-ghost { color: #6B7280 !important; }

.nav-pill, .desktop-nav {
  background: var(--nav-pill-bg) !important;
  border-color: var(--border) !important;
}
.bottom-nav {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.nav-item, .nav-label, .nav-icon, .desktop-nav a {
  color: #9CA3AF !important;
}
.nav-item.active, .nav-item.active .nav-label {
  color: #7C3AED !important;
}
.nav-item.active .nav-icon {
  color: #fff !important;
  background: #8B5CF6 !important;
}
.desktop-nav .brand,
.auth-logo,
.dashboard-brand,
.public-brand-logo {
  color: #111827 !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: none !important;
}
.nav-icon .nav-svg { stroke: currentColor; }

.settings-item { color: var(--text) !important; border-color: var(--border) !important; }
.settings-item .icon, .settings-item .chevron { color: var(--text-light) !important; }
.settings-item:hover { background: var(--card-2) !important; }

.message-tag, .social-chip, .plan-pill.free {
  background: #F3F4F6 !important;
  color: #6B7280 !important;
}
.plan-pill.premium, .premium-badge {
  background: linear-gradient(135deg, #7C3AED, #5B21B6) !important;
  color: #fff !important;
}
.message-tag.unread-tag {
  background: #8B5CF6 !important;
  color: #fff !important;
}
.message-tag.pinned-tag {
  background: rgba(251, 146, 60, 0.15) !important;
  color: #EA580C !important;
}

.msg-menu-popup {
  background: #FFFFFF !important;
  border-color: rgba(17, 24, 39, 0.1) !important;
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.12);
}
.msg-menu-item { color: #111827 !important; }
.msg-menu-item:hover { background: #F3F4F6 !important; }
.msg-menu-btn { color: #6B7280 !important; }
.sender-info-row .label { color: #9CA3AF !important; }
.sender-info-row .value { color: #111827 !important; }

.auth-tabs .nav-link { color: #6B7280 !important; }
.auth-tabs .nav-link.active {
  background: #8B5CF6 !important;
  color: #fff !important;
}
.auth-divider { color: #9CA3AF !important; }
.auth-divider::before, .auth-divider::after { background: rgba(17, 24, 39, 0.1) !important; }

.empty-state, .empty-state h3, .empty-state p { color: #6B7280 !important; }
.admin-users-table td, .admin-users-table th {
  color: #111827 !important;
  border-color: rgba(17, 24, 39, 0.08) !important;
  background: transparent !important;
}

.share-header-title, .share-reply-label { color: #111827 !important; }
.share-ratio-btn {
  color: #6B7280 !important;
  border-color: rgba(17, 24, 39, 0.12) !important;
  background: #FFFFFF !important;
}
.share-ratio-btn.active {
  background: #8B5CF6 !important;
  color: #fff !important;
  border-color: #8B5CF6 !important;
}

.loading-overlay { background: var(--bg) !important; }
.spinner-border { color: #7C3AED !important; border-right-color: transparent !important; }

.switch-sm-slider { background: #D1D5DB !important; }
.switch-sm input:checked + .switch-sm-slider { background: #7C3AED !important; }

.user-item { color: #111827 !important; }
.user-item:hover { background: rgba(17, 24, 39, 0.03) !important; }
.streak-flame { color: #F97316 !important; background: transparent !important; }

.text-dark { color: #111827 !important; }
.bg-dark, .badge.bg-dark { background: #111827 !important; color: #fff !important; }

/* Public profile card themes — keep intentional dark/colored variants for the public page */
.public-profile-card.theme-default {
  background: #FFFFFF !important;
  color: #111827 !important;
  animation: none !important;
}
.public-profile-card.theme-pink,
.public-profile-card.theme-red,
.public-profile-card.theme-gray,
.public-profile-card.theme-brown {
  /* preserve colorful public profile themes */
  color: #fff !important;
}


/* Soft hover accents */
.inbox-msg-card:hover,
.message-card:hover,
.stat-card:hover,
.metric-card:hover,
.streak-card:hover,
.settings-item:hover,
.upload-card:hover,
.pinned-card:hover {
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.08), 0 2px 10px rgba(17, 24, 39, 0.04) !important;
  border-color: rgba(124, 58, 237, 0.18) !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn-primary:hover,
.btn-dark:hover,
.btn-auth-primary:hover,
.btn-outline-dark:hover,
.btn-copy-link:hover {
  box-shadow: 0 6px 22px rgba(17, 24, 39, 0.15) !important;
}
.nav-pill {
  transition: box-shadow 0.2s ease;
}
.nav-pill:hover {
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.1), 0 2px 8px rgba(17, 24, 39, 0.05);
}
.user-item:hover {
  box-shadow: 0 4px 16px rgba(17, 24, 39, 0.06);
}


/* PWA update notice */
.update-banner {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 4000;
  width: calc(100% - 1.5rem);
  max-width: 420px;
  background: #FFFFFF;
  color: #111827;
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(17, 24, 39, 0.12), 0 4px 16px rgba(17, 24, 39, 0.06);
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.update-banner-text { flex: 1; min-width: 0; }
.update-banner-title { font-weight: 700; font-size: 0.9rem; margin: 0 0 2px; color: #111827; }
.update-banner-sub { font-size: 0.78rem; color: #6B7280; margin: 0; }
.update-banner .btn { white-space: nowrap; flex-shrink: 0; }


/* Message sent success check */
.sent-check-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #F0FDF4;
  border: 2px solid rgba(22, 163, 74, 0.35);
  box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.08), 0 8px 24px rgba(17, 24, 39, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #16A34A;
}
.sent-check-circle i {
  font-size: 1.75rem;
  line-height: 1;
  color: #16A34A;
}

/* Admin aesthetic dropdown */
.admin-dd {
  position: relative;
  z-index: 60;
}
.soft-card:has(#admin-action-dd) {
  overflow: visible !important;
  position: relative;
  z-index: 20;
  isolation: isolate;
}
.soft-card:has(.admin-dd-trigger.open) {
  z-index: 80;
}
.admin-dd-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1.5px solid rgba(17, 24, 39, 0.12);
  background: #FFFFFF;
  color: #111827;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.admin-dd-trigger:hover,
.admin-dd-trigger.open {
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.admin-dd-chevron {
  color: #9CA3AF;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.admin-dd-trigger.open .admin-dd-chevron {
  transform: rotate(180deg);
}
.admin-dd-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 200;
  background: #FFFFFF;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.12), 0 0 0 1px rgba(124, 58, 237, 0.06);
  padding: 0.4rem;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.admin-dd-menu::-webkit-scrollbar { width: 0; height: 0; display: none; }
.admin-dd-group {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9CA3AF;
  padding: 0.55rem 0.75rem 0.25rem;
}
.admin-dd-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: #374151;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.admin-dd-item:hover {
  background: #F3F4F6;
  color: #111827;
}
.admin-dd-item.active {
  background: rgba(139, 92, 246, 0.22);
  color: #E9D5FF;
  font-weight: 600;
}


/* Online presence */
.presence-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.presence-dot.online { background: #4ADE80; box-shadow: 0 0 0 3px rgba(74,222,128,0.2); }
.presence-dot.offline { background: #71717A; }

.status-pill.online { background: rgba(74,222,128,0.15); color: #4ADE80; }
.status-pill.offline { background: #F3F4F6; color: #6B7280; }

/* Admin username search results */
.admin-user-search {
  position: relative;
}
.admin-user-results {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 4px);
  z-index: 90;
  background: #FFFFFF;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.12);
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: none;
}
.admin-user-results::-webkit-scrollbar { display: none; }
.admin-user-result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  color: #111827;
  text-align: left;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
}
.admin-user-result:hover { background: #F3F4F6; }
.admin-user-result .user-info { flex: 1; min-width: 0; }
.admin-user-result .user-name { font-weight: 600; font-size: 0.88rem; }
.admin-user-result .user-username { font-size: 0.75rem; color: #9CA3AF; }

.stalkers-card .user-item { border-bottom: 1px solid rgba(17, 24, 39, 0.06); }
.stalkers-card .user-item:last-child { border-bottom: none; }


/* Profile share card live preview */
.profile-share-art {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
  color: #fff;
  display: flex;
  flex-direction: column;
  background: #0a0a0c;
}
.psa-bg {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(18px) brightness(0.45);
  transform: scale(1.1);
  z-index: 0;
}
.psa-top, .psa-avatar-wrap, .psa-lower {
  position: relative;
  z-index: 1;
}
.psa-top { padding: 14px 14px 0; }
.psa-logo {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
}
.psa-tagline {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.7);
  max-width: 70%;
  line-height: 1.3;
  margin-top: 2px;
}
.psa-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18%;
}
.psa-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #2e1065;
  border: 2px solid rgba(167,139,250,0.7);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.4rem;
  color: #E9D5FF;
}
.psa-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.psa-paste-box {
  position: relative;
  z-index: 1;
  margin: 10px auto 0;
  width: 72%;
  max-width: 200px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(196, 181, 253, 0.45);
  color: rgba(255,255,255,0.65);
  font-size: 0.58rem;
  font-weight: 500;
  text-align: center;
}
.psa-lower {
  margin-top: auto;
  padding: 0 12px 16px;
  text-align: center;
}
.psa-cta {
  font-weight: 700;
  font-size: 0.78rem;
  margin-bottom: 6px;
}
.psa-link {
  font-size: 0.62rem;
  color: #C4B5FD;
  font-weight: 600;
  word-break: break-all;
  margin-bottom: 8px;
}
.psa-site {
  font-size: 0.58rem;
  color: rgba(255,255,255,0.5);
}


.dev-name-link {
  color: #8B5CF6 !important;
  font-weight: 700;
  text-decoration: none;
}
.dev-name-link:hover {
  color: #A78BFA !important;
  text-decoration: underline;
}


/* Pen-doodle arrows pointing at paste-link box on profile share card */
.psa-paste-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 8px;
  width: 100%;
}
.psa-doodle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 0 8px;
}
.psa-doodle-arrow {
  flex-shrink: 0;
  width: 36px;
  height: 28px;
  opacity: 0.85;
  color: rgba(233, 213, 255, 0.9);
}
.psa-doodle-arrow svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.psa-paste-box {
  position: relative;
  z-index: 1;
}



/* ========== Confessr Top Navigation (icons only) ========== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.75rem;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 1000;
}
.top-nav-left,
.top-nav-right {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 88px;
}
.top-nav-right { justify-content: flex-end; }
.top-nav-brand {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: #111827;
}
.top-nav .nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #A1A1AA;
  text-decoration: none;
  transition: all 0.2s ease;
}
.top-nav .nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 1.15rem;
  line-height: 1;
}
.top-nav .nav-item .nav-icon i,
.top-nav .nav-item .nav-icon .fi,
.top-nav .nav-item .nav-icon .fi-rr-comment-dots,
.top-nav .nav-item .nav-icon .bi-gear {
  font-size: 1.15rem !important;
  width: 1.15rem;
  height: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.top-nav .nav-item.active {
  color: #111827;
  background: rgba(17, 24, 39, 0.06);
}
.top-nav .nav-item:hover {
  color: #111827;
  background: rgba(17, 24, 39, 0.04);
}
.top-nav .badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FB7185;
  border: 2px solid #FFFFFF;
}

/* Hide legacy bottom nav if present */
.bottom-nav { display: none !important; }

/* ========== Dashboard greeting ========== */
.dashboard-page { padding-top: 0.25rem; }
.dash-greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1.25rem;
}
.dash-greeting-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.dash-hello {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.dash-handle {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 2px;
}
.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 0.65rem;
}


/* ========== How-to tutorial (horizontal scroll) ========== */
.how-to-section {
  margin: 1.15rem 0 0.35rem;
}
.how-to-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9CA3AF;
  margin-bottom: 0.7rem;
  padding-left: 2px;
}
.how-to-carousel {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  margin: 0 -0.15rem;
  scrollbar-width: none;
}
.how-to-carousel::-webkit-scrollbar { display: none; }
.how-to-step {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.15rem 1.15rem 1.2rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  box-sizing: border-box;
}
.how-to-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #8B5CF6;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.how-to-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.1);
  color: #7C3AED;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.how-to-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.how-to-step-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #A78BFA;
  letter-spacing: 0.02em;
}
.how-to-text {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text);
  font-weight: 600;
}
.how-to-text strong {
  color: #7C3AED;
  font-weight: 700;
}
.how-to-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  padding-bottom: 2px;
}
.how-to-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #E5E7EB;
  transition: background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  border: none;
  padding: 0;
}
.how-to-dot.active {
  background: #8B5CF6;
  transform: scale(1.15);
}

/* ========== NGL-style prompt carousel ========== */
.prompt-section { margin-bottom: 0.5rem; }
.prompt-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 12px;
  margin: 0 -0.25rem;
  scrollbar-width: none;
}
.prompt-carousel::-webkit-scrollbar { display: none; }

.prompt-card {
  flex: 0 0 min(78vw, 280px);
  scroll-snap-align: center;
  border-radius: 24px;
  padding: 1.35rem 1.25rem 1.15rem;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  color: #fff;
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease;
}
.prompt-card:active { transform: scale(0.98); }
.prompt-card-emoji {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}
.prompt-card-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}
.prompt-card-sub {
  font-size: 0.88rem;
  opacity: 0.88;
  line-height: 1.4;
  flex: 1;
}
.prompt-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}
.prompt-card-user {
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.9;
}
.prompt-share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.22);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  backdrop-filter: blur(8px);
  transition: background 0.2s;
}
.prompt-share-btn:hover { background: rgba(255,255,255,0.35); }

.prompt-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
}
.prompt-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: all 0.2s;
  cursor: pointer;
}
.prompt-dot.active {
  background: #FAFAFA;
  width: 18px;
  border-radius: 4px;
}

/* Gradients */
.grad-violet { background: linear-gradient(145deg, #7C3AED 0%, #4C1D95 100%); }
.grad-blue   { background: linear-gradient(145deg, #2563EB 0%, #1E3A8A 100%); }
.grad-orange { background: linear-gradient(145deg, #F97316 0%, #9A3412 100%); }
.grad-pink   { background: linear-gradient(145deg, #EC4899 0%, #9D174D 100%); }
.grad-teal   { background: linear-gradient(145deg, #14B8A6 0%, #115E59 100%); }
.grad-red    { background: linear-gradient(145deg, #EF4444 0%, #7F1D1D 100%); }

@media (min-width: 768px) {
  .prompt-card { flex: 0 0 300px; }
  .top-nav { padding: 0 1.5rem; }
}

/* Adjust page-container for top nav */
.page-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}



/* ========== Top nav: brand left, icons right ========== */
.top-nav {
  justify-content: space-between;
}
.top-nav-brand {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  color: #111827;
}
.top-nav-right {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  justify-content: flex-end;
}
.top-nav-left { display: none; }

/* ========== Real profile prompt cards ========== */
.profile-prompt-card {
  flex: 0 0 min(82vw, 300px);
  scroll-snap-align: center;
  border-radius: 24px;
  min-height: 340px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  background: #1a1030;
  user-select: none;
}
.pc-bg {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(22px) brightness(0.42);
  transform: scale(1.08);
  z-index: 0;
}
.pc-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
}
.pc-body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.15rem 1.1rem 0.75rem;
  text-align: center;
  color: #fff;
}
.pc-brand {
  align-self: flex-start;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
  opacity: 0.95;
  margin-bottom: 1.1rem;
}
.pc-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.85);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  background: #2e1065;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
}
.pc-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pc-avatar-letter {
  font-size: 2.2rem;
  font-weight: 700;
  color: #E9D5FF;
}
.pc-handle {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 0.85rem;
}
.pc-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  max-width: 90%;
}
.pc-cta i {
  font-size: 1.15rem;
  opacity: 0.95;
  flex-shrink: 0;
}
.pc-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0.85rem 1rem 1.1rem;
}
.pc-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
}
.pc-action-btn:hover {
  background: rgba(255,255,255,0.3);
}
.pc-action-btn:active {
  transform: scale(0.94);
}
.pc-action-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}
.pc-action-btn svg {
  display: block;
}

/* Recent messages — no card border */
.recent-messages-list {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.recent-messages-list .message-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}
.btn-link-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  margin-top: 0.5rem;
  padding: 0.35rem 0;
}
.btn-link-all:hover { color: #111827; }

.share-fallback-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.85rem;
  z-index: 2000;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.2);
  max-width: 90vw;
  text-align: center;
}

@media (min-width: 768px) {
  .profile-prompt-card { flex: 0 0 320px; min-height: 380px; }
  .pc-avatar { width: 112px; height: 112px; }
}



/* ========== Story-ratio profile cards (9:16) ========== */
.prompt-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 6px 4px 14px;
  margin: 0 -0.25rem;
  scrollbar-width: none;
}
.prompt-carousel::-webkit-scrollbar { display: none; }

.profile-prompt-card {
  /* Instagram / FB story ratio ~ 9:16 */
  flex: 0 0 min(72vw, 260px);
  aspect-ratio: 9 / 16;
  height: auto;
  min-height: 0;
  scroll-snap-align: center;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  user-select: none;
}

.pc-bg {
  position: absolute;
  inset: -24px;
  background-size: cover;
  background-position: center;
  filter: blur(24px) brightness(0.4);
  transform: scale(1.1);
  z-index: 0;
}
.pc-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Theme colors */
.profile-prompt-card.theme-dark {
  background: #111113;
}
.profile-prompt-card.theme-dark .pc-overlay {
  background: linear-gradient(180deg, rgba(17,17,19,0.35) 0%, rgba(17,17,19,0.75) 100%);
}
.profile-prompt-card.theme-red {
  background: #7f1d1d;
}
.profile-prompt-card.theme-red .pc-overlay {
  background: linear-gradient(180deg, rgba(185,28,28,0.35) 0%, rgba(127,29,29,0.8) 100%);
}
.profile-prompt-card.theme-white {
  background: #f4f4f5;
}
.profile-prompt-card.theme-white .pc-overlay {
  background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, rgba(244,244,245,0.82) 100%);
}
.profile-prompt-card.theme-white .pc-brand,
.profile-prompt-card.theme-white .pc-handle,
.profile-prompt-card.theme-white .pc-cta {
  color: #111827;
}
.profile-prompt-card.theme-white .pc-brand-link,
.profile-prompt-card.theme-white .pc-paste {
  color: rgba(17,24,39,0.55);
  border-color: rgba(17,24,39,0.18);
  background: rgba(0,0,0,0.04);
}
.profile-prompt-card.theme-white .pc-icon-tr {
  color: rgba(17,24,39,0.55);
}
.profile-prompt-card.theme-white .pc-action-btn {
  background: rgba(0,0,0,0.08);
  color: #111827;
}
.profile-prompt-card.theme-white .pc-avatar {
  border-color: rgba(17,24,39,0.2);
}
.profile-prompt-card.theme-orange {
  background: #9a3412;
}
.profile-prompt-card.theme-orange .pc-overlay {
  background: linear-gradient(180deg, rgba(249,115,22,0.3) 0%, rgba(154,52,18,0.8) 100%);
}
.profile-prompt-card.theme-pink {
  background: #9d174d;
}
.profile-prompt-card.theme-pink .pc-overlay {
  background: linear-gradient(180deg, rgba(236,72,153,0.3) 0%, rgba(157,23,77,0.8) 100%);
}
.profile-prompt-card.theme-violet {
  background: #4c1d95;
}
.profile-prompt-card.theme-violet .pc-overlay {
  background: linear-gradient(180deg, rgba(124,58,237,0.3) 0%, rgba(76,29,149,0.8) 100%);
}

.pc-icon-tr {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  backdrop-filter: blur(8px);
}

.pc-body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0.9rem 0.5rem;
  text-align: center;
  color: #fff;
  min-height: 0;
}
.pc-brand-block {
  align-self: flex-start;
  text-align: left;
  margin-bottom: auto;
  padding-right: 40px;
}
.pc-brand {
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.pc-brand-link {
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.75;
  margin-top: 2px;
  letter-spacing: 0.01em;
}
.pc-avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid rgba(255,255,255,0.9);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  background: #2e1065;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem 0 0.4rem;
  flex-shrink: 0;
}
.pc-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pc-avatar-letter {
  font-size: 1.8rem;
  font-weight: 700;
  color: #E9D5FF;
}
.pc-handle {
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 0.45rem;
}
.pc-cta {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  max-width: 92%;
  margin-bottom: 0.55rem;
}
.pc-paste {
  font-size: 0.62rem;
  font-weight: 500;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1.2px dashed rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
  margin-bottom: 0.25rem;
}
.pc-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0.55rem 0.75rem 0.9rem;
  flex-shrink: 0;
}
.pc-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
}
.pc-action-btn:hover { background: rgba(255,255,255,0.3); }
.pc-action-btn:active { transform: scale(0.94); }
.pc-action-btn:disabled { opacity: 0.5; pointer-events: none; }

/* Link + animated gradient copy button */
.dash-link-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 1rem;
  padding: 0 0.25rem;
}
.dash-link-url {
  font-size: 0.82rem;
  color: var(--text-light);
  word-break: break-all;
  text-align: center;
  line-height: 1.4;
}
.btn-copy-gradient {
  position: relative;
  border: none;
  padding: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #3B82F6, #8B5CF6, #EC4899, #3B82F6);
  background-size: 300% 100%;
  animation: gradientBorderMove 3s linear infinite;
  cursor: pointer;
  width: 100%;
  max-width: 280px;
}
.btn-copy-gradient-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #8B5CF6;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  width: 100%;
}
.btn-copy-gradient:hover .btn-copy-gradient-inner {
  background: #7C3AED;
}
@keyframes gradientBorderMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

@media (min-width: 768px) {
  .profile-prompt-card {
    flex: 0 0 280px;
  }
  .pc-avatar { width: 96px; height: 96px; }
  .pc-cta { font-size: 1.05rem; }
}



/* ========== Card content pushed up + tight brand gap ========== */
.profile-prompt-card .pc-body {
  justify-content: flex-start;
  padding: 0.85rem 0.85rem 0.35rem;
  gap: 0;
}
.profile-prompt-card .pc-brand-block {
  align-self: flex-start;
  text-align: left;
  margin-bottom: 0.55rem;
  padding-right: 42px;
}
.profile-prompt-card .pc-brand {
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
.profile-prompt-card .pc-brand-link {
  font-size: 0.65rem;
  font-weight: 500;
  opacity: 0.75;
  margin-top: 3px; /* small gap under Confessr */
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.profile-prompt-card .pc-avatar {
  margin: 0.15rem 0 0.3rem;
}
.profile-prompt-card .pc-handle {
  margin-bottom: 0.3rem;
}
.profile-prompt-card .pc-cta {
  margin-bottom: 0.4rem;
}
.profile-prompt-card .pc-paste {
  margin-bottom: 0.15rem;
}
.profile-prompt-card .pc-actions {
  padding: 0.4rem 0.75rem 0.75rem;
  margin-top: auto;
}


/* Confessr brand = home button */
a.top-nav-brand {
  text-decoration: none;
  color: #FAFAFA;
  cursor: pointer;
}
a.top-nav-brand:hover {
  color: #fff;
  opacity: 0.9;
}

/* Full-width copy link button */
.dash-link-block {
  width: 100%;
  padding: 0;
}
.btn-copy-gradient {
  width: 100%;
  max-width: none;
}

/* Dashboard intro under cards */
.dashboard-page .dashboard-intro {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.5;
  margin: 1.1rem 0 0.25rem;
  text-align: center;
}

/* Blue badge next to Hey name */
.dash-hello.name-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}
.dash-hello .blue-badge {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.dash-hello .blue-badge svg {
  width: 18px;
  height: 18px;
  display: block;
}



/* Card footer tagline */
.pc-tagline {
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.35;
  opacity: 0.8;
  max-width: 92%;
  margin: 0.35rem auto 0.15rem;
  text-align: center;
}
.profile-prompt-card.theme-white .pc-tagline {
  color: rgba(17, 24, 39, 0.75);
  opacity: 0.85;
}

/* More visible blurred photo — lighter overlays */
.pc-bg {
  filter: blur(20px) brightness(0.62) !important;
}
.profile-prompt-card.theme-dark .pc-overlay {
  background: linear-gradient(180deg, rgba(17,17,19,0.15) 0%, rgba(17,17,19,0.45) 100%) !important;
}
.profile-prompt-card.theme-red .pc-overlay {
  background: linear-gradient(180deg, rgba(185,28,28,0.18) 0%, rgba(127,29,29,0.5) 100%) !important;
}
.profile-prompt-card.theme-white .pc-overlay {
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(244,244,245,0.55) 100%) !important;
}
.profile-prompt-card.theme-orange .pc-overlay {
  background: linear-gradient(180deg, rgba(249,115,22,0.15) 0%, rgba(154,52,18,0.5) 100%) !important;
}
.profile-prompt-card.theme-pink .pc-overlay {
  background: linear-gradient(180deg, rgba(236,72,153,0.18) 0%, rgba(157,23,77,0.5) 100%) !important;
}
.profile-prompt-card.theme-violet .pc-overlay {
  background: linear-gradient(180deg, rgba(124,58,237,0.15) 0%, rgba(76,29,149,0.5) 100%) !important;
}

/* Transparent navbar */
.top-nav {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* Active nav: color only, no background */
.top-nav .nav-item.active {
  background: transparent !important;
  color: #7C3AED !important;
}
.top-nav .nav-item {
  color: #9CA3AF;
}
.top-nav .nav-item:hover {
  background: transparent !important;
  color: #374151;
}
.top-nav .nav-item.active .nav-icon {
  background: transparent !important;
  box-shadow: none !important;
  color: #8B5CF6 !important;
}



/* Tagline at very bottom of card */
.profile-prompt-card .pc-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.profile-prompt-card .pc-tagline {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 0.5rem;
  font-size: 0.62rem;
  opacity: 0.8;
  line-height: 1.3;
}
.profile-prompt-card .pc-actions {
  margin-top: 0;
}

/* Display name + blue badge on cards */
.profile-prompt-card .pc-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-weight: 700;
}
.profile-prompt-card .pc-name {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
  font-size: 0.85rem;
}
.profile-prompt-card .pc-name .blue-badge {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.profile-prompt-card .pc-name .blue-badge svg {
  width: 16px;
  height: 16px;
  display: block;
}
.profile-prompt-card.theme-white .pc-name {
  color: #111827;
}

/* Description under "Your cards" */
.cards-section-desc {
  font-size: 0.82rem;
  color: var(--text-light, #9ca3af);
  line-height: 1.45;
  margin: 0.25rem 0 0.85rem;
  text-align: left;
}

/* Hide scrollbar but keep swipe/scroll working */
.prompt-carousel {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
.prompt-carousel::-webkit-scrollbar {
  display: none; /* Chrome, Safari, mobile */
  width: 0;
  height: 0;
  background: transparent;
}

/* Hide scrollbars site-wide on mobile while keeping scroll */
@media (max-width: 768px) {
  * {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  *::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
}



/* Less blur — photo more visible */
.pc-bg {
  filter: blur(14px) brightness(0.7) !important;
}

/* Tighter auth side margins */
.auth-container {
  padding: 1rem 0.75rem !important;
}
.auth-card {
  max-width: 100% !important;
  width: 100% !important;
  padding: 1.5rem 1.1rem !important;
  margin: 0 !important;
}
@media (min-width: 480px) {
  .auth-card {
    max-width: 400px !important;
    margin: 0 auto !important;
    padding: 2rem 1.5rem !important;
  }
}

/* Setup / register avatar picker */
.setup-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}
.setup-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-light);
}
.setup-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.setup-avatar-btn {
  cursor: pointer;
}



/* Auth / message-sent: ignore navbar offset, true viewport center */
html:has(.auth-container),
body:has(.auth-container) {
  height: 100%;
  overflow: hidden !important;
  padding-top: 0 !important;
}
body:has(.auth-container) .top-nav {
  display: none !important;
}
.auth-container {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100dvh !important;
  max-height: none !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.65rem !important;
  box-sizing: border-box !important;
  z-index: 50;
  background: transparent;
}
body.has-top-nav .auth-container {
  /* fixed inset already ignores body padding / nav */
  min-height: 100dvh !important;
  height: 100% !important;
  max-height: none !important;
}
.auth-card {
  max-height: calc(100dvh - 1.3rem) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100% !important;
  max-width: min(400px, calc(100vw - 1.3rem)) !important;
  margin: 0 auto !important;
  padding: 1.25rem 1rem !important;
}
.auth-card::-webkit-scrollbar { display: none; }

/* Bigger Confessr logo */
.auth-logo {
  font-size: 2.35rem !important;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.top-nav-brand,
a.top-nav-brand {
  font-size: 1.35rem !important;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.pc-brand {
  font-size: 1.05rem !important;
}


/* Animated "r" in Confessr wordmark */
.logo-r {
  display: inline-block;
  font-weight: inherit;
  /* Always visible base + animated color */
  color: #A78BFA;
  -webkit-text-fill-color: #A78BFA;
  animation: logoRColor 5s ease-in-out infinite;
}
@keyframes logoRColor {
  0% { color: #8B5CF6; -webkit-text-fill-color: #8B5CF6; }
  33% { color: #C084FC; -webkit-text-fill-color: #C084FC; }
  66% { color: #60A5FA; -webkit-text-fill-color: #60A5FA; }
  100% { color: #8B5CF6; -webkit-text-fill-color: #8B5CF6; }
}
.top-nav-brand .logo-r {
  color: #A78BFA;
}


/* Circular background-photo control next to theme swatches */
.share-bg-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
  background-size: cover;
  background-position: center;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #E4E4E7;
  flex-shrink: 0;
  overflow: hidden;
}
.share-bg-circle svg { flex-shrink: 0; }
.share-bg-circle.has-bg {
  border-style: solid;
  border-color: #A78BFA;
  color: transparent;
}
.share-bg-circle.has-bg svg { opacity: 0; }
.share-bg-clear-x {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #FAFAFA;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
.share-bg-clear-x:hover { background: rgba(251,113,133,0.25); color: #FB7185; }

/* Premium plan cards (weekly + monthly) */
.premium-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.premium-plans .premium-price-box {
  margin: 0;
}
.premium-price-note {
  font-size: 0.72rem;
  color: #9CA3AF;
  margin-top: 0.45rem;
}


/* Admin messages moderation */
.admin-messages-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 2px;
}
.admin-msg-item {
  background: #F9FAFB;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 12px;
  padding: 0.45rem 0.6rem;
}
.admin-msg-item.is-removed {
  opacity: 0.55;
}
.admin-msg-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 0.2rem;
  font-size: 0.7rem;
  color: #A1A1AA;
}
.admin-msg-to {
  font-weight: 600;
  color: #374151;
}
.admin-msg-body {
  font-size: 0.84rem;
  line-height: 1.4;
  color: #111827;
  word-break: break-word;
  white-space: pre-wrap;
}
.admin-msg-clue {
  font-size: 0.75rem;
  color: #A78BFA;
  margin-top: 0.3rem;
}
.admin-msg-actions {
  margin-top: 0.35rem;
  display: flex;
  justify-content: flex-end;
}
.admin-msg-actions .btn {
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
}
.admin-msg-flag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(251, 113, 133, 0.15);
  color: #FB7185;
}
.admin-msg-flag.removed {
  background: rgba(161, 161, 170, 0.15);
  color: #A1A1AA;
}

.req-star {
  color: #FB7185;
  font-weight: 700;
}

.presence-dot.online { background: #22C55E !important; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.presence-dot.offline { background: #EF4444 !important; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15); }


/* Premium contact button — soft light green */
.btn-premium-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(74, 222, 128, 0.18) !important;
  border: 1px solid rgba(74, 222, 128, 0.35) !important;
  color: #86EFAC !important;
  font-weight: 600;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  text-decoration: none;
}
.btn-premium-contact:hover {
  background: rgba(74, 222, 128, 0.28) !important;
  color: #BBF7D0 !important;
}

.premium-features {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  text-align: left;
}
.premium-features-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #E4E4E7;
  margin-bottom: 0.45rem;
}
.premium-features-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #A1A1AA;
  font-size: 0.82rem;
  line-height: 1.55;
}
.premium-features-list li { margin-bottom: 0.15rem; }


/* Nav wordmark logo image */
.top-nav-brand {
  display: inline-flex !important;
  align-items: center;
  line-height: 0;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  text-decoration: none !important;
}
.top-nav-logo {
  height: 28px;
  width: auto;
  max-width: 148px;
  object-fit: contain;
  object-position: left center;
  display: block;
  pointer-events: none;
}
@media (min-width: 480px) {
  .top-nav-logo { height: 32px; max-width: 170px; }
}


/* Settings App section logo */
.settings-app-logo-wrap {
  display: flex;
  justify-content: center;
  padding: 0.85rem 1rem 0.35rem;
}
.settings-app-logo {
  height: 36px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

/* About app card — follows theme */
.about-app-card {
  background: var(--card-bg, #ffffff) !important;
  border-color: var(--border, rgba(17, 24, 39, 0.08)) !important;
}
.about-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0.65rem;
}
.about-logo-img {
  height: 44px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
}

.about-divider {
  border: none;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  margin: 0.85rem 0;
}
[data-theme="dark"] .about-divider {
  border-top-color: rgba(255, 255, 255, 0.1);
}

/* Install app popup */
.install-app-card {
  max-width: 340px;
  padding-top: 1.5rem !important;
}
.install-app-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin: 0 auto 0.85rem;
  display: block;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  background: #000;
}
.install-app-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.install-app-desc {
  line-height: 1.5;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}


/* Admin user 3-dot menu */
.admin-user-menu-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #A1A1AA;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.admin-user-menu-btn:hover {
  background: #F3F4F6;
  color: #111827;
}
.admin-users-table th:last-child,
.admin-users-table td:last-child {
  width: 40px;
}

/* About page big app icon */
.about-app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
  background: #111827;
}
[data-theme="dark"] .about-app-icon {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.about-logo-wrap {
  margin-bottom: 0.85rem;
}

/* Admin message list separators */
.admin-msg-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #9CA3AF);
  padding: 0.75rem 0 0.4rem;
  margin-top: 0.25rem;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}
.admin-msg-section-label:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0.15rem;
}
[data-theme="dark"] .admin-msg-section-label {
  border-top-color: rgba(255, 255, 255, 0.08);
}

/* Admin metric cards with rings */
.admin-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 1.25rem;
}
.metric-card.metric-ring-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  padding: 1rem 0.9rem;
}
.metric-ring-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.metric-ring {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  position: relative;
}
.metric-ring svg {
  width: 56px;
  height: 56px;
  transform: rotate(-90deg);
}
.metric-ring-track {
  fill: none;
  stroke: rgba(17, 24, 39, 0.08);
  stroke-width: 6;
}
[data-theme="dark"] .metric-ring-track {
  stroke: rgba(255, 255, 255, 0.1);
}
.metric-ring-value {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}
.metric-ring-value.users { stroke: #8B5CF6; }
.metric-ring-value.messages { stroke: #3B82F6; }
.metric-ring-value.premium { stroke: #F59E0B; }
.metric-ring-value.reports { stroke: #F43F5E; }
.metric-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text, #111827);
}
.metric-ring-meta {
  min-width: 0;
  flex: 1;
}
.metric-ring-meta .metric-card-label {
  margin-bottom: 0.15rem;
}
.metric-ring-meta .metric-card-value {
  font-size: 1.35rem;
  line-height: 1.1;
}
.metric-bar {
  height: 4px;
  border-radius: 99px;
  background: rgba(17, 24, 39, 0.08);
  overflow: hidden;
}
[data-theme="dark"] .metric-bar {
  background: rgba(255, 255, 255, 0.1);
}
.metric-bar > span {
  display: block;
  height: 100%;
  border-radius: 99px;
  width: 0;
  transition: width 0.6s ease;
}
.metric-bar.users > span { background: #8B5CF6; }
.metric-bar.messages > span { background: #3B82F6; }
.metric-bar.premium > span { background: #F59E0B; }
.metric-bar.reports > span { background: #F43F5E; }


/* Hidden Features easter egg */
.hidden-features-card {
  padding: 2.5rem 1.25rem !important;
}
.hidden-features-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111827;
  margin-bottom: 0.5rem;
}
.hidden-features-sub {
  font-size: 0.68rem;
  color: #52525B;
  letter-spacing: 0.02em;
}


/* Notification permission reminder */
.notif-prompt-card {
  max-width: 340px;
  padding-top: 1.5rem !important;
}
.notif-prompt-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.15);
  color: #A78BFA;
  font-size: 1.5rem;
}


/* Force violet primary buttons + purple active nav (final) */
.btn-primary, .btn-dark, .btn-auth-primary,
.btn.btn-primary, .btn.btn-dark {
  background: #8B5CF6 !important;
  border-color: #8B5CF6 !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-dark:hover, .btn-auth-primary:hover,
.btn.btn-primary:hover, .btn.btn-dark:hover {
  background: #7C3AED !important;
  border-color: #7C3AED !important;
  color: #fff !important;
}
.btn-copy-gradient-inner {
  background: #8B5CF6 !important;
  color: #fff !important;
}
.btn-copy-gradient:hover .btn-copy-gradient-inner {
  background: #7C3AED !important;
}
.nav-item.active .nav-icon {
  background: #8B5CF6 !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35) !important;
}
.nav-item.active .nav-icon i,
.nav-item.active .nav-icon .fi,
.nav-item.active .nav-svg {
  color: #fff !important;
  stroke: #fff !important;
}
.nav-item.active .nav-label {
  color: #7C3AED !important;
}
.top-nav .nav-item.active,
.top-nav .nav-item.active .nav-icon {
  color: #8B5CF6 !important;
}


/* =========================================================
   DATA-THEME DARK — full site support
   ========================================================= */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .page-title,
[data-theme="dark"] .fw-bold,
[data-theme="dark"] .fw-semibold,
[data-theme="dark"] .user-name,
[data-theme="dark"] .stat-value,
[data-theme="dark"] .metric-card-value,
[data-theme="dark"] .streak-card-value,
[data-theme="dark"] .message-content,
[data-theme="dark"] .inbox-msg-body,
[data-theme="dark"] .pinned-text,
[data-theme="dark"] .label,
[data-theme="dark"] .settings-item .label,
[data-theme="dark"] .install-card-title,
[data-theme="dark"] .auth-logo,
[data-theme="dark"] .dashboard-brand,
[data-theme="dark"] .public-brand-logo,
[data-theme="dark"] .desktop-nav .brand,
[data-theme="dark"] .top-nav-brand,
[data-theme="dark"] a.top-nav-brand,
[data-theme="dark"] .how-to-text,
[data-theme="dark"] .sender-info-row .value,
[data-theme="dark"] .msg-menu-item,
[data-theme="dark"] .user-item,
[data-theme="dark"] .text-dark,
[data-theme="dark"] .about-meta-value,
[data-theme="dark"] .admin-msg-body,
[data-theme="dark"] .admin-dd-item,
[data-theme="dark"] .admin-user-result,
[data-theme="dark"] .confirm-modal-title,
[data-theme="dark"] .modal-title,
[data-theme="dark"] .update-banner-title,
[data-theme="dark"] .share-header-title,
[data-theme="dark"] .hidden-features-title {
  color: var(--text) !important;
}

[data-theme="dark"] .text-muted,
[data-theme="dark"] .page-subtitle,
[data-theme="dark"] .stat-label,
[data-theme="dark"] .metric-card-sub,
[data-theme="dark"] .metric-card-label,
[data-theme="dark"] .form-text,
[data-theme="dark"] .user-username,
[data-theme="dark"] .streak-card-label,
[data-theme="dark"] .public-brand-desc,
[data-theme="dark"] .auth-tagline,
[data-theme="dark"] .install-card-desc,
[data-theme="dark"] .settings-section-title,
[data-theme="dark"] .message-id-label,
[data-theme="dark"] .message-meta-row,
[data-theme="dark"] small,
[data-theme="dark"] .small,
[data-theme="dark"] .how-to-title,
[data-theme="dark"] .confirm-modal-msg,
[data-theme="dark"] .update-banner-sub,
[data-theme="dark"] .empty-state,
[data-theme="dark"] .empty-state h3,
[data-theme="dark"] .empty-state p,
[data-theme="dark"] .nav-item,
[data-theme="dark"] .nav-label,
[data-theme="dark"] .desktop-nav a,
[data-theme="dark"] .sender-info-row .label,
[data-theme="dark"] .about-meta-label,
[data-theme="dark"] .msg-menu-btn {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .soft-card,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .upload-card,
[data-theme="dark"] .pinned-card,
[data-theme="dark"] .install-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .metric-card,
[data-theme="dark"] .streak-card,
[data-theme="dark"] .inbox-msg-card,
[data-theme="dark"] .settings-list,
[data-theme="dark"] .message-card,
[data-theme="dark"] .share-sheet,
[data-theme="dark"] .ios-install-sheet,
[data-theme="dark"] .ios-save-sheet,
[data-theme="dark"] .public-profile-card.theme-default,
[data-theme="dark"] .how-to-step,
[data-theme="dark"] .confirm-modal-card,
[data-theme="dark"] .sender-modal-card,
[data-theme="dark"] .update-banner,
[data-theme="dark"] .msg-menu-popup,
[data-theme="dark"] .admin-dd-menu,
[data-theme="dark"] .admin-user-results,
[data-theme="dark"] .modal-content {
  background: var(--card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .input-group-text,
[data-theme="dark"] .share-reply-input {
  background: var(--input-bg) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] .share-reply-input::placeholder {
  color: var(--text-light) !important;
}

[data-theme="dark"] .form-label {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .nav-pill,
[data-theme="dark"] .desktop-nav {
  background: var(--nav-pill-bg) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .nav-item.active .nav-icon {
  background: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(167, 139, 250, 0.35) !important;
}

[data-theme="dark"] .nav-item.active .nav-label {
  color: var(--secondary-soft) !important;
}

[data-theme="dark"] .top-nav .nav-item.active,
[data-theme="dark"] .top-nav .nav-item.active .nav-icon {
  color: var(--primary) !important;
}

[data-theme="dark"] .settings-item {
  color: var(--text) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .settings-item:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}

[data-theme="dark"] .settings-item .icon,
[data-theme="dark"] .settings-item .chevron {
  color: var(--text-light) !important;
}

[data-theme="dark"] .btn-outline-dark,
[data-theme="dark"] .btn-copy-link {
  background: transparent !important;
  border-color: rgba(167, 139, 250, 0.35) !important;
  color: var(--primary) !important;
}

[data-theme="dark"] .btn-outline-dark:hover,
[data-theme="dark"] .btn-copy-link:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

[data-theme="dark"] .btn-ghost {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-dark,
[data-theme="dark"] .btn-auth-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-dark:hover,
[data-theme="dark"] .btn-auth-primary:hover {
  background: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
}

[data-theme="dark"] .btn-copy-gradient-inner {
  background: var(--primary) !important;
}

[data-theme="dark"] .btn-copy-gradient:hover .btn-copy-gradient-inner {
  background: var(--primary-hover) !important;
}

[data-theme="dark"] .auth-tabs .nav-link {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .auth-tabs .nav-link.active {
  background: var(--primary) !important;
  color: #fff !important;
}

[data-theme="dark"] .auth-divider::before,
[data-theme="dark"] .auth-divider::after {
  background: var(--border) !important;
}

[data-theme="dark"] .loading-overlay {
  background: var(--bg) !important;
}

[data-theme="dark"] .confirm-modal-overlay,
[data-theme="dark"] .sender-modal-overlay {
  background: var(--overlay) !important;
}

[data-theme="dark"] .message-tag,
[data-theme="dark"] .social-chip,
[data-theme="dark"] .plan-pill.free {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-muted) !important;
}

[data-theme="dark"] .message-tag.unread-tag {
  background: var(--primary) !important;
  color: #fff !important;
}

[data-theme="dark"] .streak-dots-track {
  background: rgba(255, 255, 255, 0.06) !important;
}

[data-theme="dark"] .streak-dots-track.active {
  background: rgba(253, 186, 116, 0.12) !important;
}

[data-theme="dark"] .streak-dot {
  background: #4B5563 !important;
}

[data-theme="dark"] .streak-dot.is-filled {
  background: #FDBA74 !important;
}

[data-theme="dark"] .streak-dots-sep {
  background: #4B5563 !important;
}

[data-theme="dark"] .how-to-dot {
  background: #374151 !important;
}

[data-theme="dark"] .how-to-dot.active {
  background: var(--primary) !important;
}

[data-theme="dark"] .how-to-icon {
  background: rgba(167, 139, 250, 0.15) !important;
  color: var(--primary) !important;
}

[data-theme="dark"] .upload-drop {
  background: var(--card-2) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .upload-drop:hover,
[data-theme="dark"] .upload-drop.dragover {
  background: #2A2F3A !important;
  border-color: rgba(167, 139, 250, 0.45) !important;
}

[data-theme="dark"] .upload-drop-title {
  color: var(--text) !important;
}

[data-theme="dark"] .upload-drop-sub {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .admin-dd-trigger {
  background: var(--card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .admin-msg-item {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: var(--border) !important;
}

[data-theme="dark"] .admin-msg-to,
[data-theme="dark"] .admin-msg-body {
  color: var(--text) !important;
}

[data-theme="dark"] .dash-link-url {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
  border-color: var(--border) !important;
}

[data-theme="dark"] .modal-body,
[data-theme="dark"] .modal-body p {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .btn-close {
  filter: invert(1);
  opacity: 0.7;
}

[data-theme="dark"] .share-icon-btn {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .share-icon-btn:hover {
  color: var(--text) !important;
}

[data-theme="dark"] .share-ratio-btn {
  background: var(--card-2) !important;
  border-color: var(--border) !important;
  color: var(--text-muted) !important;
}

[data-theme="dark"] .share-ratio-btn.active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}

[data-theme="dark"] .user-item:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}

[data-theme="dark"] .switch-sm-slider {
  background: #3f3f46 !important;
}

[data-theme="dark"] .switch-sm input:checked + .switch-sm-slider {
  background: var(--primary) !important;
}

[data-theme="dark"] .inbox-msg-card:hover,
[data-theme="dark"] .message-card:hover,
[data-theme="dark"] .stat-card:hover,
[data-theme="dark"] .metric-card:hover,
[data-theme="dark"] .streak-card:hover,
[data-theme="dark"] .settings-item:hover,
[data-theme="dark"] .upload-card:hover,
[data-theme="dark"] .pinned-card:hover {
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.18), 0 2px 10px rgba(0, 0, 0, 0.28) !important;
  border-color: rgba(139, 92, 246, 0.25) !important;
}

/* Smooth theme transitions */
body,
.soft-card,
.auth-card,
.settings-list,
.settings-item,
.form-control,
.form-select,
.input-group-text,
.btn,
.nav-pill,
.desktop-nav,
.modal-content,
.confirm-modal-card,
.sender-modal-card,
.how-to-step,
.message-card,
.inbox-msg-card,
.stat-card,
.metric-card,
.streak-card,
.share-sheet,
.loading-overlay {
  transition:
    background-color 220ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 220ms ease;
}

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

/* ========== Theme toggle control ========== */
.theme-toggle-row {
  cursor: default !important;
  gap: 10px;
}
.theme-toggle-row:hover {
  background: transparent !important;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  border-radius: 999px;
  flex-shrink: 0;
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.theme-toggle-track {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #E5E7EB;
  transition: background 220ms ease;
  flex-shrink: 0;
}
.theme-toggle.is-dark .theme-toggle-track {
  background: #4C1D95;
}
.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 220ms ease, background 220ms ease;
  font-size: 0.75rem;
  color: #D97706;
}
.theme-toggle.is-dark .theme-toggle-thumb {
  transform: translateX(22px);
  background: #1A1D24;
  color: #A78BFA;
}
.theme-icon-sun,
.theme-icon-moon {
  position: absolute;
  transition: opacity 180ms ease, transform 180ms ease;
}
.theme-icon-moon {
  opacity: 0;
  transform: rotate(-40deg) scale(0.6);
}
.theme-toggle.is-dark .theme-icon-sun {
  opacity: 0;
  transform: rotate(40deg) scale(0.6);
}
.theme-toggle.is-dark .theme-icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}
.theme-toggle-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 36px;
  text-align: left;
}

[data-theme="dark"] .theme-toggle-track {
  background: #374151;
}
[data-theme="dark"] .theme-toggle.is-dark .theme-toggle-track {
  background: #6D28D9;
}


/* Lucide icons (app UI) — nav keeps bi/fi */
.lucide-icon,
i[data-lucide],
svg.lucide {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  stroke: currentColor;
  vertical-align: -0.15em;
  flex-shrink: 0;
}
/* Space icons away from labels */
.settings-item {
  gap: 0.85rem;
}
.settings-item .icon,
.settings-item .icon.lucide-icon,
.settings-item i[data-lucide].icon,
.settings-item svg.lucide.icon,
.settings-item > svg.lucide:first-child {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  margin-right: 0 !important;
  color: var(--text-muted);
}
.settings-item .label {
  margin-left: 0;
}
.settings-item .chevron,
.settings-item .chevron.lucide-icon,
.settings-item i[data-lucide].chevron,
.settings-item svg.lucide.chevron {
  width: 1rem;
  height: 1rem;
  opacity: 0.55;
  margin-left: 0.35rem;
}
.admin-user-menu-btn .lucide-icon,
.admin-user-menu-btn i[data-lucide],
.admin-user-menu-btn svg.lucide {
  width: 1.1rem;
  height: 1.1rem;
}
.metric-card-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.metric-card-label .lucide-icon,
.metric-card-label i[data-lucide],
.metric-card-label svg.lucide {
  width: 0.95rem;
  height: 0.95rem;
  margin-right: 0;
  vertical-align: -0.12em;
}
.settings-toggle-row {
  gap: 0.85rem;
}
