:root {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-dark: #0ea5e9;
  --border: #334155;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

h1 {
  margin: 0 0 0.25rem;
  font-size: 1.6rem;
}

.subtitle {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

label {
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.req {
  color: #f87171;
}

.opt {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.8rem;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: #0f172a;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

input[type="file"] {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

button {
  margin-top: 1.5rem;
  padding: 0.75rem;
  background: var(--accent-dark);
  color: #04293f;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

button:hover:not(:disabled) {
  background: var(--accent);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Progreso de subida --- */
#progress-box {
  margin-top: 1.25rem;
}

progress {
  width: 100%;
  height: 10px;
  appearance: none;
  border: none;
  border-radius: 999px;
  background: #0f172a;
  overflow: hidden;
}

progress::-webkit-progress-bar {
  background: #0f172a;
}

progress::-webkit-progress-value {
  background: var(--accent);
  transition: width 0.2s linear;
}

progress::-moz-progress-bar {
  background: var(--accent);
}

.progress-label {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.file-list {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
}

.file-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-top: 1px solid var(--border);
}

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-state {
  flex-shrink: 0;
  color: var(--muted);
}

/* --- Banner de subida pendiente --- */
.resume-banner {
  margin-bottom: 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--accent-dark);
  border-radius: 8px;
  background: #1e3a5f;
  font-size: 0.85rem;
}

.resume-banner p {
  margin: 0 0 0.6rem;
  color: var(--accent);
}

.resume-actions {
  display: flex;
  gap: 0.5rem;
}

button.secondary {
  margin-top: 0.75rem;
  padding: 0.45rem 0.8rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 600;
}

button.secondary:hover:not(:disabled) {
  background: var(--accent-dark);
  color: #04293f;
}

.status {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.status a {
  color: inherit;
  font-weight: 700;
}

.status.loading {
  background: #1e3a5f;
  color: var(--accent);
}

.status.success {
  background: #14532d;
  color: #bbf7d0;
}

.status.error {
  background: #7f1d1d;
  color: #fecaca;
}
