@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Base ── */
body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: #f2f2f2;
  color: #1a1a1a;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Header / Logo ── */
header {
  border-radius: 12px;
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
  background: #000;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

header img {
  max-width: 100%;
  max-height: 160px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

/* ── Cards ── */
.card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 14px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.card h2 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #cc1f1f;
  margin-bottom: 14px;
  border-bottom: 2px solid #cc1f1f;
  padding-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 14px;
  background: #cc1f1f;
  border-radius: 2px;
}

/* ── Form layout ── */
.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.field {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 160px;
  margin-bottom: 10px;
}

.field--sm  { max-width: 160px; }
.field--md  { max-width: 180px; }

.field label {
  font-size: 0.72rem;
  color: #666;
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.field input,
.field select,
.field textarea {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #1a1a1a;
  padding: 8px 10px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #cc1f1f;
  box-shadow: 0 0 0 3px rgba(204, 31, 31, 0.1);
}

.field input[readonly] {
  background: #f0f0f0;
  color: #555;
  cursor: default;
}

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

/* ── Items table ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

table th {
  background: #111;
  color: #fff;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 9px 10px;
  text-align: left;
}

table th:first-child { border-radius: 6px 0 0 0; }
table th:last-child  { border-radius: 0 6px 0 0; }

table td {
  padding: 6px 8px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

table tr:hover td { background: #fdf0f0; }

table td input {
  background: transparent;
  border: none;
  color: #1a1a1a;
  width: 100%;
  font-size: 0.9rem;
  outline: none;
  padding: 2px 4px;
  font-family: inherit;
}

table td input:focus {
  background: #fff3f3;
  border-radius: 4px;
}

table td select {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #1a1a1a;
  padding: 5px;
  width: 100%;
  font-size: 0.85rem;
  font-family: inherit;
}

.btn-add {
  background: none;
  border: 1px dashed #ccc;
  color: #888;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-add:hover {
  border-color: #cc1f1f;
  color: #cc1f1f;
  background: #fff5f5;
}

.btn-remove {
  background: none;
  border: none;
  color: #cc1f1f;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
}

/* ── Totals ── */
.totals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  margin-top: 12px;
}

.totals .line {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
  font-weight: 700;
}

.totals .line span:first-child { color: #666; font-size: 0.95rem; }

.totals .line span:last-child {
  min-width: 110px;
  text-align: right;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 0.85rem;
}

.totals .total-line {
  background: #cc1f1f;
  border-radius: 6px;
  padding: 8px 14px;
  margin-top: 4px;
}

.totals .total-line span {
  color: #fff !important;
  font-weight: 700;
  font-size: 1rem;
}

.totals .total-line span:first-child {
  color: #fff !important;
  font-size: 1.1rem;
}

.totals .total-line span:last-child {
  color: #fff !important;
  font-size: 0.95rem;
}

/* ── Payment options ── */
.payment-opts {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.payment-opts label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 14px;
  transition: all 0.2s;
}

.payment-opts label:hover {
  border-color: #cc1f1f;
  background: #fff5f5;
}

.payment-opts input[type="checkbox"] {
  accent-color: #cc1f1f;
  width: 16px;
  height: 16px;
}

.payment-opts input[type="checkbox"]:checked + span {
  color: #cc1f1f;
  font-weight: 600;
}

/* ── Generate button ── */
.btn-gerar {
  display: block;
  width: 100%;
  padding: 15px;
  background: #cc1f1f;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 8px;
  text-transform: uppercase;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(204, 31, 31, 0.35);
}

.btn-gerar:hover  { background: #a81818; }
.btn-gerar:active { transform: scale(0.99); }

/* ── Footer ── */
footer {
  text-align: center;
  font-size: 0.72rem;
  color: #999;
  padding: 16px 0;
}

/* Alinha o campo de valor numérico à direita */
.input-valor { text-align: right; }
