/* License admin panel — simple, readable layout */
:root {
  --bg: #0f1117;
  --surface: #161922;
  --border: #2a3040;
  --text: #e8eaef;
  --muted: #8b93a7;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --danger: #ed4245;
  --radius: 10px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand span { color: var(--muted); font-weight: 500; }

.userbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.userbox img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.userbox .tag { color: var(--muted); }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.tabs a {
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.tabs a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.tabs a.active {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

h2 { font-size: 1.1rem; margin: 1.5rem 0 0.75rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

label { display: block; margin-top: 0.75rem; font-size: 0.9rem; color: var(--muted); }
label:first-of-type { margin-top: 0; }

input, select, textarea {
  width: 100%;
  max-width: 420px;
  margin-top: 0.35rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

button, .btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button:hover, .btn:hover { background: var(--accent-hover); }

button.link, .btn.link {
  background: none;
  color: var(--accent);
  padding: 0;
  margin: 0;
  font-weight: 500;
}

button.danger { background: var(--danger); }
button.danger:hover { filter: brightness(1.08); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
th, td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
}
th { background: #1c2029; color: var(--muted); font-weight: 600; }
tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

.muted { color: var(--muted); font-size: 0.85rem; word-break: break-all; }

form.inline { display: inline; margin-right: 0.5rem; }

.err { color: var(--danger); }

.h2-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0.75rem;
}
.h2-row h2 { margin: 0; }

dialog.modal {
  max-width: 440px;
  width: calc(100% - 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 0;
}
dialog.modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}
.modal__body {
  padding: 1.25rem 1.5rem;
}
.modal__head {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.modal__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.modal__actions button { margin-top: 0; }
.ok {
  background: rgba(88, 101, 242, 0.12);
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  word-break: break-word;
}

/* Login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}
.login-card h1 { margin-bottom: 0.5rem; }
.login-card p.sub { color: var(--muted); margin: 0 0 1.5rem; font-size: 0.95rem; }

.discord-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: #5865f2;
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
}
.discord-btn:hover { background: #4752c4; color: #fff !important; text-decoration: none !important; }

.discord-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .tabs { gap: 0.2rem; }
  table { font-size: 0.8rem; }
}
