:root {
  --bg: #09090d;
  --surface: #121218;
  --surface-raised: #191922;
  --border: #24242f;
  --text: #e8e8ee;
  --text-muted: #8a8a9a;
  --violet: #a259ff;
  --violet-dim: #7c3aed;
  --violet-glow: rgba(162, 89, 255, 0.35);
  --green: #3ddc84;
  --red: #ff5c5c;
  --amber: #ffb84d;
  --radius: 10px;
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, var(--violet-glow) 0%, transparent 60%),
    radial-gradient(ellipse 700px 400px at 100% 0%, rgba(124, 58, 237, 0.15) 0%, transparent 55%);
  background-repeat: no-repeat;
  min-height: 100vh;
}

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

/* Layout */
.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: rgba(18, 18, 24, 0.7);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--violet), var(--violet-dim));
  box-shadow: 0 0 20px var(--violet-glow);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.nav-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 8px;
  margin-bottom: 4px;
}

.guild-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.guild-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.guild-item:hover {
  background: var(--surface-raised);
  color: var(--text);
}

.guild-item.active {
  background: rgba(162, 89, 255, 0.12);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(162, 89, 255, 0.3);
}

.guild-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--surface-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--violet-dim);
}

.user-name {
  font-size: 13px;
  font-weight: 500;
}

.logout-link {
  font-size: 12px;
  color: var(--text-muted);
}

.logout-link:hover { color: var(--red); }

/* Main content */
.main {
  flex: 1;
  padding: 40px 56px;
  max-width: 1200px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 16px;
  align-items: start;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.tab {
  padding: 10px 4px;
  margin-right: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.tab:hover { color: var(--text); }

.tab.active {
  color: var(--text);
  border-bottom-color: var(--violet);
}

.stat-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.stat-box {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.member-row-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.mini-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.page-header { margin-bottom: 32px; }

.page-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px 0;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  max-width: 480px;
}

/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch-track {
  position: absolute;
  inset: 0;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s;
}

.switch-track::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform 0.15s, background 0.15s;
}

.switch input:checked + .switch-track {
  background: var(--violet-dim);
  box-shadow: 0 0 12px var(--violet-glow);
}

.switch input:checked + .switch-track::before {
  transform: translateX(18px);
  background: #fff;
}

/* Form elements */
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.field-row:first-of-type { border-top: none; }

.field-label {
  font-size: 14px;
  font-weight: 500;
}

.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

select, input[type="number"], input[type="text"] {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: var(--font-body);
}

select:focus, input:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-glow);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--violet-dim));
  color: #fff;
  box-shadow: 0 0 20px var(--violet-glow);
}

.btn-primary:hover { filter: brightness(1.1); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover { border-color: var(--violet); }

/* Sanctions table */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tag-mute { background: rgba(255, 184, 77, 0.15); color: var(--amber); }
.tag-kick { background: rgba(255, 92, 92, 0.15); color: var(--red); }
.tag-ban  { background: rgba(255, 92, 92, 0.2); color: var(--red); }
.tag-warn { background: rgba(162, 89, 255, 0.15); color: var(--violet); }

/* Login page */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 28px;
  text-align: center;
}

.login-mark {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--violet), var(--violet-dim));
  box-shadow: 0 0 60px var(--violet-glow);
}

.login-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 340px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
