:root {
  --bg: #0b0c10;
  --card: #111217;
  --text: #e6e6e6;
  --muted: #a0a0a0;
  --primary: #3b82f6;
  --primary-700: #2563eb;
  --border: #21232b;
  --ok: #10b981;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 17px;
  line-height: 1.5;
  background: radial-gradient(1000px 600px at 10% -10%, #1c1f28 20%, #0b0c10 60%, #0b0c10 100%);
  color: var(--text);
}

.container {
  max-width: 860px;
  margin: 32px auto;
  padding: 0 16px;
}

header { margin-bottom: 16px; }
h1 { font-size: 30px; margin: 0 0 6px; }
.sub { color: var(--muted); margin: 0; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Extra space before footer so last card doesn't colide */
.card:last-of-type { margin-bottom: 72px; }

h2 { font-size: 18px; margin: 0 0 12px; }

.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.option {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 14px; min-height: 56px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.option input { accent-color: var(--primary); }
.price { color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field span { color: var(--muted); font-size: 13px; }
.field input, .field select, .field textarea {
  background: #0e1015; color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; outline: none;
  font-size: 16px; /* evita zoom em iOS e melhora legibilidade para 50+ */
}
.field textarea { min-height: 84px; }
.field .error { color: #f87171; font-size: 13px; min-height: 16px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.hint { color: var(--muted); font-size: 12px; }
.status-ok { color: var(--ok); }
.status-err { color: #f87171; }

.summary { display: grid; gap: 10px; }
.summary .total strong { color: #f5f5f5; font-size: 18px; }

.actions-row { display: flex; justify-content: flex-end; margin-top: 8px; }
.actions-row--end { justify-content: flex-end; }
.top-actions { display:flex; justify-content: space-between; margin-bottom: 8px; }

.btn-primary, .btn-secondary {
  appearance: none; border: none; border-radius: 10px; cursor: pointer;
  padding: 14px 18px; font-weight: 600; font-size: 16px;
}
.btn-primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-700)); color: white;
  box-shadow: 0 8px 24px rgba(37,99,235,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
  margin-top: 24px;
  width: 100%;
}
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }

/* Sticky CTA mobile */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(11,12,16,0.95); border-top: 1px solid var(--border); backdrop-filter: blur(6px); }
.sticky-cta__total span { color: var(--muted); font-size: 13px; display:block; }
.sticky-cta__total strong { font-size: 18px; }
.sticky-cta__actions { display: flex; gap: 8px; align-items: center; }
.btn-hide-mobile { display: none; }

@media (min-width: 641px) {
  .sticky-cta { display:none !important; }
  .btn-hide-mobile { display: inline-block; }
}

/* Acessibilidade: foco visível */
*:focus-visible { outline: 3px solid rgba(59,130,246,0.6); outline-offset: 2px; }

@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

/* Footer common style (mobile-first) */
footer { text-align: center; opacity: 0.75; font-size: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
footer a { color: inherit; }
