:root {
  --bg: #f5f7fc;
  --panel: #fff;
  --ink: #1b2846;
  --muted: #5d6a83;
  --line: #d6deed;
  --blue: #334eb8;
  --soft: #eaf0ff;
  color-scheme: light;
  font:
    15px/1.6 Inter,
    system-ui,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
a {
  color: var(--blue);
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
  border-radius: 10px;
  font-weight: 650;
  cursor: pointer;
}
.secondary {
  background: var(--soft);
  color: var(--ink);
  border-color: var(--line);
}
:focus-visible {
  outline: 3px solid #809ef6;
  outline-offset: 3px;
}
input,
select {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--ink);
}
label {
  display: block;
  font-weight: 600;
  margin: 14px 0;
}
form {
  margin: 0;
}
h1 {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -1px;
  margin: 0 0 16px;
}
h2 {
  font-size: 20px;
  line-height: 1.3;
  margin: 0 0 10px;
}
h3 {
  font-size: 17px;
}
p {
  margin: 0 0 14px;
}
.muted,
small {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 750;
  color: var(--muted);
  margin: 24px 0 14px;
}
.admin-shell {
  max-width: 1560px;
  margin: auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
aside nav {
  display: grid;
  gap: 7px;
}
nav a {
  padding: 12px 15px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
}
nav a.active {
  background: var(--soft);
  color: var(--blue);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 25px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -1px;
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}
.aside-bottom {
  margin-top: auto;
  display: grid;
  gap: 18px;
  padding-top: 40px;
}
main {
  padding: 34px 40px;
  min-width: 0;
}
header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 25px;
}
.admin-name {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 7px 15px;
  overflow-wrap: anywhere;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0;
}
.stats section,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}
.stats p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.stats strong {
  font-size: 32px;
  letter-spacing: -1px;
}
.panel {
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.user-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}
.user-heading p {
  margin-bottom: 5px;
}
.badge {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 12px;
}
.search {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 22px;
}
.search label {
  flex: 1;
  margin: 0;
}
.search button {
  margin-bottom: 0;
}
.notice,
.success {
  padding: 14px 18px;
  border-radius: 12px;
  background: #fff0d3;
  color: #654300;
  border: 1px solid #c99b51;
}
.success {
  background: #dcf6e7;
  color: #185139;
  border-color: #65a581;
}
summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--blue);
  padding: 10px 0;
  min-height: 44px;
}
details[open] > summary {
  margin-bottom: 14px;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
}
.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.bars > div {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 45px;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
}
.bars span {
  background: var(--blue);
  height: 15px;
  min-width: 2px;
  border-radius: 4px;
}
.bars b {
  text-align: right;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.7;
  background: var(--bg);
  padding: 12px;
  border-radius: 8px;
}
footer {
  font-size: 12px;
  color: var(--muted);
  margin-top: 36px;
}
.login-card {
  max-width: 480px;
  margin: 8vh auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px;
}
.login-card button {
  width: 100%;
}
.login-card h1 {
  font-size: 32px;
}
[data-theme='dark'] {
  --bg: #101827;
  --panel: #1b263b;
  --ink: #e6eaf5;
  --muted: #afbad0;
  --line: #425471;
  --blue: #a7baff;
  --soft: #2b3d62;
  color-scheme: dark;
}
[data-theme='dark'] button,
[data-theme='dark'] .button {
  background: #4058b9;
  color: white;
  border-color: #7c95ee;
}
[data-theme='dark'] .secondary {
  background: var(--soft);
  color: var(--ink);
}
@media (max-width: 1000px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-shell {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  main {
    padding: 26px;
  }
  .columns {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .admin-shell {
    display: block;
  }
  aside {
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  aside .eyebrow {
    display: none;
  }
  aside nav {
    display: flex;
    overflow: auto;
    gap: 6px;
  }
  nav a {
    white-space: nowrap;
    padding: 9px 12px;
  }
  .aside-bottom {
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
  }
  .aside-bottom small {
    display: none;
  }
  .aside-bottom a {
    font-size: 12px;
  }
  main {
    padding: 22px 16px;
  }
  h1 {
    font-size: 28px;
  }
  header {
    display: block;
  }
  .admin-name {
    display: inline-block;
    font-size: 12px;
  }
  .stats {
    gap: 10px;
  }
  .stats section,
  .panel {
    padding: 18px;
  }
  .stats strong {
    font-size: 27px;
  }
  .user-heading {
    flex-direction: column;
    gap: 12px;
  }
  .login-card {
    margin: 20px 14px;
    padding: 25px;
  }
  .pager {
    font-size: 12px;
  }
}

.delete-account {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 12px;
}
.delete-account > summary {
  color: #b42318;
}
.delete-account form {
  max-width: 520px;
}
button.danger {
  background: #b42318;
  color: #fff;
  border-color: #b42318;
}
[data-theme='dark'] .delete-account > summary {
  color: #ffb4ab;
}
[data-theme='dark'] button.danger {
  background: #a32323;
  color: #fff;
  border-color: #ffb4ab;
}

.verification-card .brand {
  margin-bottom: 20px;
}
.verification-card .verification-resend,
.verification-card .verification-guest {
  margin-top: 16px;
}
.verification-card .verification-timer {
  margin-top: 10px;
  font-size: 14px;
}
.verification-card button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.verification-card form + p {
  margin-top: 12px;
}

.stats .stat-link {
  display: block;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  color: var(--ink);
}
.stat-link > span {
  position: absolute;
  right: 18px;
  bottom: 20px;
  color: var(--blue);
}
.stat-link:hover,
.stat-link:focus-visible {
  border-color: var(--blue);
  background: var(--soft);
}
.user-filters {
  flex-wrap: wrap;
  gap: 12px;
}
.user-filters label {
  flex: 1 1 145px;
}
.user-filters label:first-of-type {
  flex: 2 1 230px;
}
.user-filters > a {
  padding: 12px 0;
}
.panel.user-compact {
  padding: 18px 20px;
  margin-bottom: 12px;
}
.user-compact h2 {
  font-size: 18px;
  margin-bottom: 4px;
}
.user-identity {
  min-width: 0;
  flex: 1;
}
.user-identity p {
  overflow-wrap: anywhere;
}
.user-controls {
  text-align: right;
  flex: 0 1 440px;
}
.user-controls > .muted {
  font-size: 13px;
  margin: 6px 0 10px;
}
.user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.user-actions button {
  padding: 8px 12px;
  min-height: 40px;
  font-size: 13px;
  margin: 0;
}
button.danger-outline {
  background: transparent;
  color: #b42318;
  border-color: #b42318;
}
[data-theme='dark'] button.danger-outline {
  background: transparent;
  color: #ffb4ab;
  border-color: #ba716a;
}
.admin-dialog {
  box-sizing: border-box;
  width: min(720px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 26px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.admin-dialog::backdrop {
  background: rgb(5 12 28 / 0.65);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.dialog-heading h2 {
  margin: 0;
}
.dialog-heading button {
  font-size: 24px;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  margin: 0;
}
.admin-dialog .delete-account {
  border: 0;
  padding: 0;
  margin: 0;
}
.admin-dialog .delete-account form {
  max-width: none;
}
.admin-dialog > p {
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .user-controls {
    flex: auto;
    align-self: stretch;
    text-align: left;
  }
  .user-actions {
    justify-content: flex-start;
  }
  .user-compact .user-heading {
    gap: 10px;
  }
  .panel.user-compact {
    padding: 16px;
  }
  .stats .stat-link {
    padding: 18px;
  }
  .admin-dialog {
    padding: 20px;
  }
  .user-filters label {
    flex: 1 1 130px;
  }
}

.verification-card p {
  overflow-wrap: anywhere;
}
