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

:root {
  --bg:        #0d1117;
  --surface:   #161b22;
  --surface2:  #1c2230;
  --border:    #30363d;
  --accent:    #5865F2;
  --accent-h:  #4752c4;
  --text:      #e6edf3;
  --muted:     #8b949e;
  --success:   #3fb950;
  --warn:      #d29922;
  --danger:    #f85149;
  --radius:    10px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

.page-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  text-align: center;
}

.card-logo {
  width: 64px;
  height: 64px;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.card h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 28px;
  font-weight: 700;
  font-size: 16px;
}

.sidebar-logo .icon {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.nav-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 0 12px;
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: background .15s, color .15s;
  margin-bottom: 2px;
}

.nav-item:hover,
.nav-item.active {
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
}

.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer { margin-top: auto; }

.main {
  flex: 1;
  padding: 32px 36px;
  overflow-y: auto;
}

.page-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-header h1 { font-size: 22px; font-weight: 700; }
.page-header p  { color: var(--muted); font-size: 13px; margin-top: 2px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.stat-card .label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-card .value {
  font-size: 28px;
  font-weight: 700;
}

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 14px;
}

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

th {
  text-align: left;
  padding: 12px 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 13px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

tr:hover td { background: var(--surface2); }

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  flex-shrink: 0;
  object-fit: cover;
}

.avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge.success { background: rgba(63,185,80,.15); color: var(--success); }
.badge.warn    { background: rgba(210,153,34,.15); color: var(--warn); }
.badge.danger  { background: rgba(248,81,73,.15);  color: var(--danger); }
.badge.muted   { background: var(--surface2);       color: var(--muted); }

.badge::before { content: "●"; font-size: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: opacity .15s, background .15s;
}

.btn:hover { opacity: .88; text-decoration: none; }

.btn-primary  { background: var(--accent); color: #fff; }
.btn-success  { background: rgba(63,185,80,.2); color: var(--success); border: 1px solid rgba(63,185,80,.3); }
.btn-danger   { background: rgba(248,81,73,.15); color: var(--danger);  border: 1px solid rgba(248,81,73,.25); }
.btn-sm       { padding: 5px 12px; font-size: 13px; border-radius: 6px; }
.btn-discord  { background: #5865F2; color: #fff; padding: 13px 26px; font-size: 15px; width: 100%; justify-content: center; }
.btn-discord:hover { background: var(--accent-h); }

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.server-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, background .2s;
}

.server-card:hover {
  border-color: var(--accent);
  background: var(--surface2);
  text-decoration: none;
}

.server-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.server-name { font-weight: 600; font-size: 14px; }
.server-sub  { font-size: 12px; color: var(--muted); margin-top: 2px; }

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success { background: rgba(63,185,80,.12);  border: 1px solid rgba(63,185,80,.25); color: var(--success); }
.alert-danger  { background: rgba(248,81,73,.12);   border: 1px solid rgba(248,81,73,.25);  color: var(--danger);  }

.cf-turnstile { display: flex; justify-content: center; margin-bottom: 16px; }

.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}

.empty .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty p { font-size: 14px; }

.text-muted   { color: var(--muted); }
.text-success { color: var(--success); }
.text-warn    { color: var(--warn); }
.text-danger  { color: var(--danger); }
.mt-4 { margin-top: 16px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }