:root {
  --brand: #004AAD;
  --brand-soft: rgba(0, 74, 173, 0.08);
  --brand-border: rgba(0, 74, 173, 0.2);
  --text: #1a1a1a;
  --muted: #5f6368;
  --danger: #c62828;
  --ok: #2e7d32;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0, 74, 173, 0.12);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #f6f8fc; color: var(--text); }
body { min-height: 100vh; }

.topbar {
  background: var(--brand);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.2px;
}
.brand img { width: 36px; height: 36px; border-radius: 8px; background: #fff; }
.topbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.card {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

h1 { margin: 0 0 6px; font-size: 1.4rem; color: var(--brand); }
h2 { margin: 0 0 12px; font-size: 1.1rem; color: var(--brand); }
.muted { color: var(--muted); font-size: 0.95rem; line-height: 1.45; }

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.secondary {
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--brand);
}
.btn.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.55);
}
.btn.danger { background: var(--danger); }

.dropzone {
  border: 2px dashed var(--brand);
  background: var(--brand-soft);
  border-radius: var(--radius);
  padding: 36px 18px;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
  cursor: pointer;
}
.dropzone.dragover {
  background: rgba(0, 74, 173, 0.16);
  border-color: #00357a;
}
.dropzone strong { display: block; color: var(--brand); margin-bottom: 6px; font-size: 1.05rem; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.toolbar input[type="search"] {
  flex: 1;
  min-width: 160px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cfd8e3;
  font-size: 0.95rem;
}

.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #eef2f7;
}
.file-list li:last-child { border-bottom: none; }
.file-name { font-weight: 600; word-break: break-word; }
.file-meta { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag {
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 600;
}

.status {
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef2f7;
  color: var(--muted);
  margin-top: 12px;
  white-space: pre-wrap;
}
.status.ok { background: #e8f5e9; color: var(--ok); }
.status.err { background: #ffebee; color: var(--danger); }

.setup-warn {
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #6d4c00;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 0.92rem;
  line-height: 1.45;
}
.setup-warn code { background: rgba(0,0,0,0.06); padding: 1px 5px; border-radius: 4px; }

.hidden { display: none !important; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 8px 16px 28px;
}

@media (max-width: 560px) {
  .file-list li { grid-template-columns: 1fr; }
}

.lede {
  font-size: 1.02rem;
  line-height: 1.5;
  margin: 0 0 10px;
  color: var(--text);
}
.how-card h2 { margin-bottom: 10px; }
.how-steps {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text);
  line-height: 1.5;
}
.how-steps li { margin-bottom: 10px; }
.how-steps li:last-child { margin-bottom: 0; }
.tip {
  margin: 14px 0 0;
  padding: 10px 12px;
  background: var(--brand-soft);
  border-radius: 10px;
}
.brand img {
  object-fit: cover;
}
