:root {
  color-scheme: dark;
  --bg: #050506;
  --panel: rgba(18, 18, 20, .78);
  --panel2: rgba(28, 28, 32, .66);
  --line: rgba(255, 255, 255, .11);
  --text: #f5f1ea;
  --muted: #9a9288;
  --green: #19c987;
  --amber: #d6a43a;
  --red: #d74b5b;
  --blue: #58a9ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(214, 164, 58, .12), transparent 32%),
    radial-gradient(circle at 88% 14%, rgba(25, 201, 135, .10), transparent 28%),
    linear-gradient(135deg, #050506, #08090b 48%, #030303);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0;
}

.hidden { display: none !important; }

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .38);
  border-radius: 18px;
}

.login {
  width: min(420px, 100%);
  margin: 12vh auto 0;
  padding: 34px;
  text-align: center;
}

.sigil {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 1px solid rgba(214, 164, 58, .5);
  color: var(--amber);
  font-family: Georgia, serif;
  font-size: 42px;
  box-shadow: 0 0 42px rgba(214, 164, 58, .16), inset 0 0 22px rgba(255, 255, 255, .04);
}

h1, h2, h3, p { margin: 0; }

h1 {
  letter-spacing: .08em;
  font-size: clamp(32px, 5vw, 58px);
  line-height: .95;
}

h2 {
  font-size: 18px;
  letter-spacing: .02em;
}

h3 {
  font-size: 20px;
  letter-spacing: .01em;
}

p, .note {
  color: var(--muted);
  line-height: 1.55;
}

form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

input, select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, .22);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

input:focus, select:focus {
  border-color: rgba(214, 164, 58, .68);
  box-shadow: 0 0 0 4px rgba(214, 164, 58, .08);
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  color: #020303;
  background: linear-gradient(135deg, #1de59a, #b9ffd7);
  font-weight: 800;
  cursor: pointer;
}

button.ghost {
  background: rgba(255, 255, 255, .07);
  color: var(--text);
  border: 1px solid var(--line);
}

button.danger {
  background: rgba(215, 75, 91, .13);
  color: #ff9aa4;
  border: 1px solid rgba(215, 75, 91, .3);
}

.error {
  min-height: 20px;
  margin-top: 14px;
  color: #ff9aa4;
}

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

.eyebrow {
  color: var(--amber);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .18em;
  margin-bottom: 10px;
}

.status, .pill, .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--muted);
  white-space: nowrap;
}

.status span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

.grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.create, .pool, .employeesPanel, .eventsPanel {
  padding: 20px;
}

.panelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.note {
  margin-top: 14px;
  font-size: 13px;
}

.inlineForm {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
}

.ipPool {
  display: grid;
  gap: 10px;
}

.ip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .18);
  border-radius: 12px;
  padding: 12px;
}

.ip strong { color: var(--text); }
.ip span { color: var(--muted); font-size: 13px; }

.employees {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.employee {
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 16px;
  padding: 16px;
}

.employeeTop {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.employeeTop p {
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.badge.active {
  color: var(--green);
  border-color: rgba(25, 201, 135, .28);
}

.badge.disabled {
  color: var(--red);
  border-color: rgba(215, 75, 91, .28);
}

dl {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  padding-bottom: 8px;
}

dt { color: var(--muted); }
dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.actions select {
  grid-column: span 2;
}

.events {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.event {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

@media (max-width: 760px) {
  .topbar, .grid, .inlineForm {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar {
    align-items: start;
  }
}
