:root {
  color-scheme: light;
  --ink: #241735;
  --muted: #6f5c80;
  --line: #ead7f4;
  --brand: #7c3aed;
  --pink: #db2777;
  --hot: #fb6a22;
  --bg: #fff7fb;
  --card: rgba(255, 255, 255, 0.86);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(251, 106, 34, 0.14), transparent 34rem),
    linear-gradient(120deg, #ffffff 0%, #f5e8ff 38%, #ffe6f3 100%);
  min-height: 100vh;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
}

a {
  color: var(--brand);
  text-decoration: none;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.12);
  background: linear-gradient(90deg, #ffffff 0%, #f3e8ff 34%, #f9a8d4 70%, #fb6a22 100%);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  display: block;
  width: clamp(190px, 18vw, 300px);
  height: auto;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

nav a,
.btn,
button {
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  color: #6d28d9;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(93, 46, 135, 0.12);
  gap: 8px;
  letter-spacing: 0;
}

button,
.btn {
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
}

.btn.secondary {
  background: #ffffff;
  color: #7c3aed;
}

.btn.small {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 14px;
}

button.danger {
  background: #ffe4e6;
  color: #be123c;
  box-shadow: none;
}

button:disabled,
input:disabled,
select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.danger-zone {
  border-color: #fecdd3;
  background: rgba(255, 241, 242, 0.9);
}

main {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.hero {
  min-height: 58vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: clamp(24px, 5vw, 76px);
}

.hero-logo {
  display: block;
  width: min(520px, 100%);
  height: auto;
  margin-bottom: 24px;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: 0;
  font-weight: 900;
}

h2 {
  margin-top: 38px;
}

p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.creator {
  margin: -12px 0 18px;
  color: #7c3aed;
  font-size: 15px;
  font-weight: 800;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.code-card,
.card,
form,
table {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 24px 70px rgba(87, 45, 122, 0.14);
}

.code-card {
  padding: clamp(28px, 5vw, 56px);
  text-align: center;
  color: var(--muted);
  font-size: 22px;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.code-card strong {
  display: block;
  color: var(--pink);
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.05;
}

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: 500;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
}

.code-card .material-symbols-rounded {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
  font-size: 42px;
}

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

.cards.compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 18px 0 26px;
}

.card {
  min-height: 120px;
  padding: 22px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  display: grid;
  align-content: start;
  gap: 10px;
}

.card .material-symbols-rounded {
  color: var(--pink);
  font-size: 34px;
}

.card strong {
  display: block;
  color: var(--pink);
  font-size: 34px;
  margin-top: 14px;
}

.admin-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
}

.admin-summary span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  padding: 10px 14px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 20px 0 24px;
}

.steps div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
  display: grid;
  gap: 8px;
}

.steps .material-symbols-rounded {
  color: var(--pink);
  font-size: 32px;
}

.steps strong {
  font-size: 18px;
}

.steps span {
  color: var(--muted);
}

form {
  display: grid;
  gap: 16px;
  max-width: 720px;
  padding: 22px;
}

.pair-form {
  max-width: 620px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d8b4fe;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14);
}

.pair-code {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: -8px;
  margin-bottom: 4px;
}

.pair-code span {
  width: 16px;
}

.pair-code input {
  width: 54px;
  height: 62px;
  min-height: 62px;
  padding: 0;
  text-align: center;
  font-size: 30px;
  font-weight: 900;
  color: var(--pink);
  border-color: #f5c2df;
  background: #fff1f7;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

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

th {
  color: #6d28d9;
  background: rgba(243, 232, 255, 0.72);
}

td form {
  display: inline;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.alert {
  max-width: 720px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #f3e8ff;
  color: #6d28d9;
  font-weight: 800;
}

.alert.error {
  background: #ffe4e6;
  color: #be123c;
}

@media (max-width: 800px) {
  header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

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

  table {
    display: block;
    overflow-x: auto;
  }
}
