/* ================================================================
   EventFlow — Main Stylesheet
   Modern SaaS UI: Glassmorphism + Neumorphism + Smooth Gradients
   ================================================================ */

/* ── CSS Custom Properties ─────────────────────────────────────── */
:root {
  --primary:        #6366f1;
  --primary-dark:   #4f46e5;
  --primary-light:  #a5b4fc;
  --secondary:      #f59e0b;
  --success:        #10b981;
  --danger:         #ef4444;
  --warning:        #f59e0b;
  --info:           #3b82f6;
  --pink:           #ec4899;

  --bg:             #f5f7ff;
  --bg-card:        #ffffff;
  --bg-sidebar:     #0f0f23;
  --text:           #1e293b;
  --text-muted:     #64748b;
  --border:         #e2e8f0;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.07);
  --shadow-md:      0 4px 20px rgba(99,102,241,.12);
  --shadow-lg:      0 10px 40px rgba(99,102,241,.18);
  --radius:         16px;
  --radius-sm:      10px;
  --radius-xs:      6px;
  --sidebar-width:  260px;
  --topbar-h:       64px;
  --transition:     .25s cubic-bezier(.4,0,.2,1);
  --font:           'Inter', 'Poppins', system-ui, sans-serif;
}

/* Dark Mode Variables */
.dark-mode {
  --bg:         #0d1117;
  --bg-card:    #161b27;
  --bg-sidebar: #0a0a18;
  --text:       #e2e8f0;
  --text-muted: #94a3b8;
  --border:     #1e293b;
  --shadow-md:  0 4px 20px rgba(0,0,0,.4);
  --shadow-lg:  0 10px 40px rgba(0,0,0,.5);
}

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: clamp(13px, 1.5vw, 15px);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; border: none; background: none; }

/* ── Layout ───────────────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin var(--transition);
}

.page-content {
  flex: 1;
  padding: 24px;
  padding-top: calc(var(--topbar-h) + 24px);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform var(--transition);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ffffff10 transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #ffffff15; border-radius: 2px; }

.sidebar-brand {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ffffff0d;
}
.brand-logo { display: flex; align-items: center; gap: 10px; }
.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
  box-shadow: 0 4px 12px rgba(99,102,241,.4);
}
.brand-name { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 700; color: #fff; }
.brand-name .text-primary { color: var(--primary) !important; }
.sidebar-close { color: #ffffff60; font-size: 18px; padding: 4px; }

/* User area */
.sidebar-user {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #ffffff0d;
}
.user-avatar-wrap { position: relative; flex-shrink: 0; }
.user-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}
.user-avatar-placeholder {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px;
  border: 2px solid var(--primary);
}
.user-status-dot {
  position: absolute; bottom: 1px; right: 1px;
  width: 10px; height: 10px;
  background: var(--success); border-radius: 50%;
  border: 2px solid var(--bg-sidebar);
}
.user-info .user-name { color: #fff; font-weight: 600; font-size: 13px; }
.user-info .user-role { color: #ffffff60; font-size: 11px; text-transform: capitalize; }

/* Nav */
.sidebar-nav { flex: 1; padding: 12px 12px; }
.nav-list { list-style: none; }
.nav-item + .nav-item { margin-top: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: #ffffff80;
  font-size: 13px; font-weight: 500;
  transition: all var(--transition);
  position: relative;
}
.nav-link:hover { background: #ffffff0d; color: #fff; }
.nav-link.active {
  background: linear-gradient(135deg, var(--primary)22, var(--primary)11);
  color: var(--primary-light);
  box-shadow: inset 0 0 0 1px var(--primary)44;
}
.nav-link.active .nav-icon { color: var(--primary); }
.nav-icon { width: 20px; text-align: center; font-size: 15px; }
.nav-badge-live {
  margin-left: auto;
  display: flex; align-items: center; gap: 4px;
  background: var(--success)22; color: var(--success);
  padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 600;
}
.live-dot {
  width: 6px; height: 6px;
  background: var(--success); border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .6; transform: scale(1.3); }
}

.sidebar-footer {
  padding: 16px 16px;
  border-top: 1px solid #ffffff0d;
  display: flex; flex-direction: column; gap: 4px;
}
.sidebar-footer-link {
  padding: 8px 14px; border-radius: 10px;
  color: #ffffff60; font-size: 12px;
  display: flex; align-items: center; gap: 8px;
  transition: all var(--transition);
}
.sidebar-footer-link:hover { background: #ffffff0d; color: #fff; }
.sidebar-footer-link.text-danger { color: var(--danger) !important; }
.sidebar-footer-link.text-danger:hover { background: var(--danger)15; }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 999;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ── Topbar ───────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 12px;
  z-index: 900;
  transition: left var(--transition), background var(--transition);
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg-card) 90%, transparent);
}
.topbar-left { display: flex; align-items: center; gap: 16px; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.topbar-toggle {
  display: flex; flex-direction: column; gap: 5px;
  padding: 8px; border-radius: 8px;
  transition: background var(--transition);
}
.topbar-toggle:hover { background: var(--bg); }
.topbar-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: var(--transition);
}
.topbar-breadcrumb { display: flex; align-items: center; gap: 8px; }
.breadcrumb-home { color: var(--text-muted); font-size: 14px; }
.breadcrumb-sep { color: var(--border); font-size: 10px; }
.breadcrumb-current { color: var(--text); font-size: 14px; font-weight: 500; }

.topbar-search {
  position: relative; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 6px 14px;
  transition: all var(--transition);
}
.topbar-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary)20; }
.topbar-search i { color: var(--text-muted); font-size: 13px; }
.topbar-search input {
  border: none; background: none; color: var(--text);
  font-size: 13px; width: 180px; outline: none;
}
.topbar-btn {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 16px;
  transition: all var(--transition);
}
.topbar-btn:hover { background: var(--bg); color: var(--text); }
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--danger); color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px; padding: 0 3px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-card);
}
.topbar-user-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 24px;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.topbar-user-btn:hover { background: var(--bg); }
.topbar-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.topbar-avatar-placeholder {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 12px;
}
.user-name-top { font-size: 13px; font-weight: 500; }

/* Notifications Dropdown */
.notif-dropdown {
  width: 320px !important;
  padding: 0 !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-lg) !important;
  overflow: hidden;
}
.notif-header {
  padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.mark-read-btn { color: var(--primary); font-size: 11px; }
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: var(--primary)08; }
.notif-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px;
}
.notif-title { font-size: 12px; font-weight: 500; line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.notif-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ── Cards ────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: transparent;
}
.card-title { font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }

/* Stat Cards */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; align-items: flex-start; gap: 16px;
  position: relative; overflow: hidden;
  transition: all var(--transition);
  cursor: default;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card.primary::before   { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card.success::before   { background: linear-gradient(90deg, var(--success), #34d399); }
.stat-card.warning::before   { background: linear-gradient(90deg, var(--warning), #fcd34d); }
.stat-card.danger::before    { background: linear-gradient(90deg, var(--danger), #fca5a5); }
.stat-card.info::before      { background: linear-gradient(90deg, var(--info), #93c5fd); }
.stat-card.pink::before      { background: linear-gradient(90deg, var(--pink), #f9a8d4); }

.stat-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.stat-icon.primary { background: var(--primary)18; color: var(--primary); }
.stat-icon.success { background: var(--success)18; color: var(--success); }
.stat-icon.warning { background: var(--warning)18; color: var(--warning); }
.stat-icon.danger  { background: var(--danger)18;  color: var(--danger); }
.stat-icon.info    { background: var(--info)18;    color: var(--info); }
.stat-icon.pink    { background: var(--pink)18;    color: var(--pink); }

.stat-content { flex: 1; }
.stat-value { font-size: clamp(22px, 3vw, 30px); font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.stat-change {
  font-size: 11px; font-weight: 600; margin-top: 8px;
  display: flex; align-items: center; gap: 4px;
}
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ── Tables ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.table th {
  padding: 12px 16px;
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
.table tbody tr:hover { background: var(--bg); }
.table tbody tr:last-child td { border-bottom: none; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  border-radius: 10px !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  padding: 8px 18px !important;
  transition: all var(--transition) !important;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px var(--primary)40 !important;
}
.btn-primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px var(--primary)50 !important;
}
.btn-success {
  background: linear-gradient(135deg, var(--success), #059669) !important;
  border-color: transparent !important;
}
.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626) !important;
  border-color: transparent !important;
}
.btn-sm { padding: 5px 12px !important; font-size: 11px !important; border-radius: 8px !important; }
.btn-icon {
  width: 34px; height: 34px; padding: 0 !important;
  border-radius: 8px !important;
  display: inline-flex !important; align-items: center; justify-content: center;
}
.btn-ghost {
  background: transparent !important;
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
}
.btn-ghost:hover { background: var(--bg) !important; color: var(--text) !important; }

/* ── Badges ───────────────────────────────────────────────────── */
.badge {
  font-size: 11px !important; font-weight: 600 !important;
  padding: 4px 10px !important; border-radius: 20px !important;
}

/* ── Forms ────────────────────────────────────────────────────── */
.form-control, .form-select {
  border-radius: 10px !important;
  border: 1px solid var(--border) !important;
  background: var(--bg-card) !important;
  color: var(--text) !important;
  font-size: 13px !important;
  padding: 10px 14px !important;
  transition: all var(--transition) !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary)20 !important;
}
.form-label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.input-group .form-control { border-radius: 0 10px 10px 0 !important; }
.input-group .input-group-text {
  background: var(--bg) !important; border-color: var(--border) !important;
  color: var(--text-muted); border-radius: 10px 0 0 10px !important;
}

/* ── Page Header ──────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header-left .page-title { font-size: clamp(20px, 3vw, 26px); font-weight: 700; margin: 0; }
.page-header-left .page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Charts ───────────────────────────────────────────────────── */
.chart-wrap { position: relative; padding: 8px 0; }

/* ── Timeline ─────────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: ''; position: absolute;
  left: 8px; top: 0; bottom: 0; width: 2px;
  background: var(--border);
}
.timeline-item { position: relative; padding: 0 0 16px 20px; }
.timeline-dot {
  position: absolute; left: -24px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--primary); border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--primary)40;
}
.timeline-dot.success { background: var(--success); box-shadow: 0 0 0 2px var(--success)40; }
.timeline-dot.warning { background: var(--warning); box-shadow: 0 0 0 2px var(--warning)40; }
.timeline-dot.danger  { background: var(--danger);  box-shadow: 0 0 0 2px var(--danger)40; }
.timeline-time  { font-size: 11px; color: var(--text-muted); }
.timeline-title { font-size: 13px; font-weight: 500; }
.timeline-desc  { font-size: 12px; color: var(--text-muted); }

/* ── Avatar Group ─────────────────────────────────────────────── */
.avatar-group { display: flex; }
.avatar-group-item {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--bg-card);
  margin-left: -8px; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10px; font-weight: 700;
  object-fit: cover;
}
.avatar-group-item:first-child { margin-left: 0; }

/* ── Loading Skeleton ─────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Empty State ──────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
}
.empty-state-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: var(--text-muted);
  margin: 0 auto 16px;
}
.empty-state-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.empty-state-desc { font-size: 13px; color: var(--text-muted); max-width: 300px; margin: 0 auto 20px; }

/* ── Mobile Bottom Nav ────────────────────────────────────────── */
.mobile-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 800;
  padding-bottom: env(safe-area-inset-bottom);
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg-card) 95%, transparent);
}
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; flex: 1; padding: 8px 4px;
  color: var(--text-muted); font-size: 10px;
  transition: color var(--transition);
  position: relative;
}
.mobile-nav-item i { font-size: 20px; transition: transform var(--transition); }
.mobile-nav-item.active { color: var(--primary); }
.mobile-nav-item.active i { transform: scale(1.15); }
.mobile-nav-scan { margin-top: -24px; }
.scan-fab {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px;
  box-shadow: 0 4px 16px var(--primary)50;
  transition: all var(--transition);
}
.mobile-nav-scan.active .scan-fab { transform: scale(1.1); }

/* ── PWA Install Banner ────────────────────────────────────────── */
.pwa-install-banner {
  position: fixed; bottom: 80px; left: 16px; right: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 900;
  animation: slideUp .3s ease;
}
.pwa-install-content {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
}
.pwa-icon { width: 40px; height: 40px; border-radius: 10px; }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Event Cards ──────────────────────────────────────────────── */
.event-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.event-banner {
  height: 160px; background: linear-gradient(135deg, var(--primary), var(--pink));
  position: relative; overflow: hidden;
}
.event-banner img { width: 100%; height: 100%; object-fit: cover; }
.event-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
}
.event-status-tag {
  position: absolute; top: 12px; right: 12px;
}
.event-card-body { padding: 16px; }
.event-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; line-height: 1.3; }
.event-meta { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.event-meta-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.event-meta-item i { width: 14px; color: var(--primary); }
.event-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.capacity-bar { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin: 0 12px; }
.capacity-fill { height: 100%; background: linear-gradient(90deg, var(--success), var(--primary)); border-radius: 2px; transition: width .5s ease; }

/* ── QR Scanner ───────────────────────────────────────────────── */
.scanner-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 1/1;
  max-width: 400px;
  margin: 0 auto;
}
.scan-area-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.scan-corner {
  position: absolute;
  width: 60%; max-width: 200px;
  aspect-ratio: 1/1;
}
.scan-corner::before, .scan-corner::after,
.scan-corner-inner::before, .scan-corner-inner::after {
  content: '';
  position: absolute;
  width: 30px; height: 30px;
  border-color: var(--primary);
  border-style: solid;
}
.scan-corner::before  { top: 0; left: 0;  border-width: 3px 0 0 3px; border-radius: 3px 0 0 0; }
.scan-corner::after   { top: 0; right: 0; border-width: 3px 3px 0 0; border-radius: 0 3px 0 0; }
.scan-corner-inner::before { bottom: 0; left: 0;  border-width: 0 0 3px 3px; border-radius: 0 0 0 3px; }
.scan-corner-inner::after  { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-radius: 0 0 3px 0; }
.scan-line {
  position: absolute;
  left: 20%; right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: scanLine 2s linear infinite;
}
@keyframes scanLine {
  0%   { top: 20%; }
  100% { top: 80%; }
}
.scan-result-card {
  border-radius: var(--radius);
  padding: 16px; margin-top: 16px;
  border: 1px solid var(--border);
  animation: fadeInUp .3s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.scanner-controls { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

/* ── Badge Preview ────────────────────────────────────────────── */
.badge-card {
  width: 320px; max-width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
  background: #fff;
  position: relative;
}
.badge-header {
  padding: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; text-align: center;
}
.badge-photo {
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,.5);
  object-fit: cover;
  margin: 0 auto 10px;
  display: block;
}
.badge-photo-placeholder {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: rgba(255,255,255,.8);
  margin: 0 auto 10px;
  border: 4px solid rgba(255,255,255,.4);
}
.badge-name { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 700; }
.badge-position { font-size: 12px; opacity: .85; margin-top: 2px; }
.badge-body { padding: 16px; text-align: center; }
.badge-company { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.badge-qr { margin: 0 auto; display: block; width: 100px; height: 100px; }
.badge-event { font-size: 11px; color: var(--text-muted); margin-top: 8px; }
.badge-footer {
  padding: 10px;
  background: var(--bg);
  text-align: center;
  font-size: 10px; color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ── Registration Form ────────────────────────────────────────── */
.reg-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary)15, var(--bg), var(--pink)10);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.reg-card {
  background: var(--bg-card);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  width: 100%; max-width: 560px;
}
.reg-header {
  padding: 32px 32px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}
.reg-body { padding: 32px; }
.progress-steps { display: flex; gap: 8px; margin-bottom: 28px; }
.progress-step {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--border); transition: background .3s;
}
.progress-step.done { background: var(--primary); }

/* ── Login Page ───────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #0f172a 100%);
  padding: 20px;
  position: relative; overflow: hidden;
}
.login-bg-orb {
  position: absolute; border-radius: 50%;
  filter: blur(60px); pointer-events: none; animation: float 8s ease-in-out infinite;
}
.orb-1 { width: 400px; height: 400px; background: var(--primary)30; top: -10%; left: -10%; }
.orb-2 { width: 300px; height: 300px; background: var(--pink)20; bottom: -5%; right: -5%; animation-delay: -3s; }
.orb-3 { width: 200px; height: 200px; background: var(--info)20; top: 50%; left: 50%; animation-delay: -5s; }
@keyframes float {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-20px) rotate(5deg); }
}
.login-card {
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px;
  padding: 40px;
  width: 100%; max-width: 420px;
  position: relative; z-index: 1;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.login-logo {
  text-align: center; margin-bottom: 28px;
}
.login-logo .logo-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff; margin-bottom: 12px;
  box-shadow: 0 8px 24px var(--primary)50;
}
.login-title { font-size: 24px; font-weight: 700; color: #fff; margin-bottom: 4px; font-family: 'Poppins', sans-serif; }
.login-subtitle { font-size: 13px; color: rgba(255,255,255,.5); }
.login-card .form-control {
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(255,255,255,.12) !important;
  color: #fff !important;
}
.login-card .form-control::placeholder { color: rgba(255,255,255,.35); }
.login-card .form-control:focus {
  border-color: var(--primary) !important;
  background: rgba(255,255,255,.1) !important;
}
.login-card .form-label { color: rgba(255,255,255,.7) !important; }
.login-card .input-group-text {
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.12) !important;
  color: rgba(255,255,255,.5);
}
.login-check { display: flex; align-items: center; gap: 8px; }
.login-check .form-check-input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
.login-check label { color: rgba(255,255,255,.6); font-size: 13px; }
.login-card .btn-primary { width: 100%; padding: 12px !important; font-size: 14px !important; }
.login-card .btn-primary { letter-spacing: .02em; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.active { display: block; }
  .main-content { margin-left: 0 !important; }
  .topbar { left: 0 !important; }
  .page-content { padding: 16px; padding-top: calc(var(--topbar-h) + 16px); padding-bottom: 80px; }
}

@media (max-width: 575.98px) {
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header-actions { width: 100%; }
  .stat-card { padding: 16px; }
  .login-card { padding: 24px; }
}

/* ── Dark Mode Overrides ──────────────────────────────────────── */
.dark-mode .table th { background: #1a2235; }
.dark-mode .form-control, .dark-mode .form-select { background: #1a2235 !important; }
.dark-mode .dropdown-menu { background: #1a2235 !important; border-color: var(--border) !important; }
.dark-mode .dropdown-item { color: var(--text) !important; }
.dark-mode .dropdown-item:hover { background: #0d1117 !important; }
.dark-mode .modal-content { background: #1a2235; border-color: var(--border); }
.dark-mode .topbar { background: color-mix(in srgb, #161b27 95%, transparent); }

/* ── Animations ───────────────────────────────────────────────── */
.fade-in { animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.slide-up { animation: slideUp .3s ease; }

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Utilities ────────────────────────────────────────────────── */
.text-primary { color: var(--primary) !important; }
.text-muted   { color: var(--text-muted) !important; }
.bg-primary-soft { background: var(--primary)12; }
.gap-3 { gap: 12px; }
.cursor-pointer { cursor: pointer; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glass {
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.1);
}
