body {
  margin: 0;
  padding: 20px;
  background: #121212;
  color: white;
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 500px;
  background: #1e1e1e;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  transition: max-width 0.3s ease;
}

.container.wide {
  max-width: 750px;
}

input {
  width: 90%;
  padding: 12px;
  margin-top: 15px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #222;
  color: white;
}

button {
  margin-top: 15px;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  background: #1e90ff;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

button:hover {
  background: #3742fa;
}

#ticket-wrapper {
  display: none;
  justify-content: center;
  margin-top: 30px;
}

.ticket {
  width: 400px;
  background: white;
  color: black;
  display: flex;
  border-radius: 12px;
  overflow: hidden;
}

.ticket-left {
  flex: 1;
  padding: 20px;
  border-right: 2px dashed #aaa;
}

.ticket-right {
  width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f2f6;
}

#display-id {
  margin-top: 10px;
  background: #dfe4ea;
  padding: 5px 8px;
  border-radius: 4px;
  display: inline-block;
  font-family: monospace;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid #333;
}

.tab-btn {
  flex: 1;
  padding: 12px 10px;
  background: transparent;
  color: #888;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  margin-top: 0;
  transition: color 0.2s, border-color 0.2s;
}

.tab-btn:hover {
  color: #ccc;
  background: transparent;
}

.tab-btn.active {
  color: #1e90ff;
  border-bottom-color: #1e90ff;
  background: transparent;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Scanner section */
#scanner-section h1 {
  margin-bottom: 15px;
}

#result {
  margin-top: 20px;
  font-weight: bold;
  font-size: 18px;
}

/* html5-qrcode overrides */
#reader {
  border: none !important;
}

#reader__dashboard {
  padding: 10px 0;
}

#reader__scan_region {
  min-height: 200px;
}

/* Attendees Table */
#attendees-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.attendees-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}

.attendees-toolbar input {
  flex: 1;
  margin-top: 0;
  width: auto;
}

.refresh-btn {
  margin-top: 0;
  padding: 10px 16px;
  font-size: 16px;
  background: #2a2a2a;
  color: #aaa;
  border: 1px solid #444;
  white-space: nowrap;
}

.refresh-btn:hover {
  background: #333;
  color: white;
}

#attendees-last-updated {
  text-align: right;
  font-size: 12px;
  color: #555;
  margin-top: 8px;
}

.stat {
  background: #2a2a2a;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: #ccc;
}

.stat.checked-in strong { color: #2ed573; }
.stat.pending strong { color: #ffa502; }

#attendees-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#attendees-table th {
  background: #2a2a2a;
  color: #888;
  padding: 10px 12px;
  text-align: left;
  font-weight: normal;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

#attendees-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #2a2a2a;
  color: #ddd;
}

#attendees-table tr:hover td {
  background: #252525;
}

.ticket-id-cell {
  font-family: monospace;
  font-size: 13px;
  color: #aaa !important;
}

.status-used { color: #2ed573 !important; }
.status-pending { color: #ffa502 !important; }

/* Toast animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Scanner result card */
#scan-result-card {
  margin-top: 20px;
  animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.scan-ticket {
  width: 100%;
  max-width: 400px;
  background: white;
  color: black;
  display: flex;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.scan-ticket-left {
  flex: 1;
  padding: 20px;
  border-right: 2px dashed #aaa;
  text-align: left;
}

.scan-ticket-left h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.scan-ticket-left p {
  margin: 0 0 8px;
  font-size: 13px;
  color: #555;
}

.scan-ticket-left h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.scan-id {
  background: #dfe4ea;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  font-family: monospace;
  font-size: 13px;
}

.scan-ticket-right {
  width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f2f6;
}

#scan-status-msg {
  margin-top: 12px;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
}

#scan-invalid {
  margin-top: 20px;
  background: #2a0a0a;
  border: 1px solid #e74c3c;
  border-radius: 10px;
  padding: 20px;
  font-size: 18px;
  font-weight: bold;
  color: #e74c3c;
  animation: fadeInDown 0.3s ease;
}