:root {
  color-scheme: light;
  --ink: #18202a;
  --muted: #657080;
  --line: #d7dee8;
  --blue: #2f6fdd;
  --green: #1f9d72;
  --paper: #ffffff;
  --soft: #f4f7fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(47, 111, 221, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(31, 157, 114, 0.08) 1px, transparent 1px),
    var(--soft);
  background-size: 42px 42px;
}

.admin-body {
  background: var(--soft);
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.panel {
  width: min(440px, 100%);
  padding: 34px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 18px 60px rgba(24, 32, 42, 0.1);
}

.brand {
  font-size: 17px;
  font-weight: 700;
}

.mark {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 28px 0 22px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--green));
  font-size: 42px;
  font-weight: 760;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: 0;
}

.copy {
  margin: 16px 0 24px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.install {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 15px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.install.disabled {
  background: #aab2bd;
}

.fine {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.admin-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.admin-header h1 {
  margin-top: 6px;
  font-size: 28px;
}

.admin-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.admin-section,
.notice,
.result {
  margin: 16px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.admin-section h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.notice {
  border-color: rgba(31, 157, 114, 0.45);
  color: var(--green);
  font-weight: 700;
}

.result {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.result input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
}

.create-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 140px auto;
  gap: 12px;
  align-items: end;
}

.assign-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(220px, 1.2fr) minmax(120px, 0.8fr) 110px 110px 140px auto;
  gap: 12px;
  align-items: end;
}

.create-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.assign-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.create-form select,
.create-form input {
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.assign-form select,
.assign-form input {
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.create-form button,
.assign-form button,
.inline-form button {
  min-height: 42px;
  padding: 9px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 700;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.inline-form {
  margin: 0;
}

.billing-form {
  display: grid;
  grid-template-columns: 92px 138px minmax(150px, 1fr) 44px;
  gap: 6px;
  align-items: center;
  min-width: 440px;
}

.billing-form select,
.billing-form input {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.billing-form button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.inline-form button {
  min-height: 34px;
  background: #d94c4c;
  font-size: 13px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--soft);
  color: var(--ink);
}

@media (max-width: 460px) {
  .shell {
    align-items: start;
    padding: 18px;
  }

  .panel {
    margin-top: 24px;
    padding: 28px 22px;
  }

  h1 {
    font-size: 27px;
  }

  .admin-shell {
    padding: 18px;
  }

  .admin-header {
    display: block;
  }

  .admin-link {
    display: inline-block;
    margin-top: 12px;
  }

  .create-form {
    grid-template-columns: 1fr;
  }

  .assign-form {
    grid-template-columns: 1fr;
  }
}
