/* ═══════════════════════════════════════════════════════════════
   TECHXORA 26 – Violet/Indigo Portal Theme
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Chakra+Petch:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Violet Theme Palette */
  --pri: #a78bfa;
  --pri-glow: rgba(167, 139, 250, 0.45);
  --sec: #f59e0b;
  --sec-glow: rgba(245, 158, 11, 0.45);
  --dim: rgba(220, 210, 255, 0.38);

  --bg-primary: #07050f;
  --bg-secondary: #0c0919;
  --bg-card: rgba(10, 8, 22, 0.92);
  --bg-glass: rgba(12, 9, 25, 0.88);
  --bg-input: rgba(14, 11, 28, 0.9);

  /* Legacy aliases for backward compatibility */
  --neon-cyan: #a78bfa;
  --neon-purple: #a78bfa;
  --neon-green: #34d399;
  --neon-orange: #f59e0b;
  --neon-red: #f87171;
  --neon-blue: #818cf8;
  --neon-yellow: #f59e0b;

  --text-primary: #ede9fe;
  --text-secondary: rgba(220, 210, 255, 0.55);
  --text-muted: rgba(220, 210, 255, 0.28);
  --border: rgba(167, 139, 250, 0.14);
  --border-bright: rgba(167, 139, 250, 0.4);

  --sidebar-w: 240px;
  --radius: 12px;
  --radius-lg: 18px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --shadow-glow-cyan: 0 0 20px rgba(167, 139, 250, 0.25);
  --shadow-glow-purple: 0 0 20px rgba(167, 139, 250, 0.35);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.6);
}


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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  font-family: 'Chakra Petch', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

a {
  color: var(--pri);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #fff;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* ── Particles Canvas ──────────────────────────────────────── */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* ── Layout ────────────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0a0716 0%, #0d0920 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--transition);
}

.sidebar-logo {
  padding: 24px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-logo-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 1px;
}

.sidebar-role-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.role-admin {
  background: rgba(168, 85, 247, 0.15);
  color: var(--neon-purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.role-volunteer {
  background: rgba(249, 115, 22, 0.15);
  color: var(--neon-orange);
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.role-participant {
  background: rgba(0, 245, 255, 0.1);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 245, 255, 0.25);
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}

.nav-section-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
  position: relative;
  overflow: hidden;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: var(--neon-cyan);
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.15);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--neon-cyan);
  border-radius: 0 2px 2px 0;
}

.nav-item .nav-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sidebar-footer .logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--neon-red);
  padding: 8px 12px;
  border-radius: 8px;
  transition: background var(--transition);
}

.sidebar-footer .logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* ── Main Content ──────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 8, 16, 0.7);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  border: 1px solid var(--border);
}

.user-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.page-body {
  padding: 28px;
  flex: 1;
}

/* ── Stat Cards ────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-bright);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.stat-card[data-accent="cyan"] {
  --accent: var(--neon-cyan);
}

.stat-card[data-accent="purple"] {
  --accent: var(--neon-purple);
}

.stat-card[data-accent="green"] {
  --accent: var(--neon-green);
}

.stat-card[data-accent="orange"] {
  --accent: var(--neon-orange);
}

.stat-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
  display: block;
  filter: drop-shadow(0 0 8px var(--accent));
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 0.5px;
}

.stat-glow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.8rem;
  opacity: 0.06;
}

/* ── Cards / Panels ─────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 22px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  letter-spacing: 0.3px;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), #0077ff);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(0, 245, 255, 0.5);
  color: #000;
}

.btn-purple {
  background: linear-gradient(135deg, var(--neon-purple), #6d28d9);
  color: #fff;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.btn-purple:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
}

.btn-success {
  background: linear-gradient(135deg, var(--neon-green), #16a34a);
  color: #fff;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--neon-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 13px 28px;
  font-size: 1rem;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  padding: 12px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
  text-align: left;
}

td {
  padding: 13px 16px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

tr:last-child td {
  border-bottom: none;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-inside {
  background: rgba(34, 197, 94, 0.15);
  color: var(--neon-green);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-outside {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.badge-food {
  background: rgba(234, 179, 8, 0.15);
  color: var(--neon-yellow);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge-nofood {
  background: rgba(239, 68, 68, 0.12);
  color: var(--neon-red);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-entry {
  background: rgba(0, 245, 255, 0.1);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 245, 255, 0.25);
}

.badge-exit {
  background: rgba(168, 85, 247, 0.12);
  color: var(--neon-purple);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.badge-system {
  background: rgba(59, 130, 246, 0.12);
  color: var(--neon-blue);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-alert {
  background: rgba(239, 68, 68, 0.15);
  color: var(--neon-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
  animation: badge-pulse 1.5s infinite;
}

@keyframes badge-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ── Scanner UI ─────────────────────────────────────────────── */
.scanner-input-wrap {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
}

.scanner-input-wrap .scan-icon {
  position: absolute;
  left: 14px;
  color: var(--neon-cyan);
  font-size: 1.1rem;
}

.scanner-input {
  padding-left: 42px !important;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.scanner-result {
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  margin-top: 16px;
  display: none;
  animation: fadeInUp 0.3s ease;
}

.scanner-result.success {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.07);
}

.scanner-result.error {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.07);
}

.scanner-result.show {
  display: flex;
  gap: 16px;
  align-items: center;
}

.scan-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.scan-mode-tab {
  flex: 1;
  min-width: 100px;
  padding: 10px 14px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 600;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
}

.scan-mode-tab.active-entry {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(0, 245, 255, 0.08);
}

.scan-mode-tab.active-exit {
  border-color: var(--neon-purple);
  color: var(--neon-purple);
  background: rgba(168, 85, 247, 0.08);
}

.scan-mode-tab.active-food {
  border-color: var(--neon-yellow);
  color: var(--neon-yellow);
  background: rgba(234, 179, 8, 0.08);
}

/* ── Zoho People Timeline ────────────────────────────────────── */
.timeline-container {
  width: 100%;
}

.timeline-header-row {
  display: grid;
  grid-template-columns: 120px 1fr 90px;
  align-items: center;
  padding: 6px 16px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.timeline-time-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: var(--text-muted);
  padding: 0 0 4px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 120px 1fr 90px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--transition);
}

.timeline-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.timeline-row:last-child {
  border-bottom: none;
}

.timeline-day-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tl-weekday {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.tl-date {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.tl-today .tl-weekday {
  color: var(--neon-cyan);
}

.tl-today .tl-date {
  color: var(--neon-cyan);
}

.timeline-bar-wrap {
  position: relative;
  height: 36px;
}

.timeline-grid-lines {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.tl-gridline {
  width: 1px;
  background: rgba(255, 255, 255, 0.05);
  height: 100%;
}

.timeline-bar-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
}

.timeline-segment {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  box-shadow: 0 0 8px rgba(0, 245, 255, 0.4);
}

.tl-event-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  cursor: pointer;
  transition: transform var(--transition);
  z-index: 2;
}

.tl-event-dot:hover {
  transform: translate(-50%, -50%) scale(1.5);
}

.tl-event-dot.dot-entry {
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
}

.tl-event-dot.dot-exit {
  background: var(--neon-red);
  box-shadow: 0 0 8px var(--neon-red);
}

.tl-event-dot.dot-food {
  background: var(--neon-yellow);
  box-shadow: 0 0 8px var(--neon-yellow);
}

.tl-event-dot .tl-tooltip {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: var(--bg-secondary);
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.72rem;
  white-space: nowrap;
  color: var(--text-primary);
  z-index: 10;
  pointer-events: none;
}

.tl-event-dot:hover .tl-tooltip {
  display: block;
}

.tl-hours {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tl-hours-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  display: block;
}

.tl-no-data .timeline-bar-track {
  background: rgba(255, 255, 255, 0.03);
}

.tl-no-events {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  padding-left: 8px;
}

/* ── Log Feed ────────────────────────────────────────────────── */
.log-feed {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.log-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  animation: fadeInRight 0.2s ease;
}

.log-item:last-child {
  border-bottom: none;
}

.log-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 80px;
  padding-top: 2px;
}

.log-content {
  flex: 1;
}

.log-msg {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.log-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── QR Display ─────────────────────────────────────────────── */
.qr-card {
  text-align: center;
  padding: 28px;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.04), rgba(168, 85, 247, 0.04));
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
}

.qr-card img {
  border-radius: var(--radius);
  border: 2px solid var(--border-bright);
  box-shadow: var(--shadow-glow-cyan);
}

.qr-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 4px;
  margin-top: 16px;
  text-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

/* ── Break Alert ────────────────────────────────────────────── */
.break-alert {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  animation: fadeInUp 0.3s ease;
}

.break-alert-icon {
  font-size: 1.2rem;
}

.break-minutes {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--neon-red);
}

/* ── Toast Notifications ─────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card), var(--shadow-glow-cyan);
  min-width: 300px;
  max-width: 400px;
  animation: slideInRight 0.3s ease, fadeOut 0.4s ease 3.6s forwards;
  pointer-events: all;
}

.toast-success {
  border-color: rgba(34, 197, 94, 0.4);
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.4);
}

.toast-info {
  border-color: rgba(0, 245, 255, 0.3);
}

.toast-icon {
  font-size: 1.1rem;
}

.toast-msg {
  font-size: 0.85rem;
  color: var(--text-primary);
  flex: 1;
}

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-card), var(--shadow-glow-cyan);
  animation: scaleIn 0.2s ease;
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  transition: color var(--transition);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

/* ── Announcement Card ───────────────────────────────────────── */
.ann-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  transition: border-color var(--transition);
}

.ann-card:hover {
  border-color: var(--border-bright);
}

.ann-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.ann-body {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.ann-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 8px;
  display: flex;
  gap: 12px;
}

/* ── Flash Messages ──────────────────────────────────────────── */
.flash-messages {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flash-msg {
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flash-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--neon-green);
}

.flash-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--neon-red);
}

.flash-info {
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.25);
  color: var(--neon-cyan);
}

/* ── Print Badge ─────────────────────────────────────────────── */
@media print {
  body * {
    visibility: hidden !important;
  }

  .print-badge,
  .print-badge * {
    visibility: visible !important;
  }

  .print-badge {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
  }
}

.badge-card-print {
  width: 320px;
  border: 3px solid #00f5ff;
  border-radius: 16px;
  padding: 24px;
  background: white;
  color: #000;
  text-align: center;
}

.badge-card-print .badge-name {
  font-size: 1.3rem;
  font-weight: 800;
}

.badge-card-print .badge-uid {
  font-family: monospace;
  font-size: 1.1rem;
  letter-spacing: 3px;
  color: #0077ff;
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* ── Layout Helpers ───────────────────────────────────────────── */
.layout-admin-dash {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.layout-admin-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.layout-part-dash {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
}

.layout-part-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.layout-vol-dash {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
  max-width: 1100px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
  }

  .sidebar {
    transform: translateX(-240px);
  }

  .sidebar.open {
    transform: translateX(0);
    width: 240px;
  }

  .main-content {
    margin-left: 0;
    max-width: 100vw;
  }

  .hamburger {
    display: flex !important;
  }

  .page-body {
    padding: 16px;
  }

  .layout-admin-dash,
  .layout-admin-actions,
  .layout-part-dash,
  .layout-part-status,
  .layout-vol-dash,
  .dash-grid,
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card,
  .glass-panel,
  .auth-card {
    padding: 20px 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .table-wrap,
  .table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 20px;
  }

  .topbar {
    padding: 12px 16px;
  }

  .topbar-title {
    font-size: 1rem;
  }

  .modal-box {
    padding: 24px 16px;
  }

  .portal-cards {
    grid-template-columns: 1fr;
  }

  .hide-on-mobile {
    display: none !important;
  }
}

/* ── Hamburger ───────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── Search Bar ──────────────────────────────────────────────── */
.search-wrap {
  position: relative;
}

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

.search-input {
  padding-left: 36px !important;
}

/* ── Food Status Indicator ────────────────────────────────────── */
.food-status-card {
  border-radius: var(--radius);
  padding: 18px 22px;
  text-align: center;
}

.food-status-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.food-status-card.collected {
  background: rgba(34, 197, 94, 0.07);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.food-status-card.pending {
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--border);
}

/* ── Countdown ────────────────────────────────────────────────── */
.countdown-wrap {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 16px 0;
}

.countdown-unit {
  text-align: center;
}

.countdown-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 800;
  color: var(--neon-cyan);
  text-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

.countdown-label {
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Landing Page ─────────────────────────────────────────────── */
.landing-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.25);
  color: var(--neon-cyan);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease;
}

.landing-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.gradient-text {
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 50%, var(--neon-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 48px;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.portal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 920px;
  animation: fadeInUp 0.7s ease 0.3s both;
}

.portal-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.portal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--pc-color), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.portal-card:hover {
  transform: translateY(-4px);
  border-color: var(--pc-border);
}

.portal-card:hover::before {
  opacity: 0.07;
}

.portal-card[data-portal="admin"] {
  --pc-color: #a855f7;
  --pc-border: rgba(168, 85, 247, 0.4);
}

.portal-card[data-portal="volunteer"] {
  --pc-color: #f97316;
  --pc-border: rgba(249, 115, 22, 0.4);
}

.portal-card[data-portal="participant"] {
  --pc-color: #00f5ff;
  --pc-border: rgba(0, 245, 255, 0.35);
}

.portal-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.portal-name {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.portal-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.portal-arrow {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: transform var(--transition), color var(--transition);
}

.portal-card:hover .portal-arrow {
  transform: translateY(-50%) translateX(4px);
  color: var(--text-primary);
}

.portal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.portal-tag {
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.07);
}