/* Tela "Nova cotação" (aba Usuário). Referência: frontend-referencia/telas/01 */

main { max-width: 1200px; margin: 0 auto; padding: 44px 24px 56px; }

.topo-pagina { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.topo-pagina h1 { margin: 0; font-family: var(--fonte-titulo); font-size: 32px; font-weight: 800; color: var(--texto-forte); }
.topo-pagina p { margin: 4px 0 0; font-size: 15px; }
.titulo-linha { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.aviso-rascunho { display: inline-block; margin-top: 8px !important; padding: 4px 12px; border-radius: 999px;
  background: #EEF7E5; border: 1px solid #9FD06E; color: #256118; font-size: 13px !important; font-weight: 600; }
.vendedor { width: 340px; max-width: 100%; display: flex; flex-direction: column; gap: 6px; }

.colunas { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col-esq { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-dir { flex: 1 1 320px; min-width: 0; position: sticky; top: 16px; }

.vk-painel.secao { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.titulo-secao { display: flex; align-items: center; gap: 12px; }
.vk-h { margin: 0; font-family: var(--fonte-titulo); font-size: 18px; font-weight: 800; text-transform: uppercase; color: var(--texto-forte); }
.vk-ic {
  width: 40px; height: 40px; border-radius: 9px; flex: none; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #A6E35F, #5DB532 50%, #3E8E2B); border: 1px solid #2F6B1F;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 0 0 2px #D9DCDF, 0 0 0 3px #858A91;
}
.vk-ic svg { stroke: #fff; }

/* Campos da cotação */
.vk-l { font-size: 13px; font-weight: 600; color: var(--texto); }
.vk-l .auto { font-weight: 500; color: #4A4E55; }
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; }
.vk-f {
  display: flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 12px; color: #fff;
  background: linear-gradient(180deg, #4A4D53, #2B2E33); border: 1px solid #1C1E21; border-radius: 8px;
  box-shadow: inset 0 2px 3px rgba(0,0,0,.45), 0 1px 0 rgba(255,255,255,.8);
}
.vk-f input, .vk-f textarea {
  background: transparent; border: none; outline: none; color: #fff; font-size: 17px; font-weight: 600;
  width: 100%; min-width: 0; resize: none; padding: 10px 0;
}
.vk-f input::placeholder { color: #8F949B; font-weight: 500; }
.vk-f:focus-within { box-shadow: inset 0 2px 3px rgba(0,0,0,.45), 0 0 0 3px rgba(166,227,95,.45); }
.vk-f .u { color: #C9CDD2; font-size: 13px; font-weight: 600; }
.vk-f.warn { border: 1.5px solid #E8711A; box-shadow: inset 0 2px 3px rgba(0,0,0,.45), 0 0 0 2px rgba(232,113,26,.35); }
.vk-f.ok { border: 1.5px solid #7DC242; box-shadow: inset 0 2px 3px rgba(0,0,0,.45), 0 0 0 2px rgba(125,194,66,.3); }
.vk-f.erro { border: 1.5px solid var(--erro-borda); }
.vk-f.leitura input, .vk-f.leitura textarea { font-size: 16px; font-weight: 500; }

.grade-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.grade-4 .span-3 { grid-column: span 3; }
.linha-material { display: flex; gap: 10px; align-items: flex-end; min-width: 0; }
.linha-material .material { flex: 1; }
.linha-material .qtd { flex: 0 0 132px; }
.contador { padding: 0 4px; gap: 2px; }
.contador input { text-align: center; padding: 10px 0; }
.contador button {
  flex: none; width: 34px; height: 34px; border-radius: 7px; cursor: pointer; color: #fff;
  font-size: 20px; font-weight: 700; line-height: 1; border: 1px solid #1C1E21;
  background: linear-gradient(180deg, #5A5E64, #3A3D42); box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.contador button:hover { background: linear-gradient(180deg, #6A6E74, #45484D); }
.contador button:disabled { opacity: .35; cursor: default; }
.grade-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.linha-cliente { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.linha-cliente .nome { flex: 1 1 320px; }
.linha-cliente .prazo { flex: 0 0 170px; }
.nota { margin: -6px 0 0; font-size: 12px; color: #4A4E55; }

.vk-btn2 {
  background: linear-gradient(180deg, #FFFFFF, #D3D6DA 55%, #BABEC3); border: 1px solid #7E838A; border-radius: 7px;
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0,0,0,.25); font-size: 14px; font-weight: 600; color: #14161A;
  cursor: pointer; min-height: 36px; padding: 0 14px;
}

/* Lista de sugestões (cliente e endereços) */
.sugestoes {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20; margin: 4px 0 0; padding: 4px; list-style: none;
  background: #fff; border: 1px solid #AEB2B8; border-radius: 10px; box-shadow: 0 8px 20px rgba(0,0,0,.18);
  max-height: 300px; overflow: auto;
}
.sugestoes li { padding: 10px 12px; border-radius: 7px; cursor: pointer; font-size: 15px; color: var(--texto-forte); }
.sugestoes li small { display: block; color: var(--texto-suave); font-size: 12px; }
.sugestoes li[aria-selected="true"], .sugestoes li:hover { background: #EEF7E5; }
.sugestoes li.novo { color: var(--verde-escuro); font-weight: 700; border-top: 1px solid #E3E6EA; }
.sugestoes li.vazio { cursor: default; color: var(--texto-suave); background: none; }

/* Rota */
.linha-rota { display: flex; align-items: center; gap: 12px; }
.linha-rota .campos-rota { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ponto { width: 10px; height: 10px; border-radius: 50%; background: #C9CDD2; flex: none; }
.ponto.destino { border-radius: 0; background: #7DC242; transform: rotate(45deg); }
.inverter {
  flex: none; width: 48px; height: 48px; margin-top: 22px; border-radius: 50%; cursor: pointer;
  border: 1px solid #1C1E21; background: linear-gradient(180deg, #4A4D53, #2B2E33);
  box-shadow: 0 0 0 2px #DADDE0, 0 0 0 3px #858A91; display: flex; align-items: center; justify-content: center;
}
.inverter svg { stroke: #fff; }
.mapa {
  position: relative; min-height: 260px; border-radius: 10px; overflow: hidden; background: #E9EDE6;
  border: 1.5px solid #AEB2B8; box-shadow: inset 0 1px 3px rgba(0,0,0,.15);
  display: flex; align-items: center; justify-content: center;
}
.mapa img { display: block; width: 100%; height: auto; }
.mapa .msg { padding: 16px; text-align: center; font-size: 14px; color: #4A4E55; max-width: 460px; line-height: 1.5; }
.mapa .msg.erro { color: var(--erro); }
.mapa .km {
  position: absolute; left: 12px; top: 12px; color: #fff; border-radius: 8px; padding: 8px 12px;
  background: linear-gradient(180deg, #46494F, #2A2D32); box-shadow: 0 1px 3px rgba(0,0,0,.25);
  display: flex; flex-direction: column; gap: 2px;
}
.mapa .km small { font-size: 12px; color: #C9CDD2; font-weight: 600; }
.mapa .km strong { font-family: var(--fonte-titulo); font-size: 20px; }
.mapa .selo {
  position: absolute; right: 12px; top: 12px; background: #fff; border-radius: 8px; padding: 6px 10px;
  font-size: 12px; font-weight: 600; color: #3A3D42; box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

/* Alertas */
.vk-alert { display: flex; align-items: flex-start; gap: 10px; background: #FFF1E3; border: 1px solid #F0B98A; border-radius: 8px; padding: 11px 14px; }
.vk-alert p { margin: 0; font-size: 14px; color: #6E3006; line-height: 1.45; }
.vk-alert svg { flex: none; margin-top: 1px; stroke: #C2560C; }
.alertas { display: flex; flex-direction: column; gap: 8px; }
.vk-alert.info { background: #EAEFF5; border-color: #C3CEDB; }
.vk-alert.info p { color: #22313F; }
.vk-alert.info svg { stroke: #34495E; }

/* Resumo */
.resumo { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.vk-tile {
  background: linear-gradient(180deg, #46494F, #2A2D32); border: 1px solid #1C1E21; border-radius: 8px; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 1px 0 rgba(255,255,255,.8);
  padding: 8px 12px; display: flex; flex-direction: column; gap: 2px;
}
.vk-tile .t { font-size: 12px; color: #C9CDD2; font-weight: 600; }
.vk-tile .v { font-family: var(--fonte-titulo); font-size: 17px; font-weight: 800; white-space: nowrap; }
dl.linhas { margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.vk-row { display: flex; justify-content: space-between; gap: 12px; }
.vk-row dt { color: var(--texto); }
.vk-row dd { margin: 0; font-weight: 700; text-align: right; color: var(--texto-forte); overflow-wrap: anywhere; }
.vk-row dd.laranja { color: #B04E0A; }
.veiculo {
  border: 1.5px solid #9FD06E; background: linear-gradient(180deg, #F3FAEC, #E2F2D2); border-radius: 10px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
}
.veiculo.sem { border-color: #F0B98A; background: #FFF1E3; }
.veiculo .rotulo { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #256118; }
.veiculo .rotulo svg { stroke: #2F7A1F; }
.veiculo .modelo { font-family: var(--fonte-titulo); font-size: 19px; font-weight: 800; color: var(--texto-forte); }
.veiculo .texto { font-size: 13px; color: var(--texto); line-height: 1.45; }
.divisor { height: 1px; background: #B9BDC3; box-shadow: 0 1px 0 #fff; }
.margem-label { font-family: var(--fonte-titulo); font-size: 15px; font-weight: 800; color: var(--texto-forte); }
.vk-btn-calcular {
  width: 100%; min-height: 60px; margin: 4px 0; border-radius: 12px; cursor: pointer; color: #fff;
  font-family: var(--fonte-titulo); font-size: 21px; font-weight: 800; border: 1px solid #255F18;
  background: linear-gradient(180deg, #A2E85C 0%, #62BD34 46%, #3F9A24 54%, #2F7A1F 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 0 0 3px #DADDE0, 0 0 0 4px #858A91, 0 5px 10px rgba(0,0,0,.25);
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.vk-btn-calcular:disabled { filter: grayscale(.6); cursor: wait; }
.valor { padding: 16px 20px; }
.valor-campo { display: flex; align-items: baseline; gap: 8px; }
.valor-campo .rs { font-family: var(--fonte-titulo); font-size: clamp(18px, 1.8vw, 22px); font-weight: 800; }
.valor-campo input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none; padding: 2px 0;
  color: #fff; font-family: var(--fonte-titulo); font-size: clamp(22px, 2.3vw, 30px); font-weight: 800;
  border-bottom: 2px dashed transparent;
}
.valor-campo input::placeholder { color: #fff; opacity: 1; }
.valor-campo input:not(:disabled) { border-bottom-color: rgba(201,205,210,.45); cursor: text; }
.valor-campo input:not(:disabled):focus { border-bottom-color: #A6E35F; }
.valor-campo .lapis { stroke: #C9CDD2; flex: none; display: none; }
.valor-campo input:not(:disabled) + .lapis { display: block; }
.valor.abaixo { box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 0 2px #B23A2E; }
.valor .t2 { font-size: 13px; color: #C9CDD2; }
details.composicao { font-size: 13px; }
details.composicao summary { cursor: pointer; font-weight: 600; color: var(--texto-suave); }
details.composicao dl { margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.btn-pdf {
  width: 100%; min-height: 50px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--fonte-titulo); font-size: 17px; font-weight: 700; color: #2F7A1F;
  background: linear-gradient(180deg, #FFFFFF, #E4E6E9); border: 2px solid #5DB532; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.btn-pdf svg { stroke: #2F7A1F; }
.btn-pdf:disabled { color: #8F949B; border-color: #B8BCC2; cursor: not-allowed; }
.btn-pdf:disabled svg { stroke: #8F949B; }
.legenda { margin: -8px 0 0; text-align: center; font-size: 13px; color: #4A4E55; }

/* Janela (pop-up) */
.janela-fundo { position: fixed; inset: 0; z-index: 50; background: rgba(30,32,36,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.janela { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.25);
          background: linear-gradient(180deg, #FDFDFD, #E3E5E8); border: 1.5px solid #AEB2B8; display: flex; flex-direction: column; }
.janela .faixa { height: 4px; display: flex; flex: none; }
.janela .faixa div:first-child { flex: 3; background: #7DC242; }
.janela .faixa div:last-child { flex: 1; background: #B8BCC2; }
.janela h2 { margin: 0; padding: 22px 24px 4px; font-family: var(--fonte-titulo); font-size: 20px; font-weight: 800; }
.janela .corpo { padding: 12px 24px 20px; display: flex; flex-direction: column; gap: 14px; }
.janela .rodape { display: flex; justify-content: flex-end; gap: 12px; padding: 14px 24px; background: linear-gradient(180deg, #DDE0E3, #CDD0D4); border-top: 1px solid #AEB2B8; }
.grade-end { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grade-end .larga { grid-column: 1 / -1; }
.lista-veiculos { display: flex; flex-direction: column; gap: 8px; }
.lista-veiculos button {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; width: 100%;
  padding: 12px 14px; border-radius: 8px; cursor: pointer; border: 1px solid #AEB2B8; background: #fff; font-size: 15px;
}
.lista-veiculos button:hover { border-color: #5DB532; }
.lista-veiculos button[aria-pressed="true"] { border: 2px solid #5DB532; background: #F3FAEC; }
.lista-veiculos small { color: var(--texto-suave); font-size: 12px; }
.lista-veiculos .tag { font-size: 12px; font-weight: 700; white-space: nowrap; }
.lista-veiculos .tag.nao { color: #B04E0A; }
.lista-veiculos .tag.sim { color: var(--verde-escuro); }

@media (max-width: 760px) {
  main { padding-top: 40px; }
  .topo-pagina h1 { font-size: 26px; }
  .grade-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grade-4 .span-3, .grade-4 .span-nf { grid-column: span 2; }
  .linha-material .qtd { flex-basis: 120px; }
  .col-dir { position: static; }
  .linha-cliente .prazo { flex: 1 1 140px; }
  .grade-end { grid-template-columns: 1fr; }
}
