:root {
  --bg: #0b1220;
  --bg2: #0e1a33;
  --card: rgba(255, 255, 255, 0.06);
  --card2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.7);
  --muted2: rgba(255, 255, 255, 0.52);
  --brand: #7c5cff;
  --brand2: #18d5ff;
  --ok: #2ee59d;
  --warn: #ffbd2e;
  --danger: #ff4d6d;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --radius-sm: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Ubuntu,
    Cantarell,
    Noto Sans,
    Helvetica,
    Arial;
  line-height: 1.45;
  color: var(--text);
}

.bg {
  background: radial-gradient(1200px 700px at 20% 10%, rgba(124, 92, 255, 0.28), transparent 60%),
    radial-gradient(1000px 700px at 85% 0%, rgba(24, 213, 255, 0.18), transparent 55%),
    linear-gradient(180deg, var(--bg), #070b15 70%);
  min-height: 100dvh;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(11, 18, 32, 0.78);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  max-width: 1160px;
  padding: 14px 18px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__brand {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.9), rgba(24, 213, 255, 0.7));
  box-shadow: 0 10px 25px rgba(124, 92, 255, 0.18);
}

.topbar__title {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__user {
  color: var(--muted);
  font-weight: 600;
}

.layout {
  max-width: 1160px;
  margin: 0 auto;
  padding: 18px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  align-items: start;
}

.sidebar {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  padding: 12px;
  position: sticky;
  top: 86px;
}

.navlink {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 700;
  border: 1px solid transparent;
}

.navlink:hover,
.navlink:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.navlink--active {
  color: rgba(255, 255, 255, 0.94);
  background: rgba(124, 92, 255, 0.14);
  border-color: rgba(124, 92, 255, 0.2);
}

.content {
  min-width: 0;
}

.h1 {
  margin: 0 0 8px;
  letter-spacing: -0.4px;
}

.h2 {
  margin: 0;
  font-weight: 800;
}

.muted {
  color: var(--muted);
  margin: 0 0 14px;
}

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

.row--space {
  justify-content: space-between;
}

.card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.card--flat {
  box-shadow: none;
  background: rgba(255, 255, 255, 0.03);
}

.card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(124, 92, 255, 0.35);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.9), rgba(24, 213, 255, 0.65));
  color: rgba(255, 255, 255, 0.98);
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid rgba(24, 213, 255, 0.55);
  outline-offset: 2px;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
}

.btn--small {
  padding: 10px 12px;
  border-radius: 12px;
}

.form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.form--row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
}

.field__label {
  font-size: 12px;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 800;
}

.field__control {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  outline: none;
}

.field__control::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.field__control:focus {
  border-color: rgba(24, 213, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(24, 213, 255, 0.12);
}

.alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  margin: 12px 0;
}

.alert--ok {
  border-color: rgba(46, 229, 157, 0.25);
  background: rgba(46, 229, 157, 0.08);
}

.alert--error {
  border-color: rgba(255, 77, 109, 0.25);
  background: rgba(255, 77, 109, 0.08);
}

.table-wrap {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.table th {
  text-align: left;
  font-size: 12px;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.td-actions {
  white-space: nowrap;
}

.inline {
  display: inline;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
  font-size: 12px;
}

.pill--ok {
  border-color: rgba(46, 229, 157, 0.25);
  background: rgba(46, 229, 157, 0.08);
}

.pill--warn {
  border-color: rgba(255, 189, 46, 0.25);
  background: rgba(255, 189, 46, 0.08);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
}

.stat__k {
  font-size: 12px;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 900;
}

.stat__v {
  font-size: 26px;
  font-weight: 900;
  margin-top: 6px;
  letter-spacing: -0.4px;
}

.stat__hint {
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
}

.auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 22px;
}

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

.brand__logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.9), rgba(24, 213, 255, 0.7));
}

.brand__name {
  font-weight: 800;
  color: rgba(255, 255, 255, 0.88);
}

.footnote {
  margin-top: 14px;
  color: var(--muted2);
  font-size: 13px;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form--row {
    grid-template-columns: 1fr;
  }
}

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

