:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2d3a4d;
  --text: #e8eef5;
  --muted: #8b9cb3;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --danger: #f87171;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.card {
  width: 100%;
  max-width: 22rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
}

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

.muted {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stack label span {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
  color: var(--muted);
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

button[type="submit"],
.topbar button {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

button[type="submit"]:hover:not(:disabled) {
  background: var(--accent-hover);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error {
  color: var(--danger);
  font-size: 0.875rem;
  margin: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.brand {
  font-weight: 600;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--muted);
}

.layout {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .layout {
    grid-template-columns: 1fr 1fr;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.file-drop {
  display: block;
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.file-drop input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.file-drop.drag {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}

#file-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.status {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  word-break: break-all;
}

.error-text {
  color: var(--danger);
}

.folder-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.folder-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.folder-item:last-child {
  border-bottom: none;
}

.folder-item a {
  color: var(--accent);
}

.btn-small {
  margin-top: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.btn-small:hover {
  border-color: var(--muted);
}

.btn-danger {
  border-color: rgba(248, 113, 113, 0.35);
  color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.12);
  border-color: var(--danger);
}

.copied-toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
}
