/* ── Reset & base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0f0f13;
  color: #e4e4e7;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Auth screen ── */
.auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
}
.auth-container { width: 100%; max-width: 380px; text-align: center; }
.auth-logo { margin-bottom: 40px; }
.auth-logo .logo-icon { font-size: 2.4rem; display: block; margin-bottom: 8px; }
.auth-logo h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 500;
  background: linear-gradient(135deg, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.auth-tagline { color: #71717a; font-size: .88rem; }
.auth-step { display: none; }
.auth-step.active { display: block; animation: fadeUp .3s ease-out; }
.auth-label { display: block; text-align: left; font-size: .85rem; color: #a1a1aa; margin-bottom: 10px; }
.auth-label span { color: #a78bfa; font-weight: 500; }
.auth-input {
  width: 100%; padding: 14px 16px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; color: #e4e4e7; font-size: 1rem; outline: none;
  transition: border-color .2s; margin-bottom: 14px;
}
.auth-input:focus { border-color: #a78bfa; }
.auth-input-otp { text-align: center; font-size: 1.6rem; letter-spacing: .5em; font-weight: 600; }
.auth-btn {
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #a78bfa, #f472b6);
  color: #fff; font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: opacity .2s, transform .1s;
}
.auth-btn:hover { opacity: .9; }
.auth-btn:active { transform: scale(.98); }
.auth-btn:disabled { opacity: .5; cursor: not-allowed; }
.auth-link {
  display: block; background: none; border: none; color: #71717a;
  font-size: .82rem; margin-top: 14px; cursor: pointer; text-decoration: underline;
}
.auth-link:hover { color: #a1a1aa; }
.auth-error { color: #f43f5e; font-size: .82rem; margin-top: 10px; text-align: left; }
.auth-loading { display: flex; justify-content: center; padding: 20px; }

/* ── Header ── */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 15, 19, .85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.header-inner {
  max-width: 640px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.header-right { display: flex; align-items: center; gap: 8px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 1.4rem; }
.logo h1 {
  font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 500;
  background: linear-gradient(135deg, #a78bfa, #f472b6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* user badge */
.user-badge {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid rgba(167,139,250,.4); background: rgba(167,139,250,.15);
  color: #a78bfa; font-size: .82rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .2s;
}
.user-badge:hover { border-color: #a78bfa; }

/* user dropdown */
.user-dropdown {
  position: fixed; top: 60px; right: 20px; z-index: 200;
  background: #1a1a22; border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 16px; min-width: 220px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5); animation: fadeUp .2s ease-out;
}
.dropdown-header { margin-bottom: 12px; }
.dropdown-name { display: block; font-weight: 600; font-size: .9rem; color: #e4e4e7; }
.dropdown-email { display: block; font-size: .78rem; color: #71717a; margin-top: 2px; }
.dropdown-item {
  width: 100%; padding: 10px; border: none; border-radius: 8px;
  background: rgba(255,255,255,.04); color: #a1a1aa; font-size: .84rem;
  cursor: pointer; text-align: center; transition: all .2s;
}
.dropdown-item:hover { background: rgba(255,255,255,.08); }
.dropdown-item.danger { color: #f43f5e; }
.dropdown-item.danger:hover { background: rgba(244,63,94,.1); }

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; }
.tab {
  padding: 7px 16px; border: none; border-radius: 20px;
  background: transparent; color: #71717a; font-size: .82rem;
  font-weight: 500; cursor: pointer; transition: all .2s;
}
.tab:hover { color: #e4e4e7; }
.tab.active { background: rgba(167, 139, 250, .15); color: #a78bfa; }

/* ── Main ── */
main { max-width: 640px; margin: 0 auto; padding: 0 16px 16px; }
.view { display: none; }
.view.active { display: block; }
.hidden { display: none !important; }

/* ══════════════════════════════════════
   MOOD TABS (sticky)
   ══════════════════════════════════════ */
.mood-tabs {
  display: flex; gap: 8px; padding: 12px 16px;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 15, 19, .92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  margin: 0 -16px; /* bleed into main padding */
}
.mood-tabs::-webkit-scrollbar { display: none; }
.mood-tab {
  flex-shrink: 0; padding: 8px 18px; border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px; background: transparent; color: #71717a;
  font-size: .78rem; font-weight: 500; cursor: pointer;
  transition: all .25s; white-space: nowrap;
}
.mood-tab:hover { border-color: rgba(255,255,255,.18); color: #a1a1aa; }
.mood-tab.active {
  background: linear-gradient(135deg, rgba(167,139,250,.2), rgba(244,114,182,.15));
  border-color: rgba(167,139,250,.4); color: #e4e4e7;
}

/* ══════════════════════════════════════
   SEARCH BAR
   ══════════════════════════════════════ */
.search-bar {
  position: relative; margin: 8px 0 0;
}
.search-input {
  width: 100%; padding: 10px 14px 10px 38px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; color: #e4e4e7; font-size: .88rem; outline: none;
  transition: border-color .2s, background .2s;
}
.search-input:focus { border-color: rgba(167,139,250,.4); background: rgba(255,255,255,.08); }
.search-input::placeholder { color: #52525b; }
.search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; fill: #52525b; pointer-events: none;
}
.search-input:focus ~ .search-icon { fill: #a78bfa; }
.search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.08); border: none; border-radius: 50%;
  width: 22px; height: 22px; color: #71717a; font-size: .75rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.search-clear:hover { background: rgba(255,255,255,.15); color: #e4e4e7; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: #1a1a22; border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px; max-height: 360px; overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent;
}
.search-results::-webkit-scrollbar { width: 4px; }
.search-results::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.04);
  cursor: pointer; transition: background .15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(255,255,255,.04); }
.search-result-item-body { flex: 1; min-width: 0; }
.search-result-author { font-size: .82rem; font-weight: 600; color: #a1a1aa; margin-bottom: 4px; }
.search-result-text { font-size: .8rem; color: #71717a; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.search-result-cat {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: .65rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; margin-top: 6px;
}
.btn-share-inline {
  flex-shrink: 0; padding: 8px; border-radius: 50%;
}
.btn-share-inline svg { width: 18px; height: 18px; }
.search-empty { padding: 24px 16px; text-align: center; color: #52525b; font-size: .85rem; }
.search-loading { padding: 20px; display: flex; justify-content: center; }

/* ══════════════════════════════════════
   CATEGORY PICKER
   ══════════════════════════════════════ */
.category-picker {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; min-height: 100dvh; padding: 24px;
}
.picker-container { width: 100%; max-width: 440px; text-align: center; }
.picker-title {
  font-family: 'Playfair Display', serif; font-size: 1.4rem;
  font-weight: 500; color: #e4e4e7; margin-bottom: 8px;
}
.picker-subtitle { color: #71717a; font-size: .85rem; margin-bottom: 28px; }
.picker-grid {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-bottom: 28px;
}
.picker-chip {
  padding: 10px 20px; border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px; background: rgba(255,255,255,.03); color: #a1a1aa;
  font-size: .85rem; font-weight: 500; cursor: pointer;
  transition: all .25s; user-select: none;
}
.picker-chip:hover { border-color: rgba(255,255,255,.2); color: #e4e4e7; }
.picker-chip.selected {
  background: linear-gradient(135deg, rgba(167,139,250,.25), rgba(244,114,182,.2));
  border-color: rgba(167,139,250,.5); color: #fff;
}
.picker-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.picker-count { font-size: .82rem; color: #71717a; }
.picker-btn { flex: 1; max-width: 200px; }

/* ══════════════════════════════════════
   SWIPE CARD (Inshorts-style)
   ══════════════════════════════════════ */
.swipe-container {
  position: relative;
  height: calc(100vh - 170px);
  height: calc(100dvh - 170px);
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

.swipe-card {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translate3d(0,0,0);
}

.swipe-card-current { z-index: 2; }
.swipe-card-next { z-index: 1; }

.swipe-card-inner {
  background: #1a1a22;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  padding: 32px 28px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.swipe-card-top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 18px; align-self: flex-start; min-height: 32px;
}
.swipe-category {
  display: inline-block; padding: 5px 14px; border-radius: 20px;
  font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em;
}
.swipe-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 14px; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
}
.swipe-badge-icon { font-size: .9em; opacity: .95; }
.swipe-badge-new {
  background: linear-gradient(135deg, #166534 0%, #15803d 100%);
  color: #bbf7d0; box-shadow: 0 2px 8px rgba(22,101,52,.35);
}
.swipe-badge-read {
  background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
  color: #e5e7eb; box-shadow: 0 2px 8px rgba(55,65,81,.3);
}

.swipe-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem; line-height: 1.8; color: #d4d4d8;
  margin-bottom: 24px; flex: 1;
}

.swipe-author {
  font-size: .88rem; color: #71717a; margin-bottom: 16px;
}
.swipe-author strong { color: #a1a1aa; font-weight: 500; }

.swipe-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .06);
}
.swipe-actions { display: flex; gap: 10px; }
.swipe-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px; background: transparent; color: #71717a;
  font-size: .85rem; cursor: pointer; transition: all .2s;
}
.swipe-btn:hover { border-color: rgba(255,255,255,.2); color: #a1a1aa; }
.swipe-btn.liked {
  border-color: rgba(52,211,153,.6); color: #34d399; background: rgba(52,211,153,.18);
  box-shadow: 0 0 0 1px rgba(52,211,153,.2);
}
.swipe-btn.disliked {
  border-color: rgba(244,63,94,.6); color: #f43f5e; background: rgba(244,63,94,.18);
  box-shadow: 0 0 0 1px rgba(244,63,94,.2);
}
.swipe-stats {
  display: flex; gap: 16px; font-size: .78rem; color: #52525b;
}
.swipe-stats span { display: flex; align-items: center; gap: 4px; }

.btn-share {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  color: #a1a1aa; border-radius: 20px; padding: 8px 16px;
  font-size: .8rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all .2s; line-height: 1; position: relative; z-index: 10;
}
.btn-share svg { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }
.btn-share:hover { border-color: rgba(167,139,250,.4); color: #c4b5fd; }
.btn-share:active { transform: scale(.95); }
.btn-share.copied { border-color: rgba(52,211,153,.4); color: #34d399; }

.swipe-loader {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.swipe-empty {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center; color: #a1a1aa; max-width: 280px; padding: 24px;
}
.swipe-empty-icon {
  font-size: 2.5rem; margin-bottom: 12px; opacity: .9; color: #a78bfa;
}
.swipe-empty-title {
  font-size: 1.1rem; font-weight: 600; color: #e4e4e7; margin: 0 0 8px;
}
.swipe-empty-sub {
  font-size: .9rem; color: #71717a; margin: 0 0 20px; line-height: 1.4;
}
.swipe-refresh-btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0; padding: 12px 24px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  color: #fff; font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 4px 16px rgba(124,58,237,.35);
}
.swipe-refresh-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124,58,237,.45);
}
.swipe-refresh-icon { font-size: 1.1em; opacity: .95; }

.swipe-hint {
  text-align: center; padding: 6px 0 0; color: #3f3f46;
  font-size: .72rem; letter-spacing: .03em;
  animation: pulseHint 2s ease-in-out infinite;
}
@keyframes pulseHint {
  0%, 100% { opacity: .4; }
  50% { opacity: .8; }
}

/* category colours */
.cat-motivation  { background: rgba(251,191,36,.15); color: #fbbf24; }
.cat-philosophy  { background: rgba(139,92,246,.15); color: #8b5cf6; }
.cat-wisdom      { background: rgba(34,211,238,.15); color: #22d3ee; }
.cat-life        { background: rgba(52,211,153,.15); color: #34d399; }
.cat-success     { background: rgba(249,115,22,.15); color: #f97316; }
.cat-science     { background: rgba(59,130,246,.15); color: #3b82f6; }
.cat-creativity  { background: rgba(236,72,153,.15); color: #ec4899; }
.cat-love        { background: rgba(244,63,94,.15); color: #f43f5e; }
.cat-humor       { background: rgba(163,230,53,.15); color: #a3e635; }
.cat-mindfulness { background: rgba(45,212,191,.15); color: #2dd4bf; }
.cat-leadership  { background: rgba(251,146,60,.15); color: #fb923c; }

/* ── Period tabs (trending) ── */
.period-tabs {
  display: flex; gap: 6px; margin: 16px 0 20px; padding: 4px;
  background: rgba(255,255,255,.04); border-radius: 14px; overflow-x: auto;
}
.period-tab {
  flex: 1; padding: 9px 12px; border: none; border-radius: 10px;
  background: transparent; color: #71717a; font-size: .8rem;
  font-weight: 500; cursor: pointer; transition: all .2s; white-space: nowrap;
}
.period-tab:hover { color: #e4e4e7; }
.period-tab.active { background: rgba(167,139,250,.18); color: #a78bfa; }

/* ── Trending cards (scrollable list) ── */
.cards { display: flex; flex-direction: column; gap: 16px; }
.quote-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px; padding: 24px; transition: transform .2s, box-shadow .2s;
  animation: fadeUp .35s ease-out;
}
.quote-card:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.quote-category {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: 14px;
}
.quote-text {
  font-family: 'Playfair Display', serif; font-size: 1.1rem;
  line-height: 1.7; color: #d4d4d8; margin-bottom: 16px;
}
.quote-author { font-size: .85rem; color: #71717a; margin-bottom: 16px; }
.quote-author strong { color: #a1a1aa; font-weight: 500; }
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid rgba(255,255,255,.06);
}
.card-actions { display: flex; gap: 6px; }
.action-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px; background: transparent; color: #71717a;
  font-size: .78rem; cursor: pointer; transition: all .2s;
}
.action-btn:hover { border-color: rgba(255,255,255,.15); color: #a1a1aa; }
.action-btn.liked {
  border-color: rgba(52,211,153,.5); color: #34d399; background: rgba(52,211,153,.15);
}
.action-btn.disliked {
  border-color: rgba(244,63,94,.5); color: #f43f5e; background: rgba(244,63,94,.15);
}
.card-stats { display: flex; gap: 14px; font-size: .75rem; color: #52525b; }
.card-stats span { display: flex; align-items: center; gap: 4px; }
.rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  font-size: .75rem; font-weight: 700; margin-right: 8px; flex-shrink: 0;
}
.rank-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #000; }
.rank-2 { background: linear-gradient(135deg, #d1d5db, #9ca3af); color: #000; }
.rank-3 { background: linear-gradient(135deg, #d97706, #b45309); color: #fff; }
.rank-n { background: rgba(255,255,255,.08); color: #71717a; }

/* ── Loader ── */
.loader { display: flex; justify-content: center; padding: 32px 0; }
.spinner {
  width: 28px; height: 28px;
  border: 3px solid rgba(167,139,250,.2);
  border-top-color: #a78bfa; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.empty-state { text-align: center; padding: 48px 20px; color: #52525b; font-size: .9rem; }

/* ── Metrics ── */
.section-title { font-size: 1rem; font-weight: 600; color: #a1a1aa; margin: 28px 0 14px; }
.section-title:first-child { margin-top: 0; }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.metrics-grid.small { grid-template-columns: repeat(3, 1fr); }
.metric-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px; padding: 20px 16px; text-align: center;
}
.metric-value { font-size: 1.6rem; font-weight: 700; margin-bottom: 4px; }
.metric-label { font-size: .75rem; color: #71717a; text-transform: uppercase; letter-spacing: .04em; }
.accent-blue   .metric-value { color: #60a5fa; }
.accent-green  .metric-value { color: #34d399; }
.accent-red    .metric-value { color: #f43f5e; }
.accent-purple .metric-value { color: #a78bfa; }
.accent-orange .metric-value { color: #fb923c; }
.category-bars { display: flex; flex-direction: column; gap: 10px; }
.cat-bar { display: flex; align-items: center; gap: 12px; }
.cat-bar-label { font-size: .8rem; color: #a1a1aa; width: 100px; text-transform: capitalize; flex-shrink: 0; }
.cat-bar-track { flex: 1; height: 8px; background: rgba(255,255,255,.06); border-radius: 4px; overflow: hidden; }
.cat-bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #a78bfa, #f472b6); transition: width .6s ease; }
.cat-bar-count { font-size: .75rem; color: #71717a; min-width: 30px; text-align: right; }
.pref-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pref-tag {
  padding: 6px 14px; border-radius: 20px; font-size: .78rem; font-weight: 500;
  background: rgba(167,139,250,.12); color: #a78bfa; text-transform: capitalize;
}
.pref-empty { color: #52525b; font-size: .85rem; }

/* ══════════════════════════════════════
   ADMIN DASHBOARD
   ══════════════════════════════════════ */
#admin-dashboard {
  text-align: center; width: 100%;
}
.admin-badge {
  display: inline-block; padding: 6px 16px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(251,191,36,.15), rgba(249,115,22,.15));
  border: 1px solid rgba(251,191,36,.3); color: #fbbf24;
  font-size: .8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 8px;
}
.admin-ingestion-block {
  display: flex; flex-direction: column; align-items: stretch; gap: 24px;
  max-width: 560px; margin: 0 auto 32px;
}
.admin-ingestion-block .admin-ingestion-card {
  width: 100%; box-sizing: border-box;
}
.admin-ingestion-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; padding: 24px 28px; text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.admin-ingestion-label {
  font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: #a1a1aa; margin: 0 0 14px;
}
.admin-ingestion-row {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.btn-ingestion {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 14px;
  border: 1px solid rgba(167,139,250,.4);
  background: rgba(30,27,75,.6);
  color: #c4b5fd; font-weight: 600; font-size: .95rem; letter-spacing: .02em;
  cursor: pointer; transition: transform .15s ease, border-color .2s, background .2s;
}
.btn-ingestion:hover:not(:disabled) {
  background: rgba(67,56,202,.35);
  border-color: #a78bfa;
  transform: translateY(-2px);
}
.btn-ingestion:active:not(:disabled) { transform: translateY(0); }
.btn-ingestion:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.btn-ingestion-icon { font-size: 1.15em; opacity: .9; }
.admin-ingestion-status {
  font-size: .85rem; color: #71717a;
}
.admin-ingestion-status.success { color: #34d399; }
.admin-ingestion-status.error { color: #f87171; }

.admin-upload-actions {
  display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%;
}
.admin-upload-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
}
.admin-upload-hint {
  font-size: .8rem; color: #71717a; margin: 0 0 16px; max-width: 400px; margin-left: auto; margin-right: auto;
}
.admin-download-link-wrap {
  margin: 4px 0;
}
.admin-download-link-wrap.hidden { display: none !important; }
.admin-download-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(52,211,153,.2), rgba(16,185,129,.2));
  border: 1px solid rgba(52,211,153,.4);
  color: #34d399; font-weight: 600; font-size: .95rem;
  text-decoration: none; cursor: pointer;
  transition: background .2s, transform .15s;
}
.admin-download-link:hover {
  background: linear-gradient(135deg, rgba(52,211,153,.35), rgba(16,185,129,.35));
  transform: translateY(-1px);
}
.admin-file-input {
  padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25); color: #e4e4e7; font-size: .9rem;
  min-width: 180px;
}
.btn-upload { margin-left: 4px; }

.admin-syncs-list {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px; padding: 12px; margin-bottom: 24px; min-height: 48px;
}
.admin-syncs-list:empty::before {
  content: "No syncs today yet.";
  color: #52525b; font-size: .9rem;
}
.admin-sync-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: .9rem; color: #d4d4d8;
}
.admin-sync-row:last-child { border-bottom: none; }
.admin-sync-time { color: #a1a1aa; font-variant-numeric: tabular-nums; }
.admin-sync-count { color: #a78bfa; font-weight: 600; }
.admin-chart-container {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px; padding: 20px; margin-bottom: 8px;
}
.admin-chart-container canvas { width: 100% !important; max-height: 300px; }
.admin-table-wrap {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px; overflow-x: auto; margin-bottom: 8px;
}
.admin-table {
  width: 100%; border-collapse: collapse; font-size: .82rem;
}
.admin-table th {
  text-align: left; padding: 12px 14px; color: #a1a1aa;
  font-weight: 600; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .05em; border-bottom: 1px solid rgba(255,255,255,.08);
  white-space: nowrap;
}
.admin-table td {
  padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.04);
  color: #d4d4d8; white-space: nowrap;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,.02); }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table .like-col { color: #34d399; }
.admin-table .dislike-col { color: #f43f5e; }
.admin-table .view-col { color: #60a5fa; }
.admin-table .email-col { color: #a78bfa; font-size: .78rem; }
.admin-table .text-muted { color: #71717a; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .header-inner { flex-direction: column; gap: 10px; }
  .header-right { width: 100%; justify-content: center; }
  .tabs { width: 100%; justify-content: center; }
  .swipe-text { font-size: 1.05rem; }
  .swipe-card-inner { padding: 24px 20px; }
  .swipe-container { height: calc(100vh - 200px); height: calc(100dvh - 200px); }
  .metrics-grid.small { grid-template-columns: repeat(2, 1fr); }
  .period-tabs { gap: 4px; }
  .period-tab { padding: 8px 8px; font-size: .75rem; }
  .user-dropdown { right: 10px; left: 10px; min-width: auto; }
  .admin-table { font-size: .75rem; }
  .admin-table th, .admin-table td { padding: 8px 10px; }
}
