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

:root {
  --bg: #09090b;
  --card: #141417;
  --card-2: #1c1c21;
  --text: #FAFAFA;
  --text-muted: #D4D4D8;
  --text-light: #A1A1AA;
  --border: rgba(255, 255, 255, 0.10);
  --primary: #09090b;
  --primary-hover: #000000;
  --secondary: #8B5CF6;
  --secondary-soft: #A78BFA;
  --accent: #FFFFFF;
  --accent-muted: #E4E4E7;
  --success: #4ADE80;
  --danger: #FB7185;
  --warning: #FBBF24;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-lg: 28px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.3);
  --nav-height: 72px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  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;
}

body {
  padding-bottom: calc(var(--nav-height) + 8px);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(124, 58, 237, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(88, 28, 135, 0.12), transparent 50%),
    linear-gradient(160deg, #050506 0%, #0c0c10 40%, #0a0a0c 100%);
  background-attachment: fixed;
  animation: softBlackShift 18s ease-in-out infinite alternate;
}

@keyframes softBlackShift {
  0% {
    background:
      radial-gradient(1200px 600px at 8% -8%, rgba(124, 58, 237, 0.16), transparent 55%),
      radial-gradient(900px 500px at 92% 5%, rgba(88, 28, 135, 0.10), transparent 50%),
      linear-gradient(160deg, #050506 0%, #0c0c10 40%, #0a0a0c 100%);
  }
  100% {
    background:
      radial-gradient(1200px 600px at 18% 0%, rgba(124, 58, 237, 0.22), transparent 55%),
      radial-gradient(900px 500px at 80% 10%, rgba(109, 40, 217, 0.14), transparent 50%),
      linear-gradient(170deg, #030304 0%, #101018 45%, #0a0a0c 100%);
  }
}

/* ========== 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: rgba(20, 20, 24, 0.92);
  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;
  color: var(--text);
  backdrop-filter: blur(12px);
}

.soft-card:hover {
  box-shadow: 0 10px 36px rgba(139, 92, 246, 0.22), 0 4px 16px rgba(0,0,0,0.35);
  border-color: rgba(139, 92, 246, 0.28);
}

.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: #111827;
}

.nav-item.active .nav-icon {
  background: #111827;
  color: #fff;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.25);
}

.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: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
}

.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.85rem 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 (dark) ========== */
.modal-content {
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow-hover);
  background: #141417 !important;
  color: #FAFAFA !important;
}
.modal-header {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 1.25rem 1.5rem;
  color: #FAFAFA;
}
.modal-title { color: #FAFAFA !important; }
.modal-body {
  padding: 1.5rem;
  color: #E4E4E7 !important;
}
.modal-body p { color: #E4E4E7 !important; }
.modal-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1rem 1.5rem;
}
.btn-close { filter: invert(1); opacity: 0.7; }

/* 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(0,0,0,0.65);
  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: #141417;
  color: #FAFAFA;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(139, 92, 246, 0.15);
  padding: 1.35rem 1.25rem 1.2rem;
}
.confirm-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FAFAFA;
  margin: 0 0 0.5rem;
}
.confirm-modal-msg {
  font-size: 0.9rem;
  color: #D4D4D8;
  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: #D4D4D8 !important;
  cursor: pointer;
}
.share-icon-btn:hover { color: #FAFAFA; background: transparent; }
.share-icon-btn:active { background: transparent; color: #A1A1AA; }

.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: #111827;
  border-color: #111827;
  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;
}
.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); }

/* 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: #111827; 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: rgba(255,255,255,0.06);
}
.streak-dots-track.active {
  background: rgba(249, 115, 22, 0.12);
}
.streak-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3F3F46;
  transition: background 0.25s ease, transform 0.25s ease;
}
.streak-dot.is-filled {
  background: #F97316;
}
/* 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: #3F3F46; transform: scale(0.85); opacity: 0.5; }
  28%, 55% { background: #F97316; transform: scale(1.2); opacity: 1; }
  70%, 100% { background: #F97316; transform: scale(1); opacity: 0.85; }
}
.streak-dots-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #3F3F46;
}

/* ========== 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(255,255,255,0.16);
  border-radius: 16px;
  background: #1A1A1F;
  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(139, 92, 246, 0.55);
  background: #222228;
}
.upload-drop-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #E4E4E7;
}
.upload-drop-sub {
  font-size: 0.75rem;
  color: #A1A1AA;
  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: 1.25rem;
  padding: 0 0.15rem;
}
.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.28em;
  margin-right: 0;
  line-height: 1;
  position: relative;
  top: 0;
}
.blue-badge svg {
  width: 100%;
  height: 100%;
  display: block;
}
.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: #111827;
}
.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: #1A1A1F;
  border: 1px solid rgba(255,255,255,0.1);
}
.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: #D4D4D8 !important; line-height: 1; cursor: pointer;
}
.ios-install-close:hover { color: #FAFAFA !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(0, 0, 0, 0.55);
  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;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45), 0 0 0 1px rgba(139, 92, 246, 0.15);
  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: #D4D4D8 !important;
  cursor: pointer;
  padding: 4px 8px;
}
.sender-modal-close:hover { color: #FAFAFA !important; background: transparent !important; }

/* Auth buttons — black, slightly larger */
.btn-auth-primary {
  background: #111827 !important;
  border: 1.5px solid #111827 !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: #000 !important;
  border-color: #000 !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: #111827 !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: #111827; 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(255,255,255,0.08);
  font-size: 0.92rem;
}
.about-meta-row:last-child { border-bottom: none; }
.about-meta-label {
  color: #A1A1AA !important;
  font-weight: 500;
}
.about-meta-value {
  font-weight: 700;
  text-align: right;
  color: #FAFAFA !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 black, secondary blue-violet, accent white */
.btn-primary,
.btn-dark,
.btn-auth-primary {
  background: #0a0a0c !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.25), 0 4px 16px rgba(0,0,0,0.35);
}
.btn-primary:hover,
.btn-dark:hover,
.btn-auth-primary:hover {
  background: #000 !important;
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.45), 0 6px 20px rgba(0,0,0,0.4);
}
.btn-outline-dark {
  color: #fff !important;
  border-color: rgba(255,255,255,0.2) !important;
  background: transparent !important;
}
.btn-outline-dark:hover {
  background: rgba(124, 58, 237, 0.15) !important;
  border-color: var(--secondary) !important;
  color: #fff !important;
}
.auth-tabs .nav-link.active {
  background: linear-gradient(135deg, #0a0a0c, #1a1030) !important;
  color: #fff !important;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.35);
}
.nav-pill, .desktop-nav {
  background: rgba(12, 12, 16, 0.92) !important;
  border-color: rgba(255,255,255,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: var(--secondary-soft) !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: rgba(10,10,14,0.85) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #fff !important;
}
.form-control:focus {
  border-color: var(--secondary) !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2) !important;
}
.settings-list, .settings-item {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.06) !important;
}
.stat-card, .metric-card, .streak-card {
  background: rgba(20,20,24,0.9) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  color: #fff;
}
.loading-overlay { background: #0a0a0c !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(255,255,255,0.1);
  background: rgba(0,0,0,0.25);
  border-radius: 12px;
  padding: 8px 4px;
  color: #A1A1AA;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
}
.profile-theme-opt.active {
  border-color: var(--secondary-soft);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.4);
}
.theme-preview {
  width: 100%;
  height: 28px;
  border-radius: 8px;
  display: block;
}
.theme-preview.theme-default {
  background: linear-gradient(135deg, #1a1a20, #141418);
}
.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 DARK THEME — readable text everywhere
   Primary black · Secondary blue-violet · Accent white / light gray
   ========================================================= */
html, body {
  background-color: #09090b !important;
  color: #FAFAFA !important;
}

body {
  background:
    radial-gradient(1000px 500px at 12% -5%, rgba(139, 92, 246, 0.14), transparent 55%),
    radial-gradient(800px 400px at 88% 5%, rgba(91, 33, 182, 0.10), transparent 50%),
    linear-gradient(165deg, #050506 0%, #0c0c10 50%, #09090b 100%) !important;
  background-attachment: fixed !important;
  color: #FAFAFA !important;
  animation: none !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: #FAFAFA !important;
}

.auth-logo,
.dashboard-brand,
.public-brand-logo,
.desktop-nav .brand {
  color: #FAFAFA !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: #D4D4D8 !important;
}

a:not(.btn):not(.nav-item):not(.settings-item):not(.user-item) {
  color: #A78BFA !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: #141417 !important;
  color: #FAFAFA !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  animation: none !important;
  background-size: auto !important;
}

.form-control, .form-select, .input-group-text, .share-reply-input {
  background: #0c0c10 !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: #FAFAFA !important;
}
.form-control::placeholder, .share-reply-input::placeholder {
  color: #A1A1AA !important;
  opacity: 1 !important;
}
.form-control:focus, .form-select:focus {
  border-color: #8B5CF6 !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25) !important;
  color: #FAFAFA !important;
}
.form-label { color: #E4E4E7 !important; font-weight: 600; }

.btn-primary, .btn-dark, .btn-auth-primary {
  background: #09090b !important;
  border: 1px solid rgba(139, 92, 246, 0.45) !important;
  color: #FFFFFF !important;
}
.btn-primary:hover, .btn-dark:hover, .btn-auth-primary:hover {
  background: #000 !important;
  border-color: #A78BFA !important;
  color: #fff !important;
}
.btn-outline-dark, .btn-copy-link {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
  color: #FAFAFA !important;
}
.btn-outline-dark:hover, .btn-copy-link:hover {
  background: rgba(139, 92, 246, 0.15) !important;
  border-color: #8B5CF6 !important;
  color: #fff !important;
}
.btn-ghost { color: #E4E4E7 !important; }

.nav-pill, .desktop-nav {
  background: rgba(12, 12, 16, 0.95) !important;
  border-color: rgba(255,255,255,0.08) !important;
}
.bottom-nav {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.nav-item, .nav-label, .nav-icon, .desktop-nav a {
  color: #D4D4D8 !important;
}
.nav-item.active, .nav-item.active .nav-label, .nav-item.active .nav-icon {
  color: #A78BFA !important;
}
.desktop-nav .brand,
.auth-logo,
.dashboard-brand,
.public-brand-logo {
  color: #FAFAFA !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: none !important;
}
.nav-icon .nav-svg { stroke: currentColor; }

.settings-item { color: #FAFAFA !important; border-color: rgba(255,255,255,0.06) !important; }
.settings-item .icon, .settings-item .chevron { color: #A1A1AA !important; }
.settings-item:hover { background: rgba(139, 92, 246, 0.08) !important; }

.message-tag, .social-chip, .plan-pill.free {
  background: rgba(255,255,255,0.08) !important;
  color: #E4E4E7 !important;
}
.plan-pill.premium, .premium-badge {
  background: linear-gradient(135deg, #7C3AED, #5B21B6) !important;
  color: #fff !important;
}
.message-tag.unread-tag {
  background: rgba(139, 92, 246, 0.25) !important;
  color: #E9D5FF !important;
}
.message-tag.pinned-tag {
  background: rgba(251, 146, 60, 0.2) !important;
  color: #FDBA74 !important;
}

.msg-menu-popup {
  background: #1c1c21 !important;
  border-color: rgba(255,255,255,0.1) !important;
}
.msg-menu-item { color: #FAFAFA !important; }
.msg-menu-item:hover { background: rgba(139, 92, 246, 0.12) !important; }
.msg-menu-btn { color: #D4D4D8 !important; }
.sender-info-row .label { color: #A1A1AA !important; }
.sender-info-row .value { color: #FAFAFA !important; }

.auth-tabs .nav-link { color: #D4D4D8 !important; }
.auth-tabs .nav-link.active {
  background: linear-gradient(135deg, #09090b, #1e1035) !important;
  color: #fff !important;
}
.auth-divider { color: #A1A1AA !important; }
.auth-divider::before, .auth-divider::after { background: rgba(255,255,255,0.12) !important; }

.empty-state, .empty-state h3, .empty-state p { color: #D4D4D8 !important; }
.admin-users-table td, .admin-users-table th {
  color: #FAFAFA !important;
  border-color: rgba(255,255,255,0.06) !important;
  background: transparent !important;
}

.share-header-title, .share-reply-label { color: #FAFAFA !important; }
.share-ratio-btn {
  color: #D4D4D8 !important;
  border-color: rgba(255,255,255,0.12) !important;
  background: rgba(0,0,0,0.3) !important;
}
.share-ratio-btn.active {
  background: rgba(139, 92, 246, 0.2) !important;
  color: #fff !important;
  border-color: #8B5CF6 !important;
}

.loading-overlay { background: #09090b !important; }
.spinner-border { color: #A78BFA !important; border-right-color: transparent !important; }

.switch-sm-slider { background: #3f3f46 !important; }
.switch-sm input:checked + .switch-sm-slider { background: #8B5CF6 !important; }

.user-item { color: #FAFAFA !important; }
.user-item:hover { background: rgba(139, 92, 246, 0.08) !important; }
.streak-flame { color: #F97316 !important; background: transparent !important; }

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

/* Disable old colorful public themes if CSS still present */
.public-profile-card.theme-pink,
.public-profile-card.theme-red,
.public-profile-card.theme-gray,
.public-profile-card.theme-brown,
.public-profile-card.theme-default {
  background: #141417 !important;
  animation: none !important;
  color: #FAFAFA !important;
}


/* Soft purple 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(139, 92, 246, 0.18), 0 2px 10px rgba(0,0,0,0.28) !important;
  border-color: rgba(139, 92, 246, 0.25) !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(139, 92, 246, 0.35) !important;
}
.nav-pill {
  transition: box-shadow 0.2s ease;
}
.nav-pill:hover {
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.2), 0 2px 8px rgba(0,0,0,0.25);
}
.user-item:hover {
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15);
}


/* 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: #141417;
  color: #FAFAFA;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(139, 92, 246, 0.25), 0 4px 16px rgba(0,0,0,0.4);
  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: #FAFAFA; }
.update-banner-sub { font-size: 0.78rem; color: #D4D4D8; 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: #1A1A1F;
  border: 2px solid rgba(74, 222, 128, 0.45);
  box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.12), 0 8px 24px rgba(0,0,0,0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4ADE80;
}
.sent-check-circle i {
  font-size: 1.75rem;
  line-height: 1;
  color: #4ADE80;
}

/* 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(255,255,255,0.12);
  background: #121216;
  color: #FAFAFA;
  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(139, 92, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.admin-dd-chevron {
  color: #A1A1AA;
  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: #141417;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(139, 92, 246, 0.12);
  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: #A1A1AA;
  padding: 0.55rem 0.75rem 0.25rem;
}
.admin-dd-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: #E4E4E7;
  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: rgba(139, 92, 246, 0.14);
  color: #fff;
}
.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: rgba(113,113,122,0.2); color: #A1A1AA; }

/* 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: #141417;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  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: #FAFAFA;
  text-align: left;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
}
.admin-user-result:hover { background: rgba(139, 92, 246, 0.12); }
.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: #A1A1AA; }

.stalkers-card .user-item { border-bottom: 1px solid rgba(255,255,255,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;
}
