:root {
  --primary: #1c64f2;
  --primary-dark: #1a4fd6;
  --accent: #f59e0b;
  --bg: #f4f7fb;
  --text: #1f2933;
  --muted: #6b7280;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, rgba(28, 100, 242, 0.08), rgba(245, 158, 11, 0.08));
  min-height: 100vh;
  color: var(--text);
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.card {
  background: #fff;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
  position: relative;
  overflow: hidden;
}

.brand-hero {
  display: flex;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.brand-hero img {
  width: min(320px, 70%);
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 32px rgba(15, 23, 42, 0.18));
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(28, 100, 242, 0.12), transparent 55%),
    radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.12), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.card > * {
  position: relative;
  z-index: 1;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.75rem;
  color: var(--primary);
}

p.lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

form {
  display: grid;
  gap: 1.5rem;
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid.two-columns {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

fieldset {
  border: none;
  padding: 0;
}

legend {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--primary-dark);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea,
input[type="password"],
input[type="number"] {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(28, 100, 242, 0.15);
}

.radio-group {
  display: flex;
  gap: 1rem;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-pill input {
  accent-color: var(--primary);
}

.radio-pill:hover,
.radio-pill:has(input:checked) {
  border-color: var(--primary);
  background: rgba(28, 100, 242, 0.1);
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  padding: 0.95rem 1.75rem;
  border-radius: 16px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(28, 100, 242, 0.2);
}

.notice {
  background: rgba(28, 100, 242, 0.08);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--primary);
  color: var(--primary-dark);
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .card {
    padding: 1.75rem;
  }

  .brand-hero {
    margin-bottom: 1.25rem;
  }

  .brand-hero img {
    width: min(280px, 85%);
  }

  .radio-group {
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  main {
    padding: 2.5rem 1.25rem 3rem;
  }

  .card {
    padding: 1.5rem;
    border-radius: 20px;
  }

  h1 {
    text-align: center;
  }

  .lead {
    text-align: center;
  }

  .grid.two-columns {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .tab-bar {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
}

@media (max-width: 380px) {
  :root {
    font-size: 15px;
  }

  .card {
    padding: 1.35rem;
  }

  .tab-button {
    flex: 1 1 100%;
  }
}

.table-wrapper {
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

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

thead {
  background: rgba(28, 100, 242, 0.12);
}

thead th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.85rem;
  text-align: left;
  color: var(--primary-dark);
}

tbody td {
  padding: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 0.95rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(28, 100, 242, 0.12);
  color: var(--primary-dark);
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.stat-card h3 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card p {
  margin: 0.35rem 0 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.tab-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.tab-button {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-button.active,
.tab-button:hover {
  border-color: rgba(28, 100, 242, 0.4);
  background: rgba(28, 100, 242, 0.1);
  color: var(--primary-dark);
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: 14px;
  margin-bottom: 1.5rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(5, 150, 105, 0.3);
  color: #047857;
}

.alert-error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #b91c1c;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.qr-card {
  padding: 1.25rem;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  text-align: center;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.qr-card img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

small {
  color: var(--muted);
}