:root {
  --bg: #f4f6f8;
  --card: #fff;
  --text: #1a2332;
  --muted: #5c6b7a;
  --line: #e2e8f0;
  --brand: #1565c0;
  --brand-dark: #0d47a1;
  --danger: #c62828;
  --ok: #2e7d32;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.header h1 { font-size: 20px; margin: 0; }
.lang-btn, button, input, select { font: inherit; }
.lang-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
  margin-bottom: 16px;
}

label, .field-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input[type="text"], input[type="password"], input[type="number"], input[type="tel"], select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}
.field { margin-bottom: 16px; }
.field-hint { font-size: 12px; color: var(--muted); margin-bottom: 6px; }

.tab-bar { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 16px; }
.tab {
  border: 0;
  background: transparent;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab-active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tab-pane { display: none; }
.tab-pane-active { display: block; }

.radio-group, .check-group { display: flex; flex-direction: column; gap: 8px; }
.radio-item, .check-item { display: flex; align-items: center; gap: 8px; color: var(--text); }
.switch-row { display: inline-flex; align-items: center; gap: 8px; }

.btn {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-secondary { background: #fff; color: var(--brand); border: 1px solid var(--brand); margin-top: 8px; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b71c1c; }

.msg { font-size: 14px; margin: 8px 0 0; }
.msg.error { color: var(--danger); }
.msg.ok { color: var(--ok); }
.muted { color: var(--muted); font-size: 14px; line-height: 1.5; }
.hidden { display: none !important; }

.meta { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.captcha-row { display: flex; gap: 8px; align-items: center; }
.captcha-img {
  height: 44px;
  width: 148px;
  flex: 0 0 148px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2ff;
  cursor: pointer;
}
.captcha-row input { flex: 1; }
.picker-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  max-height: 280px;
  overflow-y: auto;
}
.picker-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text);
}
.picker-item:hover { border-color: var(--brand); }
.picker-item-active {
  border-color: var(--brand);
  background: #e8f1fb;
}
.picker-item-connected { border-color: #16a34a; }
.picker-item-disabled {
  cursor: default;
  opacity: 0.85;
}
.roster-list { max-height: 320px; }
.picker-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.picker-item-name { font-weight: 600; }
.picker-item-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.picker-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
}
.picker-badge-ok { background: #dcfce7; color: #15803d; }
.picker-badge-busy { background: #fef3c7; color: #b45309; }
.picker-badge-paired { background: #e0e7ff; color: #3730a3; }
.picker-empty { font-size: 12px; color: var(--muted); padding: 4px 0; }
.countdown {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--brand-dark);
  margin: 12px 0 16px;
  font-size: 16px;
}
