:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1c1f24;
  --muted: #667085;
  --border: #e3e6ea;
  --accent: #3355dd;
  --accent-text: #ffffff;
  --error: #c0362c;
  --hover: #eef1f6;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --card: #1d2025;
    --text: #e6e8eb;
    --muted: #98a2b3;
    --border: #2f343b;
    --accent: #6d8bff;
    --accent-text: #0d1020;
    --error: #ff7a6e;
    --hover: #262a31;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 16px;
}

h1 { font-size: 1.4rem; margin: 0 0 16px; }

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

.narrow { max-width: 380px; margin: 10vh auto 0; }

form label {
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
}

input[type="email"], input[type="password"] {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

button, .button {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
button:disabled { opacity: 0.6; cursor: default; }
form button { width: 100%; margin-top: 4px; }

button.secondary, button.link {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
button.link { padding: 4px 8px; font-size: 0.9em; }
button.link.danger { color: var(--error); }

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.topbar h1 { margin: 0; }
.who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dropzone {
  text-align: center;
  border-style: dashed;
  border-width: 2px;
}
.dropzone p { margin: 0 0 8px; }
.dropzone p.small { margin: 8px 0 0; }
.dropzone.dragover { border-color: var(--accent); background: var(--hover); }

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
th { font-size: 0.85em; color: var(--muted); font-weight: 600; }
tbody tr:last-child td { border-bottom: none; }
td.name { word-break: break-all; }
td.actions { white-space: nowrap; text-align: right; }
.num { text-align: right; white-space: nowrap; }

.muted { color: var(--muted); }
.small { font-size: 0.85em; }
.error { color: var(--error); margin: 0 0 12px; }
.status { margin: 0 0 16px; }
.status.error { color: var(--error); }

@media (max-width: 600px) {
  th:nth-child(3), td:nth-child(3) { display: none; }
}
