/* ============================================================
   Trash Point Collector — Glass visual identity
   Deep teal-night background with soft aurora glow (teal + gold),
   frosted glass panels with a specular highlight line, and a
   signature circular points ring as the dashboard centerpiece.
   ============================================================ */

:root {
  --bg-deep: #050B1A;
  --bg-deep-2: #0A1638;
  --glow-teal: #2F6FED;
  --glow-gold: #10dafd;

  --glass-fill: rgba(255, 255, 255, 0.07);
  --glass-fill-strong: rgba(255, 255, 255, 0.11);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.55);

  --text-primary: #F2F7F4;
  --text-muted: rgba(242, 247, 244, 0.64);
  --text-faint: rgba(242, 247, 244, 0.42);

  --gold: #4ae8e8;
  --gold-soft: #7fccf8;
  --teal: #4FA8FF;
  --rust: #E28569;

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  background:
    radial-gradient(ellipse 900px 600px at 12% -5%, rgba(47, 111, 237, 0.32), transparent 60%),
    radial-gradient(ellipse 700px 500px at 95% 10%, rgba(232, 185, 74, 0.20), transparent 55%),
    radial-gradient(ellipse 800px 700px at 50% 110%, rgba(47, 111, 237, 0.20), transparent 60%),
    linear-gradient(160deg, var(--bg-deep) 0%, var(--bg-deep-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; }
::selection { background: rgba(74, 200, 232, 0.35); }

/* ---------- Glass panel base ---------- */
.glass {
  position: relative;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.06);
}
/* specular highlight line across the top edge — the "real glass" cue */
.glass::before {
  content: "";
  position: absolute;
  top: 0; left: 6%;
  width: 88%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-highlight), transparent);
}

/* ---------- Top bar ---------- */
.topbar {
  padding: 18px 24px;
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-radius: var(--radius-md);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  height: 34px;
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(74, 195, 232, 0.35));
}
.badge-logo {
  height: 56px;
  width: auto;
  margin: 0 auto 14px;
  display: block;
  filter: drop-shadow(0 0 16px rgba(74, 208, 232, 0.4));
}
.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}
.brand-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-top: 1px;
}
.topnav { display: flex; align-items: center; gap: 18px; font-size: 0.88rem; }
.topnav a { text-decoration: none; color: var(--text-muted); padding: 6px 2px; border-bottom: 2px solid transparent; transition: color 0.15s ease; }
.topnav a:hover { color: var(--text-primary); }
.topnav a.active { color: var(--text-primary); border-bottom-color: var(--gold); }
.topnav a.logout-link { color: var(--gold-soft); }

.page { max-width: 1100px; margin: 0 auto; padding: 12px 24px 60px; }

.sitefooter {
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-faint);
  padding: 28px 24px;
}

/* ---------- Auth pages (login / register) ---------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.badge-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 44px 36px 36px;
  text-align: center;
}
.badge-notch {
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%);
  width: 52px; height: 20px;
  background: rgba(255,255,255,0.10);
  border: 1px solid var(--glass-border);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  backdrop-filter: blur(10px);
}
.badge-notch::after {
  content: "";
  position: absolute;
  top: 7px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 5px;
  background: var(--gold);
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(74, 200, 232, 0.7);
}
.badge-card .brand-mark { font-size: 1.5rem; display: block; }
.auth-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
  margin-bottom: 26px;
  line-height: 1.5;
}
.auth-form { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.auth-form label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

input, select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}
input::placeholder { color: var(--text-faint); }
input:focus, select:focus, button:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(69, 255, 240, 0.25);
}
input[readonly] { color: var(--gold-soft); font-family: var(--font-mono); }

.btn-primary {
  margin-top: 4px;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #17281F;
  border: none;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 8px 24px rgba(74, 232, 232, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(232, 185, 74, 0.35); }
.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-danger { color: var(--rust); border-color: rgba(105, 226, 226, 0.5); }

.notice {
  font-size: 0.85rem;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  border: 1px solid;
  text-align: left;
}
.notice-warn { background: rgba(74, 227, 232, 0.1); color: var(--gold-soft); border-color: rgba(232,185,74,0.35); }
.notice-ok { background: rgba(79, 220, 255, 0.12); color: var(--teal); border-color: rgba(79,168,255,0.38); }
.notice-error { background: rgba(105, 192, 226, 0.1); color: var(--rust); border-color: rgba(226,133,105,0.4); }

.auth-link { text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--text-muted); }
.auth-link a { color: var(--gold-soft); font-weight: 600; text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }

/* ---------- Section headers ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.section-head h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 0;
  color: var(--text-primary);
}
.section-head p { margin: 5px 0 0; color: var(--text-muted); font-size: 0.88rem; }

/* ---------- Signature element: circular points ring ---------- */
.ring-panel {
  padding: 36px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.points-ring-wrap { position: relative; width: 176px; height: 176px; flex-shrink: 0; }
.points-ring-wrap svg { transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255,255,255,0.10); stroke-width: 12; }
.ring-progress {
  fill: none;
  stroke: url(#ringGradient);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.4,0,0.2,1);
  filter: drop-shadow(0 0 10px rgba(74, 222, 232, 0.5));
}
.ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ring-center .ring-value { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: var(--gold-soft); line-height: 1; }
.ring-center .ring-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }

.ring-side { flex: 1; min-width: 220px; }
.ring-side h2 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 4px; color: var(--text-primary); }
.ring-side p { margin: 0 0 18px; color: var(--text-muted); font-size: 0.86rem; line-height: 1.5; }

/* ---------- Stat tiles ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-tile {
  padding: 20px 22px;
}
.stat-tile .stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.stat-tile .stat-value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--text-primary);
  margin-top: 6px;
}
.stat-tile .stat-value.gold { color: var(--gold-soft); }
.stat-tile .stat-value.teal { color: var(--teal); }

/* ---------- Tables ---------- */
.table-wrap {
  overflow: hidden;
}
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
thead th {
  text-align: left;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 18px;
}
tbody td { padding: 13px 18px; border-top: 1px solid rgba(255,255,255,0.08); vertical-align: middle; }
tbody tr:hover { background: rgba(255,255,255,0.04); }
.mono { font-family: var(--font-mono); font-size: 0.84rem; color: var(--text-muted); }
.points-pill {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #17281F;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 11px;
  border-radius: 999px;
}
.empty-state { padding: 44px 20px; text-align: center; color: var(--text-faint); }

/* ---------- Register page: scan detector ---------- */
.register-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 26px;
  align-items: start;
}
@media (max-width: 760px) { .register-grid { grid-template-columns: 1fr; } }

.scan-panel {
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}
.scan-ring {
  width: 128px; height: 128px;
  border-radius: 50%;
  border: 2px dashed rgba(74, 232, 232, 0.45);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--gold-soft);
  transition: all 0.25s ease;
}
.scan-ring.detected {
  border: 2px solid var(--gold);
  background: rgba(74, 200, 232, 0.12);
  box-shadow: 0 0 30px rgba(74, 227, 232, 0.35);
  animation: pulse 0.9s ease-in-out 2;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.scan-uid { font-family: var(--font-mono); font-size: 1.05rem; color: var(--gold-soft); min-height: 1.4em; }
.scan-hint { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

.form-panel { padding: 30px; }
.form-panel h2 { font-family: var(--font-display); font-size: 1.1rem; color: var(--text-primary); margin: 0 0 4px; }
.form-panel .hint { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 20px; }
.form-grid { display: flex; flex-direction: column; gap: 15px; }
.form-grid label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); display: flex; flex-direction: column; gap: 7px; }

@media (max-width: 600px) {
  .ring-panel { flex-direction: column; text-align: center; }
  .ring-side { text-align: center; }
}
