

/* ==========================================================================
   License Panel — Global Stylesheet
   Design language: "control rail" — a dark ops console for keys, hardware
   IDs, and status states. Monospace carries anything a machine reads
   (keys, HWIDs, Discord IDs); a technical sans carries anything a human
   reads (labels, copy, nav).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ---- Palette ---- */
  --bg:            #0A0D14;
  --bg-raised:     #10141D;
  --surface:       #141924;
  --surface-hover: #1A2030;
  --border:        #232A3B;
  --border-soft:   #1A2030;

  --text:          #E8EAF2;
  --text-muted:    #8890A4;
  --text-faint:    #565E72;

  --accent:        #7C6CF0;   /* signature indigo */
  --accent-soft:   rgba(124, 108, 240, 0.14);
  --accent-strong: #9C8FFF;

  --data:          #4CC9F0;   /* cyan, used only for machine-readable strings */

  --success:       #35D28A;
  --success-soft:  rgba(53, 210, 138, 0.12);
  --danger:        #F0576B;
  --danger-soft:   rgba(240, 87, 107, 0.12);
  --warning:       #F0B429;
  --warning-soft:  rgba(240, 180, 41, 0.12);
  --info:          #4CC9F0;
  --info-soft:     rgba(76, 201, 240, 0.12);

  /* ---- Type ---- */
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  /* ---- Layout ---- */
  --sidebar-w: 232px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.02) inset, 0 8px 24px rgba(0,0,0,0.35);
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  color-scheme: dark;
}
body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1200px 600px at 100% -10%, rgba(124,108,240,0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(76,201,240,0.05), transparent 60%);
  background-attachment: fixed;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px 0;
  letter-spacing: -0.01em;
}
h1 { font-size: 22px; }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; margin-bottom: 14px; }

a { color: var(--accent-strong); text-decoration: none; }

code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--data);
  background: rgba(76, 201, 240, 0.08);
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(76, 201, 240, 0.16);
  white-space: nowrap;
}

::selection { background: var(--accent-soft); color: var(--text); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ==========================================================================
   Sidebar — the "control rail". Fixed left, monospace nav labels, a
   glowing left-edge indicator marks the active view.
   ========================================================================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--bg-raised) 0%, var(--bg) 100%);
  border-right: 1px solid var(--border-soft);
  padding: 28px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 10;
}

.sidebar h2 {
  font-family: var(--font-display);
  text-transform: none;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  padding: 0 12px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.sidebar h2::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 12px 1px rgba(124,108,240,0.6);
  flex-shrink: 0;
}

.sidebar a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--transition), background var(--transition);
  border-left: 2px solid transparent;
  margin-left: -1px;
}
.sidebar a::before {
  content: '';
  opacity: 0.55;
}
.sidebar a:hover {
  color: var(--text);
  background: var(--surface-hover);
}
.sidebar a.active {
  color: var(--text);
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  font-weight: 600;
}

.sidebar a[href="logout.php"] {
  margin-top: auto;
  color: var(--danger);
  opacity: 0.85;
}
.sidebar a[href="logout.php"]:hover {
  background: var(--danger-soft);
  color: var(--danger);
  opacity: 1;
}

/* ==========================================================================
   Main content
   ========================================================================== */
.main-content {
  margin-left: var(--sidebar-w);
  padding: 36px 44px 64px;
  max-width: 1280px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}
.header span {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 20px;
}

.main-content > h1 {
  margin-bottom: 24px;
}

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   Stat cards
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 75%);
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(124,108,240,0.35);
}
.stat-card h3 {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.stat-card div {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Cheat status pills (dynamic .status-{value} classes) */
[class^="status-"], [class*=" status-"] {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 20px;
  margin: 0 8px 8px 0;
}
[class^="status-"]::before, [class*=" status-"]::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}
.status-undetected { color: var(--success); background: var(--success-soft); border: 1px solid rgba(53,210,138,0.25); }
.status-detected    { color: var(--danger);  background: var(--danger-soft);  border: 1px solid rgba(240,87,107,0.25); }
.status-updating    { color: var(--warning); background: var(--warning-soft); border: 1px solid rgba(240,180,41,0.25); }
.status-freezed     { color: var(--info);    background: var(--info-soft);    border: 1px solid rgba(76,201,240,0.25); }

/* Recent activity feed */
.log-entry {
  font-size: 13px;
  color: var(--text-muted);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.log-entry:last-child { border-bottom: none; }
.log-entry small {
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: 11.5px;
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

form { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
form > div { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input, select, textarea {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  transition: border-color var(--transition), background var(--transition);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:hover, select:hover, textarea:hover { border-color: var(--text-faint); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-hover);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { min-width: 260px; min-height: 70px; resize: vertical; font-family: var(--font-body); }

select { cursor: pointer; }

button, input[type="submit"] {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
  white-space: nowrap;
}
button:hover, input[type="submit"]:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}
button:active, input[type="submit"]:active { transform: translateY(1px); }

/* Inline action buttons inside table rows keep a compact footprint */
td button {
  font-size: 12px;
  padding: 6px 12px;
  margin: 2px 4px 2px 0;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text);
}
td button:hover { background: var(--bg-raised); border-color: var(--text-faint); }

/* Delete / unban buttons ship an inline red background from the backend —
   we only refine shape, not color, so we don't fight that inline style. */
td button[style*="background"] {
  border-color: transparent;
  color: #fff;
}

/* ==========================================================================
   Alerts
   ========================================================================== */
.success, .error {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.success::before, .error::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.success {
  color: var(--success);
  background: var(--success-soft);
  border: 1px solid rgba(53,210,138,0.25);
}
.success::before { background: var(--success); box-shadow: 0 0 6px var(--success); }
.error {
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(240,87,107,0.25);
}
.error::before { background: var(--danger); box-shadow: 0 0 6px var(--danger); }

/* ==========================================================================
   Tables
   ========================================================================== */
.table-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: auto;
  box-shadow: var(--shadow-card);
}

table { width: 100%; border-collapse: collapse; min-width: 640px; }

thead th {
  position: sticky;
  top: 0;
  background: var(--bg-raised);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
  font-size: 13.5px;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--surface-hover); }

tbody td small {
  display: block;
  color: var(--text-faint);
  font-size: 11.5px;
  margin-top: 3px;
}

/* Discord IDs / HWIDs read as data, not prose */
td:first-child { font-family: var(--font-mono); font-size: 12.5px; color: var(--data); }

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
  display: flex;
  gap: 6px;
  padding: 16px 18px;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.pagination a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-raised);
  transition: all var(--transition);
}
.pagination a:hover { color: var(--text); border-color: var(--text-faint); }
.pagination a[style*="font-weight"] {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* ==========================================================================
   Login page
   ========================================================================== */
body:has(.login-container) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-container {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-card);
  margin: 40px auto;
}
.login-container h1 {
  text-align: center;
  font-size: 20px;
  margin-bottom: 26px;
}
.login-container h1::before {
  content: '● ';
  color: var(--accent);
  font-size: 10px;
  vertical-align: middle;
}
.login-container form {
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
}
.login-container form > div { min-width: 0; }
.login-container input { width: 100%; padding: 11px 14px; }
.login-container button {
  width: 100%;
  padding: 11px 18px;
  margin-top: 4px;
}
.login-container .error { margin-bottom: 18px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
  }
  .sidebar h2 { width: 100%; margin-bottom: 10px; }
  .sidebar a[href="logout.php"] { margin-top: 0; margin-left: auto; }
  .main-content { margin-left: 0; padding: 24px 20px 48px; }
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  form { flex-direction: column; align-items: stretch; }
  form > div { min-width: 0; }
}