:root {
  color-scheme: dark;

  --bg: #0b0d11;
  --panel: #12161d;
  --panel2: #171c24;
  --line: #252c37;
  --text: #eef2f7;
  --muted: #8f99a8;
  --accent: #8b7cff;
  --accent2: #b6adff;
  --good: #58d68d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;

  background:
    radial-gradient(
      circle at 70% 0%,
      rgba(139, 124, 255, .09),
      transparent 35rem
    ),
    var(--bg);

  color: var(--text);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;

  display: grid;
  grid-template-columns: 240px 1fr;
}

.sidebar {
  border-right: 1px solid var(--line);

  padding: 24px 18px;

  display: flex;
  flex-direction: column;

  background:
    rgba(10, 12, 16, .82);
}

.brand-row {
  display: flex;
  gap: 12px;
  align-items: center;

  margin-bottom: 34px;
}

.brand-mark {
  width: 64px;
  height: 64px;

  border-radius: 18px;

  display: grid;
  place-items: center;

  background:
    linear-gradient(
      145deg,
      #9f93ff,
      #6657e8
    );

  color: white;

  font-weight: 900;
  font-size: 30px;

  box-shadow:
    0 18px 50px
    rgba(102, 87, 232, .25);
}

.brand-mark.small {
  width: 38px;
  height: 38px;

  border-radius: 11px;

  font-size: 18px;
}

.eyebrow {
  font-size: 11px;

  letter-spacing: .18em;

  color: var(--muted);

  font-weight: 800;
}

nav {
  display: grid;
  gap: 6px;
}

nav a {
  padding: 11px 12px;

  border-radius: 10px;

  color: #aeb6c2;
}

nav a:hover,
nav a.active {
  background: var(--panel2);

  color: white;
}

.sidebar-bottom {
  margin-top: auto;

  border-top:
    1px solid var(--line);

  padding-top: 18px;

  display: grid;
  gap: 7px;
}

.sidebar-bottom a {
  font-size: 13px;

  color: var(--muted);
}

.main {
  padding: 34px;

  max-width: 1500px;
  width: 100%;

  margin: 0 auto;
}

.topbar {
  display: flex;

  justify-content: space-between;
  align-items: center;

  gap: 20px;
}

.topbar h1 {
  font-size: 32px;

  margin: 7px 0 0;
}

.topbar button,
.login-card button {
  background: var(--accent);

  color: #fff;

  border: 0;

  border-radius: 11px;

  padding: 12px 18px;

  font-weight: 800;
}

.topbar button:disabled {
  opacity: .5;
}

.hero {
  margin: 28px 0;

  padding: 22px 24px;

  border:
    1px solid var(--line);

  background:
    linear-gradient(
      135deg,
      rgba(139, 124, 255, .11),
      rgba(18, 22, 29, .8)
    );

  border-radius: 18px;
}

.hero p {
  color: var(--muted);

  margin: 9px 0 0;
}

.status-dot {
  display: inline-block;

  width: 9px;
  height: 9px;

  border-radius: 50%;

  background: var(--good);

  margin-right: 8px;

  box-shadow:
    0 0 16px
    var(--good);
}

.grid {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 18px;
}

.panel {
  border:
    1px solid var(--line);

  background:
    rgba(18, 22, 29, .87);

  border-radius: 18px;

  padding: 20px;
}

.panel-head {
  display: flex;

  justify-content: space-between;
  align-items: center;
}

.panel-head h2 {
  margin: 0;

  font-size: 18px;
}

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

.empty {
  padding: 34px 0 15px;

  color: var(--muted);
}

.empty strong {
  color: var(--text);
}

.empty p {
  margin-bottom: 0;
}

.row {
  display: flex;

  justify-content: space-between;

  border-top:
    1px solid var(--line);

  padding: 14px 0;
}

.row:first-of-type {
  margin-top: 16px;
}

.row small {
  display: block;

  color: var(--muted);

  margin-top: 3px;
}

.panel.compact {
  min-height: 150px;
}

.metric-label {
  color: var(--muted);
}

.metric {
  font-size: 42px;

  font-weight: 800;

  margin: 12px 0 4px;
}

.panel.compact p {
  color: var(--muted);

  margin: 0;
}

.login-page {
  min-height: 100vh;

  display: grid;
  place-items: center;

  padding: 24px;
}

.login-shell {
  width: min(430px, 100%);

  text-align: center;
}

.login-shell h1 {
  font-size: 48px;

  margin: 7px 0 4px;
}

.lead {
  color: var(--muted);

  margin: 0 0 28px;
}

.login-card {
  text-align: left;

  padding: 22px;

  border:
    1px solid var(--line);

  background:
    rgba(18, 22, 29, .9);

  border-radius: 18px;

  display: grid;
  gap: 16px;
}

.login-card label span {
  display: block;

  font-size: 13px;

  color: var(--muted);

  margin-bottom: 7px;
}

.login-card input {
  width: 100%;

  background: #0d1117;

  color: white;

  border:
    1px solid #303846;

  border-radius: 10px;

  padding: 12px;
}

.login-card input:focus {
  outline:
    2px solid
    rgba(139, 124, 255, .35);

  border-color: var(--accent);
}

.login-card button {
  width: 100%;

  cursor: pointer;

  margin-top: 2px;
}

.alert {
  background:
    rgba(255, 92, 92, .1);

  border:
    1px solid
    rgba(255, 92, 92, .25);

  color: #ffb3b3;

  padding: 12px;

  border-radius: 11px;

  margin-bottom: 14px;

  text-align: left;
}

.hint {
  color: var(--muted);

  font-size: 13px;

  margin-top: 16px;
}

.login-shell > .brand-mark {
  margin: 0 auto;
}

@media (max-width: 800px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 20px;
  }

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

  .topbar {
    align-items: flex-start;
  }
}

.twofa-heading {
  margin-bottom: 2px;
}

.twofa-heading strong {
  display: block;

  font-size: 17px;

  margin-bottom: 7px;
}

.twofa-heading p {
  margin: 0;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.5;
}

.login-card input.twofa-code {
  text-align: center;

  font-size: 26px;
  font-weight: 800;

  letter-spacing: .32em;

  padding-left: calc(12px + .32em);
}

.twofa-cancel-form {
  margin-top: 14px;
}

.link-button {
  appearance: none;

  border: 0;
  background: transparent;

  color: var(--muted);

  cursor: pointer;

  font-size: 13px;

  padding: 6px 10px;
}

.link-button:hover {
  color: var(--text);
}

.nav-section {
  margin: 18px 12px 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #697586;
}

.admin-nav-marker {
  color: #a9a0ff;
}

.language-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0d1117;
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
}

.login-language-row {
  width: min(430px, 100%);
  margin: 14px auto 0;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
}

.admin-grid {
  margin-top: 28px;
}
