:root {
  color-scheme: light;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  color: #09090b;
  background: #fafafa;
  --brand-violet: #8f46ef;
  --brand-pink: #f04691;
  --brand-gradient: linear-gradient(135deg, #8f46ef 0%, #f04691 100%);
  --surface: #ffffff;
  --border: #27272a;
  --muted: #71717a;
}

* { box-sizing: border-box; }

body { margin: 0; }

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.site-header {
  background: #09090b;
  color: #fafafa;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.brand {
  color: #fafafa;
  text-decoration: none;
  font-weight: 700;
}

.card {
  background: var(--surface);
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.card.narrow {
  max-width: 460px;
  margin: 48px auto 0;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
}

.hint {
  display: block;
  margin-top: 6px;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted);
}

.hint code {
  font-size: 0.85em;
  background: #f4f4f5;
  padding: 1px 4px;
  border-radius: 4px;
}

input, select, textarea, button, .button {
  font: inherit;
}

input, select, textarea {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
}

textarea {
  resize: vertical;
}

button, .button {
  display: inline-block;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  cursor: pointer;
}

button.secondary, .button.secondary {
  background: #71717a;
}

button.danger, .button.danger {
  background: #dc2626;
}

.brand-button {
  width: 100%;
  background: var(--brand-gradient);
  font-weight: 600;
}

.inline-form { display: inline; }

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid #e4e4e7;
  text-align: left;
  vertical-align: top;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.error { color: #b91c1c; }
.success { color: #047857; }
.muted { color: var(--muted); }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f4f4f5;
  font-size: 0.85rem;
}

.danger-zone { margin-top: 24px; }
.danger-link {
  background: none;
  border: none;
  color: #b91c1c;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.public-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #fafafa;
}

.public-card {
  text-align: center;
}

.brand-logo {
  height: 48px;
  margin: 0 auto 16px;
  display: block;
}

.brand-accent {
  height: 3px;
  width: 120px;
  margin: 0 auto 24px;
  border-radius: 999px;
  background: var(--brand-gradient);
}

.certificate-form {
  text-align: left;
  margin-top: 24px;
}

.link-card {
  margin-bottom: 24px;
}

.copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.copy-row input {
  margin-top: 0;
}
