:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background: #eef2f7;
  color: #152238;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, #dcecff 0, transparent 34%),
    #eef2f7;
}
button, input { font: inherit; }
button {
  border: 0;
  border-radius: 10px;
  padding: 11px 18px;
  background: #1d67d8;
  color: white;
  cursor: pointer;
  font-weight: 650;
}
button:hover { filter: brightness(.96); }
button:disabled { opacity: .55; cursor: wait; }
button.secondary { background: #e6edf7; color: #24405f; }
button.danger { background: #ffe7e7; color: #a42626; }
button.compact { padding: 7px 11px; border-radius: 8px; font-size: 13px; }
.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 40px auto;
}
.card {
  background: rgba(255, 255, 255, .94);
  border: 1px solid #dce4ef;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 16px 50px rgba(44, 67, 98, .08);
}
.login-card { width: min(430px, 100%); margin: 12vh auto 0; }
.brand {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #1d67d8, #734bd1);
  font-weight: 800;
  letter-spacing: .04em;
}
.brand.small {
  display: inline-grid;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  margin-right: 10px;
  font-size: 12px;
}
h1 { margin: 18px 0 6px; }
h2 { margin: 0 0 18px; font-size: 19px; }
.muted, .hint { color: #697a90; }
.hint { display: block; margin-top: 5px; font-size: 12px; }
form { display: grid; gap: 16px; margin-top: 22px; }
label {
  display: grid;
  gap: 7px;
  color: #34475f;
  font-size: 14px;
  font-weight: 600;
}
input {
  width: 100%;
  border: 1px solid #cdd8e6;
  background: white;
  border-radius: 10px;
  padding: 11px 12px;
  color: #152238;
  outline: none;
}
input:focus {
  border-color: #3979d7;
  box-shadow: 0 0 0 3px rgba(57, 121, 215, .14);
}
.error {
  min-height: 20px;
  margin: 12px 0 0;
  color: #b12727;
  font-size: 14px;
}
.hidden { display: none !important; }
.topbar, .list-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar { margin-bottom: 20px; }
.topbar > div { display: flex; align-items: center; font-size: 19px; }
.grid {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(360px, 1.2fr);
  gap: 20px;
}
.result-card { min-height: 280px; }
.codes { display: grid; gap: 10px; margin-top: 18px; }
.codes.empty { color: #8b98aa; padding: 30px 0; text-align: center; }
.code-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #f2f6fb;
}
.code-line code {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .035em;
  overflow-wrap: anywhere;
}
.list-card { margin-top: 20px; }
.list-title h2 { margin-bottom: 0; }
.table-wrap { margin-top: 18px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td {
  padding: 12px 10px;
  border-bottom: 1px solid #e7edf4;
  text-align: left;
  white-space: nowrap;
}
th { color: #687a90; font-weight: 650; }
td.status { font-weight: 650; }
td.status.revoked { color: #a42626; }
.empty-row { text-align: center; color: #8b98aa; padding: 32px; }
@media (max-width: 780px) {
  .shell { margin: 20px auto; }
  .grid { grid-template-columns: 1fr; }
  .card { padding: 18px; }
}
