:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --success: #15803d;
  --border: #d1d5db;
  --warn: #9a3412;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.container { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.topbar { background: #0f172a; color: #fff; padding: 16px 0; margin-bottom: 24px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.topbar h1 { margin: 0; font-size: 1.25rem; }
.subtitle { margin: 2px 0 0; font-size: 0.85rem; color: #cbd5e1; }
.user-bar { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}
.card h2 { margin-top: 0; font-size: 1.15rem; }
.hidden { display: none !important; }
.btn {
  display: inline-block;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: #e5e7eb; color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 4px 8px; font-size: 0.8rem; }
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  background: #f9fafb;
  margin-bottom: 12px;
}
.drop-zone.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.auth-alert {
  border: 1px solid var(--warn);
  background: #fff7ed;
  color: var(--warn);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
}
.auth-alert p { margin: 0 0 10px; }
.auth-links { margin-top: 10px; }
.file-list { list-style: none; padding: 0; margin: 12px 0; }
.file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 6px;
  background: #fff;
}
.file-actions { display: flex; gap: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.progress-panel { margin-top: 16px; }
.progress-bar-bg {
  height: 12px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-fill { height: 100%; background: var(--primary); transition: width 0.3s ease; }
.status-text { font-weight: 500; margin-top: 8px; }
.warnings { color: var(--warn); font-size: 0.9rem; padding-left: 18px; }
.muted { color: var(--muted); font-size: 0.9rem; }
.reuse-box { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.upload-docx-box { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
