:root {
  --bg: #1a1410;
  --bg-elev: #241c16;
  --ink: #f3ebe3;
  --muted: #b9a99a;
  --line: #3d3229;
  --accent: #c4a574;
  --on: #3d8f6a;
  --off: #a65d4a;
  --exp: #9a7b3c;
  --card: #2a211a;
  --focus: #e8d3b0;
  --font: "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, #3a2a1c 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, #2a1f28 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  line-height: 1.45;
}

a { color: var(--accent); }
code {
  font-size: 0.9em;
  background: rgba(0,0,0,.25);
  padding: .1rem .35rem;
  border-radius: 4px;
}

.eyebrow {
  margin: 0 0 .35rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  color: var(--muted);
}
h1 { margin: 0; font-size: 1.6rem; font-weight: 650; letter-spacing: -0.02em; }
.lede { color: var(--muted); margin: .5rem 0 1.25rem; }

.auth {
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.auth-card {
  width: min(400px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.75rem 1.5rem;
  border-radius: 12px;
}
label {
  display: block;
  margin-bottom: 1rem;
  font-size: .85rem;
  color: var(--muted);
}
input {
  display: block;
  width: 100%;
  margin-top: .35rem;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}
input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
button {
  width: 100%;
  margin-top: .5rem;
  padding: .7rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #1a1410;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button.ghost {
  width: auto;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: .4rem .8rem;
  font-weight: 500;
}
button:hover { filter: brightness(1.05); }

.alert {
  background: rgba(166, 93, 74, .2);
  border: 1px solid var(--off);
  color: #f0c4ba;
  padding: .75rem 1rem;
  border-radius: 8px;
}
.hint { color: var(--muted); font-size: .9rem; padding: 0 1.25rem; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--line);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.who { color: var(--muted); font-size: .9rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  padding: 1.25rem;
}
.stat {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
}
.stat-label {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .35rem;
}
.stat strong { font-size: 1.75rem; }
.stat.online strong { color: #7dcea8; }
.stat.offline strong { color: #e0a090; }

.table-wrap {
  margin: 0 1.25rem 2rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
th, td {
  text-align: left;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 600;
}
tr:last-child td { border-bottom: 0; }
.name { font-weight: 600; }
.muted { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 2rem !important; }

.pill {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}
.pill.on { background: rgba(61, 143, 106, .25); color: #9ee0c0; }
.pill.off { background: rgba(166, 93, 74, .25); color: #f0c4ba; }
.pill.exp { background: rgba(154, 123, 60, .25); color: #e8d39a; }

.foot {
  padding: 0 1.25rem 2rem;
  color: var(--muted);
  font-size: .85rem;
}

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
  .top { flex-direction: column; }
}
