/* ── Abel Design Tokens ── */
:root {
  --accent: #DECCAA;
  --accent-rgb: 222, 204, 170;
  --ink: #FFFDF7;
  --text: rgba(238, 233, 222, 0.92);
  --text-dim: rgba(210, 199, 179, 0.65);
  --text-faint: rgba(210, 199, 179, 0.38);
  --window: #262421;
  --card: rgba(16, 16, 16, 0.36);
  --card-border: rgba(222, 204, 170, 0.1);
  --card-border-hover: rgba(222, 204, 170, 0.24);
  --field: rgba(255, 255, 255, 0.047);
  --danger: #FF968C;
  --warn: #FFB260;
  --good: #78D6A8;
  --r-card: 10px;
  --r-btn: 8px;
  --r-field: 6px;
  --island-h: 48px;
  --gap: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--window);
  color: var(--text);
  font: 700 13px/1.5 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

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

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(222, 204, 170, 0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(222, 204, 170, 0.25); }

/* ── Nav / Island Bar ── */
.abel-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--island-h);
  overflow: hidden;
}

.nav-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.nav-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--ink);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

.brand .sc { display: inline-block; }
.brand .sc-noise { color: var(--ink); }
.brand .sc-leet { color: rgba(222, 204, 170, 0.85); }

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-user {
  color: rgba(255, 253, 247, 0.65);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font-size: 12px;
}

.nav-link {
  color: rgba(255, 253, 247, 0.6);
  transition: color 0.15s;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.nav-link:hover { color: var(--ink); }

.nav-btn {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--r-field);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 253, 247, 0.15);
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.nav-btn:hover { background: rgba(0, 0, 0, 0.5); border-color: rgba(255, 253, 247, 0.3); }
.nav-btn.accent { border-color: rgba(222, 204, 170, 0.4); color: var(--accent); }
.nav-btn.accent:hover { border-color: rgba(222, 204, 170, 0.7); }
.nav-btn.danger { border-color: rgba(255, 150, 140, 0.4); color: var(--danger); }
.nav-btn.danger:hover { border-color: rgba(255, 150, 140, 0.7); }

/* ── Layout ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px;
}

.page-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
}

.section {
  margin-bottom: 40px;
}

/* ── Cards (titled border) ── */
.abel-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r-card);
  padding: 22px 18px 18px;
  transition: border-color 0.2s;
}
.abel-card:hover {
  border-color: var(--card-border-hover);
}

.abel-card[data-title]::before {
  content: attr(data-title);
  position: absolute;
  top: 0;
  left: 14px;
  transform: translateY(-50%);
  padding: 0 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: var(--window);
  transition: color 0.2s;
}
.abel-card:hover[data-title]::before {
  color: rgba(222, 204, 170, 0.85);
}

.abel-card + .abel-card { margin-top: 20px; }

/* ── Info Grid (account details) ── */
.info-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 14px;
}
.info-label { color: var(--text-dim); }
.info-value { color: var(--text); }

/* ── Buttons ── */
.abel-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border: none;
  border-radius: var(--r-btn);
  color: var(--ink);
  font: 700 13px/1 'Inter', system-ui, sans-serif;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  background: linear-gradient(90deg, hsl(37,40%,34%), hsl(35,45%,40%), hsl(39,42%,37%), hsl(37,48%,42%), hsl(37,40%,34%));
  background-size: 200% 100%;
  animation: cta-flow 6s linear infinite;
  transition: filter 0.15s, transform 0.1s;
}
.abel-cta:hover { filter: brightness(1.15); }
.abel-cta:active { filter: brightness(0.95); transform: translateY(1px); }
.abel-cta:disabled { opacity: 0.4; cursor: not-allowed; filter: none; }
.abel-cta.full { width: 100%; }

@keyframes cta-flow {
  from { background-position: 0% 50%; }
  to { background-position: -200% 50%; }
}

.abel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border-radius: var(--r-btn);
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-dim);
  font: 700 12px/1 'Inter', system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.abel-btn:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--card-border-hover); color: var(--text); }
.abel-btn.ban { border-color: rgba(255, 150, 140, 0.4); color: var(--danger); }
.abel-btn.ban:hover { background: rgba(255, 150, 140, 0.12); border-color: rgba(255, 150, 140, 0.6); }

.abel-btn-sm {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-field);
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text-dim);
  font: 700 11px/1 'Inter', system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  margin-right: 4px;
}
.abel-btn-sm:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.abel-btn-sm.ban { border-color: rgba(255, 150, 140, 0.35); color: var(--danger); }
.abel-btn-sm.ban:hover { background: rgba(255, 150, 140, 0.1); border-color: rgba(255, 150, 140, 0.6); }
.abel-btn-sm.unban { border-color: rgba(120, 214, 168, 0.35); color: var(--good); }
.abel-btn-sm.unban:hover { background: rgba(120, 214, 168, 0.1); border-color: rgba(120, 214, 168, 0.6); }
.abel-btn-sm.accent { border-color: rgba(222, 204, 170, 0.25); color: var(--accent); }
.abel-btn-sm.accent:hover { background: rgba(222, 204, 170, 0.08); border-color: rgba(222, 204, 170, 0.5); }
.abel-btn-sm.kick { border-color: rgba(210, 199, 179, 0.2); color: var(--text-dim); }
.abel-btn-sm.kick:hover { border-color: rgba(255, 150, 140, 0.5); color: var(--danger); background: rgba(255, 150, 140, 0.08); }

/* ── Form Fields ── */
.abel-field {
  width: 100%;
  padding: 9px 14px;
  background: var(--field);
  border: 1px solid var(--card-border);
  border-radius: var(--r-field);
  color: var(--text);
  font: 700 13px/1.4 'Inter', system-ui, sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.abel-field:focus { border-color: rgba(222, 204, 170, 0.45); }
.abel-field::placeholder { color: var(--text-faint); font-weight: 400; }

.form-group { margin-bottom: 14px; }

/* ── Tables ── */
.table-scroll {
  max-height: 500px;
  overflow-y: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 8px 14px;
  color: var(--text-faint);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(222, 204, 170, 0.08);
  white-space: nowrap;
}

td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-weight: 400;
  font-size: 13px;
}

tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

.empty-row td {
  color: var(--text-faint);
  text-align: center;
  padding: 28px 14px;
  font-weight: 400;
}
.empty-row:hover td { background: transparent; }

.hwid-cell {
  font-size: 11px;
  color: var(--text-faint);
  font-family: 'JetBrains Mono', 'Cascadia Code', monospace;
  font-weight: 400;
}

.actions-cell { white-space: nowrap; }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-field);
  font-size: 11px;
  font-weight: 700;
}
.badge-active { background: rgba(120, 214, 168, 0.12); color: var(--good); }
.badge-expired { background: rgba(255, 150, 140, 0.12); color: var(--danger); }
.badge-admin { background: rgba(222, 204, 170, 0.1); color: var(--accent); margin-left: 6px; }
.badge-banned { background: rgba(255, 150, 140, 0.12); color: var(--danger); }

/* ── Product Group ── */
.product-group { margin-bottom: 20px; }
.product-group-title {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 0;
  color: var(--text-dim);
  margin-bottom: 6px;
}

/* ── Search ── */
.search-wrap { margin-bottom: 14px; }

/* ── Login ── */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--island-h) - 40px);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 360px;
}

.login-card .login-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  text-align: center;
}

.error-msg {
  color: var(--danger);
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 400;
  display: none;
  text-align: center;
}
.error-msg.visible { display: block; }

/* ── Levels canvas (indeterminate wait) ── */
.levels-canvas {
  display: block;
  width: 100%;
  height: 16px;
}

/* ── Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: rgba(28, 27, 25, 0.95);
  border: 1px solid var(--card-border-hover);
  border-radius: var(--r-card);
  padding: 24px 28px;
  width: 100%;
  max-width: 380px;
}
.modal-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}
.modal-body {
  margin-bottom: 18px;
  color: var(--text-dim);
  font-weight: 400;
}
.modal-body p { margin: 0; }
.modal-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--field);
  border: 1px solid var(--card-border);
  border-radius: var(--r-field);
  color: var(--text);
  font: 700 13px/1.4 'Inter', system-ui, sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.modal-input:focus { border-color: rgba(222, 204, 170, 0.45); }
.modal-input::placeholder { color: var(--text-faint); font-weight: 400; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  padding: 8px 20px;
  border-radius: var(--r-btn);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
}
.toast-show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.toast-ok { background: rgba(120, 214, 168, 0.15); color: var(--good); border: 1px solid rgba(120, 214, 168, 0.25); }
.toast-err { background: rgba(255, 150, 140, 0.15); color: var(--danger); border: 1px solid rgba(255, 150, 140, 0.25); }

/* ── Footer ── */
.abel-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 400;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .container { padding: 24px 14px; }
  .info-grid { grid-template-columns: 1fr; }
  table { font-size: 12px; }
  th, td { padding: 7px 10px; }
  .modal { margin: 14px; }
  .nav-inner { padding: 0 14px; gap: 12px; }
  .brand { font-size: 16px; }
}
