:root {
  --bg: #fafaf7;
  --panel: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e6e4dd;
  --accent: #1f6feb;
  --accent-ink: #ffffff;
  --ok: #117a3d;
  --err: #b3261e;
  --warn: #8a6d00;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

header {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 16px;
}

header h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.subtitle {
  color: var(--muted);
  margin: 0;
  max-width: 640px;
}

.subtitle code {
  background: #ececec;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 24px 48px;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: var(--panel);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover, .dropzone.drag {
  border-color: var(--accent);
  background: #f3f7ff;
  color: var(--ink);
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dropzone p {
  margin: 0;
}

#files-section {
  margin-top: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #fafaf7;
}

tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

.col-name { width: 45%; }
.col-color { width: 30%; }
.col-status { width: 15%; }
.col-actions { width: 10%; text-align: right; }

.filename {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}

.color-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-family: inherit;
}

.color-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}

.status {
  font-size: 13px;
}
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }
.status.warn { color: var(--warn); }
.status.busy { color: var(--accent); }

.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.row-actions a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.row-actions a:hover { text-decoration: underline; }

.row-actions button.remove {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
}
.row-actions button.remove:hover { background: #f0eee7; color: var(--ink); }

.actions {
  padding: 16px;
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border);
  background: #fafaf7;
}

button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.1s, border-color 0.1s;
}

button.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
button.primary:hover { background: #1858c4; }
button.primary:disabled { background: #a8b8d0; cursor: not-allowed; }

button.secondary {
  background: white;
  color: var(--ink);
  border-color: var(--border);
}
button.secondary:hover { background: #f5f3ed; }

footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 640px) {
  .col-status { display: none; }
  thead th, tbody td { padding: 8px; }
}
