/* ============================================
   CrickTips — pages.css
   Page-specific styles
   ============================================ */

/* ---- Melbet Ad Banner ---- */
.melbet-ad-img {
  width: 100%;
  display: block;
  height: auto;
}

/* ---- Hamburger / Mobile Nav ---- */
.hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 18px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  line-height: 1;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.2s;
}

.mobile-nav.open {
  display: flex;
  max-height: 400px;
  padding: 8px 0;
}

.mobile-nav a {
  color: var(--muted);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s, background 0.15s;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--accent);
  background: var(--bg3);
}

@media (max-width: 900px) {
  .hamburger { display: block; }
  nav { display: none; }
}

/* ---- Page Hero Banner ---- */
.page-hero {
  background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
  border-bottom: 1px solid var(--border);
  padding: 28px 20px;
  width: 100%;
  overflow: hidden;
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.page-hero h1 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}

/* ---- Main Full Width (no sidebar) ---- */
.main--full {
  grid-template-columns: 1fr;
  max-width: 1280px;
}

/* ---- Tips Page ---- */
.tips-page-stats {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.tips-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tips-stat-num {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.tips-stat-label {
  font-size: 11px;
  color: var(--muted);
}

.filter-bar-advanced {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  overflow: hidden;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 80px;
  flex-shrink: 0;
}

.tip-expert {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 3rem;
  font-size: 14px;
}

/* ---- Premium Modal Pricing ---- */
.modal--wide {
  max-width: 820px;
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.pricing-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  position: relative;
}

.pricing-card--featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(245,166,35,0.08), var(--bg3));
  transform: scale(1.03);
}

/* Once a plan is selected, only that card keeps the orange highlight —
   even the "Most Popular" featured card loses it if a different plan is picked */
.pricing-grid--has-selection .pricing-card--featured:not(.pricing-card--selected) {
  border-color: var(--border);
  background: var(--bg3);
  transform: none;
}

.pricing-card--selected {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(245,166,35,0.35);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.pricing-tier {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.pricing-price {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
}

.pricing-price span {
  font-size: 14px;
  color: var(--muted);
  font-family: var(--font-body);
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pricing-features li {
  font-size: 12px;
  padding: 3px 0;
}

.feat-yes { color: var(--green); }
.feat-no { color: var(--muted); }

.pricing-btn {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.pricing-btn:hover { opacity: 0.85; }

.pricing-btn--primary {
  background: linear-gradient(135deg, var(--accent), #e8860a);
  color: #000;
}

.pricing-btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

@media (max-width: 600px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card--featured { transform: none; }
}

/* ---- Premium Purchase Modal (QR / UTR / Promo) ---- */
.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin: 0 auto;
}

.qr-image {
  width: 220px;
  height: 220px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  padding: 8px;
}

.qr-amount {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.ppm-summary {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 14px 0;
  font-size: 14px;
}

.ppm-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  color: var(--muted);
}

.ppm-summary-total {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-weight: 700;
  color: var(--text);
}

/* ---- Tip Detail Modal ---- */
.modal-match-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.modal-section {
  margin: 16px 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.modal-section h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.h2h-row {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.odds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.odds-table th,
.odds-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.odds-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
}

.modal-expert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  margin: 16px 0;
}

.modal-odds-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  margin-top: 16px;
}

/* ---- Modal mobile fixes ---- */
@media (max-width: 600px) {
  .modal {
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 18px 14px;
  }
  .modal-match-label { font-size: 11px; }
  .modal h3 { font-size: 18px !important; }

  .h2h-row { flex-wrap: wrap; gap: 8px; font-size: 13px; }

  .table-wrap-modal,
  .modal-section .odds-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .odds-table th, .odds-table td { padding: 6px 8px; font-size: 12px; white-space: nowrap; }

  .modal-expert { flex-wrap: wrap; padding: 12px; gap: 8px; }

  .modal-odds-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }
  .modal-odds-bar > div { width: 100%; }
  .modal-odds-bar .bet-btn,
  .modal-odds-bar button {
    width: 100% !important;
    padding: 12px !important;
  }
}

/* ---- Experts Page ---- */
.expert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.expert-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  transition: border-color 0.2s, transform 0.15s;
}

.expert-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.expert-card--top {
  border-color: #ffd700;
  background: linear-gradient(135deg, rgba(255,215,0,0.05), var(--bg2));
}

.expert-top-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffd700;
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.expert-card-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  margin: 0 auto 12px;
}

.expert-card-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
}

.expert-card-stats {
  display: flex;
  justify-content: space-around;
  margin: 12px 0;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.expert-card-stat { text-align: center; }
.ec-num { font-family: var(--font-heading); font-size: 20px; font-weight: 700; }
.ec-label { font-size: 10px; color: var(--muted); }

.expert-monthly-badge {
  background: rgba(63,185,80,0.1);
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 8px;
}

.expert-view-btn {
  display: block;
  width: 100%;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: all 0.15s;
}

.expert-view-btn:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* Leaderboard Table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); width: 100%; -webkit-overflow-scrolling: touch; }

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.leaderboard-table th {
  background: var(--bg3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.leaderboard-table th.sortable {
  cursor: pointer;
}

.leaderboard-table th.sortable:hover {
  color: var(--accent);
}

.leaderboard-table tr:last-child td { border-bottom: none; }
.leaderboard-table tr:hover td { background: var(--bg3); }

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

/* ---- Predictions Page ---- */
.poll-wins-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(63,185,80,0.12);
  color: var(--green);
  border: 1px solid rgba(63,185,80,0.3);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

#poll-sport-filters {
  margin-bottom: 16px;
}

.polls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.poll-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.poll-card-header {
  background: var(--bg3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.poll-card > #poll-widget-1,
.poll-card > [id^="poll-widget-"] {
  padding: 14px 16px;
}

.poll-option.voted { cursor: default; }

.prob-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}

.prob-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.prob-rows { display: flex; flex-direction: column; gap: 8px; }

.prob-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prob-label {
  width: 140px;
  min-width: 80px;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 1;
  word-break: break-word;
}

.prob-bar-wrap {
  flex: 1;
  height: 20px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
}

.prob-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.prob-bar--team1 { background: linear-gradient(90deg, var(--green), var(--accent2)); }
.prob-bar--team2 { background: linear-gradient(90deg, var(--red), #f85149cc); }
.prob-bar--draw  { background: linear-gradient(90deg, var(--muted), #6e7681); }

.prob-pct {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  width: 44px;
  text-align: right;
  flex-shrink: 0;
}

.prob-factors {
  margin-top: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* Track Record */
.track-record-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.accuracy-badge {
  text-align: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 24px;
}

.accuracy-num {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  color: var(--green);
}

.track-record-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.track-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.track-icon {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.track-match { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.track-prediction { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.track-date { font-size: 10px; margin-bottom: 4px; }
.track-result { font-size: 11px; }

@media (max-width: 900px) {
  .polls-grid { grid-template-columns: 1fr; }
  .track-record-grid { grid-template-columns: repeat(2, 1fr); }
  .prob-label { width: 100px; font-size: 11px; }
}

/* ---- Stats Page ---- */
.overview-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.overview-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.overview-num {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
}

.overview-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* CSS Bar Chart */
.chart-container {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 24px 0;
  margin-bottom: 8px;
  overflow: hidden;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 220px;
  padding-bottom: 0;
}

.chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.chart-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-heading);
}

.chart-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.chart-bar {
  width: 80%;
  background: linear-gradient(180deg, var(--accent), #e8860a);
  border-radius: 4px 4px 0 0;
  transition: height 0.6s ease;
  min-height: 4px;
}

.chart-month {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  padding-bottom: 12px;
}

.chart-baseline {
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  margin: 0 24px 16px;
}

@media (max-width: 900px) {
  .overview-stats { grid-template-columns: repeat(2, 1fr); }
  .chart-bars { height: 140px; }
}

/* ---- Blog Page ---- */
.featured-article {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
}

.featured-body {
  padding: 28px 32px;
}

.featured-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  transition: color 0.15s;
}

.featured-article:hover .featured-title {
  color: var(--accent);
}

.featured-excerpt {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 700px;
}

#article-modal .modal {
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#article-modal-body p {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 600px) {
  #article-modal .modal { max-height: 88vh; padding: 20px 16px; }
  #article-modal-body h2 { font-size: 19px !important; }
}

.featured-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.article-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.article-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}

.article-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.article-card-body {
  padding: 16px;
  flex: 1;
}

.article-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  transition: color 0.15s;
}

.article-card:hover .article-title {
  color: var(--accent);
}

.article-excerpt {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .article-grid { grid-template-columns: 1fr; }
  .featured-body { padding: 20px; }
  .featured-title { font-size: 20px; }
}

/* ============================================
   AUTH PAGES (login.html, signup.html, admin-login.html)
   ============================================ */

.auth-page {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--bg);
}

.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 32px;
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
}

.auth-card--wide { max-width: 680px; }

.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-title { font-family: var(--font-heading); font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.auth-subtitle { font-size: 13px; color: var(--muted); }

.auth-tabs {
  display: flex;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
}

.auth-tab.active { background: var(--accent); color: #000; }
.auth-tab:not(.active):hover { background: var(--bg3); color: var(--text); }

.auth-error {
  background: rgba(248,81,73,0.1);
  border: 1px solid rgba(248,81,73,0.3);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

.auth-success {
  background: rgba(63,185,80,0.1);
  border: 1px solid rgba(63,185,80,0.3);
  color: var(--green);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

.auth-info-box {
  background: rgba(88,166,255,0.08);
  border: 1px solid rgba(88,166,255,0.2);
  color: var(--blue);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-bottom: 16px;
}

.auth-form { width: 100%; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }

.form-group input::placeholder,
.form-group textarea::placeholder { color: #444; }

.form-group select { cursor: pointer; }
.form-group textarea { resize: vertical; }

.input-wrap { position: relative; }
.input-wrap input { padding-right: 40px; }

.toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  padding: 2px;
}

.form-hint { font-size: 11px; color: var(--muted); }
.form-link { color: var(--accent); font-size: 12px; font-weight: 500; }
.form-link:hover { text-decoration: underline; }
.req { color: var(--red); }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; padding: 6px 0; }

.btn-auth {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--accent), #e8860a);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-top: 4px;
  font-family: var(--font-body);
  transition: opacity 0.15s;
}

.btn-auth:hover { opacity: 0.9; }
.btn-auth--expert { background: linear-gradient(135deg, var(--accent2), #009d82); }

.auth-switch { text-align: center; font-size: 12px; color: var(--muted); margin-top: 14px; }
.auth-switch a { color: var(--accent); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 11px;
}

.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

@media (max-width: 600px) {
  .auth-card { padding: 24px 18px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---- Auth state in header ---- */
.btn-login {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  text-decoration: none;
  display: inline-block;
}

.btn-login:hover { border-color: var(--accent); color: var(--accent); }

.auth-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}

.auth-pill:hover { border-color: var(--accent2); }

.auth-pill-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.auth-pill-name { font-size: 12px; font-weight: 600; }

.auth-role-badge {
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.auth-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 160px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  overflow: hidden;
}

.auth-pill:hover .auth-dropdown,
.auth-pill:focus-within .auth-dropdown { display: block; }

.auth-dropdown a {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  transition: background 0.1s, color 0.1s;
}

.auth-dropdown a:last-child { border-bottom: none; }
.auth-dropdown a:hover { background: var(--bg3); color: var(--text); }

/* ============================================
   ADMIN DASHBOARD (admin.html)
   ============================================ */

.admin-body { background: #080c12; min-height: 100vh; overflow-x: hidden; }

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.admin-topbar-left { display: flex; align-items: center; gap: 14px; }
.admin-topbar-right { display: flex; align-items: center; gap: 12px; }

.sidebar-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.admin-top-link { font-size: 12px; color: var(--muted); transition: color 0.15s; }
.admin-top-link:hover { color: var(--accent); }

.admin-user-pill { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

.btn-logout {
  background: transparent;
  border: 1px solid rgba(248,81,73,0.3);
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
}

.btn-logout:hover { background: rgba(248,81,73,0.1); }

.admin-layout { display: flex; min-height: calc(100vh - 52px); overflow-x: hidden; width: 100%; }

.admin-sidebar {
  width: 210px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 16px 0;
  transition: width 0.2s;
  overflow: hidden;
}

.admin-sidebar.collapsed { width: 0; padding: 0; }

.admin-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: var(--font-body);
  transition: all 0.15s;
  white-space: nowrap;
}

.admin-nav-item:hover { background: var(--bg3); color: var(--text); }
.admin-nav-item.active { background: rgba(245,166,35,0.12); color: var(--accent); font-weight: 600; }
.nav-icon { font-size: 16px; }

.admin-main { flex: 1; padding: 24px; overflow-x: hidden; min-width: 0; }

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

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-section-header h2 { font-family: var(--font-heading); font-size: 22px; font-weight: 700; }
.admin-date { font-size: 12px; color: var(--muted); }

.admin-badge {
  background: rgba(245,166,35,0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.as-num { font-family: var(--font-heading); font-size: 28px; font-weight: 700; color: var(--accent); }
.as-label { font-size: 11px; color: var(--muted); margin-top: 4px; }

.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.admin-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

.admin-card-title {
  background: var(--bg3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.activity-log { padding: 8px 16px; }

.log-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.log-item:last-child { border-bottom: none; }
.log-action { color: var(--muted); flex: 1; }
.log-time { color: var(--accent2); font-weight: 600; margin-left: 12px; }

.quick-actions { padding: 14px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.qa-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
  text-align: center;
}

.qa-btn:hover { border-color: var(--accent); color: var(--accent); }

.btn-add {
  background: linear-gradient(135deg, var(--accent), #e8860a);
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
}

.admin-form-card {
  background: var(--bg2);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.admin-form-card .form-group { margin-bottom: 12px; }

.form-actions { display: flex; gap: 10px; margin-top: 16px; }

.btn-save {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-body);
}

.form-msg { font-size: 13px; margin-top: 10px; display: none; font-weight: 600; padding: 8px 12px; border-radius: 6px; }
.form-msg--success { display: block; color: var(--green); background: rgba(63,185,80,0.1); border: 1px solid rgba(63,185,80,0.3); }
.form-msg--error   { display: block; color: var(--red);   background: rgba(248,81,73,0.1);  border: 1px solid rgba(248,81,73,0.3);  }

/* Expert dashboard section title */
.admin-section-title { font-family: var(--font-heading); font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 20px; }

/* Sidebar collapsed state */
.admin-sidebar.collapsed { width: 0; overflow: hidden; padding: 0; }
.admin-layout.sidebar-collapsed { grid-template-columns: 0 1fr; }

/* Filter tabs inside admin/expert panels */
.admin-section .filter-tab {
  padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); background: var(--bg3); color: var(--muted);
  cursor: pointer; transition: all 0.2s;
}
.admin-section .filter-tab.active,
.admin-section .filter-tab:hover { background: var(--accent); color: #000; border-color: var(--accent); }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.admin-table th,
.admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: left; }

.admin-table th {
  background: var(--bg3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.tbl-btn {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  margin-right: 4px;
  transition: opacity 0.15s;
}

.tbl-btn:hover { opacity: 0.8; }
.tbl-btn--edit    { background: rgba(88,166,255,0.15); color: var(--blue); }
.tbl-btn--del     { background: rgba(248,81,73,0.15); color: var(--red); }
.tbl-btn--approve { background: rgba(63,185,80,0.15); color: var(--green); }

.tbl-select {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
}

.source-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.source-base  { background: rgba(139,148,158,0.15); color: var(--muted); }
.source-admin { background: rgba(245,166,35,0.15);  color: var(--accent); }

.status-badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 4px; }
.status-pending  { background: rgba(245,166,35,0.15); color: var(--accent); }
.status-approved { background: rgba(63,185,80,0.15);  color: var(--green); }
.status-rejected { background: rgba(248,81,73,0.15);  color: var(--red); }
.status-in_progress { background: rgba(88,166,255,0.15); color: var(--blue); }
.status-resolved { background: rgba(63,185,80,0.15);  color: var(--green); }

@media (max-width: 900px) {
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid-2     { grid-template-columns: 1fr; }
  .quick-actions    { grid-template-columns: 1fr; }
  .admin-main       { padding: 16px 12px; }

  /* Mobile sidebar: slide-in overlay drawer */
  .admin-sidebar {
    position: fixed;
    top: 52px;
    left: 0;
    bottom: 0;
    z-index: 200;
    width: 220px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    display: block !important;
    overflow-y: auto;
  }
  .admin-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.5);
  }
  .admin-sidebar.collapsed { transform: translateX(-100%); width: 220px; padding: 16px 0; }
}

@media (max-width: 600px) {
  .admin-stats-grid { gap: 8px; }
  .admin-stat-card { padding: 12px; }
  .as-num { font-size: 22px; }
  .admin-section-header h2 { font-size: 18px; }
  .admin-topbar { padding: 0 12px; }
  .page-hero { padding: 18px 14px; }
  .page-hero h1 { font-size: 24px; }
  .prob-label { width: 80px; font-size: 11px; }
  .prob-pct { font-size: 15px; }
  .filter-bar-advanced { padding: 12px 14px; }
  .filter-label { min-width: 60px; font-size: 10px; }
  .auth-card { padding: 20px 14px; }
  .featured-body { padding: 16px; }
  .featured-title { font-size: 18px; }
}

@media (max-width: 400px) {
  .overview-stats { grid-template-columns: 1fr 1fr; }
  .track-record-grid { grid-template-columns: 1fr 1fr; }
  .leaderboard-table th, .leaderboard-table td { padding: 8px 8px; font-size: 11px; }
  .admin-table th, .admin-table td { padding: 8px 8px; font-size: 11px; }
}

/* ── Elite Hub ─────────────────────────────────────────────────────────── */
.elite-services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.elite-service-card { padding: 20px; }
.elite-service-icon { font-size: 28px; margin-bottom: 8px; }
.elite-service-card h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  margin-bottom: 6px;
}
.elite-service-card p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .elite-services-grid { grid-template-columns: 1fr; }
}
