
:root {
  --admin-bg: #050505;
  --admin-panel: #0c0d11;
  --admin-panel-strong: #0f1016;
  --admin-border: #191a22;
  --admin-border-soft: #232431;
  --admin-text: #f5f5f7;
  --admin-text-soft: #b4b7c5;
  --admin-accent: #f97316;
  --admin-accent-strong: #fbbf24;
  --admin-accent-link: #fb923c;
  --admin-accent-rgb: 249, 115, 22;
  --admin-accent-soft: rgba(var(--admin-accent-rgb), 0.2);
  --admin-radius: 10px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 24% 12%, rgba(var(--admin-accent-rgb), 0.08), transparent 30%),
    radial-gradient(circle at top, #0f0f12 0, #050505 46%);
  color: var(--admin-text);
  min-height: 100vh;
}

a { color: var(--admin-accent-link); text-decoration: none; }
a:hover { text-decoration: underline; }

.auth-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100svh;
  overflow: hidden;
  position: relative;
  padding: 32px 16px 24px;
  gap: 0;
}

.auth-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.login-card {
  background: var(--admin-panel);
  border-radius: 12px;
  padding: 24px 28px;
  border: 1px solid var(--admin-border);
  box-shadow: 0 18px 45px rgba(0,0,0,0.7);
  max-width: 360px;
  width: 100%;
  text-align: center;
}

.auth-actions {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 12px;
  border: 1px solid #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.status-badge--error {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.45);
  color: #fecdd3;
  box-shadow: 0 8px 30px rgba(220, 38, 38, 0.2);
}

.status-badge--warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fcd34d;
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.15);
}

.login-card h1 {
  margin-top: 0;
  margin-bottom: 8px;
}

.auth-footer {
  position: static;
  color: var(--admin-text-soft);
  font-size: 12px;
  text-align: center;
  width: 100%;
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 600;
  border: 1px solid var(--admin-accent-link);
  background: linear-gradient(135deg, var(--admin-accent-strong), var(--admin-accent));
  color: #0b0b0f;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.12s ease;
}

button:hover,
.btn:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.btn-secondary {
  background: #0f0f14;
  border-color: var(--admin-border);
  color: var(--admin-text);
}

.btn-secondary:hover {
  background: #13131b;
}

.btn-discord {
  background: linear-gradient(135deg, var(--admin-accent-strong), var(--admin-accent));
  border-color: var(--admin-accent-link);
  color: #0b0b0f;
  margin-top: 12px;
}

.btn-discord:hover {
  filter: brightness(1.08);
}

.admin-layout {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(145deg, rgba(12, 13, 17, 0.94), rgba(5, 5, 5, 0.96));
}

.admin-sidebar {
  width: 220px;
  background: radial-gradient(circle at 10% 20%, rgba(var(--admin-accent-rgb), 0.12), transparent 32%),
    linear-gradient(180deg, #0d0f15, #08090d);
  border-right: 1px solid var(--admin-border);
  padding: 18px 16px 24px;
  box-shadow: 6px 0 24px rgba(0, 0, 0, 0.35);
}

.admin-sidebar h2 {
  font-size: 18px;
  margin-top: 0;
  color: var(--admin-text);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-nav__separator {
  height: 1px;
  background: var(--admin-border);
  margin: 4px 6px;
  border-radius: 999px;
}

.admin-sidebar nav a {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 12px;
  color: var(--admin-text-soft);
  border: 1px solid transparent;
  background: linear-gradient(180deg, rgba(24, 24, 28, 0.45), rgba(10, 10, 12, 0.7));
  box-shadow: inset 0 0 0 1px rgba(25, 26, 34, 0.65);
  transition: border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.admin-sidebar nav a:hover {
  border-color: var(--admin-border-soft);
  color: var(--admin-text);
  transform: translateX(2px);
}

.admin-sidebar nav a.active {
  background: linear-gradient(135deg, rgba(var(--admin-accent-rgb), 0.16), rgba(var(--admin-accent-rgb), 0.06));
  color: var(--admin-text);
  font-weight: 700;
  border-color: var(--admin-accent-soft);
  box-shadow: 0 10px 24px rgba(var(--admin-accent-rgb), 0.12), inset 0 0 0 1px rgba(var(--admin-accent-rgb), 0.18);
}

.admin-sidebar nav a.admin-nav__logout {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
}

.admin-sidebar nav a.admin-nav__logout:hover {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.6);
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.2);
}

.admin-user {
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--admin-border);
  margin-bottom: 12px;
}

.admin-user__info {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 14px;
}

.admin-user__username {
  color: var(--admin-text-soft);
}

.admin-user__edit {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
}

.admin-main {
  flex: 1;
  padding: 18px 22px;
  background: linear-gradient(180deg, rgba(12, 12, 14, 0.95), rgba(6, 6, 8, 0.98));
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}

th, td {
  border: 1px solid var(--admin-border);
  padding: 6px 8px;
}

th {
  background: #0f1016;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
select {
  background: linear-gradient(180deg, #16161f, #0f0f14);
  border: 1px solid #34343f;
  border-radius: var(--admin-radius);
  padding: 9px 11px;
  color: var(--admin-text);
  box-shadow: 0 0 0 1px rgba(52, 52, 63, 0.55);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
select:focus {
  outline: none;
  border-color: var(--admin-accent-link);
  box-shadow: 0 0 0 2px rgba(var(--admin-accent-rgb), 0.28);
}

select option {
  background: #0f0f14;
  color: var(--admin-text);
}

textarea {
  background: linear-gradient(180deg, #16161f, #0f0f14);
  border: 1px solid #34343f;
  border-radius: var(--admin-radius);
  padding: 10px 12px;
  color: var(--admin-text);
  font-family: inherit;
  resize: vertical;
  box-shadow: 0 0 0 1px rgba(52, 52, 63, 0.55);
}

textarea:focus {
  outline: none;
  border-color: var(--admin-accent-link);
  box-shadow: 0 0 0 2px rgba(var(--admin-accent-rgb), 0.28);
}

.form-row {
  margin-bottom: 10px;
}

.user-action-form { display: none; }

.user-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 14px;
}

.user-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #cbd5e1;
}

.user-filter-field input[type="text"] {
  min-width: 260px;
}

.user-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn.btn-reset {
  background: #0f172a;
  color: #e5e7eb;
  border: 1px solid #1f2937;
}

.user-action-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  max-width: 460px;
}

.user-action-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #cbd5e1;
}

.user-action-field input[type="text"] {
  width: 100%;
  min-width: 260px;
}

.user-note-field textarea {
  width: 100%;
  min-width: 260px;
  height: 34px;
}

.user-display-cell input[type="text"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.user-flag-cell {
  white-space: nowrap;
}

.user-note-cell textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 40px;
  box-sizing: border-box;
}

.user-action-status {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #9ca3af;
}

.user-action-status[data-state="pending"] { color: var(--admin-accent-strong); }
.user-action-status[data-state="success"] { color: #34d399; }
.user-action-status[data-state="error"] { color: #f87171; }

.user-action-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.inline-status {
  font-size: 12px;
  color: #6b7280;
  margin-left: 8px;
}

.settings-card {
  background: linear-gradient(180deg, rgba(18, 18, 22, 0.94), rgba(12, 12, 16, 0.98));
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius);
  padding: 16px;
  margin-bottom: 16px;
}

.settings-card__header {
  margin-bottom: 12px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.settings-grid--full {
  grid-template-columns: 1fr;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.settings-field small {
  color: #94a3b8;
}

.muted {
  color: #94a3b8;
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.settings-actions__spacer {
  flex: 1;
}

.banner {
  border-radius: 10px;
  padding: 10px 12px;
  margin: 10px 0 16px;
  font-weight: 600;
}

.tuning-visibility {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tuning-visibility__group {
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 12px;
  background:
    radial-gradient(circle at 12% 18%, rgba(59, 130, 246, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(18, 18, 22, 0.96), rgba(10, 10, 12, 0.98));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.tuning-visibility__group-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.tuning-visibility__list {
  display: flex;
  flex-direction: column;
}

.tuning-visibility__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tuning-visibility__item:last-child {
  border-bottom: none;
}

.tuning-visibility__item-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tuning-visibility__label {
  font-weight: 600;
}

.tuning-visibility__meta {
  color: #94a3b8;
  font-size: 12px;
}

.tuning-visibility__toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
.community-links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-column: 1 / -1;
}

.community-link-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  background:
    radial-gradient(circle at 10% 14%, rgba(var(--admin-accent-rgb), 0.05), transparent 30%),
    linear-gradient(180deg, rgba(18, 18, 22, 0.94), rgba(10, 10, 12, 0.98));
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

.community-link-row__actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.banner--success {
  background: #0d3923;
  color: #86efac;
  border: 1px solid #14532d;
}

.banner--error {
  background: #3b0c17;
  color: #fecdd3;
  border: 1px solid #881337;
}

.table-action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.inline-status[data-state="success"] {
  color: #059669;
}

.inline-status[data-state="error"] {
  color: #dc2626;
}

.table-hint {
  font-size: 13px;
  color: #9ca3af;
  margin: 6px 0 12px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 999px;
  font-size: 12px;
  color: #e5e7eb;
}

.admin-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
}

.admin-search-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-search-form input[type="text"] {
  min-width: 220px;
}

.admin-form-card {
  background:
    radial-gradient(circle at 12% 10%, rgba(var(--admin-accent-rgb), 0.06), transparent 34%),
    linear-gradient(180deg, rgba(16, 16, 20, 0.96), rgba(8, 8, 12, 0.98));
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 12px 0 18px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.admin-changelog-card h2 {
  margin-top: 0;
}

.admin-changelog {
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--admin-border-soft);
  background: rgba(12, 13, 18, 0.8);
  color: var(--admin-text-soft);
  line-height: 1.5;
}

.admin-changelog__date {
  margin: 14px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--admin-border-soft);
  font-weight: 700;
  color: var(--admin-text);
}

.admin-changelog__line + .admin-changelog__line {
  margin-top: 4px;
}

.admin-changelog__date + .admin-changelog__line {
  margin-top: 10px;
}

.admin-form-card input[type="text"],
.admin-form-card input[type="number"],
.admin-form-card input[type="email"],
.admin-form-card input[type="date"],
.admin-form-card select {
  background: linear-gradient(180deg, #16161f, #0f0f14);
  border-color: var(--admin-border-soft);
  color: var(--admin-text);
  width: 100%;
  box-shadow: 0 0 0 1px rgba(52, 52, 63, 0.55);
}

.admin-form-card textarea {
  background: linear-gradient(180deg, #16161f, #0f0f14);
  border-color: var(--admin-border-soft);
  color: var(--admin-text);
  width: 100%;
  box-shadow: 0 0 0 1px rgba(52, 52, 63, 0.55);
}

.admin-form-card label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.form-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.form-field + .form-field {
  margin-top: 12px;
}

.form-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.alert {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  margin: 8px 0;
}

.alert.success { background: rgba(34,197,94,0.1); border:1px solid rgba(34,197,94,0.3); color:#bbf7d0; }
.alert.error { background: rgba(220,38,38,0.08); border:1px solid rgba(220,38,38,0.3); color:#fecdd3; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #111827;
  color: #e5e7eb;
  border: 1px solid #1f2937;
  font-size: 13px;
  text-decoration: none;
}

.pill-red { background: rgba(220,38,38,0.15); color: #fecdd3; border-color: rgba(220,38,38,0.4); }
.pill-active {
  border-color: var(--admin-accent-soft);
  background: rgba(var(--admin-accent-rgb), 0.12);
  color: var(--admin-text);
  box-shadow: 0 10px 24px rgba(var(--admin-accent-rgb), 0.12);
}

.table-subtext { font-size: 12px; color: #94a3b8; margin-top: 2px; }

.table-wrapper { overflow-x: auto; margin-top: 12px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 12px 0 18px;
}

.stat-card {
  background:
    radial-gradient(circle at 18% 18%, rgba(var(--admin-accent-rgb), 0.06), transparent 36%),
    linear-gradient(180deg, rgba(18, 18, 22, 0.96), rgba(10, 10, 12, 0.98));
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.stat-label { color: #9ca3af; font-size: 13px; margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 700; color: #e5e7eb; }

.admin-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.page-kicker { text-transform: uppercase; letter-spacing: 1px; font-size: 12px; color: #94a3b8; }

.pill-filter { display: inline-flex; gap: 8px; }

.ban-list { display: grid; gap: 12px; margin-top: 14px; }

.ban-card {
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 12px 14px;
  background:
    radial-gradient(circle at 16% 12%, rgba(var(--admin-accent-rgb), 0.05), transparent 32%),
    linear-gradient(180deg, rgba(18, 18, 22, 0.95), rgba(10, 10, 12, 0.98));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
}

.ban-card__header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.ban-name { font-weight: 700; font-size: 16px; }
.ban-meta { color: #94a3b8; font-size: 13px; }
.ban-card__body { display:grid; gap:6px; margin:8px 0; }
.ban-detail { display:flex; gap:6px; color:#cbd5e1; }
.ban-detail strong { color:#e5e7eb; }
.ban-actions { margin-top: 8px; }
