:root {
  color-scheme: dark;
  --bg: #080b0d;
  --panel: rgba(18, 25, 31, 0.88);
  --ink: #f4f8fb;
  --soft: #c4ced6;
  --muted: #83919d;
  --line: rgba(255, 255, 255, 0.12);
  --mint: #6cff9b;
  --accent: #5aa7f3;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(135deg, #050706 0%, var(--bg) 56%, #101820 100%);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.admin-topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(18px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgba(6, 9, 11, 0.78);
  backdrop-filter: blur(20px);
}

.brand {
  font-size: 24px;
  font-weight: 800;
}

.danger-action {
  color: #ffd9d9;
  border-color: rgba(255, 111, 111, 0.32);
  background: rgba(255, 111, 111, 0.1);
}

.preset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.preset-actions button {
  min-height: 34px;
  color: var(--soft);
  font-size: 12px;
}

.admin-topbar div {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.admin-layout {
  width: min(1440px, calc(100% - 36px));
  margin: 18px auto 28px;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 14px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.users-panel,
.detail-panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-head p {
  margin: 0 0 4px;
  color: var(--mint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-head h1,
h2 {
  margin: 0;
}

.panel-head h1 {
  font-size: 24px;
}

button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.user-list,
.record-list {
  display: grid;
  gap: 8px;
}

.user-button,
.record-item {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
}

.user-button.active {
  border-color: rgba(108, 255, 155, 0.5);
  color: var(--ink);
  background: rgba(108, 255, 155, 0.1);
}

.user-button strong,
.record-item strong {
  color: var(--ink);
}

.user-button span,
.record-item span {
  color: var(--muted);
  font-size: 12px;
}

.membership-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

label {
  display: grid;
  gap: 7px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

input,
select {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.membership-form button {
  align-self: end;
  color: #041009;
  background: linear-gradient(180deg, var(--mint), #54e98d);
}

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

.admin-columns h2 {
  margin-bottom: 10px;
  font-size: 16px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100% - 44px));
  border: 1px solid rgba(108, 255, 155, 0.34);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(12, 19, 15, 0.94);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  font-size: 13px;
  font-weight: 800;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .admin-layout,
  .admin-columns,
  .membership-form {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
