/* ── Cartões ── */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.card h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 4px;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.step {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  font-weight: 600;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  flex: none;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
}
.card .hint {
  color: var(--ink-soft);
  font-size: .86rem;
  margin: 0 0 16px;
}

/* ── Formulário / Configuração ── */
.cfg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 620px) {
  .cfg-grid { grid-template-columns: 1fr; }
}

label.field { display: block; }
label.field .lab {
  display: block;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

input[type=text],
input[type=number],
select {
  width: 100%;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: .92rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  transition: border-color .15s, box-shadow .15s;
}
input[type=text]:focus,
input[type=number]:focus,
select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.mono { font-family: 'JetBrains Mono', monospace; font-size: .84rem; }

.toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .9rem;
  cursor: pointer;
  user-select: none;
  padding-top: 8px;
}
.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  cursor: pointer;
}

/* ── Dropzone ── */
.drop {
  border: 2px dashed var(--line);
  border-radius: 14px;
  background: #fefdf9;
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}
.drop:hover { border-color: var(--teal); background: var(--teal-soft); }
.drop.drag  { border-color: var(--accent); background: #fbeee7; transform: scale(1.006); }
.drop .di   { width: 42px; height: 42px; color: var(--teal); margin-bottom: 10px; }
.drop strong { font-weight: 700; }
.drop .pick {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.drop small {
  display: block;
  color: var(--ink-soft);
  margin-top: 7px;
  font-size: .82rem;
}

.filechip {
  display: none;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 11px 14px;
  background: var(--success-bg);
  border: 1px solid #33784f33;
  border-radius: 11px;
  font-size: .9rem;
}
.filechip svg { width: 20px; height: 20px; color: var(--success); flex: none; }
.filechip .x {
  margin-left: auto;
  cursor: pointer;
  color: var(--ink-soft);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}
.filechip .x:hover { background: #0001; }

/* ── Botões ── */
.btn {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  font-size: .96rem;
  border: none;
  border-radius: 11px;
  padding: 13px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: transform .12s, filter .15s, box-shadow .15s;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px -8px var(--accent-deep);
}
.btn-primary:not(:disabled):hover { filter: brightness(1.04); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-ghost:not(:disabled):hover { border-color: var(--ink); }

.btn-success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 8px 18px -8px #33784f88;
}
.btn-success:not(:disabled):hover { filter: brightness(1.05); transform: translateY(-1px); }

.btnrow {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  align-items: center;
}

.linklike {
  background: none;
  border: none;
  color: var(--teal);
  font-family: 'Hanken Grotesk';
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}

/* ── Progresso ── */
#progressCard { display: none; }

.pbar {
  height: 11px;
  border-radius: 99px;
  background: #0000000d;
  overflow: hidden;
  margin: 6px 0 14px;
}
.pbar > div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--teal), var(--accent));
  transition: width .25s;
  border-radius: 99px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.stat {
  flex: 1;
  min-width: 90px;
  background: #fefdf9;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 13px;
}
.stat .n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
}
.stat .l {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-soft);
  margin-top: 5px;
}
.stat.ok   .n { color: var(--success); }
.stat.fail .n { color: var(--error); }
.stat.warn .n { color: var(--warn); }

.pstatus {
  font-size: .88rem;
  color: var(--ink-soft);
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.spinner {
  width: 15px;
  height: 15px;
  border: 2.5px solid var(--teal-soft);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Tabela de prévia ── */
#resultCard { display: none; }

.tablewrap {
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: auto;
  max-height: 380px;
  margin-top: 6px;
}
table { border-collapse: collapse; width: 100%; font-size: .83rem; }
th, td {
  padding: 8px 11px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th {
  position: sticky;
  top: 0;
  background: var(--paper);
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-soft);
  z-index: 1;
}
tbody tr:hover { background: var(--teal-soft); }
td.coord { font-family: 'JetBrains Mono', monospace; font-size: .8rem; }

.tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}
.tag.ok   { background: var(--success-bg); color: var(--success); }
.tag.warn { background: var(--warn-bg);    color: var(--warn); }
.tag.fail { background: var(--error-bg);   color: var(--error); }

.morenote {
  font-size: .8rem;
  color: var(--ink-soft);
  margin: 10px 2px 0;
}

/* ── Avisos ── */
.alert {
  display: none;
  padding: 12px 15px;
  border-radius: 11px;
  font-size: .88rem;
  margin-top: 14px;
  align-items: flex-start;
  gap: 9px;
}
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert.err  { background: var(--error-bg); color: var(--error); border: 1px solid #b53e2633; }
.alert.info { background: var(--warn-bg);  color: #7a5614;      border: 1px solid #a9761f33; }
