* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: #1f2937;
  min-height: 100vh;
}

.card {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  padding: 2.5rem;
}

header h1 {
  margin: 0;
  font-size: 1.75rem;
  color: #1e3a8a;
}
.subtitle {
  margin: 0.25rem 0 1.5rem;
  color: #6b7280;
  font-size: 0.95rem;
}

.terms {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  max-height: 320px;
  overflow-y: auto;
  font-size: 0.92rem;
  line-height: 1.55;
}
.terms h2 {
  font-size: 1rem;
  margin: 1rem 0 0.4rem;
  color: #1e3a8a;
}
.terms h2:first-child { margin-top: 0; }
.terms ul { padding-left: 1.2rem; }

.consent-block {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checkbox {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  background: #eef2ff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}
.checkbox input { margin-top: 0.2rem; flex-shrink: 0; }

button {
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.1s;
}
button:not(.ghost) {
  background: #1e40af;
  color: #fff;
}
button:not(.ghost):hover:not(:disabled) { background: #1e3a8a; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.ghost {
  background: transparent;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.result {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: 8px;
}
.result.ok { background: #ecfdf5; border: 1px solid #6ee7b7; }
.result.err { background: #fef2f2; border: 1px solid #fca5a5; }
.result h2 { margin-top: 0; }
.result dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 1rem;
  margin: 0.75rem 0;
}
.result dt { font-weight: 600; color: #374151; }
.result code {
  display: inline-block;
  background: #f3f4f6;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  word-break: break-all;
}
.hint { margin-top: 1rem; }

.hidden { display: none !important; }

/* admin */
.admin {
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}
.admin h1 { margin-top: 0; color: #1e3a8a; }
.meta { color: #6b7280; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
th, td {
  border-bottom: 1px solid #e5e7eb;
  padding: 0.6rem 0.5rem;
  text-align: left;
  vertical-align: top;
}
th { background: #f3f4f6; font-weight: 600; }
tr.withdrawn { opacity: 0.55; }
.ua { max-width: 200px; word-break: break-word; }
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge.active { background: #d1fae5; color: #065f46; }
.badge.revoked { background: #fee2e2; color: #991b1b; }
.empty { color: #6b7280; font-style: italic; }

.intro {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  background: #f9fafb;
  border-left: 3px solid #1e3a8a;
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.55;
}
.intro p { margin: 0; }

button.primary {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  background: #1e3a8a;
  color: #fff;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

button.consent {
  font-size: 1rem;
  font-weight: 600;
  background: transparent;
  color: #4c05ff;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

button.consent:hover:not(:disabled) { background: transparent; }
 

button.consent .pdf-icon { flex-shrink: 0; color: #dc2626; }
button.consent .btn-label { text-decoration: underline; }

button.primary p {
  text-decoration: underline;
}

button.primary:hover:not(:disabled) { background: #1e40af; }
button.primary:disabled { background: #9ca3af; cursor: wait; }

