* { box-sizing: border-box; }

:root {
  --bg: #0b0d12;
  --card: #171a21;
  --card-2: #1e222b;
  --border: #2a2f3b;
  --text: #eceef2;
  --hint: #8b91a0;
  --accent: #5b8def;
  --accent-2: #7aa2f7;
  --green: #3fb950;
  --red: #e5534b;
  --radius: 14px;
}

body {
  margin: 0;
  padding: 32px 16px;
  background: var(--bg);
  background-image: radial-gradient(ellipse 60% 40% at 20% 10%, rgba(91, 141, 239, 0.14), transparent 70%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: "Segoe UI", -apple-system, Roboto, Arial, sans-serif;
  line-height: 1.45;
}

.center-wrap {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

h1 {
  font-size: 21px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.hint {
  color: var(--hint);
  font-size: 13.5px;
  line-height: 1.5;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  color: #c7cad1;
  font-weight: 500;
}

input[type="text"],
input[type="password"] {
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0e1116;
  color: #fff;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.2);
}

input[type="file"] {
  color: var(--hint);
  font-size: 13.5px;
}

button {
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.05s ease;
}
button:hover { filter: brightness(1.08); }
button:active { transform: scale(0.98); }

.flash {
  margin-top: 14px;
  padding: 11px 13px;
  background: var(--card-2);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  font-size: 13.5px;
}
.flash p { margin: 4px 0; }

.banned-notice {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(229, 83, 75, 0.12);
  border: 1px solid rgba(229, 83, 75, 0.35);
  border-radius: 10px;
  font-size: 13.5px;
  color: #ffb4af;
}

/* ---- шапка/навигация ---- */
.topbar {
  max-width: 1040px;
  margin: 0 auto 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar h1 { margin: 0; }
.topbar nav {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13.5px;
}
.topbar .hint { margin: 0; }

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #9b6bf0);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

/* ---- галерея модерации ---- */
.grid {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: border-color 0.15s ease;
}
.item:hover { border-color: #3a4152; }

.item img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #0e1116;
  border-radius: 8px;
}

.item-who {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.item-who b { font-size: 14px; }

.actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.actions form { margin: 0; flex: 1; }
.actions button { width: 100%; padding: 10px; font-size: 13.5px; }
.actions .ok { background: var(--green); }
.actions .no { background: var(--red); }

/* ---- таблица аккаунтов ---- */
.users-table-wrap {
  max-width: 1040px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
table.users {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.users th,
table.users td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.users th {
  color: var(--hint);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.users tr:last-child td { border-bottom: none; }
table.users tr.is-banned { opacity: 0.55; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge.ok { background: rgba(63, 185, 80, 0.15); color: #6fd97e; }
.badge.banned { background: rgba(229, 83, 75, 0.15); color: #ff8b84; }

.btn-small {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 8px;
}
