/* Conversor ZPL → PDF (PWA) — tema preto/dourado Artesã de Ouro */
:root {
  --bg: #0e0e10; --bg-2: #16161a; --card: #1c1c22; --card-2: #232329;
  --line: #2c2c34; --text: #f2f2f4; --muted: #8b8b95;
  --gold: #d4af37; --gold-dark: #b8941f; --green: #34d399; --red: #f87171; --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px;
  display: flex; flex-direction: column; min-height: 100vh;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
  background: linear-gradient(180deg, #1a1a1f, #141418);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; }
.gem { font-size: 22px; }
.brand-title { font-weight: 700; font-size: 16px; }
.brand-sub { font-size: 11px; }

main { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 14px; max-width: 680px; width: 100%; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }

.step-head { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.step-num { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #0e0e10; font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label { font-size: 12px; font-weight: 600; }
input[type=text], input[type=number], textarea, select {
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 12px; font-size: 16px; width: 100%; font-family: inherit;
}
textarea { resize: vertical; font-family: "Cascadia Code", Consolas, monospace; font-size: 13px; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold-dark); }

.row { display: flex; gap: 10px; align-items: flex-end; }
.row > .field { margin-bottom: 0; }

button {
  border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  border-radius: 10px; padding: 12px 14px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: .12s;
}
button:active { transform: scale(.98); }
button:disabled { opacity: .5; }
button.ghost { background: var(--card-2); }
button.primary { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #0e0e10; border: none; }

.hint { font-size: 12px; margin-top: 4px; line-height: 1.5; }

.preview {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  min-height: 220px; display: flex; align-items: center; justify-content: center;
  padding: 12px; margin-bottom: 12px; overflow: hidden;
}
.preview img { max-width: 100%; max-height: 60vh; background: #fff; border-radius: 4px; box-shadow: 0 4px 20px rgba(0,0,0,.4); }
.preview-empty { font-size: 13px; text-align: center; }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 12px; }
.pager button { padding: 6px 14px; }

.status { padding: 10px 4px; font-size: 13px; min-height: 20px; display: flex; align-items: center; gap: 8px; }
.status.ok { color: var(--green); }
.status.err { color: var(--red); }
.status a { color: var(--gold); cursor: pointer; text-decoration: underline; }

.foot { font-size: 11px; text-align: center; line-height: 1.6; padding: 4px 8px 20px; }

.spinner {
  width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--gold);
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
