:root {
  --bg-dark: #0a0c10;
  --bg-card: rgba(18, 22, 30, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --color-primary: #ff6b35;
  --color-secondary: #004e89;
  --color-success: #2ea44f;
  --color-error: #f43f5e;
  --text-main: #ffffff;
  --text-muted: #8b949e;
  --radius-lg: 16px;
  --radius-md: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --gradient: linear-gradient(135deg, #ff6b35 0%, #dd4b1a 100%);
  --gradient-blue: linear-gradient(135deg, #004e89 0%, #002d52 100%);
}

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

body {
  font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Top Navigation Header */
header {
  background: rgba(10, 12, 16, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.brand-icon {
  font-size: 1.8rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}

.brand-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  color: var(--color-primary);
  font-weight: 600;
}

/* Dashboard Layout Grid */
.dashboard-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .dashboard-container {
    grid-template-columns: 1fr;
  }
}

/* Glassmorphism Cards */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Lists (Events) */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 4px;
}

.event-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.event-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.event-item.active {
  background: rgba(255, 107, 53, 0.08);
  border-color: var(--color-primary);
}

.event-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.event-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* Forms and Inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  width: 100%;
}

.btn-primary {
  background: var(--gradient);
  color: var(--text-main);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.55);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--color-error);
  color: var(--text-main);
}

/* Stats Dashboard cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  margin: 6px 0;
  background: linear-gradient(135deg, #ffffff 60%, #a0a0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Event Details & Controls Area */
.event-details-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
  gap: 1.5rem;
}

@media (max-width: 600px) {
  .event-details-header {
    flex-direction: column;
    align-items: stretch;
  }
}

.event-details-title h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.event-details-title p {
  color: var(--text-muted);
  font-size: 0.95rem;
  display: flex;
  gap: 12px;
}

.actions-row {
  display: flex;
  gap: 10px;
}

/* Table Area */
.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 1.5rem;
}

@media (max-width: 600px) {
  .table-controls {
    flex-direction: column;
    align-items: stretch;
  }
}

.search-container {
  position: relative;
  flex-grow: 1;
  max-width: 400px;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

th {
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

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

/* Badges for status */
.status-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-checkedin {
  background: rgba(46, 164, 79, 0.15);
  color: #58a6ff;
  color: #3fb950;
  border: 1px solid rgba(46, 164, 79, 0.25);
}

.status-noshow {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

/* QR Code Modal Display */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 90%;
  max-width: 480px;
  text-align: center;
  box-shadow: var(--shadow);
  transform: scale(0.9);
  transition: var(--transition);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.qr-box {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  display: inline-block;
  margin: 1.5rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.qr-link-display {
  background: rgba(0,0,0,0.4);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 0.85rem;
  word-break: break-all;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Check-In Portal styling (attendees phone) */
.checkin-portal {
  max-width: 500px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.checkin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.success-icon {
  font-size: 4rem;
  color: var(--color-success);
  margin-bottom: 1.5rem;
  animation: scaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleUp {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

.checkin-success-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 10px;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

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