:root {
  --bg: #000;
  --bg2: #0b0b0f;
  --card: rgba(28,28,30,.82);
  --card2: rgba(44,44,46,.88);
  --border: rgba(255,255,255,.10);
  --text: #f5f5f7;
  --muted: #a1a1aa;
  --blue: #0a84ff;
  --green: #30d158;
  --yellow: #ffd60a;
  --red: #ff453a;
  --radius: 24px;
  --shadow: 0 18px 60px rgba(0,0,0,.55);
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(10,132,255,.22), transparent 34%),
    radial-gradient(circle at bottom right, rgba(48,209,88,.10), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Arial, sans-serif;
}

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

.page {
  width: min(1280px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 42px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  margin-bottom: 22px;
  background: rgba(28,28,30,.78);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.logo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.03));
  border: 1px solid var(--border);
  font-weight: 900;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.03em;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.nav a {
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--text);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.nav a:hover,
.nav a.active {
  background: rgba(10,132,255,.28);
  border-color: rgba(10,132,255,.45);
}

.nav a.danger {
  background: rgba(255,69,58,.15);
  border-color: rgba(255,69,58,.24);
}

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

.card {
  grid-column: span 12;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.card h2,
.card h3 {
  margin: 0 0 12px;
  letter-spacing: -.03em;
}

.stat {
  grid-column: span 3;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat .num {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -.06em;
}

.stat .label {
  color: var(--muted);
  font-size: 13px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.btn,
button,
input[type=submit] {
  appearance: none;
  border: 0;
  cursor: pointer;
  color: white;
  background: linear-gradient(180deg, #0a84ff, #0066d6);
  padding: 11px 14px;
  border-radius: 15px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn.secondary {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.12);
}

.btn.green { background: linear-gradient(180deg, #30d158, #169a39); }
.btn.red { background: linear-gradient(180deg, #ff453a, #c92b22); }
.btn.yellow { background: linear-gradient(180deg, #ffd60a, #d6a800); color: #111; }

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
}

th, td {
  padding: 12px 11px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: rgba(255,255,255,.05);
}

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

.badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(10,132,255,.18);
  border: 1px solid rgba(10,132,255,.30);
  font-size: 12px;
  font-weight: 800;
}

.badge.green {
  background: rgba(48,209,88,.16);
  border-color: rgba(48,209,88,.28);
}

.badge.red {
  background: rgba(255,69,58,.16);
  border-color: rgba(255,69,58,.28);
}

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

.field {
  grid-column: span 6;
}

.field.full {
  grid-column: span 12;
}

label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  background: rgba(255,255,255,.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 12px;
  outline: none;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.login-card {
  width: min(420px, 100%);
  background: rgba(28,28,30,.78);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 30px;
  padding: 24px;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
}

.login-card .logo {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  margin: 0 auto 14px;
  font-size: 28px;
}

.login-card h1,
.login-card p {
  text-align: center;
}

.login-card h1 {
  margin: 0;
  letter-spacing: -.05em;
}

.login-card p {
  color: var(--muted);
  margin: 8px 0 22px;
}

.alert {
  padding: 12px 14px;
  background: rgba(255,214,10,.12);
  border: 1px solid rgba(255,214,10,.28);
  border-radius: 16px;
  margin-bottom: 14px;
}

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

.copybox {
  width: 100%;
  min-height: 210px;
  font-size: 15px;
  line-height: 1.5;
}

@media (max-width: 920px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
  }

  .stat {
    grid-column: span 6;
  }

  .field {
    grid-column: span 12;
  }
}

@media (max-width: 560px) {
  .stat {
    grid-column: span 12;
  }
}
