
:root {
  --brand-green: #075b2d;
  --brand-green-deep: #063b1f;
  --brand-green-soft: #cfe7d8;
  --brand-yellow: #ffd33d;
  --brand-yellow-soft: #fff4bd;
  --ink: #143222;
  --muted: #5f7265;
  --glass: rgba(255,255,255,0.28);
  --glass-strong: rgba(255,255,255,0.42);
  --glass-border: rgba(255,255,255,0.58);
  --shadow: 0 16px 40px rgba(9, 39, 23, 0.10);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(255, 211, 61, 0.16), transparent 22%),
    radial-gradient(circle at bottom left, rgba(7, 91, 45, 0.18), transparent 22%),
    linear-gradient(135deg, #eff6ef 0%, #edf6ee 42%, #f6f7ef 100%);
}
.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(620px 320px at 78% 12%, rgba(255, 214, 92, 0.12), transparent 58%),
    radial-gradient(520px 280px at 18% 76%, rgba(22, 126, 66, 0.16), transparent 60%);
  pointer-events: none;
}
.shell {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 24px calc(120px + env(safe-area-inset-bottom));
}
.glass-panel {
  background: linear-gradient(135deg, rgba(255,255,255,.54), rgba(255,255,255,.22));
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(26px) saturate(130%);
  -webkit-backdrop-filter: blur(26px) saturate(130%);
  box-shadow: var(--shadow);
  border-radius: 28px;
}
.masthead,
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  overflow: hidden;
  position: relative;
}
.masthead {
  margin-bottom: 18px;
}
.hero {
  margin-bottom: 18px;
}
.masthead::after,
.hero::after,
.intro::after,
.config-section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 10%, rgba(255,255,255,0.18) 42%, transparent 72%);
  mix-blend-mode: screen;
}
.brand-wrap,
.masthead-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--brand-green-deep);
}
.brand-subtitle {
  color: var(--muted);
  font-size: 14px;
}
.menu-trigger {
  border: 1px solid rgba(7,91,45,.10);
  background: rgba(255,255,255,0.36);
  color: var(--brand-green);
  border-radius: 20px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.logo-orb {
  width: 88px;
  height: 88px;
  border-radius: 26px;
  background: rgba(255,255,255,0.28);
  border: 1px solid rgba(255,255,255,0.65);
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 14px rgba(255,255,255,.6), 0 10px 30px rgba(5, 64, 35, 0.12);
}
.logo-orb img { width: 74px; height: 74px; object-fit: contain; }
.eyebrow, .section-kicker {
  color: #2b6340;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.hero h1, .intro h2, .config-head h3 {
  margin: 6px 0 8px;
  line-height: 1.02;
}
.hero h1 { font-size: clamp(34px, 5vw, 58px); color: var(--brand-green-deep); }
.hero p, .intro p, .config-head p { margin: 0; color: var(--muted); }
.version-pill {
  padding: 12px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(7,91,45,.08), rgba(255,211,61,.20));
  border: 1px solid rgba(7,91,45,.12);
  font-weight: 700;
  white-space: nowrap;
}
.top-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px;
  margin-top: 0;
}
.menu-chip {
  padding: 12px 14px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.28);
  border: 1px solid rgba(255,255,255,0.58);
  color: #365244;
  font-weight: 600;
}
.menu-chip.active {
  background: linear-gradient(135deg, rgba(7,91,45,.14), rgba(255,211,61,.22));
  color: var(--brand-green);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 10px 22px rgba(7,91,45,.08);
}
.menu-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(7,91,45,0.09);
}
.intro {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 24px 26px;
}
.intro-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.primary-btn, .ghost-btn, .section-btn {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 14px 18px;
  border-radius: 18px;
  transition: transform .16s ease, box-shadow .16s ease;
}
.primary-btn, .section-btn.save {
  color: white;
  background: linear-gradient(135deg, var(--brand-green), #0a753b);
  box-shadow: 0 10px 24px rgba(7,91,45,.25);
}
.ghost-btn, .section-btn.edit {
  color: var(--brand-green);
  background: rgba(255,255,255,0.32);
  border: 1px solid rgba(7,91,45,0.12);
}
.primary-btn:hover, .ghost-btn:hover, .section-btn:hover { transform: translateY(-1px); }
.sections-stack {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}
.config-section {
  position: relative;
  padding: 22px;
}
.config-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.field-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.42), rgba(255,255,255,0.18));
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 22px;
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 10px 20px rgba(8,41,25,.05);
}
.field-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
label {
  font-size: 15px;
  font-weight: 700;
}
.info-chip {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,211,61,0.48);
  background: linear-gradient(135deg, rgba(255,255,255,0.58), rgba(255,236,179,0.36));
  color: var(--brand-green);
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.field-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.24);
  border: 1px solid rgba(255,255,255,0.62);
}
.field-input-wrap.editable {
  border-color: rgba(7,91,45,.18);
  box-shadow: 0 0 0 4px rgba(7,91,45,0.03);
}
input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
}
input[readonly] { cursor: default; }
.unit {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.footer-note {
  text-align: center;
  color: var(--muted);
  margin: 20px auto 0;
  font-size: 14px;
  width: fit-content;
  max-width: calc(100% - 20px);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.34), rgba(255,255,255,0.18));
  border: 1px solid rgba(255,255,255,0.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  background: rgba(20, 50, 34, 0.92);
  color: white;
  padding: 12px 16px;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
  max-width: min(92vw, 520px);
  text-align: center;
  transition: all .2s ease;
  z-index: 30;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 860px) {
  .shell { padding: 14px 14px calc(130px + env(safe-area-inset-bottom)); }
  .masthead, .hero, .intro, .config-section { padding: 18px; }
  .masthead, .hero, .intro, .config-head { flex-direction: column; align-items: stretch; }
  .brand-wrap, .masthead-brand { align-items: flex-start; }
  .menu-trigger { width: 100%; justify-content: center; }
  .top-nav { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 10px; }
  .menu-chip { white-space: nowrap; }
  .intro-actions { width: 100%; }
  .primary-btn, .ghost-btn, .section-btn { flex: 1; justify-content: center; }
  .field-grid { grid-template-columns: 1fr; }
  .field-card { padding: 14px; }
  .section-btn { width: 100%; }
}

.calculator-panel{margin-top:18px;position:relative;padding:24px}
.calc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-top:18px}
.calc-grid label{background:rgba(255,255,255,.32);padding:14px;border-radius:18px}
.calc-grid input{display:block;margin-top:8px;background:rgba(255,255,255,.45);padding:10px;border-radius:12px}
.result-card{margin-top:20px;padding:22px;background:linear-gradient(135deg,rgba(7,91,45,.10),rgba(255,211,61,.16))}
.result-card strong{font-size:36px;color:#075b2d;display:block;margin:10px 0}


/* v0.1.2.4-beta — reparo controlado da Calculadora Venda */
button.menu-chip {
  border: 0;
  font: inherit;
  cursor: pointer;
}
.calc-page {
  display: grid;
  gap: 18px;
}
.calc-result-value {
  margin: 12px 0 18px;
  color: var(--brand-green-deep);
  font-size: clamp(32px, 7vw, 54px);
  line-height: 1;
  font-weight: 800;
}
.calc-result-list {
  display: grid;
  gap: 8px;
}
.calc-result-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgb(8 80 42 / 10%);
}
@media (min-width: 900px) {
  .calc-page {
    grid-template-columns: 1fr 1fr;
  }
  .calc-page > section:last-child {
    grid-column: 1 / -1;
  }
}


/* v0.1.2.5-beta — refinamento mobile da Calculadora */
.calc-page {
  gap: 14px;
}

.calc-page .config-section {
  margin: 0;
}

.calc-page .field-grid {
  gap: 12px;
}

.calc-page .field-card {
  padding: 18px;
}

.calc-page .field-input-wrap {
  margin-top: 10px;
}

/* Evita sobra visual branca no fim da página no Safari/iOS */
html,
body,
#app {
  min-height: 100%;
  background: transparent;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
}

.shell {
  min-height: 100dvh;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.page-bg {
  position: fixed;
  inset: 0;
  min-height: 100dvh;
}

.footer-note {
  margin-bottom: 0;
}

/* Unidade percentual visível sem interferir na digitação */
.calc-page .unit {
  flex: 0 0 auto;
  min-width: 22px;
  text-align: right;
  font-weight: 700;
}

@media (max-width: 640px) {
  .calc-page {
    gap: 12px;
  }

  .calc-page .config-section {
    padding: 22px 18px;
  }

  .calc-page .field-grid {
    gap: 10px;
  }

  .calc-page .field-card {
    padding: 16px;
  }
}
