:root {
  /* ── SaaS Emerald & Slate Theme ──────────────────────────── */
  --brand-primary:   #10b981;   /* Vibrant Emerald Green */
  --brand-secondary: #f59e0b;   /* Amber Gold */
  --brand-accent:    #34d399;   /* Mint Accent */
  --brand-danger:    #f43f5e;   /* Rose Red */
  --brand-warning:   #fb923c;   /* Orange Warning */
  --brand-info:      #3b82f6;   /* Sky Blue */

  /* ── Glassmorphism Surfaces ─────────────────────────────── */
  --bg-base:         #090d16;   /* Solid Dark Deep Space Blue */
  --bg-surface:      rgba(17, 24, 39, 0.65); /* Translucent Card Body */
  --bg-elevated:     rgba(31, 41, 55, 0.85); /* Hover/Focussed Surface */
  --bg-glass:        rgba(15, 23, 42, 0.55);
  --bg-glass-border: rgba(255, 255, 255, 0.08);
  --bg-active-tab:   rgba(16, 185, 129, 0.12);

  /* ── Typography & Text ──────────────────────────────────── */
  --text-primary:    #f8fafc;   /* White/Slate-50 */
  --text-secondary:  #94a3b8;   /* Slate-400 */
  --text-muted:      #64748b;   /* Slate-500 */
  --text-inverse:    #0f172a;
  --font-sans:       'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:       'JetBrains Mono', 'Fira Code', monospace;

  /* ── Borders & Radii ────────────────────────────────────── */
  --radius-sm:       8px;
  --radius-md:       14px;
  --radius-lg:       22px;
  --radius-xl:       30px;

  /* ── Shadow & Glow FX ───────────────────────────────────── */
  --shadow-sm:       0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-md:       0 8px 30px rgba(0, 0, 0, 0.65);
  --shadow-lg:       0 16px 48px rgba(0, 0, 0, 0.8);
  --shadow-glow-green:  0 0 25px rgba(16, 185, 129, 0.25);
  --shadow-glow-gold:   0 0 25px rgba(245, 158, 11, 0.2);
  --shadow-glow-red:    0 0 25px rgba(244, 63, 94, 0.2);

  /* ── Transitions ────────────────────────────────────────── */
  --transition-fast: 160ms ease;
  --transition-med:  300ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ═══════════════════════════════════════════════
   RESET & SYSTEM BASE
   ═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Custom Sleek Scrollbars ────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 99px; border: 2px solid var(--bg-base); }
::-webkit-scrollbar-thumb:hover { background: var(--brand-primary); }

/* ── Background Mesh Orbs ───────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(245, 158, 11, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.04) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
  animation: bgPulse 12s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% { opacity: 0.85; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

/* ═══════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════ */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; color: var(--text-primary); }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.25rem, 3.5vw, 1.85rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }
p  { color: var(--text-secondary); }
a  { color: var(--brand-accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--brand-primary); }

/* ═══════════════════════════════════════════════
   LAYOUT CONTAINERS
   ═══════════════════════════════════════════════ */
.wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

.page-header {
  padding: 2rem 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--bg-glass-border);
  margin-bottom: 2rem;
}

.page-title { margin-bottom: 0.35rem; }
.page-subtitle { color: var(--text-secondary); font-size: 0.95rem; }

/* ═══════════════════════════════════════════════
   STICKY NAVBAR
   ═══════════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bg-glass-border);
  padding: 0.8rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
}

.navbar-links a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.navbar-links a:hover,
.navbar-links a.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.navbar-links a.active {
  border-bottom: 2px solid var(--brand-primary);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.navbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-accent);
}

/* ═══════════════════════════════════════════════
   PREMIUM GLASS CARDS
   ═══════════════════════════════════════════════ */
.card, .card-glass {
  background: var(--bg-surface);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-med);
  position: relative;
  overflow: hidden;
}

.card:hover, .card-glass:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.card-icon.green  { background: rgba(16, 185, 129, 0.15); color: var(--brand-accent); border: 1px solid rgba(16, 185, 129, 0.2); }
.card-icon.gold   { background: rgba(245, 158, 11, 0.15);  color: var(--brand-secondary); border: 1px solid rgba(245, 158, 11, 0.2); }
.card-icon.red    { background: rgba(244, 63, 94, 0.15);   color: var(--brand-danger); border: 1px solid rgba(244, 63, 94, 0.2); }
.card-icon.blue   { background: rgba(59, 130, 246, 0.15);  color: var(--brand-info); border: 1px solid rgba(59, 130, 246, 0.2); }

/* ═══════════════════════════════════════════════
   DASHBOARD STAT CARDS
   ═══════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all var(--transition-med);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  opacity: 0.85;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(16, 185, 129, 0.2);
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--text-primary), var(--brand-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all var(--transition-fast);
  position: relative;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  color: var(--text-inverse);
  box-shadow: var(--shadow-glow-green);
  font-weight: 700;
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

.btn-primary:active { transform: translateY(0); filter: brightness(0.95); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--bg-glass-border);
}

.btn-secondary:hover {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  background: rgba(16, 185, 129, 0.05);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--brand-danger);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background: var(--brand-danger);
  color: white;
  box-shadow: var(--shadow-glow-red);
}

.btn-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--brand-accent);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: var(--brand-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-glow-green);
}

.btn-sm { padding: 0.45rem 1.1rem; font-size: 0.82rem; }
.btn-lg { padding: 0.95rem 2.2rem; font-size: 1rem; }

/* ═══════════════════════════════════════════════
   FORM & INPUTS
   ═══════════════════════════════════════════════ */
.form-group { margin-bottom: 1.25rem; }

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.8rem 1.1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1.5px solid var(--bg-glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  outline: none;
  transition: all var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  background: rgba(15, 23, 42, 0.8);
}

input::placeholder { color: var(--text-muted); }

/* ═══════════════════════════════════════════════
   CHECK-IN PAGE INTEGRATIONS
   ═══════════════════════════════════════════════ */
.info-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.5rem;
  color: #fbbf24;
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

/* Tab navigation for scan view */
.scan-tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: 0.35rem;
  margin-bottom: 1.75rem;
}

.scan-tab-btn {
  flex: 1;
  padding: 0.7rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.scan-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.scan-tab-btn.active {
  color: var(--text-primary);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--bg-glass-border);
}

/* Scan input field icon wrapper */
.scan-input-wrapper {
  position: relative;
  margin-bottom: 1.25rem;
}

.scan-input {
  width: 100%;
  padding: 1.2rem 1.5rem 1.2rem 3.8rem;
  background: rgba(15, 23, 42, 0.7);
  border: 2px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1.2rem;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  outline: none;
  transition: all var(--transition-med);
}

.scan-input:focus {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-glow-green);
  background: rgba(15, 23, 42, 0.9);
}

.scan-input-icon {
  position: absolute;
  left: 1.3rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.35rem;
  pointer-events: none;
}

/* ── Drag & Drop File Upload Area ───────────────── */
.photo-dropzone {
  border: 2px dashed rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.03);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-med);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.photo-dropzone:hover {
  border-color: var(--brand-primary);
  background: rgba(16, 185, 129, 0.06);
  transform: scale(1.005);
}

.photo-dropzone-icon {
  font-size: 2.2rem;
  color: var(--brand-accent);
}

/* ── Live Video Scan Area ───────────────────────── */
.video-scan-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.video-preview-wrapper {
  position: relative;
  width: 100%;
  min-height: 280px;
  max-height: 380px;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--bg-glass-border);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
}

.video-preview-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-scan-overlay {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Laser scan animation line */
.video-scan-overlay::after {
  content: '';
  position: absolute;
  left: 5%;
  right: 5%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand-primary), transparent);
  box-shadow: 0 0 10px var(--brand-primary);
  animation: laserSweep 2s ease-in-out infinite;
}

@keyframes laserSweep {
  0% { top: 15%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 85%; opacity: 0; }
}

.scan-debug-info {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  word-break: break-all;
}

/* Scan feedback result box styling */
.scan-result {
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border: 1.5px solid transparent;
  transition: all var(--transition-med);
  opacity: 0;
  transform: translateY(8px);
}

.scan-result.visible { opacity: 1; transform: translateY(0); }

.scan-result.success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: var(--shadow-glow-green);
}

.scan-result.duplicate {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: var(--shadow-glow-gold);
}

.scan-result.blocked {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.35);
  box-shadow: var(--shadow-glow-red);
}

.scan-result.not-found {
  background: rgba(244, 63, 94, 0.06);
  border-color: rgba(244, 63, 94, 0.2);
}

.scan-result-icon { font-size: 2.2rem; flex-shrink: 0; }
.scan-result-name { font-size: 1.35rem; font-weight: 700; color: var(--text-primary); }
.scan-result-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }

/* ═══════════════════════════════════════════════
   TABLES (SaaS style)
   ═══════════════════════════════════════════════ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-glass-border);
  background: rgba(17, 24, 39, 0.4);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead th {
  padding: 0.95rem 1.2rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  background: rgba(31, 41, 55, 0.5);
  border-bottom: 1px solid var(--bg-glass-border);
}

tbody tr {
  border-bottom: 1px solid var(--bg-glass-border);
  transition: background var(--transition-fast);
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

tbody td {
  padding: 0.95rem 1.2rem;
  color: var(--text-primary);
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════
   BADGES & PILLS
   ═══════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-green  { background: rgba(16, 185, 129, 0.15); color: var(--brand-accent); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-gold   { background: rgba(245, 158, 11, 0.15);  color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-red    { background: rgba(244, 63, 94, 0.15);   color: var(--brand-danger); border: 1px solid rgba(244, 63, 94, 0.2); }
.badge-blue   { background: rgba(59, 130, 246, 0.15);  color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.badge-gray   { background: var(--bg-elevated);        color: var(--text-secondary); border: 1px solid var(--bg-glass-border); }

/* Pulsing Status Dot */
.badge-green::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--brand-primary);
  animation: dotPulse 1.5s infinite;
  margin-right: 0.1rem;
}

@keyframes dotPulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* ═══════════════════════════════════════════════
   SEARCH BAR WRAPPERS
   ═══════════════════════════════════════════════ */
.search-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-input {
  width: 100%;
  padding: 0.9rem 1.2rem 0.9rem 3.2rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1.5px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: all var(--transition-med);
}

.search-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  background: rgba(15, 23, 42, 0.85);
}

.search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.15rem;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   DAY SELECTION TABS
   ═══════════════════════════════════════════════ */
.day-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--bg-glass-border);
  padding: 0.3rem;
  border-radius: var(--radius-md);
  width: fit-content;
}

.day-tab {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.day-tab.active {
  background: var(--brand-primary);
  color: var(--text-inverse);
  font-weight: 700;
  box-shadow: var(--shadow-glow-green);
}

/* ═══════════════════════════════════════════════
   SCAN HISTORY & LEADERBOARDS
   ═══════════════════════════════════════════════ */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1.1rem;
  background: rgba(31, 41, 55, 0.35);
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-glass-border);
  animation: slideIn 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.history-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--text-inverse);
  flex-shrink: 0;
}

.history-name { font-weight: 600; font-size: 0.9rem; }
.history-meta { font-size: 0.78rem; color: var(--text-secondary); display: flex; align-items: center; gap: 0.25rem; }
.history-time { margin-left: auto; font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }

/* Leaderboard chart columns */
.leaderboard { display: flex; flex-direction: column; gap: 0.65rem; }

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.leaderboard-rank {
  width: 24px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
}

.leaderboard-name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-bar-wrap {
  flex: 2.2;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 99px;
  height: 7px;
  overflow: hidden;
}

.leaderboard-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  transition: width 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.leaderboard-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-secondary);
  min-width: 44px;
  text-align: right;
}

/* ═══════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  padding: 0.95rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn 350ms cubic-bezier(0.16, 1, 0.3, 1) both;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 360px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.toast-success { background: rgba(16, 185, 129, 0.95); color: var(--text-inverse); backdrop-filter: blur(12px); }
.toast-error   { background: rgba(244, 63, 94, 0.95);  color: white; backdrop-filter: blur(12px); }
.toast-info    { background: rgba(31, 41, 55, 0.95);   color: var(--text-primary); backdrop-filter: blur(12px); }

/* Progress Indicator fill */
.progress-bar-wrap {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Screen overlay flash */
.flash-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  transition: opacity 100ms ease;
}
.flash-overlay.success { background: rgba(16, 185, 129, 0.15); }
.flash-overlay.error   { background: rgba(244, 63, 94, 0.15); }
.flash-overlay.flash   { opacity: 1; }

/* ── Empty State ───────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE DESIGN (Tablets & Mobile)
   ═══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .checkin-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .navbar-links { display: none; }
  .page-header { flex-direction: column; align-items: stretch; gap: 1rem; }
  .page-header .btn, .page-header a { width: 100%; }
  .card, .card-glass { padding: 1.25rem; }
  .stats-main-grid { grid-template-columns: 1fr !important; }
  .gruppe-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-value { font-size: 2.2rem; }
  .scan-tabs { flex-direction: column; gap: 0.25rem; }
  .toast { max-width: 90vw; bottom: 1rem; right: 5vw; }
}

/* Modals Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
