/* redroid-token-farm admin — modern dark theme */
:root {
  --bg: #0a0c10;
  --bg-elev: #12151b;
  --panel: #14181f;
  --panel-2: #171c24;
  --line: #232a34;
  --line-soft: #1b212a;
  --fg: #e8ecf2;
  --fg-dim: #aab4c2;
  --muted: #6b7688;
  --accent: #5b8cff;
  --accent-hover: #7aa2ff;
  --accent-glow: rgba(91, 140, 255, 0.35);
  --ok: #34d399;
  --ok-bg: rgba(52, 211, 153, 0.12);
  --bad: #f87171;
  --bad-bg: rgba(248, 113, 113, 0.12);
  --warn: #fbbf24;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", "Cascadia Code", Menlo, monospace;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg);
  background:
    radial-gradient(1100px 600px at 12% -8%, rgba(91, 140, 255, 0.10), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(124, 92, 255, 0.08), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------- header */
header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10, 12, 16, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
}
header h1 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
header h1::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-bg), 0 0 12px var(--ok);
}
.spacer { flex: 1; }

/* ---------------------------------------------------------- layout */
main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 24px 64px;
  display: grid;
  gap: 22px;
}
.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
h2 {
  font-size: 15px;
  font-weight: 640;
  letter-spacing: -0.01em;
  margin: 0 0 2px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.muted { color: var(--muted); font-weight: 400; }
p.muted { margin: 4px 0 14px; font-size: 13px; }

/* ---------------------------------------------------------- tables */
table { width: 100%; border-collapse: collapse; margin: 6px 0; }
th, td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
thead th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
tbody tr:last-child td { border-bottom: 0; }
code {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent-hover);
  background: rgba(91, 140, 255, 0.08);
  padding: 2px 6px;
  border-radius: 5px;
}

/* ---------------------------------------------------------- inputs */
input {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  width: 100%;
  font: inherit;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
input::placeholder { color: var(--muted); }
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ---------------------------------------------------------- buttons */
button {
  font: inherit;
  font-weight: 550;
  background: linear-gradient(180deg, var(--accent-hover), var(--accent));
  border: 0;
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease;
  box-shadow: 0 2px 10px var(--accent-glow);
}
button:hover { box-shadow: 0 4px 18px var(--accent-glow); }
button:active { transform: translateY(1px); }
button.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-dim);
  box-shadow: none;
}
button.ghost:hover { border-color: var(--accent); color: var(--fg); background: rgba(91, 140, 255, 0.06); }
button.danger {
  background: transparent;
  color: var(--bad);
  border: 1px solid transparent;
  box-shadow: none;
  padding: 4px 9px;
  font-size: 15px;
  line-height: 1;
}
button.danger:hover { background: var(--bad-bg); border-color: rgba(248, 113, 113, 0.3); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.row { display: flex; gap: 8px; margin-top: 12px; }
.row input { flex: 1; }

/* ---------------------------------------------------------- badges */
.badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }

/* ---------------------------------------------------------- device cards */
.device {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 14px;
  background: var(--bg-elev);
}
.device:last-child { margin-bottom: 0; }
.device-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.device-head strong { font-size: 14px; letter-spacing: -0.01em; }

/* ---------------------------------------------------------- login */
body.login {
  display: grid;
  place-items: center;
  min-height: 100vh;
}
.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 30px;
  width: 340px;
  display: grid;
  gap: 14px;
  text-align: center;
  box-shadow: var(--shadow);
}
.card h1 {
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -0.02em;
  margin: 0;
  background: linear-gradient(90deg, var(--fg), var(--accent-hover));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.card .muted { margin: -6px 0 6px; }
.card button { width: 100%; padding: 10px; }
.err { color: var(--bad); min-height: 18px; margin: 0; font-size: 13px; }

/* ---------------------------------------------------------- misc */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2c3542; }
::selection { background: var(--accent-glow); }
