:root {
  --bg: #0f1419;
  --panel: #1a2029;
  --border: #2a323d;
  --text: #e6e9ee;
  --muted: #94a3b8;
  --accent: #4f8cff;
  --accent-hover: #3b76e0;
  --ok: #34d399;
  --err: #f87171;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 640px;
  padding: 48px 24px;
}

h1 { font-size: 1.6rem; margin: 0 0 8px; }

.subtitle { color: var(--muted); margin: 0 0 32px; }

code {
  background: var(--panel);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 160px;
  padding: 24px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: #1e2733;
}

.dropzone.has-file {
  border-color: var(--ok);
  color: var(--text);
}

button {
  margin-top: 16px;
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}

button:hover:not(:disabled) { background: var(--accent-hover); }
button:disabled { opacity: .5; cursor: not-allowed; }

.status {
  margin-top: 24px;
  padding: 16px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  white-space: pre-wrap;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.85rem;
}

.status.ok { border-color: var(--ok); }
.status.err { border-color: var(--err); color: var(--err); }

/* ---------- Pantalla de revisión ---------- */
.container--wide { max-width: 880px; }

.back {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.back:hover { color: var(--accent); }

.warnings {
  margin-bottom: 24px;
  padding: 12px 16px;
  background: #2a2113;
  border: 1px solid #6b5418;
  border-radius: 8px;
  color: #e8c97a;
}
.warnings summary { cursor: pointer; font-weight: 600; }
.warnings ul { margin: 8px 0 0; padding-left: 20px; font-size: 0.88rem; }

fieldset {
  margin: 0 0 24px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
legend {
  padding: 0 8px;
  font-weight: 600;
  color: var(--accent);
}

.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

input[type="text"],
textarea {
  width: 100%;
  padding: 9px 11px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  resize: vertical;
}
input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.grid { display: grid; gap: 0 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.list-editor { display: flex; flex-direction: column; gap: 8px; }
.list-row { display: flex; gap: 8px; align-items: center; }
.list-row input { flex: 1; }

.btn-remove {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  margin: 0;
  padding: 0;
  font-size: 1.2rem;
  line-height: 1;
  background: transparent;
  color: var(--err);
  border: 1px solid var(--border);
  border-radius: 7px;
}
.btn-remove:hover { background: #3a1f1f; }

.btn-add {
  width: auto;
  margin-top: 10px;
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  background: transparent;
  color: var(--accent);
  border: 1px dashed var(--border);
}
.btn-add:hover { background: #1e2733; border-color: var(--accent); }

.img-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.img-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  background: var(--bg);
}
.img-card img {
  display: block;
  max-width: 240px;
  max-height: 150px;
  border-radius: 4px;
}
.btn-remove-img {
  width: 100%;
  margin: 6px 0 0;
  padding: 4px;
  font-size: 0.78rem;
  background: transparent;
  color: var(--err);
  border: 1px solid var(--border);
}
.btn-remove-img:hover { background: #3a1f1f; }
.new-tag {
  position: absolute;
  top: 8px; left: 8px;
  padding: 2px 6px;
  font-size: 0.7rem;
  background: var(--ok);
  color: #04231a;
  border-radius: 4px;
}

.file-add {
  display: block;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}
.file-add span { display: block; margin-bottom: 6px; }
