:root {
  color-scheme: light;
  --ink: #1d1a16;
  --muted: #6f675e;
  --line: rgba(29, 26, 22, 0.12);
  --paper: rgba(255, 252, 247, 0.9);
  --accent: #0e6b52;
  --danger: #9d3b32;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  min-height: 100%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 12% -10%, #f4f0e6, transparent 55%),
    radial-gradient(700px 480px at 110% 0%, #d7e6de, transparent 50%),
    linear-gradient(180deg, #dcd6cb, #c5ced3);
}
.card {
  width: min(380px, calc(100% - 32px));
  padding: 22px 22px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(40, 32, 20, 0.16);
}
.brand { font-weight: 700; letter-spacing: 0.04em; font-size: 13px; color: var(--accent); }
h1 { margin: 8px 0 4px; font-size: 22px; font-weight: 650; }
p { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.mark { width: 52px; height: 52px; margin-bottom: 12px; }
.mark svg { width: 52px; height: 52px; display: block; filter: drop-shadow(0 8px 14px rgba(14, 107, 82, 0.28)); }
label { display: flex; align-items: center; gap: 6px; margin: 10px 0 4px; font-size: 12px; color: var(--muted); }
label i { width: 14px; height: 14px; display: inline-flex; }
label svg { width: 14px; height: 14px; }
input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: inherit;
  font: inherit;
}
button {
  margin-top: 14px;
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
button:disabled { opacity: 0.6; cursor: default; }
button.ghost { background: transparent; color: var(--muted); font-weight: 500; margin-top: 4px; }
.error { min-height: 18px; margin-top: 8px; color: var(--danger); font-size: 12px; }
[hidden] { display: none !important; }
body.clients-page {
  display: block;
  height: auto;
  min-height: 100%;
  padding: 28px 0 40px;
}
body.clients-page .card {
  width: min(440px, calc(100% - 32px));
  margin: 0 auto;
}
.client-list { display: flex; flex-direction: column; gap: 10px; }
.client-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.client-item b { display: block; font-size: 14px; }
.client-item .note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.client-item a { color: var(--accent); }
.client-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
a.download {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 14%, #fff);
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}
a.download.primary { background: var(--accent); color: #fff; }
.install-qr { margin: 12px 0 0; display: grid; justify-items: center; gap: 6px; }
.install-qr img {
  width: 168px; height: 168px; background: #fff; border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
}
.install-qr figcaption { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; text-align: center; }
.client-item .empty, .status {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}
button.linkish {
  margin-top: 8px;
  background: transparent;
  color: var(--accent);
  font-weight: 650;
}
