@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@500;600&family=Outfit:wght@400;500;600&display=swap");

:root {
  --bg: #070907;
  --panel: #101610;
  --line: rgba(214, 255, 47, 0.22);
  --lime: #d6ff2f;
  --ink: #eef3e6;
  --muted: #a7b39a;
  --danger: #ffb4b4;
}

* { box-sizing: border-box; }
body.admin-body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(900px 420px at 0% 0%, rgba(214, 255, 47, 0.08), transparent 60%), var(--bg);
  color: var(--ink);
  font-family: Outfit, sans-serif;
}
a { color: var(--lime); }
h1, h2, .brand {
  font-family: Oswald, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
button, .button, input, textarea, select { font: inherit; }

.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  background: #050605;
  border-right: 1px solid var(--line);
}
.brand { color: #fff; text-decoration: none; font-size: 22px; line-height: 1; }
.brand span { color: var(--lime); }
.side-kicker { margin: 18px 8px 8px; color: var(--muted); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.side-nav { display: grid; gap: 4px; }
.side-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
}
.side-nav a:hover, .side-nav a.is-active { background: rgba(214, 255, 47, 0.12); color: var(--lime); }
.side-user { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); }
.side-user p { margin: 0 0 8px; font-weight: 600; }
.side-user button, .admin-main button, .admin-main .button {
  background: var(--lime);
  color: #071007;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.admin-content { min-width: 0; }
.admin-top { padding: 22px 28px 0; }
.admin-top h1 { margin: 0; font-size: 34px; }
.admin-main { width: min(1080px, calc(100% - 56px)); margin: 8px auto 48px; }
.lead { color: var(--muted); margin-top: 0; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
}
.card strong { display: block; font-family: Oswald, sans-serif; font-size: 36px; line-height: 1; }
.card span { color: var(--muted); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input, .split input, .admin-form input, .admin-form textarea, .admin-form select {
  background: #070907;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.toolbar input { min-width: min(320px, 100%); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid rgba(214, 255, 47, 0.12); vertical-align: middle; }
.admin-table th { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.admin-table tr:hover td { background: rgba(214, 255, 47, 0.04); }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.danger { background: transparent !important; color: var(--danger) !important; box-shadow: inset 0 0 0 1px var(--danger); }
.note, .empty { color: var(--muted); }
.alert { background: rgba(214, 255, 47, 0.12); border-radius: 12px; padding: 10px 12px; }
.alert.bad { background: rgba(255, 180, 180, 0.12); color: var(--danger); }
.admin-form { display: grid; gap: 12px; }
.admin-form label, .stack label { display: grid; gap: 6px; font-size: 14px; }
.admin-form label.check { display: flex; align-items: center; gap: 8px; }
.admin-form label.check input { width: auto; }
.admin-form input, .admin-form textarea, .admin-form select { width: 100%; min-width: 0; }
.admin-form textarea { min-height: 120px; }
.admin-form textarea.code { min-height: 420px; font-family: Consolas, monospace; font-size: 13px; }
.split { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 16px; align-items: start; }
.narrow { max-width: 520px; }
.login-wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.login-wrap .panel { width: min(420px, 100%); max-width: 100%; min-width: 0; }
.login-wrap h1 { margin: 0 0 8px; }
.login-wrap button {
  width: 100%;
  background: var(--lime);
  color: #071007;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}
.badge {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(214, 255, 47, 0.14);
  color: var(--lime);
  font-size: 12px;
}
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .side-nav { grid-template-columns: repeat(3, 1fr); }
  .side-user { margin-top: 16px; }
  .cards, .split { grid-template-columns: 1fr; }
  .admin-main:not(.login-wrap) { width: min(1080px, calc(100% - 28px)); }
  .admin-table { display: block; overflow-x: auto; }
}
