/* ============================================================
   WHISPRR - NGL-inspired UI
   Clean, modern, mobile-first dark theme
   Font: Inter — tight, sharp, Gen Z
   ============================================================ */

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

:root {
  --bg:       #f6f7fb;
  --bg2:      #ffffff;
  --card:     #ffffff;
  --card2:    #f9faff;
  --border:   #e7e9f2;
  --text:     #171a24;
  --text2:    #60667a;
  --text3:    #939ab0;
  --accent:   #5b5cf0;
  --accent-h: #4d4fe1;
  --red:      #ef4444;
  --orange:   #f97316;
  --yellow:   #eab308;
  --green:    #22c55e;
  --pink:     #ec4899;
  --radius:   16px;
  --radius-sm:10px;
  --nav-h:    60px;
  --font:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 8% 10%, rgba(91,92,240,0.10), transparent 38%),
    radial-gradient(circle at 90% 88%, rgba(34,197,94,0.08), transparent 32%);
  pointer-events: none;
  z-index: -1;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; border: none; outline: none; background: none; }
button { cursor: pointer; }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

/* ============================================================
   LAYOUT
   ============================================================ */
.page {
  min-height: 100dvh;
  padding-top: 10px;
  padding-bottom: calc(var(--nav-h) + 12px);
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}
.page--no-nav { padding-bottom: 0; }
.container { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 16px; }

/* ============================================================
   BOTTOM NAV
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 480px);
  height: var(--nav-h);
  background: rgba(255,255,255,0.95);
  border-top: 1px solid rgba(225,230,245,0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 24px rgba(17,23,46,0.08);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 24px; position: relative;
  opacity: 0.6; transition: opacity .15s;
}
.nav-item.active { opacity: 1; }
.nav-icon { font-size: 20px; line-height: 1; }
.nav-label {
  font-size: 9px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: #8f95aa;
}
.nav-item.active .nav-label { color: #343a54; }
.nav-item .badge {
  position: absolute; top: 2px; right: 14px;
  background: var(--red); color: #fff; font-size: 9px; font-weight: 700;
  min-width: 15px; height: 15px; border-radius: 8px; padding: 0 3px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--bg);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1 { font-size: 1.75rem; font-weight: 800; line-height: 1.15; letter-spacing: -.025em; }
h2 { font-size: 1.35rem; font-weight: 700; line-height: 1.2;  letter-spacing: -.015em; }
h3 { font-size: 1rem;    font-weight: 600; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px; border-radius: 100px;
  font-size: 0.9rem; font-weight: 700; letter-spacing: -.01em;
  transition: all .15s; cursor: pointer; width: 100%;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-h); transform: translateY(-1px); }
.btn--primary:active { transform: scale(0.99); }
.btn--ghost { border: 1px solid var(--border); color: var(--text2); background: var(--card); }
.btn--ghost:hover { border-color: #d6c9ff; color: var(--text); background: #fff; }
.btn--danger { background: var(--red); color: #fff; }
.btn--sm { padding: 9px 16px; font-size: 0.8rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 20px; background: #fff; color: #111;
  border-radius: 100px; font-weight: 700; font-size: 0.9rem;
  width: 100%; transition: all .15s; letter-spacing: -.01em;
  border: 1px solid #ececec;
}
.google-btn:hover { background: #f0f0f0; transform: translateY(-1px); }
.google-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ============================================================
   INPUTS
   ============================================================ */
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 0.7rem; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
  color: var(--text3); margin-bottom: 6px;
}
.input, .textarea {
  width: 100%; background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  padding: 12px 14px; font-size: 0.93rem; transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:focus, .textarea:focus { border-color: #1f1f1f; box-shadow: 0 0 0 3px rgba(0,0,0,0.08); background: #fff; }
.textarea { resize: none; }
.input::placeholder, .textarea::placeholder { color: var(--text3); }
.char-count { font-size: 0.7rem; color: var(--text3); text-align: right; margin-top: 4px; font-weight: 500; }

/* ============================================================
   HOME PAGE
   ============================================================ */
.home-hero {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 48px 24px;
  width: 100%; max-width: 480px; margin: 0 auto;
  position: relative; overflow: hidden;
}
.home-bg {
  position: absolute; inset: 0;
  background: linear-gradient(140deg, rgba(91,92,240,0.14), rgba(255,255,255,0));
  pointer-events: none;
  z-index: 0;
}
.floating-messages {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.home-hero > *:not(.home-bg):not(.floating-messages) {
  position: relative;
  z-index: 1;
}
.float-msg {
  position: absolute;
  font-size: 0.72rem;
  font-weight: 700;
  color: #404862;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(228,232,244,0.9);
  border-radius: 999px;
  padding: 6px 10px;
  backdrop-filter: blur(4px);
  animation: floatDrift 4.2s ease-in-out infinite;
}
.float-msg:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.float-msg:nth-child(2) { top: 9%; right: 5%; animation-delay: 1.2s; }
.float-msg:nth-child(3) { bottom: 14%; left: 6%; animation-delay: 2.4s; }

@keyframes floatDrift {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  20% { transform: translateY(-12px) translateX(4px); }
  50% { transform: translateY(-20px) translateX(0px); }
  80% { transform: translateY(-10px) translateX(-5px); }
}
.gradient-text {
  background: linear-gradient(135deg, #5b5cf0 0%, #7c3aed 55%, #ff5f8e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo-mark {
  font-size: 2rem; font-weight: 900; letter-spacing: -.04em;
  margin-bottom: 4px; color: var(--text);
}
.logo-tagline {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--text3); margin-bottom: 48px;
}
.home-hero h1 { margin-bottom: 10px; color: var(--text); }
.home-hero p { color: var(--text2); font-size: 0.92rem; line-height: 1.6; max-width: 290px; margin: 0 auto 40px; }
.home-cta { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 10px; }

/* ============================================================
   PUBLIC PROFILE PAGE
   ============================================================ */
.profile-page { background: var(--bg); }
.profile-hero { padding: 36px 20px 22px; text-align: center; }
.avatar-wrap { display: inline-block; margin-bottom: 12px; }
.avatar { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.avatar-placeholder {
  width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem; font-weight: 800; color: #fff;
}
.profile-name { font-size: 1.4rem; font-weight: 800; letter-spacing: -.025em; margin-bottom: 5px; }
.profile-bio { color: var(--text2); font-size: 0.85rem; line-height: 1.5; max-width: 280px; margin: 0 auto; }

.message-box-wrap { padding: 0 16px 18px; }
.message-box-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
}
.message-box-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--text3); margin-bottom: 10px;
}
.message-input {
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  padding: 12px 14px; font-size: 0.93rem; font-family: var(--font);
  resize: none; min-height: 86px; transition: border-color .15s; line-height: 1.5;
}
.message-input:focus { border-color: var(--accent); outline: none; }
.message-input::placeholder { color: var(--text3); }

.type-selector { display: flex; gap: 6px; margin: 10px 0; overflow-x: auto; padding-bottom: 2px; }
.type-selector::-webkit-scrollbar { display: none; }
.type-chip {
  flex-shrink: 0; padding: 5px 12px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 600; border: 1px solid var(--border);
  color: var(--text3); cursor: pointer; transition: all .15s; background: var(--bg2);
}
.type-chip.active { border-color: var(--accent); color: var(--accent); background: rgba(139,92,246,0.1); }

.prompts-section { padding: 0 16px 100px; }
.prompts-title {
  font-size: 0.7rem; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--text3); margin-bottom: 10px;
}
.prompts-grid { display: flex; flex-direction: column; gap: 7px; }
.prompt-pill {
  background: var(--card); border: 1px solid var(--border); border-radius: 100px;
  padding: 11px 16px; font-size: 0.84rem; color: var(--text2); cursor: pointer;
  transition: all .15s; display: flex; align-items: center; gap: 8px;
  text-align: left; font-weight: 500;
}
.prompt-pill:hover { border-color: var(--accent); color: var(--text); background: rgba(139,92,246,0.07); }
.prompt-pill:active { transform: scale(0.98); }
.prompt-pill .p-emoji { font-size: 1rem; flex-shrink: 0; }

.send-success {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.96); flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 40px 24px;
}
.send-success.show { display: flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.success-emoji { font-size: 3.5rem; margin-bottom: 16px; animation: pop .35s cubic-bezier(.34,1.56,.64,1); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.success-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.success-sub { color: var(--text2); font-size: 0.88rem; margin-bottom: 32px; line-height: 1.5; }

/* ============================================================
   DASHBOARD / INBOX
   ============================================================ */
.dashboard-page {
  padding-top: 16px;
}
.inbox-header {
  margin: 0 16px 12px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(17,23,46,0.06);
  display: flex; align-items: flex-start; justify-content: space-between;
}
.inbox-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.inbox-count { font-size: 0.8rem; color: var(--text2); margin-top: 4px; font-weight: 500; }
.inbox-share-btn {
  border-color: #dbe0f0;
  background: #f7f8fd;
  color: #454d68;
}
.inbox-share-btn:hover {
  border-color: #cfd5ee;
  background: #fff;
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 14px;
}
.stat-chip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 9px 10px;
  text-align: left;
  box-shadow: 0 6px 16px rgba(17,23,46,0.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stat-icon {
  font-size: 0.78rem;
  line-height: 1;
}
.stat-num { font-size: 1.05rem; font-weight: 800; letter-spacing: -.015em; line-height: 1; }
.stat-label { font-size: 0.58rem; color: var(--text3); text-transform: uppercase; letter-spacing: .4px; font-weight: 700; line-height: 1; }

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 14px;
  overflow-x: visible;
}
.filter-tab {
  flex-shrink: 1;
  min-width: 42px;
  padding: 8px 7px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text2);
  transition: all .15s;
  cursor: pointer;
  background: rgba(255,255,255,0.8);
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.filter-tab:hover { border-color: #cfd5ee; background: #fff; }
.filter-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 18px rgba(91,92,240,0.28); }
.filter-tab .filter-icon {
  font-size: 0.98rem;
  line-height: 1;
}

.messages-list { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.message-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 15px 15px;
  cursor: pointer; transition: border-color .15s, background .15s;
  position: relative; display: block;
  box-shadow: 0 8px 18px rgba(17,23,46,0.06);
}
.message-card:hover { border-color: #cfd5ee; background: #fbfcff; transform: translateY(-1px); }
.message-card:active { transform: scale(0.99); }
.message-card.unread::after {
  content: ''; position: absolute; top: 14px; right: 14px;
  width: 8px; height: 8px; border-radius: 50%; background: #5b5cf0;
  box-shadow: 0 0 0 3px rgba(91,92,240,0.16);
}

.msg-type-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 100px;
  font-size: 0.67rem; font-weight: 700; letter-spacing: .3px;
  text-transform: uppercase; margin-bottom: 7px;
}
.badge--normal    { background: rgba(34,197,94,0.12);  color: #4ade80; }
.badge--roast     { background: rgba(249,115,22,0.12); color: #fb923c; }
.badge--confession{ background: rgba(234,179,8,0.12);  color: #facc15; }
.badge--compliment{ background: rgba(236,72,153,0.14); color: #ec4899; }
.badge--prompt    { background: rgba(139,92,246,0.12); color: #a78bfa; }

.msg-text {
  font-size: 0.92rem; line-height: 1.5; color: var(--text); font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.msg-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.msg-time { font-size: 0.7rem; color: var(--text3); font-weight: 500; }
.msg-device { font-size: 0.7rem; color: var(--text3); font-weight: 500; }

.empty-state { text-align: center; padding: 56px 24px; }
.empty-emoji { font-size: 3rem; margin-bottom: 12px; }
.empty-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -.01em; }
.empty-sub { color: var(--text2); font-size: 0.84rem; line-height: 1.5; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 20px 16px; }
.page-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); color: var(--text2);
  font-size: 0.82rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; background: var(--card);
}
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn:hover:not(.active) { border-color: #d7dcef; color: var(--text); background: #fbfcff; }

@media (min-width: 420px) {
  .stats-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ============================================================
   MESSAGE DETAIL
   ============================================================ */
.message-detail { padding: 16px 16px 100px; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text2); font-size: 0.84rem; margin-bottom: 18px;
  font-weight: 500; transition: color .15s; padding: 6px 0;
}
.back-btn:hover { color: var(--text); }
.detail-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 10px; }
.detail-text { font-size: 1.05rem; line-height: 1.65; margin-top: 12px; font-weight: 500; }
.hints-card {
  background: rgba(139,92,246,0.05); border: 1px solid rgba(139,92,246,0.15);
  border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
}
.hints-title { font-size: 0.68rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #a78bfa; margin-bottom: 10px; }
.hint-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid rgba(139,92,246,0.08);
  font-size: 0.84rem; color: var(--text2); font-weight: 500;
}
.hint-item:last-child { border-bottom: none; }

/* ============================================================
   SHARE PAGE
   ============================================================ */
.share-page {
  min-height: 100dvh; padding: 36px 20px calc(var(--nav-h) + 20px);
  text-align: center; display: flex; flex-direction: column; align-items: center;
}
.share-link-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 100px; padding: 6px 6px 6px 16px;
  width: 100%; max-width: 340px; margin: 18px auto;
}
.share-link-text { flex: 1; font-size: 0.82rem; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.copy-btn {
  background: var(--accent); color: #fff; border-radius: 100px;
  padding: 9px 16px; font-size: 0.78rem; font-weight: 700;
  flex-shrink: 0; transition: background .15s;
}
.copy-btn:hover { background: var(--accent-h); }
.share-platforms { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; width: 100%; max-width: 320px; margin: 0 auto 24px; }
.share-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 8px; font-size: 0.7rem; font-weight: 600; color: var(--text2);
  transition: all .15s; cursor: pointer;
}
.share-btn:hover { border-color: #d7dcef; color: var(--text); background: #fbfcff; }
.share-btn:active { transform: scale(0.97); }
.share-btn .s-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #fff;
}
.share-btn .s-icon .s-icon-svg {
  width: 16px;
  height: 16px;
  display: block;
}
.s-icon--wa { background: #25d366; }
.s-icon--ig { background: linear-gradient(135deg, #fd1d1d, #fcb045 55%, #833ab4); }
.s-icon--tg { background: #2aabee; }
.s-icon--x { background: #111111; }
.s-icon--more { background: #6b7280; font-size: 0.8rem; }
.s-icon--copy { background: #5b5cf0; font-size: 0.8rem; }
.share-card-preview { width: 100%; max-width: 300px; border-radius: var(--radius); overflow: hidden; margin: 0 auto 18px; border: 1px solid var(--border); }
.share-card-inner {
  background: linear-gradient(150deg, #5b5cf0 0%, #7c3aed 55%, #ff5f8e 100%);
  padding: 30px 22px; text-align: center; position: relative; overflow: hidden;
}
.share-card-inner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.18), transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(255,255,255,0.1), transparent 50%);
}
.share-card-inner > * { position: relative; z-index: 1; }
.sc-eyes { font-size: 2rem; margin-bottom: 8px; }
.sc-text { font-size: 0.95rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: 4px; }
.sc-sub { font-size: 0.72rem; color: rgba(255,255,255,0.45); margin-bottom: 12px; }
.sc-link { font-size: 0.7rem; color: #a78bfa; font-weight: 600; }

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-page { padding: 18px 16px; }
.settings-header { margin-bottom: 22px; }
.settings-section { margin-bottom: 22px; }
.settings-section-title { font-size: 0.68rem; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--text3); margin-bottom: 10px; }
.avatar-edit-wrap { display: flex; flex-direction: column; align-items: center; padding: 18px 0; }
.avatar-edit-btn { margin-top: 10px; font-size: 0.8rem; color: var(--accent); cursor: pointer; font-weight: 600; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-info { flex: 1; margin-right: 16px; }
.toggle-label { font-size: 0.88rem; font-weight: 600; }
.toggle-desc { font-size: 0.74rem; color: var(--text2); margin-top: 1px; }
.toggle { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--card2);
  border: 1px solid var(--border); border-radius: 24px; cursor: pointer; transition: .2s;
}
.toggle-slider::before {
  content: ''; position: absolute; width: 16px; height: 16px;
  left: 3px; bottom: 3px; background: var(--text3); border-radius: 50%; transition: .2s;
}
.toggle input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); background: #fff; }
.danger-zone { border: 1px solid rgba(239,68,68,0.18); border-radius: var(--radius); padding: 14px; background: rgba(239,68,68,0.04); }

/* ============================================================
   AUTH
   ============================================================ */
.auth-page {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 32px 20px;
}
.auth-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; width: 100%; max-width: 360px; box-shadow: 0 12px 32px rgba(17,23,46,0.10); }
.auth-logo { text-align: center; margin-bottom: 22px; }
.auth-logo .logo-mark { font-size: 1.8rem; }
.auth-title { font-size: 1.15rem; font-weight: 700; letter-spacing: -.015em; text-align: center; margin-bottom: 4px; }
.auth-sub { text-align: center; color: var(--text2); font-size: 0.84rem; margin-bottom: 22px; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--text3); font-size: 0.75rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-footer { text-align: center; margin-top: 16px; font-size: 0.8rem; color: var(--text2); }
.auth-footer a { color: var(--accent); font-weight: 600; }

/* ============================================================
   SEO PAGES
   ============================================================ */
.seo-page { padding: 32px 16px; max-width: 600px; margin: 0 auto; }
.seo-hero { text-align: center; margin-bottom: 28px; }
.seo-hero h1 { margin-bottom: 8px; }
.seo-hero p { color: var(--text2); line-height: 1.6; font-size: 0.88rem; }
.seo-prompts-grid { display: flex; flex-direction: column; gap: 7px; }
.seo-prompt-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 15px; display: flex; align-items: center; gap: 12px; }
.seo-prompt-num { font-size: 0.95rem; font-weight: 800; color: var(--accent); width: 26px; flex-shrink: 0; }
.seo-cta { text-align: center; margin-top: 32px; }

/* ============================================================
   TOAST
   ============================================================ */
.toast-container { position: fixed; bottom: calc(var(--nav-h) + 14px); left: 16px; right: 16px; display: flex; flex-direction: column; gap: 6px; z-index: 500; pointer-events: none; }
.toast { background: var(--card2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 15px; font-size: 0.84rem; font-weight: 500; animation: slideUp .2s ease; pointer-events: all; }
.toast--success { border-color: rgba(34,197,94,0.3); }
.toast--error   { border-color: rgba(239,68,68,0.3);  }
@keyframes slideUp { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============================================================
   MISC
   ============================================================ */
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.2); border-top-color: #fff; border-radius: 50%; animation: spin .5s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: 0 10px 24px rgba(17,23,46,0.08); }
.alert { border-radius: var(--radius-sm); padding: 11px 14px; font-size: 0.84rem; font-weight: 500; margin-bottom: 12px; }
.alert--success { background: rgba(34,197,94,0.08);  border: 1px solid rgba(34,197,94,0.2);  color: #4ade80; }
.alert--error   { background: rgba(239,68,68,0.08);   border: 1px solid rgba(239,68,68,0.2);   color: #f87171; }
.pwa-prompt { position: fixed; bottom: calc(var(--nav-h) + 12px); left: 16px; right: 16px; background: var(--card2); border: 1px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; display: none; align-items: center; gap: 12px; z-index: 400; animation: slideUp .3s ease; }
.pwa-prompt.show { display: flex; }
.pwa-icon { font-size: 1.8rem; flex-shrink: 0; }
.pwa-info { flex: 1; }
.pwa-title { font-weight: 700; font-size: 0.86rem; }
.pwa-sub { font-size: 0.7rem; color: var(--text2); }
.pwa-install-btn { background: var(--accent); color: #fff; border-radius: 100px; padding: 8px 14px; font-size: 0.76rem; font-weight: 700; flex-shrink: 0; }
.pwa-close { position: absolute; top: 8px; right: 12px; font-size: 0.9rem; color: var(--text3); cursor: pointer; }

/* Admin */
.admin-wrap { max-width: 960px; margin: 0 auto; padding: 20px 16px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.admin-nav { display: flex; gap: 6px; margin-bottom: 18px; overflow-x: auto; }
.admin-nav a { flex-shrink: 0; padding: 7px 13px; border-radius: 100px; border: 1px solid var(--border); font-size: 0.8rem; font-weight: 600; color: var(--text2); transition: all .15s; background: var(--card); }
.admin-nav a.active, .admin-nav a:hover { border-color: var(--accent); color: var(--text); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--text3); font-weight: 700; font-size: 0.68rem; text-transform: uppercase; letter-spacing: .5px; }
.admin-table tr:hover td { background: #f8f9fd; }

/* Utils */
.text-center { text-align: center; }
.text-muted  { color: var(--text2); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.not-found { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; }

@media (min-width: 480px) {
  .message-box-wrap, .prompts-section, .messages-list,
  .stats-bar, .filter-tabs, .inbox-header { padding-left: 24px; padding-right: 24px; }
}
