/* Design sóbrio, responsivo, sem frameworks. */
:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #1d2433;
  --muted: #6b7280;
  --line: #e3e6eb;
  --brand: #2b6cb0;
  --brand-dark: #245a93;
  --ok: #1f8a4c;
  --err: #c0392b;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  line-height: 1.5;
}

.card {
  background: var(--card);
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 8px 30px rgba(20, 30, 50, 0.06);
}

h1 {
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: -0.5px;
}

.subtitle {
  margin: 0.4rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  outline: none;
}
.dropzone:hover,
.dropzone:focus-visible { border-color: var(--brand); }
.dropzone.dragover {
  border-color: var(--brand);
  background: #eef4fb;
}
.dropzone .icon {
  width: 38px;
  height: 38px;
  color: var(--brand);
  margin-bottom: 0.5rem;
}
.dz-text { margin: 0 0 0.75rem; color: var(--muted); }

/* Info do arquivo */
.file-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.65rem 0.85rem;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
}
.file-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.file-size { color: var(--muted); white-space: nowrap; }
.link-btn {
  background: none;
  border: none;
  color: var(--err);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  text-decoration: underline;
}

/* Botões */
.btn {
  font: inherit;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.btn-secondary {
  background: #eef2f7;
  color: var(--brand-dark);
  font-weight: 600;
}
.btn-secondary:hover { background: #e2e8f1; }
.btn-primary {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
}
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Status */
.status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  font-size: 0.92rem;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  background: #f7f9fc;
}
.status.ok { color: var(--ok); background: #eaf6ef; }
.status.err { color: var(--err); background: #fbecea; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(43, 108, 176, 0.3);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

footer {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

@media (max-width: 480px) {
  .card { padding: 1.5rem; }
  h1 { font-size: 1.45rem; }
}
