:root {
  --bg: #050814;
  --bg-2: #0a1020;
  --panel: rgba(11, 18, 38, 0.86);
  --panel-2: rgba(8, 12, 26, 0.9);
  --text: #edf7ff;
  --muted: #8ca0c2;
  --border: rgba(123, 164, 220, 0.18);
  --border-strong: rgba(81, 208, 255, 0.35);
  --accent: #51d0ff;
  --accent-2: #8a5cff;
  --accent-3: #65ffb8;
  --danger: #ff5f87;
  --ok: #65ffb8;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 18%, rgba(81, 208, 255, 0.12), transparent 30%),
    radial-gradient(circle at 84% 9%, rgba(138, 92, 255, 0.16), transparent 28%),
    radial-gradient(circle at 64% 78%, rgba(101, 255, 184, 0.08), transparent 24%),
    linear-gradient(150deg, var(--bg), var(--bg-2) 48%, #04060d 100%);
  position: relative;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  width: 38vw;
  height: 38vw;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(18px);
  opacity: 0.28;
  z-index: 0;
}

.ambient-a {
  top: -10vw;
  right: -8vw;
  background: radial-gradient(circle, rgba(81, 208, 255, 0.35), transparent 62%);
}

.ambient-b {
  left: -12vw;
  bottom: -12vw;
  background: radial-gradient(circle, rgba(138, 92, 255, 0.3), transparent 62%);
}

.container {
  position: relative;
  z-index: 1;
  width: min(1520px, calc(100% - 34px));
  margin: 24px auto 42px;
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.78fr);
  gap: 18px;
  margin-bottom: 18px;
}

.page-copy,
.header-panel,
.card,
.stat-card {
  backdrop-filter: blur(18px);
}

.page-copy {
  padding: 28px;
  border-radius: 28px;
  background:
    linear-gradient(140deg, rgba(13, 20, 42, 0.92), rgba(9, 15, 31, 0.75)),
    linear-gradient(90deg, rgba(81, 208, 255, 0.18), rgba(138, 92, 255, 0.15));
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.page-copy::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -52%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(81, 208, 255, 0.16), transparent 62%);
}

.page-copy h1,
.card h2,
.stat-card h3 {
  font-family: "Eurostile", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
}

.page-copy h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 0.95;
}

.page-copy p:last-of-type {
  max-width: 720px;
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow.tiny {
  margin-bottom: 8px;
  font-size: 11px;
}

.header-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.header-tag,
.auth-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(117, 221, 255, 0.22);
  background: rgba(9, 16, 34, 0.7);
  color: #dff7ff;
  font-size: 12px;
}

.header-panel {
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(14, 20, 42, 0.95), rgba(8, 12, 26, 0.86));
  border: 1px solid rgba(117, 221, 255, 0.16);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.header-panel::before,
.card::before,
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(81, 208, 255, 0), rgba(81, 208, 255, 0.88), rgba(138, 92, 255, 0));
}

.header-panel strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.header-panel p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.mini-label {
  color: #7ddfff;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(13, 20, 42, 0.95), rgba(8, 12, 26, 0.88));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.auth-card {
  background:
    radial-gradient(circle at top right, rgba(81, 208, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(13, 20, 42, 0.97), rgba(8, 12, 26, 0.9));
}

.card-top,
.auth-top,
.section-row,
.row.space-between {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.card-top {
  margin-bottom: 16px;
}

.card h2 {
  margin: 0;
  font-size: 25px;
}

.section-copy {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: right;
}

.section-copy-left {
  margin: -4px 0 16px;
  text-align: left;
  max-width: none;
}

.grid {
  display: grid;
  gap: 12px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.row {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.auth-row {
  margin-top: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
}

.grow {
  flex: 1;
}

.field span,
th {
  color: #dfedff;
  font-size: 13px;
}

input,
select,
textarea,
button {
  border-radius: 16px;
  border: 1px solid rgba(117, 221, 255, 0.14);
  background: rgba(8, 12, 26, 0.9);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

input,
select,
textarea {
  padding: 14px 15px;
  box-shadow: inset 0 0 0 1px rgba(8, 12, 26, 0.66), inset 0 10px 24px rgba(81, 208, 255, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(81, 208, 255, 0.64);
  box-shadow: 0 0 0 4px rgba(81, 208, 255, 0.1), inset 0 10px 24px rgba(81, 208, 255, 0.08);
  transform: translateY(-1px);
}

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

button {
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(81, 208, 255, 0.92), rgba(138, 92, 255, 0.92));
  color: #04111f;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(81, 208, 255, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(81, 208, 255, 0.26);
  filter: saturate(1.08);
}

button.secondary {
  background: linear-gradient(135deg, rgba(19, 33, 61, 0.95), rgba(33, 46, 82, 0.95));
  color: #dbeaff;
  box-shadow: none;
}

button.danger {
  background: linear-gradient(135deg, rgba(255, 95, 135, 0.96), rgba(255, 143, 102, 0.9));
  color: #210713;
}

button.ok {
  background: linear-gradient(135deg, rgba(101, 255, 184, 0.96), rgba(81, 208, 255, 0.9));
  color: #03150f;
}

.download-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(101, 255, 184, 0.24);
  background: linear-gradient(135deg, rgba(101, 255, 184, 0.18), rgba(81, 208, 255, 0.14));
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}

.status {
  min-height: 24px;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(101, 255, 184, 0.2);
  background: rgba(8, 18, 20, 0.68);
  color: #baffde;
  line-height: 1.5;
}

.status.error {
  color: #ffb6ca;
  border-color: rgba(255, 95, 135, 0.28);
  background: rgba(30, 10, 18, 0.78);
}

.stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(11, 18, 38, 0.96), rgba(8, 12, 28, 0.88));
  min-height: 144px;
}

.stat-card h3 {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.stat-card p {
  margin: 22px 0 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1;
  font-weight: 700;
}

.stat-card.cyan {
  box-shadow: inset 0 0 30px rgba(81, 208, 255, 0.06);
}

.stat-card.violet {
  box-shadow: inset 0 0 30px rgba(138, 92, 255, 0.08);
}

.stat-card.rose {
  box-shadow: inset 0 0 30px rgba(255, 95, 135, 0.08);
}

.stat-card.mint {
  box-shadow: inset 0 0 30px rgba(101, 255, 184, 0.08);
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(117, 221, 255, 0.1);
  border-radius: 18px;
  background: rgba(6, 10, 23, 0.64);
}

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

th,
td {
  border-bottom: 1px solid rgba(123, 164, 220, 0.12);
  text-align: left;
  padding: 10px 10px;
  font-size: 13px;
  vertical-align: top;
}

th {
  color: #9db5d8;
  font-weight: 600;
  background: rgba(11, 18, 38, 0.72);
  position: sticky;
  top: 0;
}

.mono-box {
  margin: 12px 0 0;
  background: rgba(7, 12, 24, 0.86);
  border: 1px solid rgba(117, 221, 255, 0.14);
  border-radius: 18px;
  padding: 12px;
  max-height: 280px;
  overflow: auto;
  font-size: 12px;
}

.actions-cell {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.actions-cell button {
  padding: 10px 12px;
  font-size: 12px;
}

.pill {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.pill.active {
  border-color: rgba(101, 255, 184, 0.4);
  color: #9ff6c8;
}

.pill.blocked {
  border-color: rgba(255, 95, 135, 0.42);
  color: #ffb3c8;
}

.pill.expired {
  border-color: rgba(255, 174, 102, 0.4);
  color: #ffd39d;
}

.admin-content[hidden] {
  display: none !important;
}

@media (max-width: 1160px) {
  .page-header,
  .stats-grid,
  .three,
  .four {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .container {
    width: min(100% - 18px, 1520px);
    margin-top: 14px;
  }

  .card,
  .page-copy,
  .header-panel,
  .stat-card {
    border-radius: 20px;
    padding: 18px;
  }

  .card-top,
  .auth-top,
  .section-row,
  .row.space-between {
    flex-direction: column;
    align-items: start;
  }

  .section-copy {
    text-align: left;
    max-width: none;
  }
}


.auth-card-standalone {
  max-width: 980px;
  margin: 72px auto 20px;
}

.auth-card-standalone .status {
  margin-top: 12px;
}

.minimal-auth-row {
  align-items: end;
}

@media (max-width: 860px) {
  .auth-card-standalone {
    margin-top: 18px;
  }
}
