:root {
  --bg: #0f1115;
  --bg-elevated: #171a21;
  --border: #262b35;
  --text: #e6e8eb;
  --text-muted: #8a909c;
  --accent: #4f8cff;
  --accent-hover: #3f76e0;
  --danger: #e6555a;
  --success: #4caf6a;
}

* {
  box-sizing: border-box;
}

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

.hidden {
  display: none !important;
}

.view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#login-view {
  justify-content: center;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  width: min(360px, 90vw);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  font-size: 0.95rem;
}

input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
}

button:hover {
  background: var(--accent-hover);
}

button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

button.secondary:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.error {
  color: var(--danger);
  min-height: 1.2em;
  font-size: 0.85rem;
  margin: 0;
}

#dashboard-view {
  width: min(720px, 92vw);
  gap: 1.5rem;
  padding: 2rem 0 4rem;
}

.topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar h1 {
  font-size: 1.3rem;
  margin: 0;
}

#dropzone {
  width: 100%;
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

#dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(79, 140, 255, 0.06);
}

.dz-title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.dz-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.link {
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

.panel {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.panel h2 {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.list li:last-child {
  border-bottom: none;
}

.item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.badge.uploading {
  background: rgba(79, 140, 255, 0.15);
  color: var(--accent);
}

.badge.done {
  background: rgba(76, 175, 106, 0.15);
  color: var(--success);
}

.badge.failed {
  background: rgba(230, 85, 90, 0.15);
  color: var(--danger);
}

.progress-track {
  flex: 1;
  height: 6px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.2s;
}

.empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}
