:root {
  --bg: #0f1720;
  --panel: #172232;
  --border: #26344a;
  --text: #e8ecf2;
  --muted: #8a97ac;
  --accent: #4c9aff;
  --accent-2: #22c55e;
  --danger: #ef4444;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: #0b1220;
}
header h1 { font-size: 20px; margin: 0; }
main { max-width: 960px; margin: 24px auto; padding: 0 16px; }
a { color: var(--accent); }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.card h2 { font-size: 16px; margin: 0 0 12px; color: var(--accent); }
input[type=file] {
  display: block;
  width: 100%;
  padding: 10px;
  background: #0f1827;
  color: var(--text);
  border: 1px dashed var(--border);
  border-radius: 8px;
  margin: 8px 0;
}
input[type=file]:disabled { opacity: 0.4; }
.checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
#fileList { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
button, .btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  border: 0;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }
.btn { background: var(--accent-2); }
.danger-btn { background: var(--danger); }
.link-button {
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-size: 13px;
}
.hidden { display: none !important; }
.pill {
  background: #26344a;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
}
.pill.ok { background: #103a22; color: #6ee7a7; }
.pill.err { background: #3a1010; color: #fca5a5; }
.bar {
  width: 100%;
  height: 14px;
  background: #0f1827;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 6px;
}
#bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s;
}
#progressPct { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
pre#log {
  background: #0a1020;
  padding: 12px;
  border-radius: 8px;
  max-height: 260px;
  overflow-y: auto;
  font-size: 12.5px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #c9d6e6;
  margin: 0 0 12px;
}
footer {
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 12px;
}
footer code { color: var(--accent); }

.userbar {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}
.userbar form { margin: 0; }
.auth-main {
  max-width: 420px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.auth-card h1 {
  margin: 0 0 16px;
  font-size: 22px;
}
.auth-form {
  display: grid;
  gap: 12px;
}
.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.auth-form input {
  width: 100%;
  padding: 10px 12px;
  color: var(--text);
  background: #0f1827;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.msg {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.msg.ok {
  color: #6ee7a7;
  background: #103a22;
}
.msg.error {
  color: #fca5a5;
  background: #3a1010;
}
.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.users-table th,
.users-table td {
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 10px 8px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.actions form { margin: 0; }
