:root {
  color-scheme: light dark;
  --bg: #0f1115;
  --panel: #171a21;
  --border: #2a2e37;
  --text: #e8eaed;
  --muted: #9aa0ac;
  --accent: #4f8cff;
  --danger: #ff5d5d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

h1 { font-size: 20px; margin: 0; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.login-shell {
  max-width: 360px;
  margin: 15vh auto 0;
}

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

input[type=text], input[type=password], input[type=file], select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #10131a;
  color: var(--text);
  margin-bottom: 14px;
  font-size: 14px;
}

input[type=color] {
  width: 48px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: none;
  margin-bottom: 14px;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  background: var(--accent);
  color: white;
}

button.secondary { background: #2a2e37; color: var(--text); }
button.danger { background: var(--danger); }

.error { color: var(--danger); font-size: 13px; margin-bottom: 10px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 500; }

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

a { color: var(--accent); }

#qr-canvas { display: flex; justify-content: center; margin: 16px 0; }

.muted { color: var(--muted); font-size: 13px; }
