/* ============================================================
   Plus Scraper — Auth Pages Shared Styles
   Beautiful, modern, light-and-colorful theme
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Sora:wght@500;600;700;800&display=swap');

:root {
  --c-bg: #f3f0ff;
  --c-surface: rgba(255, 255, 255, 0.82);
  --c-surface-solid: #ffffff;
  --c-border: rgba(124, 93, 250, 0.16);
  --c-text: #1c1430;
  --c-text-soft: #5b5370;
  --c-text-muted: #8b83a0;
  --c-primary: #7c3aed;
  --c-primary-2: #8b5cf6;
  --c-accent: #ec4899;
  --c-cyan: #06b6d4;
  --c-amber: #f59e0b;
  --c-emerald: #10b981;
  --c-rose: #f43f5e;
  --gradient: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 45%, #ec4899 100%);
  --gradient-soft: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(236, 72, 153, 0.08));
  --shadow-card: 0 20px 60px -20px rgba(76, 29, 149, 0.25), 0 4px 20px -8px rgba(76, 29, 149, 0.12);
  --shadow-btn: 0 12px 28px -10px rgba(124, 58, 237, 0.55);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

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

html, body { height: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Aurora / mesh background ===== */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60rem 60rem at 12% 8%, rgba(139, 92, 246, 0.28), transparent 55%),
    radial-gradient(50rem 50rem at 88% 12%, rgba(6, 182, 212, 0.20), transparent 55%),
    radial-gradient(55rem 55rem at 85% 88%, rgba(236, 72, 153, 0.24), transparent 55%),
    radial-gradient(45rem 45rem at 15% 90%, rgba(16, 185, 129, 0.18), transparent 55%),
    linear-gradient(135deg, #f6f3ff 0%, #eef2ff 40%, #fdf2f8 100%);
}
.auth-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(124, 58, 237, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse at 50% 20%, black, transparent 75%);
}
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  z-index: -1;
  animation: float 14s ease-in-out infinite;
}
.blob-1 { width: 420px; height: 420px; background: rgba(139, 92, 246, 0.35); top: -120px; left: -100px; }
.blob-2 { width: 380px; height: 380px; background: rgba(6, 182, 212, 0.30); top: 30%; right: -120px; animation-delay: -4s; }
.blob-3 { width: 360px; height: 360px; background: rgba(236, 72, 153, 0.30); bottom: -100px; left: 35%; animation-delay: -8s; }
@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-30px) translateX(20px); }
}

/* ===== Layout ===== */
.auth-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--c-surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 40px 38px;
  position: relative;
  overflow: hidden;
  animation: cardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-card.wide { max-width: 720px; }
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: var(--gradient);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Brand ===== */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-btn);
  flex-shrink: 0;
}
.brand-name { font-family: 'Sora', sans-serif; font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.brand-sub { font-size: 12.5px; color: var(--c-text-muted); font-weight: 500; }

/* ===== Headings ===== */
.auth-title {
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 8px;
}
.auth-sub {
  color: var(--c-text-soft);
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 26px;
}
.auth-sub b { color: var(--c-text); }

/* ===== Fields ===== */
.field { margin-bottom: 18px; }
.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-text-soft);
  margin-bottom: 7px;
  letter-spacing: 0.2px;
}
.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-muted);
  display: flex;
  pointer-events: none;
}
.input {
  width: 100%;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--c-text);
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 12px 14px 12px 42px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.input.no-icon { padding-left: 14px; }
.input::placeholder { color: var(--c-text-muted); }
.input:focus {
  border-color: var(--c-primary-2);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}
.toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--c-text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.toggle-pass:hover { color: var(--c-primary); background: rgba(124, 58, 237, 0.08); }

/* Password strength meter */
.strength { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.strength-bars { display: flex; gap: 4px; flex: 1; }
.strength-bars span {
  height: 4px;
  flex: 1;
  border-radius: 99px;
  background: rgba(124, 58, 237, 0.12);
  transition: background 0.25s;
}
.strength-text { font-size: 11.5px; font-weight: 600; color: var(--c-text-muted); min-width: 68px; text-align: right; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: var(--gradient);
  background-size: 150% 150%;
  box-shadow: var(--shadow-btn);
  transition: transform 0.15s, box-shadow 0.2s, background-position 0.3s;
  letter-spacing: 0.2px;
}
.btn:hover { background-position: right center; transform: translateY(-1px); box-shadow: 0 16px 32px -10px rgba(124, 58, 237, 0.6); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: rgba(124, 58, 237, 0.07);
  color: var(--c-primary);
  box-shadow: none;
  border: 1.5px solid rgba(124, 58, 237, 0.2);
}
.btn-ghost:hover { background: rgba(124, 58, 237, 0.12); box-shadow: none; }
.btn-success { background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 12px 28px -10px rgba(16, 185, 129, 0.55); }
.btn-danger { background: linear-gradient(135deg, #e11d48, #f43f5e); box-shadow: 0 12px 28px -10px rgba(244, 63, 94, 0.55); }
.btn-sm { width: auto; padding: 9px 16px; font-size: 13px; border-radius: 10px; }
.btn-xs { width: auto; padding: 7px 12px; font-size: 12px; border-radius: 9px; }

/* ===== Status ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.pill-dot { width: 7px; height: 7px; border-radius: 50%; }
.pill-pending { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.pill-pending .pill-dot { background: var(--c-amber); }
.pill-approved { background: rgba(16, 185, 129, 0.12); color: #047857; }
.pill-approved .pill-dot { background: var(--c-emerald); }
.pill-rejected { background: rgba(244, 63, 94, 0.12); color: #be123c; }
.pill-rejected .pill-dot { background: var(--c-rose); }
.pill-admin { background: rgba(124, 58, 237, 0.12); color: #6d28d9; }
.pill-admin .pill-dot { background: var(--c-primary); }
.pill-user { background: rgba(6, 182, 212, 0.12); color: #0e7490; }
.pill-user .pill-dot { background: var(--c-cyan); }

/* ===== Alert / notice ===== */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 20px;
  animation: cardIn 0.4s ease;
}
.notice svg { flex-shrink: 0; margin-top: 1px; }
.notice-info { background: rgba(6, 182, 212, 0.10); color: #0e7490; border: 1px solid rgba(6, 182, 212, 0.25); }
.notice-success { background: rgba(16, 185, 129, 0.10); color: #047857; border: 1px solid rgba(16, 185, 129, 0.25); }
.notice-error { background: rgba(244, 63, 94, 0.10); color: #be123c; border: 1px solid rgba(244, 63, 94, 0.25); }
.notice-warn { background: rgba(245, 158, 11, 0.10); color: #b45309; border: 1px solid rgba(245, 158, 11, 0.28); }

/* ===== Footer link ===== */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13.5px;
  color: var(--c-text-soft);
}
.auth-footer a {
  color: var(--c-primary);
  font-weight: 700;
  text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

/* ===== Approvals page ===== */
.approvals-wrap {
  max-width: 960px;
  width: 100%;
}
.approvals-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.approvals-title {
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.approvals-sub { color: var(--c-text-soft); font-size: 14px; margin-top: 4px; }
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 10px 30px -18px rgba(76, 29, 149, 0.2);
  text-align: center;
}
.stat-num {
  font-family: 'Sora', sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
}
.stat-label { font-size: 12.5px; color: var(--c-text-muted); font-weight: 600; margin-top: 5px; }
.stat-pending .stat-num { color: var(--c-amber); }
.stat-approved .stat-num { color: var(--c-emerald); }
.stat-rejected .stat-num { color: var(--c-rose); }
.stat-total .stat-num { color: var(--c-primary); }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.tab {
  padding: 9px 18px;
  border-radius: 99px;
  border: 1.5px solid var(--c-border);
  background: rgba(255, 255, 255, 0.6);
  color: var(--c-text-soft);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.tab:hover { border-color: rgba(124, 58, 237, 0.4); color: var(--c-primary); }
.tab.active {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-btn);
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.user-card {
  background: var(--c-surface-solid);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 12px 32px -20px rgba(76, 29, 149, 0.25);
  animation: cardIn 0.4s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.user-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -20px rgba(76, 29, 149, 0.35); }
.user-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--gradient-soft);
  border: 1.5px solid rgba(124, 58, 237, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--c-primary);
  flex-shrink: 0;
}
.user-name { font-weight: 700; font-size: 15px; }
.user-uname { font-size: 12.5px; color: var(--c-text-muted); font-family: monospace; margin-top: 2px; }
.user-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 12.5px; }
.user-meta .meta-item { display: flex; align-items: center; gap: 6px; color: var(--c-text-soft); min-width: 0; }
.user-meta .meta-item svg { flex-shrink: 0; color: var(--c-text-muted); }
.user-meta .meta-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta .full { grid-column: 1 / -1; }
.user-actions { display: flex; gap: 8px; margin-top: auto; }
.user-actions .btn { flex: 1; }

/* ===== Session bar (injected on protected pages) ===== */
#gemstone-session-bar {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--c-surface-solid);
  border: 1px solid var(--c-border);
  border-radius: 99px;
  box-shadow: 0 10px 30px -14px rgba(76, 29, 149, 0.35);
  padding: 6px 8px 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-text-soft);
}
#gemstone-session-bar .sb-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}
#gemstone-session-bar .sb-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#gemstone-session-bar .sb-logout {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(244, 63, 94, 0.1);
  color: #e11d48;
  border: none;
  border-radius: 99px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
#gemstone-session-bar .sb-logout:hover { background: rgba(244, 63, 94, 0.18); }

/* ===== Misc ===== */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.hidden { display: none !important; }
.loading-state { text-align: center; padding: 50px 20px; color: var(--c-text-muted); font-size: 14px; }

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(124, 58, 237, 0.2);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .auth-card { padding: 30px 22px; }
  .auth-title { font-size: 22px; }
  .approvals-head { flex-direction: column; align-items: flex-start; }
  .user-meta { grid-template-columns: 1fr; }
}
