:root{
  --bg: #F7F5F1;
  --card: #FFFFFF;
  --ink: #1A1A1A;
  --ink-soft: #6B6660;
  --orange: #FF6A00;
  --orange-dark: #E25A00;
  --line: #E7E2D8;
  --ok: #1F7A3D;
  --err: #C0392B;
  --radius: 14px;
}

*{ box-sizing: border-box; }

body{
  margin:0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ── TOPBAR ── */
.topbar{
  background: var(--orange);
  color:#fff;
  padding: 18px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.brand{
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.5px;
}

.logo{
  height: 28px;
  display: block;
}

.subtitle{
  font-size: 13px;
  color: rgba(26,26,26,0.65);
  margin-top: 4px;
}

/* ── LAYOUT ── */
main{
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 16px 100px;
}

.card{
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 18px;
  margin-bottom: 14px;
}

.section-title{
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

/* ── FORM ── */
label{
  display:block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  margin-top: 14px;
}

label:first-of-type{ margin-top: 0; }

input, textarea{
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  background: #FCFBF9;
  color: var(--ink);
}

input:focus, textarea:focus{
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,106,0,0.15);
}

textarea{ resize: vertical; min-height: 70px; }

/* Campo com erro de validação */
input.field-error{
  border-color: var(--err) !important;
  box-shadow: 0 0 0 3px rgba(192,57,43,0.12) !important;
}

.produto-fixo{
  display:flex;
  align-items:center;
  justify-content:space-between;
  background: #FFF3EA;
  border: 1px dashed var(--orange);
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 700;
  color: var(--orange-dark);
}

.produto-fixo small{
  display:block;
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: 2px;
}

.row2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hint{
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* ── BOTÕES ── */
.btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  padding: 15px 18px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .05s ease, opacity .2s ease;
}

.btn:active{ transform: scale(0.98); }

.btn-primary{
  background: var(--orange);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255,106,0,0.35);
}

.btn-primary:disabled{
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
}

.btn-ghost{
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
  margin-top: 10px;
}

/* ── STATUS ── */
.status{
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  min-height: 20px;
}

.status.ok{ color: var(--ok); }
.status.err{ color: var(--err); }
.status.pending{ color: var(--ink-soft); }

/* ── PWA INSTALL ── */
.install-steps{
  display:none;
  margin-top: 12px;
  padding: 12px;
  background: #FFF3EA;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.install-steps.show{ display:block; }
.install-steps b{ color: var(--orange-dark); }

/* ── FOOTER ── */
footer{
  text-align:center;
  font-size: 11px;
  color: var(--ink-soft);
  padding: 20px 24px 30px;
}
