:root {
  --ig-gradient: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  --primary: #E1306C;
  --primary-dark: #C13584;
  --bg: #0A0A0A;
  --surface: #1A1A1A;
  --surface-2: #222222;
  --border: #2D2D2D;
  --text: #FAFAFA;
  --text-muted: #8E8E8E;
  --gold: #FFD700;
  --silver: #C0C0C0;
  --bronze: #CD7F32;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Navbar ─────────────────────────────────────────────────────────────── */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 60px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  font-size: 1.3rem;
  font-weight: 800;
  text-decoration: none;
  background: var(--ig-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-instagram {
  background: var(--ig-gradient);
  color: white;
}
.btn-instagram:hover { opacity: 0.88; transform: scale(1.02); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface); }

.btn-vote {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.btn-vote:hover, .btn-vote.voted {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(225, 48, 108, 0.08);
}
.btn-vote:disabled { cursor: default; opacity: 0.6; }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(225,48,108,0.13) 0%, transparent 65%);
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

.hero h1 span {
  background: var(--ig-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

/* ── Category tabs ───────────────────────────────────────────────────────── */

.categories-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.categories-bar::-webkit-scrollbar { display: none; }

.cat-btn {
  flex-shrink: 0;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.cat-btn.active, .cat-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

.main-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 1.5rem;
}

@media (max-width: 800px) {
  .main-layout { grid-template-columns: 1fr; }
}

.section-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.875rem;
}

/* ── Podium ──────────────────────────────────────────────────────────────── */

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem;
  margin-bottom: 2rem;
}

@media (max-width: 480px) {
  .podium { grid-template-columns: 1fr; }
}

.podium-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}
.podium-card:hover { transform: translateY(-3px); }

.podium-card.rank-1 { border-color: var(--gold); background: linear-gradient(145deg, #1a1500 0%, #1a1a1a 60%); }
.podium-card.rank-2 { border-color: var(--silver); background: linear-gradient(145deg, #131516 0%, #1a1a1a 60%); }
.podium-card.rank-3 { border-color: var(--bronze); background: linear-gradient(145deg, #160e08 0%, #1a1a1a 60%); }

.podium-medal { font-size: 1.75rem; margin-bottom: 0.5rem; }

.podium-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 0.5rem;
  border: 2px solid var(--border);
}
.rank-1 .podium-avatar { border-color: var(--gold); }
.rank-2 .podium-avatar { border-color: var(--silver); }
.rank-3 .podium-avatar { border-color: var(--bronze); }

.podium-username { font-size: 0.82rem; font-weight: 700; margin-bottom: 0.35rem; }

.podium-text {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.podium-votes {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
}

.podium-cat {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ── Comment cards ───────────────────────────────────────────────────────── */

.comment-list { display: flex; flex-direction: column; gap: 0.625rem; }

.comment-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  transition: border-color 0.2s;
}
.comment-card:hover { border-color: rgba(225,48,108,0.4); }

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
}

.rank-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 26px;
  text-align: center;
}

.comment-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  flex-shrink: 0;
}

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

.comment-username {
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.comment-username:hover { color: var(--primary); }

.comment-cat-tag {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  margin-top: 0.1rem;
}

.comment-text {
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 0.625rem;
  word-break: break-word;
}

.comment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.comment-ig-link {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s;
}
.comment-ig-link:hover { color: var(--primary); }

/* ── Leaderboard ─────────────────────────────────────────────────────────── */

.leaderboard-panel {
  position: sticky;
  top: 76px;
  height: fit-content;
}

.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.panel-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.leaderboard-list { display: flex; flex-direction: column; gap: 0.75rem; }

.leader-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.leader-item:hover { opacity: 0.75; }

.leader-rank {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 18px;
  text-align: center;
}
.leader-rank.top1 { color: var(--gold); }
.leader-rank.top2 { color: var(--silver); }
.leader-rank.top3 { color: var(--bronze); }

.leader-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

.leader-info { flex: 1; min-width: 0; }
.leader-username { font-size: 0.82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leader-meta { font-size: 0.72rem; color: var(--text-muted); }

.leader-score { font-size: 0.82rem; font-weight: 800; color: var(--primary); white-space: nowrap; }

/* ── Demo banner ─────────────────────────────────────────────────────────── */

.demo-banner {
  background: linear-gradient(135deg, #0e1629, #16213e);
  border: 1px solid #1e3a6e;
  border-radius: 12px;
  padding: 0.875rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.demo-banner p { font-size: 0.82rem; color: #bfcfff; line-height: 1.5; }
.demo-banner a { color: #818cf8; }

/* ── Empty / loading ─────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.9rem; }

.loading-skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 12px;
  height: 110px;
  margin-bottom: 0.625rem;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── User menu ───────────────────────────────────────────────────────────── */

.user-menu { position: relative; }

.user-trigger {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.2rem 0.7rem 0.2rem 0.2rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s;
  font-size: 0.85rem;
  font-weight: 600;
}
.user-trigger:hover { border-color: var(--primary); }
.user-trigger img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.user-trigger span { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.4rem;
  min-width: 150px;
  display: none;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}
.user-dropdown.open { display: block; }
.user-dropdown a {
  display: block;
  padding: 0.45rem 0.7rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.87rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.user-dropdown a:hover { background: var(--surface-2); }
.user-dropdown .dd-divider { height: 1px; background: var(--border); margin: 0.25rem 0; }

/* ── Toast ───────────────────────────────────────────────────────────────── */

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  max-width: 320px;
  animation: toastIn 0.3s ease;
}
.toast.success { background: #0e2b17; border: 1px solid #16a34a; color: #4ade80; }
.toast.error   { background: #2b0e0e; border: 1px solid #dc2626; color: #f87171; }
.toast.info    { background: #0e1b2b; border: 1px solid #2563eb; color: #93c5fd; }
@keyframes toastIn {
  from { transform: translateX(80px); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

/* ── Profile page ────────────────────────────────────────────────────────── */

.profile-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.profile-header-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}
@media (max-width: 520px) {
  .profile-header-card { flex-direction: column; align-items: center; text-align: center; }
}

.profile-avatar-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  padding: 2px;
  background: var(--ig-gradient);
  flex-shrink: 0;
}
.profile-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--bg);
}

.profile-info { flex: 1; }
.profile-handle { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.2rem; }
.profile-name   { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.75rem; }

.profile-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.875rem;
}
.stat-item { text-align: center; }
.stat-number { font-size: 1.15rem; font-weight: 800; }
.stat-label  { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.ig-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  background: var(--ig-gradient);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}
.ig-follow-btn:hover { opacity: 0.88; }

.demo-tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
}

/* ── Submit page ─────────────────────────────────────────────────────────── */

.submit-wrapper {
  max-width: 580px;
  margin: 2rem auto;
  padding: 0 1.5rem 3rem;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
}
.form-card h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.2rem; }
.form-subtitle { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 1.5rem; line-height: 1.5; }

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}
.form-group textarea,
.form-group input,
.form-group select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}
.form-group textarea { min-height: 130px; }
.form-group textarea:focus,
.form-group input:focus,
.form-group select:focus { border-color: var(--primary); }
.form-group select { appearance: none; cursor: pointer; }

.char-counter { font-size: 0.72rem; color: var(--text-muted); text-align: right; margin-top: 0.25rem; }
.char-counter.warn { color: #d97706; }
.char-counter.over { color: #dc2626; }

.field-error { font-size: 0.78rem; color: #f87171; margin-top: 0.25rem; display: none; }

.form-hint { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.3rem; line-height: 1.5; }

.preview-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.25rem;
  display: none;
}
.preview-label { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; }

.submit-btn { width: 100%; justify-content: center; padding: 0.85rem; font-size: 0.95rem; }

/* ── Instagram post embed ────────────────────────────────────────────────── */

.post-embed-wrap { margin: 0.5rem 0 0.625rem; }

.post-embed-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.post-embed-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(225,48,108,0.06);
}

.post-embed-content {
  margin-top: 0.75rem;
  border-radius: 12px;
  overflow: hidden;
}

/* Override Instagram embed iframe background */
.post-embed-content iframe {
  border-radius: 12px !important;
}

.login-required {
  text-align: center;
  padding: 3.5rem 1rem;
}
.login-required .icon { font-size: 3rem; margin-bottom: 1rem; }
.login-required h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.5rem; }
.login-required p { color: var(--text-muted); font-size: 0.9rem; max-width: 360px; margin: 0 auto 1.5rem; line-height: 1.6; }

/* ── Search bar ──────────────────────────────────────────────────────────── */

.search-bar {
  position: relative;
  margin-bottom: 1.25rem;
}
.search-bar input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--primary); }
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar .search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}
.search-bar .search-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  display: none;
  padding: 0;
  line-height: 1;
}
.search-bar .search-clear.visible { display: block; }

/* ── Notification bell ───────────────────────────────────────────────────── */

.notif-wrap {
  position: relative;
}
.notif-bell {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  position: relative;
}
.notif-bell:hover { border-color: var(--primary); }
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  background: var(--primary);
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  z-index: 300;
  display: none;
  overflow: hidden;
}
.notif-dropdown.open { display: block; }
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
}
.notif-header span { font-size: 0.88rem; font-weight: 700; }
.notif-header button {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 600;
}
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  line-height: 1.5;
  cursor: pointer;
  transition: background 0.15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: rgba(225,48,108,0.05); }
.notif-item .notif-time { color: var(--text-muted); font-size: 0.72rem; margin-top: 0.15rem; }
.notif-empty { padding: 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* ── Report modal ────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  width: 100%;
  max-width: 400px;
  transform: translateY(16px);
  transition: transform 0.2s;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; }
.modal-box p  { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
.report-reasons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.reason-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.reason-btn:hover, .reason-btn.selected {
  border-color: var(--primary);
  background: rgba(225,48,108,0.08);
}
.modal-actions { display: flex; gap: 0.75rem; }
.modal-actions .btn { flex: 1; justify-content: center; }

/* ── Featured badge ──────────────────────────────────────────────────────── */

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  margin-left: 0.4rem;
}

/* ── Admin page ──────────────────────────────────────────────────────────── */

.admin-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

.admin-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.admin-tab {
  padding: 0.6rem 1.1rem;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}
.admin-tab.active { color: var(--text); border-bottom-color: var(--primary); }
.admin-tab:hover  { color: var(--text); }

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
  text-align: center;
}
.stat-card .stat-val { font-size: 1.6rem; font-weight: 800; }
.stat-card .stat-lbl { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

.admin-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.admin-table-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.admin-table-toolbar .filter-btns { display: flex; gap: 0.35rem; }
.filter-btn {
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

.action-btns { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.action-btn {
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.action-btn:hover             { border-color: var(--text-muted); color: var(--text); }
.action-btn.btn-feature:hover { border-color: #f59e0b; color: #f59e0b; }
.action-btn.btn-hide:hover    { border-color: #dc2626; color: #f87171; }
.action-btn.btn-show:hover    { border-color: #16a34a; color: #4ade80; }
.action-btn.btn-delete:hover  { border-color: #dc2626; color: #f87171; background: rgba(220,38,38,0.08); }
.action-btn.btn-admin:hover   { border-color: #f59e0b; color: #f59e0b; }

.status-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-pill.active   { background: rgba(22,163,74,0.15);  color: #4ade80; }
.status-pill.hidden   { background: rgba(220,38,38,0.15);  color: #f87171; }
.status-pill.featured { background: rgba(245,158,11,0.15); color: #fbbf24; }

.admin-user-cell { display: flex; align-items: center; gap: 0.5rem; }
.admin-user-cell img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
