:root {
  --bg: #0c142f;
  --card: #131b3a;
  --accent: #f39129;
  --text: #e9edf7;
  --muted: #93a0c0;
  --error: #ff6b6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.muted { color: var(--muted); }
.error { color: var(--error); }

.login-body {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--card);
  padding: 2rem;
  border-radius: 12px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.login-card h1 { margin: 0; font-size: 1.4rem; }
.login-card p { margin: 0; }

input {
  padding: 0.7rem;
  border-radius: 8px;
  border: 1px solid #2a345e;
  background: #0c142f;
  color: var(--text);
  font-size: 1rem;
}

button {
  padding: 0.7rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #1a1205;
  font-weight: 600;
  cursor: pointer;
}

button:hover { filter: brightness(1.05); }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--card);
}

.topbar button {
  width: auto;
  padding: 0.4rem 0.9rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid #2a345e;
}

.container { padding: 1.5rem; max-width: 980px; margin: 0 auto; }

pre { white-space: pre-wrap; word-break: break-word; }

/* ---- painel ---- */
.topbar-actions { display: flex; gap: 0.5rem; align-items: center; }

select {
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #2a345e;
  background: #0c142f;
  color: var(--text);
  font-size: 0.95rem;
}

button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid #2a345e;
}
button.ghost:hover { background: #1b2547; filter: none; }
button.danger { color: var(--error); border-color: var(--error); }
button.small { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
button:disabled { opacity: 0.5; cursor: default; }

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.card h2 { margin: 0 0 1rem; font-size: 1.1rem; color: var(--accent); }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 720px) { .cols { grid-template-columns: 1fr; } }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.grid2 .col2 { grid-column: 1 / -1; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }

label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); }
label input, label select, label textarea { font-size: 0.95rem; }
textarea {
  padding: 0.7rem; border-radius: 8px; border: 1px solid #2a345e;
  background: #0c142f; color: var(--text); font-family: ui-monospace, monospace; resize: vertical;
}

.row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-top: 0.9rem; }
.hint { color: var(--muted); font-size: 0.8rem; }

.chips { list-style: none; padding: 0; margin: 0 0 0.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: #1b2547; padding: 0.35rem 0.7rem; border-radius: 999px; font-size: 0.85rem;
}
.chip button { background: none; border: none; color: var(--muted); padding: 0; width: auto; font-size: 1rem; cursor: pointer; }
.chip button:hover { color: var(--error); }

.ranked, .used { list-style: none; padding: 0; margin: 0.8rem 0 0; display: flex; flex-direction: column; gap: 0.5rem; }
.ranked li, .used li { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px solid #1b2547; }
.ranked li button { margin-left: auto; }
.badge {
  background: var(--accent); color: #1a1205; border-radius: 6px;
  padding: 0.1rem 0.45rem; font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
}
.used a, .ranked a { color: var(--accent); text-decoration: none; }

#wp-link { color: var(--accent); text-decoration: none; margin-left: auto; align-self: center; }

.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  background: #1b2547; color: var(--text); padding: 0.8rem 1.2rem; border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4); border-left: 3px solid var(--accent); max-width: 90%;
}
.toast-error { border-left-color: var(--error); }
