:root {
  color-scheme: light;
  --ink: #211936;
  --muted: #665e77;
  --line: #e1dbea;
  --accent: #6038a9;
  --accent-dark: #482581;
  --surface: #fff;
  background: #f5f3f8;
  color: var(--ink);
  font-family: system-ui, sans-serif;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
.topbar {
  background: #24183d;
  color: #fff;
}
.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.masthead,
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.masthead {
  min-height: 70px;
  justify-content: space-between;
}
.brand {
  font-weight: 750;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #bd9dfb;
  color: #29163f;
}
.product {
  color: #e0cffb;
  font-weight: 500;
}
.page-heading {
  padding: 36px 0 20px;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  letter-spacing: -0.035em;
}
h2 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}
p {
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 22px;
  min-width: 0;
}
.summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
}
.metric strong {
  font-size: 1.9rem;
  line-height: 1.5;
}
.dashboard {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 2.2fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 28px;
}
.fields {
  display: grid;
  gap: 16px;
}
.fields label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}
.fields .check {
  display: flex;
  align-items: center;
  gap: 9px;
}
input:not([type="checkbox"]) {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #c9c1d7;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  min-width: 0;
  font-size: 1rem;
}
input[readonly] {
  background: #f5f3f8;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
button {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 43px;
  padding: 8px 15px;
  font-weight: 600;
  cursor: pointer;
}
.primary {
  color: #fff;
  background: var(--accent);
}
.primary:hover {
  background: var(--accent-dark);
}
.outline {
  background: transparent;
  border-color: var(--line);
  color: inherit;
}
.text-link {
  color: var(--accent-dark);
  font-weight: 650;
  text-underline-offset: 3px;
}
input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #9569e5;
  outline-offset: 3px;
}
.search {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
td,
th {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--muted);
  font-weight: 650;
  font-size: 0.875rem;
}
td {
  font-size: 0.9rem;
  white-space: nowrap;
}
td code {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}
.pill {
  display: inline-block;
  border-radius: 40px;
  padding: 4px 9px;
  background: #f0edf5;
}
.active,
.notice.success {
  color: #165e43;
  background: #e4f5ed;
}
.expired,
.notice.error {
  color: #8a3043;
  background: #fcebf0;
}
.empty {
  white-space: normal;
  color: var(--muted);
}
.notice {
  padding: 12px 15px;
  border-radius: 8px;
  margin: 0 0 16px;
}
.login-card {
  max-width: 420px;
  margin: 70px auto;
}
.login-card h1 {
  margin-bottom: 24px;
}
.login-card button {
  margin-top: 4px;
}
@media (max-width: 760px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  .shell {
    padding-inline: 16px;
  }
  .card {
    padding: 17px;
  }
  .page-heading {
    padding-top: 26px;
  }
}
@media (max-width: 360px) {
  .brand {
    gap: 7px;
  }
  .brand-icon {
    width: 28px;
    height: 28px;
  }
  .search {
    flex-wrap: wrap;
  }
}
