:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #fdf7fa;
  color: #49323d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 201, 220, 0.45), transparent 25rem),
    radial-gradient(circle at 85% 0%, rgba(192, 235, 232, 0.45), transparent 22rem),
    #fff9fb;
}

button,
input {
  font: inherit;
}

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

.hero,
.toolbar,
.toolbar-actions,
.actions,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero,
.toolbar {
  justify-content: space-between;
}

.eyebrow {
  margin: 0;
  color: #c46c91;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(32px, 6vw, 54px);
}

.subtitle {
  color: #876d79;
}

.card,
dialog {
  border: 1px solid rgba(213, 157, 181, 0.45);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 50px rgba(139, 83, 108, 0.1);
}

.login-card {
  width: min(440px, 100%);
  margin: 40px auto;
  padding: 28px;
}

form,
label {
  display: grid;
  gap: 8px;
}

form {
  gap: 16px;
}

input {
  min-width: 0;
  border: 1px solid #e3c3d0;
  border-radius: 12px;
  padding: 11px 13px;
  background: #fff;
  color: #49323d;
}

button {
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  padding: 10px 15px;
  transition: 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary {
  background: #ca7197;
  color: white;
}

.ghost {
  background: #f8e8ef;
  color: #8b5470;
}

.danger {
  background: #f7d8df;
  color: #a73d59;
}

.toolbar {
  margin-top: 28px;
  padding: 20px;
}

.toolbar h2,
.toolbar p {
  margin-bottom: 4px;
}

.table-card {
  margin-top: 16px;
  overflow: hidden;
}

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

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

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

th {
  color: #8c6b79;
  font-size: 13px;
}

.status {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
}

.status.active {
  background: #daf1e7;
  color: #287057;
}

.status.revoked {
  background: #f7d8df;
  color: #a73d59;
}

.message {
  min-height: 24px;
  margin: 18px 0 0;
  color: #49756c;
}

.message.error {
  color: #a73d59;
}

.hidden {
  display: none !important;
}

dialog {
  width: min(440px, calc(100% - 32px));
  padding: 0;
}

dialog::backdrop {
  background: rgba(73, 50, 61, 0.24);
}

.dialog-content {
  padding: 24px;
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

#new-code {
  display: block;
  border-radius: 12px;
  padding: 16px;
  background: #f8e8ef;
  color: #8b5470;
  font-size: 18px;
  text-align: center;
}

@media (max-width: 720px) {
  .hero,
  .toolbar,
  .toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
