/* Painel Ryze SaaS — dark theme, sem framework */
:root {
  --bg: #1e1f22;
  --bg-2: #2b2d31;
  --bg-3: #313338;
  --bg-4: #383a40;
  --border: #3f4147;
  --text: #dbdee1;
  --text-dim: #949ba4;
  --white: #f2f3f5;
  --accent: #8b0000;
  --accent-2: #b22222;
  --green: #23a55a;
  --yellow: #f0b232;
  --red: #f23f43;
  --blue: #00a8fc;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

button { font-family: inherit; }

/* ---------- topo ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-size: 17px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.3px;
}
.brand span { color: var(--accent-2); }

.userbox {
  display: flex;
  align-items: center;
  gap: 10px;
}
.userbox img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
}
.userbox .uname { font-weight: 600; color: var(--white); }
.userbox .badge-super {
  font-size: 10px;
  font-weight: 700;
  color: #000;
  background: var(--yellow);
  border-radius: 4px;
  padding: 2px 6px;
}

/* ---------- login ---------- */
.login-wrap {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px 48px;
  text-align: center;
  max-width: 420px;
}
.login-card h2 { color: var(--white); margin: 0 0 8px; }
.login-card p { color: var(--text-dim); margin: 0 0 24px; }

.btn-discord {
  display: inline-block;
  background: #5865f2;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 15px;
}
.btn-discord:hover { background: #4752c4; }

/* ---------- layout ---------- */
.main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px;
}

.guild-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.guild-bar label { color: var(--text-dim); font-size: 13px; font-weight: 600; }

select, input[type="text"], input[type="number"], input[type="url"], textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
select:focus, input:focus, textarea:focus { border-color: var(--accent-2); }
textarea { width: 100%; min-height: 80px; resize: vertical; }
input[type="color"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 48px;
  height: 36px;
  padding: 2px;
  cursor: pointer;
}

/* ---------- abas ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tab {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--white); border-bottom-color: var(--accent-2); }

.section { display: none; }
.section.active { display: block; }

/* ---------- cards ---------- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.card h3 {
  margin: 0 0 4px;
  color: var(--white);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card .hint { color: var(--text-dim); font-size: 13px; margin: 0 0 12px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px 0;
  max-width: 480px;
}
.field label { font-size: 12px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.4px; }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }

/* ---------- toggle ---------- */
.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
  position: absolute;
  inset: 0;
  background: #4e5058;
  border-radius: 22px;
  transition: background 0.15s;
  cursor: pointer;
}
.toggle .slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s;
}
.toggle input:checked + .slider { background: var(--green); }
.toggle input:checked + .slider::before { transform: translateX(18px); }

/* ---------- badges ---------- */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}
.badge.ACTIVE { background: rgba(35, 165, 90, 0.18); color: var(--green); }
.badge.TRIAL { background: rgba(240, 178, 50, 0.18); color: var(--yellow); }
.badge.SUSPENDED { background: rgba(242, 63, 67, 0.18); color: var(--red); }
.badge.mode { background: rgba(0, 168, 252, 0.15); color: var(--blue); }

/* ---------- botões ---------- */
.btn {
  background: var(--bg-4);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: var(--radius);
  cursor: pointer;
}
.btn:hover { background: #44474e; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.savebar {
  position: sticky;
  bottom: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
#saveStatus { font-size: 13px; color: var(--text-dim); }
#saveStatus.ok { color: var(--green); }
#saveStatus.err { color: var(--red); }

/* ---------- tabela ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
th { color: var(--text-dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
td a { color: var(--blue); text-decoration: none; }
td a:hover { text-decoration: underline; }

/* ---------- equipe ---------- */
.admin-list { list-style: none; padding: 0; margin: 0 0 12px; max-width: 480px; }
.admin-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 6px;
  font-family: monospace;
  font-size: 14px;
}

.muted { color: var(--text-dim); }
.hidden { display: none !important; }
