/* Estilo das páginas do sistema (cotações, cadastro, minha assinatura e painel).
   As cores seguem a identidade do escritório; para outra marca, troque as variáveis abaixo. */
:root {
  --bg: #f7faf8; --surface: #ffffff; --ink: #12281c; --ink-2: #4a5a50; --ink-3: #33433a;
  --line: #dde5e0; --line-2: #ebf0ed; --field: #87958c; --soft: #f2f6f3; --edge: #b7c6bd;
  /* marca AWWB Agro: verde 7731 C e 361 C, dourado 7409 C e 7565 */
  --brand: #088944; --brand-2: #25af2b; --gold: #f5b510; --gold-2: #d89802;
  /* derivados da marca: --primary recebe texto branco, --deep é o fundo escuro, --accent-ink é o verde para texto */
  --primary: #07803f; --primary-hover: #066a35; --deep: #0b3d26; --deep-soft: #b9d4c4;
  --accent: #088944; --accent-ink: #06713a; --tint: #e8f5ec; --tint-2: #d3ecd9;
  --up: #0a6b2d; --up-bg: #e6f4ea; --down: #b3261e; --down-bg: #fdecea; --flat-bg: #ebf0ed;
  --warn: #5c4100; --warn-bg: #fff1cc;
  --band: linear-gradient(90deg, #088944 0%, #25af2b 50%, #088944 100%);
  --font: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { line-height: 1.15; font-weight: 900; letter-spacing: -0.01em; text-wrap: balance; }
a { color: var(--ink); }
a:hover { color: var(--accent-ink); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.page { max-width: 1248px; margin: 0 auto; padding: 40px 24px 56px; display: flex; flex-direction: column; gap: 28px; }
.page.narrow { max-width: 520px; padding: 28px 16px 40px; gap: 20px; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.eyebrow::before { content: ""; flex: none; width: 24px; height: 3px; border-radius: 2px; background: var(--gold); }
.head { display: flex; flex-direction: column; gap: 8px; }
.head h1 { font-size: clamp(28px, 4.5vw, 40px); }
.lead { font-size: 17px; color: var(--ink-2); max-width: 680px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.card h2 { font-size: 22px; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 10px; border: 1px solid var(--primary); background: var(--primary); color: #fff; font-weight: 700;
  font-size: 15px; text-decoration: none; cursor: pointer; }
.btn:hover { color: #fff; background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { background: var(--surface); color: var(--ink); }
.btn.ghost:hover { background: var(--soft); color: var(--ink); }
.btn.danger { background: var(--surface); color: var(--down); border-color: var(--down); }
.btn.link { background: transparent; border-color: transparent; color: var(--ink); text-decoration: underline; padding: 0 6px; }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.block { width: 100%; }

/* Controles de escolha */
.pill { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--edge); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 15px; cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.pill[aria-pressed="true"]::before { content: ""; width: 12px; height: 7px; border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor; transform: rotate(-45deg) translateY(-2px); }
.tabs .pill[aria-pressed="true"]::before { content: none; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--line-2); border-radius: 12px; }
.seg button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2);
  font-weight: 700; font-size: 15px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(11, 61, 38, .18); }
.label { font-size: 13px; font-weight: 700; color: var(--ink-2); }

/* Formulário */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .legend { font-size: 14px; font-weight: 700; }
.field input, .field select { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--field); border-radius: 10px;
  background: var(--surface); font-size: 16px; }
.hint { font-size: 13px; color: var(--ink-2); }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.check.soft { border: 0; background: var(--soft); }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--primary); }
.check strong { display: block; font-size: 15px; }
.check span span { font-size: 14px; color: var(--ink-2); }
.msg { padding: 12px 14px; border-radius: 10px; font-size: 15px; font-weight: 700; }
.msg.error { background: var(--down-bg); color: var(--down); }
.msg.ok { background: var(--up-bg); color: var(--up); }
.msg.warn { background: var(--warn-bg); color: var(--warn); }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: 13px;
  font-weight: 700; white-space: nowrap; background: var(--flat-bg); color: var(--ink-2); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.ativo { background: var(--up-bg); color: var(--up); }
.status.pendente, .status.aprovacao, .status.pausado { background: var(--warn-bg); color: var(--warn); }

/* Etapas do cadastro */
.steps { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: var(--ink-2); }
.steps li i { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--line-2); font-style: normal; font-weight: 900; }
.steps li.done i { background: var(--tint-2); color: var(--ink); }
.steps li[aria-current="step"] { color: var(--ink); font-weight: 900; }
.steps li[aria-current="step"] i { background: var(--primary); color: #fff; }
.cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 28px; }
.cols > .main { flex: 999 1 560px; min-width: 0; }
.cols > aside { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.bubble-box { background: var(--deep); box-shadow: inset 0 4px 0 var(--gold); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 14px; color: var(--deep-soft); font-size: 13px; }
.bubble { background: #fff; color: var(--ink); border-radius: 4px 14px 14px 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; }
.ticks li { position: relative; padding-left: 28px; font-size: 15px; color: var(--ink-3); }
.ticks li + li { margin-top: 12px; }
.ticks li::before { content: ""; position: absolute; left: 3px; top: 5px; width: 13px; height: 7px; border-left: 3px solid var(--accent-ink);
  border-bottom: 3px solid var(--accent-ink); transform: rotate(-45deg); }
.navrow { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line-2); padding-top: 20px; }
.alertbox { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 16px; border-radius: 10px; background: var(--tint); }
.alertbox .field { flex: 1 1 150px; }
.summary { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 12px; background: var(--soft); }
.summary dt { font-size: 13px; color: var(--ink-2); }
.summary dd { font-size: 15px; font-weight: 700; }

/* Interruptor */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 68px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.switch-row:last-child { border-bottom: 0; }
.switch { flex: none; width: 52px; height: 44px; padding: 7px 0; border: 0; background: transparent; cursor: pointer; }
.switch i { display: block; width: 52px; height: 30px; border-radius: 999px; background: var(--field); position: relative; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(11, 61, 38, .3); transition: left .15s; }
.switch[aria-checked="true"] i { background: var(--primary); }
.switch[aria-checked="true"] i::after { left: 25px; }
.rule { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--tint); }
.icon-btn { flex: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; font-size: 22px; line-height: 1; }

/* Painel */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.tile b { font-size: 28px; font-weight: 900; line-height: 1.1; }
.meter { height: 8px; border-radius: 999px; background: #d7e3db; overflow: hidden; }
.meter i { display: block; height: 8px; border-radius: 999px; background: var(--brand); }
.scroll { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 980px; }
table.grid th, table.grid td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.grid thead th { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--line); }
table.grid tbody th { font-weight: 700; }
table.grid td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.foot { font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Cabeçalho com o logo do escritório (aparece quando REPORT_LOGO está configurado).
   O manual da marca pede o logo horizontal com pelo menos 300 px de largura; em tela estreita entra a versão sem a assinatura. */
.brandbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.brandbar::before { content: ""; display: block; height: 6px; background: var(--band); }
.brandbar .in { max-width: 1248px; margin: 0 auto; padding: 14px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.brandbar img { display: block; height: 62px; width: auto; max-width: 100%; }
.brandbar nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.brandbar nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 700; text-decoration: none; }
.brandbar nav a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .brandbar .in { padding: 12px 16px; }
  .brandbar img { height: 44px; }
}
