:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #1c2530;
  --muted: #6b7787;
  --line: #e2e6eb;
  --accent: #2f6df6;
  --accent-ink: #ffffff;
  --ok: #1a7f4b;
  --err: #c0392b;
  --over: #c0392b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

header {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 20px 8px;
}
header h1 { margin: 0; font-size: 1.6rem; }
header .sub { margin: 4px 0 0; color: var(--muted); }

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 20px 60px;
  display: grid;
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  display: grid;
  gap: 14px;
}

.field-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

input[type="text"], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grid .col-2 { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.dropzone {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 26px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone:focus { border-color: var(--accent); outline: none; }
.dropzone.drag { border-color: var(--accent); background: #eef3ff; }
.dz-hint { margin: 0; }

.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb { position: relative; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-rm {
  position: absolute; top: 2px; right: 2px;
  width: 22px; height: 22px; border: none; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 15px; line-height: 1;
}

.services summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.services[open] summary { margin-bottom: 10px; }

.btn-primary {
  padding: 11px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  justify-self: start;
}
.btn-primary:disabled { opacity: .6; cursor: default; }

.status { margin: 0; font-weight: 600; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }

.results { display: grid; gap: 20px; }
.estilo-badge {
  justify-self: start;
  background: #eef3ff;
  border: 1px solid #cfe0ff;
  color: #1c4bd1;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
}
.result-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
}
.result-block h2 { margin: 0 0 12px; font-size: 1.1rem; }

.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #fbfcfd;
}
.item:last-child { margin-bottom: 0; }
.item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.item p { margin: 0; white-space: pre-wrap; }
.btn-row { display: flex; align-items: center; gap: 8px; }

.btn-copy {
  padding: 4px 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  font-size: .8rem;
  cursor: pointer;
  white-space: nowrap;
}
.btn-copy:hover { border-color: var(--accent); color: var(--accent); }
.btn-copy.copied { border-color: var(--ok); color: var(--ok); }

.counter { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--over); font-weight: 700; }
