@font-face {
  font-family: "Graphik LCG";
  src: url("./GraphikLCG-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Graphik LCG";
  src: url("./GraphikLCG-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Graphik LCG";
  src: url("./GraphikLCG-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ff: "Graphik LCG", sans-serif;
  --bg: #f9f9fa;
  --surface: #fff;
  --text: #0a0c11;
  --muted: #5b616d;
  --line: rgba(0, 0, 0, 0.08);
  --brand: #f83ce9;
  --brand-deep: #e322d4;
  --info: #008ece;
  --info-bright: #06b1f1;
  --danger: #ed4030;
  --ok: #409b3f;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

[hidden],
.is-hidden {
  display: none !important;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body {
  font-family: var(--ff);
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; height: 44px; }
.brand img { height: 32px; width: auto; display: block; }
.brand-sub {
  font-weight: 500;
  font-size: 14px;
  color: var(--muted);
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.who { margin-left: auto; color: var(--muted); font-size: 13px; }
.site-header .btn { margin-left: 0; }

#app { max-width: 1080px; margin: 0 auto; padding: 32px 24px 64px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px;
  display: grid;
  gap: 12px;
}
.login { max-width: 400px; margin: 8vh auto; padding: 28px; }
.login h1 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.02em; }

h1, h2, h3 { margin: 0; font-family: var(--ff); color: var(--text); }
h2 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 16px; line-height: 24px; font-weight: 600; }

label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
input, select {
  font: inherit;
  font-weight: 400;
  color: var(--text);
  padding: 10px 12px;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}
input:focus, select:focus {
  outline: none;
  border-color: rgba(248, 60, 233, 0.45);
  box-shadow: 0 0 0 3px rgba(248, 60, 233, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--ff);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 3px 3px rgba(255, 255, 255, 0.12) inset;
}
.btn-primary:hover { background: var(--brand-deep); }
.btn-ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { background: #f2f2f4; }
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.chk { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--text); }
.chk input { min-height: 0; width: 16px; height: 16px; accent-color: var(--brand); }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding: 4px;
  width: fit-content;
  background: #f2f2f4;
  border-radius: 12px;
}
.tabs button {
  font-family: var(--ff);
  font-size: 14px;
  font-weight: 500;
  min-height: 36px;
  padding: 6px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.tabs button.on {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
}

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .site-header { padding: 0 16px; }
  .brand-sub { display: none; }
}

.list { display: grid; gap: 8px; margin: 16px 0 24px; }
.list article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: pointer;
}
.list article:hover { border-color: rgba(248, 60, 233, 0.35); }
.list article span:first-child { flex: 1; font-weight: 500; }

.muted { color: var(--muted); font-size: 13px; font-weight: 400; }
.err { color: var(--danger); font-size: 13px; }

.queue { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.queue li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: grab;
}
.queue li::before {
  content: "";
  width: 10px;
  height: 16px;
  flex: 0 0 auto;
  background: radial-gradient(circle, #c3c6cc 1.2px, transparent 1.4px);
  background-size: 5px 5px;
  opacity: 0.9;
}
.queue li.pin { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(248, 60, 233, 0.16); }
.queue li strong { flex: 1; font-weight: 500; }

.badge {
  font-size: 11px;
  font-weight: 500;
  border-radius: 99px;
  padding: 2px 8px;
  background: #f2f2f4;
  color: var(--muted);
}
.badge.on { background: rgba(64, 155, 63, 0.12); color: #2c6a2b; }
.badge.off { background: #f2f2f4; color: var(--muted); }

.log {
  background: #0a0c11;
  color: #d6ffd6;
  padding: 16px;
  border-radius: 12px;
  overflow: auto;
  max-height: 420px;
  font-size: 12px;
  line-height: 18px;
}
