* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: #f4f6f8;
  color: #1f2933;
  line-height: 1.5;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 18px 60px;
}

.card {
  background: #fff;
  border-radius: 14px;
  padding: 24px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 6px;
}

h2 {
  font-size: 1.15rem;
  margin: 0 0 16px;
}

p.subtitle {
  color: #616e7c;
  margin: 0 0 20px;
  font-size: 0.95rem;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 16px 0 6px;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d3d9e0;
  border-radius: 10px;
  font-size: 1rem;
  background: #fbfcfd;
}

input:focus {
  outline: none;
  border-color: #3b82f6;
  background: #fff;
}

.radio-group {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.radio-option {
  flex: 1;
  border: 1px solid #d3d9e0;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  font-size: 0.9rem;
  cursor: pointer;
}

.radio-option input { display: none; }

.radio-option.selected {
  border-color: #3b82f6;
  background: #eaf2ff;
  color: #1d4ed8;
  font-weight: 600;
}

button, .btn {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 22px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

button:active, .btn:active { background: #1d4ed8; }

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 0.92rem;
}

.alert-success { background: #e6f7ec; color: #087443; }
.alert-error   { background: #fdecec; color: #b3261e; }
.alert-info    { background: #eaf2ff; color: #1d4ed8; }

.qr-box {
  text-align: center;
  margin: 20px 0;
}

.qr-box img {
  width: 220px;
  height: 220px;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid #e1e6eb;
}

.code-display {
  text-align: center;
  font-size: 1.6rem;
  letter-spacing: 4px;
  font-weight: 700;
  background: #f4f6f8;
  border-radius: 10px;
  padding: 14px;
  margin: 16px 0;
}

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

th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #edf0f2;
  white-space: nowrap;
}

.status-pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-pending   { background: #fdf3e3; color: #9a6a00; }
.status-confirmed { background: #e6f7ec; color: #087443; }

.table-scroll { overflow-x: auto; }

.stats {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.stat-box {
  flex: 1;
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat-box .num { font-size: 1.4rem; font-weight: 700; }
.stat-box .lbl { font-size: 0.75rem; color: #616e7c; }

a { color: #2563eb; }

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.top-bar a.btn {
  width: auto;
  margin-top: 0;
  padding: 8px 14px;
  font-size: 0.85rem;
}

.scanner-box {
  margin: 18px 0;
  text-align: center;
}

.scanner-box video {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  background: #000;
}