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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  min-height: 100vh;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 1.6rem;
}

h2 {
  margin-bottom: 16px;
  font-size: 1.3rem;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 0.95rem;
}

/* Top bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.top-bar h1 {
  margin-bottom: 0;
  text-align: left;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-badge {
  background: #4361ee;
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Auth kártya (login/regisztráció) */
.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  max-width: 420px;
  margin: 0 auto;
}

.auth-card h2 {
  text-align: center;
}

.switch-link {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #666;
}

.switch-link a {
  color: #4361ee;
  text-decoration: none;
  font-weight: 600;
}

.switch-link a:hover {
  text-decoration: underline;
}

.error-msg {
  color: #dc3545;
  font-size: 0.9rem;
  text-align: center;
  min-height: 20px;
  margin-bottom: 8px;
}

.success-msg {
  color: #28a745;
  font-size: 0.9rem;
  text-align: center;
  min-height: 20px;
  margin-bottom: 8px;
}

/* Checkin kártya */
.checkin-card {
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin-bottom: 24px;
}

.checkin-card h2 {
  margin-bottom: 4px;
}

.card-desc {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.input-group {
  margin-bottom: 20px;
  text-align: left;
}

.input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.input-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.input-group input:focus {
  outline: none;
  border-color: #4361ee;
}

/* Gombok */
.btn {
  display: inline-block;
  padding: 14px 40px;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 8px;
}

.btn-primary {
  background: #4361ee;
  color: #fff;
  box-shadow: 0 4px 14px rgba(67, 97, 238, 0.4);
}

.btn-primary:hover {
  background: #3a56d4;
}

.btn-primary:disabled {
  background: #a0a0a0;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-secondary {
  background: #e9ecef;
  color: #333;
  padding: 10px 24px;
  font-size: 0.95rem;
}

.btn-secondary:hover {
  background: #dee2e6;
}

.btn-success {
  background: #2d6a4f;
  color: #fff;
  padding: 10px 24px;
  font-size: 0.95rem;
}

/* Spinner */
.spinner {
  display: none;
  margin: 20px auto;
  width: 40px;
  height: 40px;
  border: 4px solid #e9ecef;
  border-top-color: #4361ee;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Eredmény */
.result {
  display: none;
  margin-top: 24px;
  padding: 24px;
  border-radius: 12px;
  font-size: 1.1rem;
}

.result.success {
  background: #d4edda;
  border: 2px solid #28a745;
  color: #155724;
}

.result.fail {
  background: #f8d7da;
  border: 2px solid #dc3545;
  color: #721c24;
}

.result .result-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}

.result .result-details {
  font-size: 0.9rem;
  margin-top: 10px;
  color: #555;
}

/* Előzmények szekció */
.history-section {
  margin-top: 8px;
}

.history-section h2 {
  margin-bottom: 0;
}

/* Admin link */
.admin-link {
  text-align: center;
  margin-top: 30px;
}

.admin-link a {
  color: #888;
  font-size: 0.85rem;
  text-decoration: none;
}

.admin-link a:hover {
  color: #4361ee;
}

/* Admin / Login box */
.login-box {
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  text-align: center;
  max-width: 400px;
  margin: 40px auto;
}

.login-box input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 1rem;
  margin: 16px 0;
}

.login-box input:focus {
  outline: none;
  border-color: #4361ee;
}

.login-error {
  color: #dc3545;
  font-size: 0.9rem;
  display: none;
}

/* Admin panel */
.admin-panel {
  display: none;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.admin-header select {
  padding: 8px 12px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
}

.admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.summary {
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.summary-item {
  font-size: 0.95rem;
}

.summary-item strong {
  font-size: 1.3rem;
  display: block;
}

.table-wrap {
  background: #fff;
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

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

th {
  background: #f8f9fa;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 2px solid #dee2e6;
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
}

tr:hover td {
  background: #f8f9fa;
}

.status-ok {
  color: #28a745;
  font-weight: 600;
}

.status-fail {
  color: #dc3545;
  font-weight: 600;
}

.empty-msg {
  text-align: center;
  padding: 40px;
  color: #888;
}

@media (max-width: 600px) {
  .container {
    padding: 12px;
  }

  .checkin-card, .auth-card {
    padding: 24px 16px;
  }

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

  .btn-full {
    width: 100%;
  }

  .top-bar {
    flex-direction: column;
    text-align: center;
  }

  .admin-header {
    flex-direction: column;
    align-items: stretch;
  }

  table {
    font-size: 0.8rem;
  }

  td, th {
    padding: 8px 10px;
  }
}
