:root {
  --bg: #080a12;
  --bg-soft: #101321;
  --panel: #151a2d;
  --panel-2: #1b2137;
  --border: #2c3351;
  --text: #f4f1e8;
  --muted: #9ea7bf;
  --gold: #d8ae58;
  --violet: #8e6cff;
  --green: #46d38a;
  --red: #ff6577;
  --blue: #62b7ff;
  --shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% -10%, rgba(142,108,255,.22), transparent 34rem),
    radial-gradient(circle at 90% 0%, rgba(216,174,88,.16), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  flex: 0 0 260px;
  padding: 22px 18px;
  background: rgba(10, 13, 24, .88);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  margin-bottom: 28px;
}
.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #17110a;
  background: linear-gradient(135deg, var(--gold), #fff0ac);
  font-size: 13px;
}
.sidebar nav { display: grid; gap: 6px; }
.sidebar a:not(.brand) {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
}
.sidebar a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.sidebar-section {
  margin: 24px 10px 10px;
  color: #727b94;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
}
.main { flex: 1; padding: 28px; min-width: 0; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
}
.topbar h1 { margin: 0; font-size: 28px; line-height: 1.15; }
.topbar p { margin: 6px 0 0; color: var(--muted); }
.topbar-user { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel, .auth-card {
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02)), var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.panel { padding: 18px; }
.panel h2, .panel h3 { margin: 0 0 14px; }
.metric { padding: 18px; }
.metric span { color: var(--muted); font-size: 13px; }
.metric strong { display: block; margin-top: 8px; font-size: 30px; }
.table-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; font-weight: 800; background: rgba(255,255,255,.035); }
tr:last-child td { border-bottom: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
label { color: var(--muted); font-size: 13px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #0d1120;
  color: var(--text);
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 12px;
  font: inherit;
}
textarea { min-height: 110px; resize: vertical; }
.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--gold), #f2d27b);
  color: #17110a;
  font-weight: 800;
  cursor: pointer;
}
.button.secondary, button.secondary { background: var(--panel-2); color: var(--text); border-color: var(--border); }
.button.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.button.danger, button.danger { background: var(--red); color: #24070c; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.badge, .role {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.badge.success { background: rgba(70,211,138,.14); color: var(--green); }
.badge.warning { background: rgba(216,174,88,.14); color: var(--gold); }
.badge.danger { background: rgba(255,101,119,.14); color: var(--red); }
.badge.info { background: rgba(98,183,255,.14); color: var(--blue); }
.badge.muted { background: rgba(158,167,191,.13); color: var(--muted); }
.role { background: rgba(255,255,255,.08); color: var(--text); }
.role.tank { background: rgba(98,183,255,.16); color: var(--blue); }
.role.healer { background: rgba(70,211,138,.16); color: var(--green); }
.role.dps { background: rgba(255,101,119,.16); color: var(--red); }
.role.support { background: rgba(142,108,255,.18); color: #b9a6ff; }
.alert {
  margin: 0 0 16px;
  padding: 13px 15px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
}
.alert.success { border-color: rgba(70,211,138,.45); color: var(--green); }
.alert.warning { border-color: rgba(216,174,88,.45); color: var(--gold); }
.alert.danger { border-color: rgba(255,101,119,.45); color: var(--red); }
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}
.auth-card { width: min(760px, 100%); padding: 28px; }
.auth-card h1 { margin-top: 0; }
.muted { color: var(--muted); }
.plus { color: var(--green); font-weight: 800; }
.minus { color: var(--red); font-weight: 800; }
.warning-text { color: var(--gold); }
.danger-text { color: var(--red); }
.split { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 14px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.check-row { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.check-row input { width: auto; min-height: auto; }

@media (max-width: 980px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: auto; height: auto; }
  .main { padding: 18px; }
  .grid.two, .grid.three, .grid.four, .form-grid { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
}

