/* Pagina publica de envio de documentacion. Sin fuentes ni recursos externos. */
:root {
  --gold: #C9A84C;
  --gold-light: #E8C97A;
  --dark: #0F0F0F;
  --surface: #1A1A1A;
  --surface2: #242424;
  --border: #3A3A3A;
  --text: #F0EDE8;
  --muted: #A3A39B;
  --error: #F08A8A;
  --success: #6BBF8E;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  background: var(--dark);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px;
}

.card {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 22px;
}

[hidden] { display: none !important; }

h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.3;
  color: var(--gold-light);
  margin-bottom: 14px;
  outline: none;
}

h2 {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

p { margin-bottom: 12px; }
.muted { color: var(--muted); font-size: 0.92rem; }

.view { text-align: left; }
#view-loading { display: flex; justify-content: center; padding: 40px 0; }
#view-done, #view-invalid, #view-error { text-align: center; }

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

.icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 600;
}
.icon.ok { background: rgba(107, 191, 142, 0.15); color: var(--success); }
.icon.warn { background: rgba(201, 168, 76, 0.15); color: var(--gold); }

.privacy {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin: 18px 0;
}
.privacy p { font-size: 0.93rem; }
.privacy-link { margin-bottom: 14px; }
.privacy-link a { color: var(--gold-light); font-weight: 600; }
.privacy-link a:focus-visible, .btn:focus-visible, .check input:focus-visible, .file-remove:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 0.95rem;
}
.check input {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--gold);
  cursor: pointer;
}

.files { list-style: none; margin: 4px 0 8px; }
.files li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
}
.files li.error { border-color: var(--error); }
.file-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-state { flex: 0 0 auto; font-size: 0.82rem; color: var(--muted); }
.files li.done .file-state { color: var(--success); }
.files li.error .file-state { color: var(--error); }
.file-error { display: block; flex-basis: 100%; font-size: 0.82rem; color: var(--error); }
.files li.error { flex-wrap: wrap; }
.file-remove {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  margin: -8px -6px -8px 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.3rem;
  cursor: pointer;
  border-radius: 8px;
}
.file-remove:hover { color: var(--text); }

.msg { color: var(--error); font-size: 0.93rem; margin: 6px 0 10px; }

.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.btn {
  min-height: 50px;
  padding: 12px 20px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn.primary { background: var(--gold); color: #1A1400; }
.btn.primary:hover:not(:disabled) { background: var(--gold-light); }
.btn.secondary { background: transparent; color: var(--gold-light); border-color: var(--gold); }
.btn.secondary:hover:not(:disabled) { background: rgba(201, 168, 76, 0.1); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

@media (min-width: 560px) {
  body { padding: 48px 16px; }
  .card { padding: 36px 34px; }
  .actions { flex-direction: row; }
  .actions .btn { flex: 1 1 0; }
  #view-error .actions { justify-content: center; }
  #view-error .actions .btn { flex: 0 0 auto; }
}
