/* ==========================================================================
   Traffic Torch – Pro Dashboard styles
   v1.0  ·  loaded by /pro/  ·  do not inline-edit on other pages
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Layout primitives
   -------------------------------------------------------------------------- */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.dark .glass { background: rgba(0, 0, 0, 0.3); }

/* --------------------------------------------------------------------------
   2. Tabs
   -------------------------------------------------------------------------- */
.tab-active { border-bottom: 3px solid #f97316; color: #f97316; }

/* --------------------------------------------------------------------------
   3. Cards
   -------------------------------------------------------------------------- */
.stat-card { transition: transform 0.2s; }
.stat-card:hover { transform: translateY(-4px); }

.tool-card { transition: transform 0.2s, box-shadow 0.2s; }
.tool-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.15); }
.dark .tool-card:hover { box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.5); }

.result-detail { border-left: 3px solid #f97316; }

/* --------------------------------------------------------------------------
   4. Spinner
   -------------------------------------------------------------------------- */
.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: #f97316;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   5. Pagination
   -------------------------------------------------------------------------- */
.pagination-btn {
  padding: 4px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: white;
  color: #374151;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.dark .pagination-btn { border-color: #4b5563; background: #1f2937; color: #d1d5db; }
.pagination-btn:hover:not(:disabled) { background: #f3f4f6; border-color: #f97316; color: #f97316; }
.dark .pagination-btn:hover:not(:disabled) { background: #374151; border-color: #f97316; color: #f97316; }
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* --------------------------------------------------------------------------
   6. Query / page list hovers
   -------------------------------------------------------------------------- */
.query-card, .page-card { transition: background 0.2s; }
.query-card:hover, .page-card:hover { background: rgba(255, 255, 255, 0.05); }

/* --------------------------------------------------------------------------
   7. Modal overlay
   -------------------------------------------------------------------------- */
.modal-overlay { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); }

/* --------------------------------------------------------------------------
   8. Password toggle (modal)
   -------------------------------------------------------------------------- */
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #6b7280;
}
.password-toggle svg {
  width: 22px; height: 22px; display: block;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.dark .password-toggle { color: #9ca3af; }

/* --------------------------------------------------------------------------
   9. Notifications
   -------------------------------------------------------------------------- */
.notif-row {
  display: flex;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
}
.notif-row:hover { background: rgba(255, 255, 255, 0.06); }
.dark .notif-row { background: rgba(0, 0, 0, 0.25); border-color: rgba(255, 255, 255, 0.04); }
.notif-row.unread { background: rgba(249, 115, 22, 0.08); border-color: rgba(249, 115, 22, 0.25); }
.dark .notif-row.unread { background: rgba(249, 115, 22, 0.12); border-color: rgba(249, 115, 22, 0.2); }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #f97316; flex-shrink: 0; margin-top: 0.5rem;
}

.notif-link { color: #2563eb; font-weight: 600; text-decoration: none; cursor: pointer; }
.notif-link:hover { text-decoration: underline; }
.dark .notif-link { color: #60a5fa; }

/* --------------------------------------------------------------------------
   10. Link buttons (profile pill links)
   -------------------------------------------------------------------------- */
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.18s ease;
  border: 1px solid rgba(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.1);
  color: #ea580c;
  text-decoration: none;
}
.link-btn:hover { background: rgba(249, 115, 22, 0.2); transform: translateY(-1px); }
.dark .link-btn { color: #fb923c; border-color: rgba(251, 146, 60, 0.3); background: rgba(251, 146, 60, 0.12); }

/* Pill already uses gap:0.5rem between children, so the emoji's own margin
   would double up — neutralise it only inside .link-btn. */
.link-btn .emoji { margin-right: 0; }

/* --------------------------------------------------------------------------
   11. Profile meta rows  (job · company · location · member-since)
   -------------------------------------------------------------------------- */
.meta-item {
  display: inline-flex;
  align-items: center;
  margin: 0 0.75rem;        /* 24px visual gap between items */
  line-height: 1.4;
}
.emoji {
  display: inline-block;
  flex-shrink: 0;
  margin-right: 0.5rem;     /* 8px between emoji and its label */
  line-height: 1;
  font-style: normal;
}

/* --------------------------------------------------------------------------
   12. Module score rows (feed "More details")
   -------------------------------------------------------------------------- */
.mod-row { display: flex; align-items: center; gap: 0.75rem; font-size: 0.78rem; }
.mod-label { flex-shrink: 0; font-weight: 700; color: #4b5563; white-space: nowrap; min-width: 130px; }
.dark .mod-label { color: #9ca3af; }
.mod-track { flex: 1; height: 8px; background: #e5e7eb; border-radius: 9999px; overflow: hidden; }
.dark .mod-track { background: #374151; }
.mod-fill { display: block; height: 100%; border-radius: 9999px; transition: width 0.3s ease; }
.mod-fill.good { background: #22c55e; }
.mod-fill.mid  { background: #eab308; }
.mod-fill.bad  { background: #ef4444; }
.mod-score { flex-shrink: 0; min-width: 28px; text-align: right; font-weight: 700; color: #374151; }
.dark .mod-score { color: #d1d5db; }
/* ── Avatar tier ring (Phase A) ──────────────────────────────────────── */
.avatar-ring {
  display: inline-block;
  padding: 3px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #94a3b8, #cbd5e1);
  flex-shrink: 0;
  line-height: 0;
}
.avatar-ring.tier-free       { background: linear-gradient(135deg, #94a3b8, #cbd5e1); }
.avatar-ring.tier-pro        { background: linear-gradient(135deg, #f97316, #ec4899); }
.avatar-ring.tier-enterprise { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.avatar-ring > img {
  display: block;
  border-radius: 9999px;
  background: #fff;
}
.dark .avatar-ring > img { background: #0f172a; }
