:root {
  color-scheme: dark;
  --bg: #0b1220;
  --card: #111827;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --green: #34d399;
  --danger: #fb7185;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(124, 58, 237, 0.28), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(34, 211, 238, 0.16), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
}

button, input, select { font: inherit; color: inherit; }

.shell { max-width: 1180px; margin: 0 auto; padding: 28px 20px 64px; }

.login-card, .panel, .table-wrap, .banner {
  background: rgba(17, 24, 39, 0.92);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.login-card {
  max-width: 440px;
  margin: 12vh auto 0;
  padding: 32px 28px;
}

.mark {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--cyan);
}

h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 32px;
  line-height: 1.1;
  margin: 8px 0 10px;
}

.lede, .hint, .meta { color: var(--muted); }

label { display: block; font-size: 13px; margin: 16px 0 6px; color: #cbd5e1; }

input, select {
  width: 100%;
  background: #0b1220;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}

input:focus, select:focus { outline: 2px solid rgba(34, 211, 238, 0.45); border-color: transparent; }

.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

.btn {
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #22d3ee, #34d399);
  color: #042f2e;
  font-weight: 700;
  cursor: pointer;
}

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

.btn:disabled { opacity: 0.55; cursor: wait; }

.banner {
  padding: 12px 14px;
  margin: 0 0 16px;
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.35);
}

.banner.ok { color: #d1fae5; border-color: rgba(52, 211, 153, 0.35); }

.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.who { text-align: right; }
.role {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.16);
  color: var(--violet);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.role:empty { display: none; }

.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  align-items: center;
}

.toolbar input { max-width: 360px; }

.table-wrap { overflow: auto; }

table { width: 100%; border-collapse: collapse; min-width: 860px; }

th, td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.name { font-weight: 700; }
.id { font-family: "Space Grotesk", monospace; font-size: 12px; color: var(--muted); margin-top: 4px; }

.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  margin-right: 6px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}

.switch[aria-pressed="true"] {
  border-color: rgba(52, 211, 153, 0.55);
  color: var(--green);
}

.switch:disabled { cursor: wait; }

.panel { padding: 20px; margin-bottom: 16px; }
.panel h2 { margin: 0 0 4px; font-size: 20px; }
.checks { display: flex; gap: 18px; margin: 14px 0; }
.checks label { display: flex; align-items: center; gap: 8px; margin: 0; }
.checks input { width: auto; }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

.hidden { display: none !important; }

@media (max-width: 720px) {
  .top, .toolbar, .row, .actions { flex-direction: column; align-items: stretch; }
  .who { text-align: left; }
  .toolbar input { max-width: none; }
  .table-wrap { overflow: visible; }
  table { min-width: 0; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tr { padding: 8px 0 14px; border-bottom: 1px solid var(--line); }
  td { border-bottom: 0; padding: 6px 16px; }
  td:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
}
