/* >>> BEGIN FILE: css/comercial_vendas.css */

.vendas-vibe {
  --vendas-1: #0f4c5c;
  --vendas-2: #146c7e;
  --vendas-3: #1b91a7;
  --vendas-4: #eff8fb;
  --vendas-5: #d9eef4;
  --vendas-text: #17313a;
  --vendas-border: rgba(15, 76, 92, 0.16);
  --vendas-shadow: 0 10px 25px rgba(15, 76, 92, 0.08);
  color: var(--vendas-text);
}

/* =========================
   Header do módulo
========================= */
.vendas-header {
  background: linear-gradient(135deg, var(--vendas-1), var(--vendas-2));
  color: #fff;
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--vendas-shadow);
}

.vendas-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #fff;
}

.vendas-head-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.vendas-head-actions .btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

/* =========================
   Tabs internas
========================= */
.vendas-tabs {
  background: #fff;
  border: 1px solid var(--vendas-border);
  border-radius: 16px;
  padding: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  box-shadow: var(--vendas-shadow);
}

.vendas-tabs .seg-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--vendas-1);
}

.vendas-tabs .seg-tab.active {
  background: var(--vendas-4);
  border-color: var(--vendas-5);
  color: var(--vendas-2);
}

.vendas-shell {
  display: grid;
  gap: 16px;
}

/* =========================
   Topbar da aba
========================= */
.v-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.v-page-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--vendas-1);
}

.v-page-subtitle {
  margin: 0;
  color: #6b7f86;
}

.v-topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================
   Grid / cards
========================= */
.vendas-grid {
  display: grid;
  gap: 16px;
}

.vendas-grid-2 {
  grid-template-columns: 1.1fr 0.9fr;
}

.v-card {
  background: #fff;
  border: 1px solid var(--vendas-border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--vendas-shadow);
}

.v-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.v-card-head h3,
.v-subhead h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--vendas-1);
}

.v-card-head.between,
.v-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.v-subhead {
  margin: 8px 0 12px;
}

.v-subhead small {
  color: #617a82;
}

/* =========================
   Formulários
========================= */
.v-form {
  display: grid;
  gap: 12px;
}

.v-form-row {
  display: grid;
  gap: 12px;
}

.v-form-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.v-form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.v-form-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.v-form-row.cols-5 { grid-template-columns: 2fr 0.8fr 0.8fr 1fr auto; }

.v-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: var(--vendas-text);
}

.v-form input,
.v-form select,
.v-form textarea,
.v-toolbar input,
.v-toolbar select {
  width: 100%;
  border: 1px solid var(--vendas-border);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}

.v-form input:focus,
.v-form select:focus,
.v-form textarea:focus,
.v-toolbar input:focus,
.v-toolbar select:focus {
  border-color: var(--vendas-3);
  box-shadow: 0 0 0 3px rgba(27, 145, 167, 0.12);
}

.v-toolbar {
  margin-bottom: 12px;
}

.v-toolbar-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 10px;
}

.v-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.v-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding-top: 28px;
}

.check-row input {
  width: auto;
}

.btn-col {
  display: flex;
  align-items: end;
}

/* =========================
   Boxes auxiliares
========================= */
.v-pauta-box,
.v-total-box {
  border: 1px dashed var(--vendas-border);
  border-radius: 14px;
  padding: 12px;
  background: #fbfeff;
}

/* =========================
   Listas
========================= */
.v-lista-pauta,
.v-lista-clientes,
.v-lista-pedidos,
.v-lista-itens {
  display: grid;
  gap: 10px;
}

.v-pauta-item,
.v-item-pedido {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--vendas-border);
  border-radius: 12px;
  background: #fff;
}

.v-pauta-item strong,
.v-item-pedido strong,
.v-list-card h4 {
  color: var(--vendas-1);
}

.v-pauta-item small,
.v-item-pedido small,
.v-list-card p {
  display: block;
  color: #667e87;
}

.v-pauta-right,
.v-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.v-list-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--vendas-border);
  border-radius: 14px;
  background: #fff;
}

.v-list-card-main {
  display: grid;
  gap: 4px;
}

.v-list-card-actions {
  display: flex;
  gap: 8px;
  align-items: start;
  flex-wrap: wrap;
}

/* =========================
   Tags / badges
========================= */
.mini-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.mini-tag,
.badge {
  background: var(--vendas-4);
  color: var(--vendas-2);
  border: 1px solid var(--vendas-5);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.mini-tag.danger {
  background: #fdecec;
  color: #a33131;
  border: 1px solid #f3caca;
}

.mini-tag.warn {
  background: #fff4df;
  color: #a36500;
  border: 1px solid #f3ddb0;
}

.mini-tag.info {
  background: #eaf6fb;
  color: #1a6a85;
  border: 1px solid #cfe6f0;
}

.mini-tag.ok {
  background: #e8f7ef;
  color: #1d7d55;
  border: 1px solid #cdebd9;
}

/* =========================
   Cards de resumo
========================= */
.v-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 16px;
}

.v-stat-card {
  background: #fff;
  border: 1px solid var(--vendas-border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--vendas-shadow);
}

.v-stat-card span {
  display: block;
  color: #5b7680;
  font-size: 13px;
}

.v-stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  color: var(--vendas-1);
}

.v-stat-card.destaque {
  background: linear-gradient(135deg, var(--vendas-1), var(--vendas-2));
}

.v-stat-card.destaque span,
.v-stat-card.destaque strong {
  color: #fff;
}

/* =========================
   Blocos operacionais
========================= */
.v-blocos-operacionais {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.v-bloco-prioridade {
  border: 1px solid var(--vendas-border);
  border-radius: 14px;
  padding: 12px;
  background: #fcfeff;
}

.pedido-atrasado {
  border-color: rgba(176, 55, 55, 0.35);
  background: #fff8f8;
}

/* =========================
   Tabelas
========================= */
.table-wrap {
  overflow: auto;
}

.v-table {
  width: 100%;
  border-collapse: collapse;
}

.v-table th,
.v-table td {
  border-bottom: 1px solid #edf3f5;
  padding: 10px 8px;
  text-align: left;
}

.v-table thead th {
  color: var(--vendas-1);
  font-size: 13px;
}

/* =========================
   Estados auxiliares
========================= */
.v-empty {
  padding: 16px;
  text-align: center;
  border: 1px dashed var(--vendas-border);
  border-radius: 12px;
  color: #6f8891;
  background: #fcfeff;
}

.ta-center {
  text-align: center !important;
}

.top-space {
  margin-top: 8px;
}

.hidden {
  display: none !important;
}

/* =========================
   Modal
========================= */
.v-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 19, 24, 0.45);
  z-index: 9990;
}

.v-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 9991;
  padding: 20px;
}

.v-modal-dialog {
  width: min(1200px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--vendas-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.v-modal.v-modal-xl .v-modal-dialog {
  width: min(1280px, 96vw);
}

.v-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid #eef3f5;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 2;
}

.v-modal-header h3 {
  margin: 0;
  color: var(--vendas-1);
}

.v-modal-subtitle {
  margin: 4px 0 0;
  color: #6f8289;
}

.v-modal-body {
  padding: 18px;
}

body.modal-open {
  overflow: hidden;
}

/* =========================
   Modais do AS.Vendas
========================= */

.v-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 19, 24, 0.58);
  backdrop-filter: blur(2px);
  overflow-y: auto;
}

.v-modal-overlay > .v-modal {
  position: relative;
  inset: auto;
  z-index: 9991;
  display: block;
  place-items: initial;

  width: min(900px, 96vw);
  max-height: 92vh;
  margin: auto;
  padding: 0;
  overflow-y: auto;

  background: #ffffff;
  color: var(--vendas-text);

  border: 1px solid var(--vendas-border);
  border-radius: 18px;

  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.28);
}

.v-modal-overlay .v-modal-head {
  position: sticky;
  top: 0;
  z-index: 4;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;

  padding: 18px 20px;
  background: #ffffff;

  border-bottom: 1px solid var(--vendas-border);
  border-radius: 18px 18px 0 0;
}

.v-modal-overlay .v-modal-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;

  margin: 0;
  color: var(--vendas-1);
}

.v-modal-overlay .v-modal-head p {
  margin: 5px 0 0;
}

.v-modal-overlay form {
  padding: 20px;
  background: #ffffff;
}

.v-modal-overlay .v-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;

  margin-top: 20px;
  padding-top: 16px;

  border-top: 1px solid var(--vendas-border);
}

.vendedor-modal {
  background: #ffffff !important;
}

.vendedor-modal-section {
  margin-top: 18px;
  padding: 16px;

  background: #fbfeff;

  border: 1px solid var(--vendas-border);
  border-radius: 14px;
}

.vendedor-modal-section h4 {
  display: flex;
  align-items: center;
  gap: 8px;

  margin: 0 0 12px;
  color: var(--vendas-1);
}

.vendedor-modal .v-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.vendedor-modal .v-field {
  display: grid;
  gap: 6px;
}

.vendedor-modal .v-field > span {
  font-weight: 600;
  color: var(--vendas-text);
}

.vendedor-modal .span-2 {
  grid-column: 1 / -1;
}

.vendedor-modal .v-input,
.vendedor-clientes-modal .v-input {
  display: block;
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;

  padding: 10px 12px;

  background: #ffffff;
  color: #17313a;

  border: 2px solid #9fb8c0;
  border-radius: 10px;

  outline: none;
  box-shadow: inset 0 1px 2px rgba(15, 76, 92, 0.05);

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.vendedor-modal .v-input:focus,
.vendedor-clientes-modal .v-input:focus {
  border-color: var(--vendas-3);

  box-shadow:
    0 0 0 3px rgba(27, 145, 167, 0.18),
    inset 0 1px 2px rgba(15, 76, 92, 0.05);
}

.vendedor-modal .v-input:hover,
.vendedor-clientes-modal .v-input:hover {
  border-color: #6f9aa7;
}

.vendedor-modal textarea.v-input {
  min-height: 90px;
  resize: vertical;
}

.vendedor-clientes-modal {
  width: min(760px, 96vw) !important;
  background: #ffffff !important;
}

.vendedor-clientes-modal-body {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.vendedor-permissoes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.vendedor-permissao-item,
.vendedor-cliente-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  padding: 12px;

  background: #ffffff;

  border: 1px solid var(--vendas-border);
  border-radius: 12px;

  cursor: pointer;
}

.vendedor-permissao-item input,
.vendedor-cliente-item input {
  margin-top: 3px;
}

.vendedor-permissao-item span,
.vendedor-cliente-item span {
  display: grid;
  gap: 3px;
}

.vendedor-permissao-item small,
.vendedor-cliente-item small {
  color: #667e87;
}

.vendedor-clientes-lista {
  display: grid;
  gap: 8px;

  max-height: 300px;
  margin-top: 12px;
  padding-right: 4px;

  overflow-y: auto;
}

.vendedor-clientes-lista.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.vendedor-clientes-acoes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;

  margin-top: 10px;
}

.vendedor-convite-modal,
.vendedor-confirmacao-modal {
  width: min(620px, 96vw) !important;
  background: #ffffff !important;
}

.vendedor-convite-dados {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.vendedor-convite-alerta {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  padding: 12px;

  color: #875700;
  background: #fff7e6;

  border: 1px solid #f0d69b;
  border-radius: 12px;
}

.vendedor-convite-alerta p {
  margin: 0;
}

.vendedor-confirmacao-modal .v-modal-actions,
.vendedor-convite-modal .v-modal-actions {
  padding: 16px 20px 20px;
}

@media (max-width: 780px) {
  .v-modal-overlay {
    align-items: flex-start;
    padding: 10px;
  }

  .v-modal-overlay > .v-modal {
    width: 100%;
    max-height: calc(100vh - 20px);
  }

  .vendedor-modal .v-form-grid,
  .vendedor-permissoes-grid {
    grid-template-columns: 1fr;
  }

  .vendedor-modal .span-2 {
    grid-column: auto;
  }

  .v-modal-overlay .v-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .v-modal-overlay .v-modal-actions .btn {
    width: 100%;
  }
}

/* =========================
   Toast
========================= */
.vendas-toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: grid;
  gap: 10px;
}

.vendas-toast {
  min-width: 220px;
  max-width: 340px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s ease;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  font-weight: 600;
}

.vendas-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.vendas-toast.info { background: #2c6474; }
.vendas-toast.ok { background: #1d7d55; }
.vendas-toast.warn { background: #b06a11; }

/* =========================
   Responsivo
========================= */
@media (max-width: 1200px) {
  .vendas-grid-2,
  .v-stats,
  .v-form-row.cols-3,
  .v-form-row.cols-4,
  .v-form-row.cols-5,
  .v-blocos-operacionais,
  .v-toolbar-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 780px) {
  .vendas-grid-2,
  .v-stats,
  .v-form-row.cols-2,
  .v-form-row.cols-3,
  .v-form-row.cols-4,
  .v-form-row.cols-5,
  .v-list-card,
  .v-blocos-operacionais,
  .v-toolbar-grid,
  .v-topbar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .v-list-card {
    display: grid;
  }

  .v-card,
  .vendas-header {
    padding: 14px;
  }

  .v-actions,
  .v-list-card-actions,
  .v-card-head.between {
    justify-content: stretch;
  }

  .v-list-card-actions .btn,
  .v-actions .btn,
  .v-topbar-actions .btn,
  .v-modal-footer .btn {
    width: 100%;
  }

  .v-modal {
    padding: 10px;
  }

  .v-modal-dialog {
    width: 100%;
    max-height: 95vh;
  }
}

/* Clientes permitidos dentro do modal principal */

.vendedor-clientes-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  margin-top: 18px;
  padding: 14px 0;

  background: transparent;
  border-top: 1px solid var(--vendas-border);
  border-bottom: 1px solid var(--vendas-border);
  border-radius: 0;
  box-shadow: none;
}

.vendedor-clientes-inline-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: 1;
}

.vendedor-clientes-inline-titulo {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.vendedor-clientes-inline-titulo > svg {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--vendas-2);
}

.vendedor-clientes-inline-titulo div {
  display: grid;
  gap: 3px;
}

.vendedor-clientes-inline-titulo strong {
  color: var(--vendas-1);
}

.vendedor-clientes-inline-titulo small {
  color: #667e87;
  font-weight: 400;
}

@media (max-width: 780px) {
  .vendedor-clientes-inline,
  .vendedor-clientes-inline-info {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .vendedor-clientes-inline .btn {
    width: 100%;
  }

  .vendedor-clientes-inline-info .v-badge {
    justify-self: start;
  }
}

.vendedor-modal .v-input.input-invalido {
  border-color: #d92d20 !important;
  background: #fff7f6;
  box-shadow:
    0 0 0 3px rgba(217, 45, 32, 0.12);
}

/* =========================================================
   FILA DE PEDIDOS RECEBIDOS DO AS.VENDAS
========================================================= */

.asv-fila-section {
  margin: 18px 0 22px;
  padding: 18px;

  background:
    linear-gradient(
      145deg,
      #f8fbfc,
      #eef6f7
    );

  border:
    1px solid
    #cfe0e4;

  border-radius:
    20px;

  box-shadow:
    0 12px 34px
    rgba(15, 76, 92, 0.08);
}

.asv-fila-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;

  margin-bottom: 16px;
}

.asv-fila-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;

  margin: 4px 0 5px;

  color: #17313a;
  font-size: 20px;
}

.asv-fila-head h3 svg {
  width: 21px;
  height: 21px;

  color: #0f7185;
}

.asv-fila-head p {
  margin: 0;

  color: #687e86;
  font-size: 13px;
}

.asv-fila-label {
  display: block;

  color: #0f7185;

  font-size: 11px;
  font-weight: 900;

  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.asv-fila-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#badgeFilaASVendas {
  min-width: 36px;
  min-height: 36px;

  display: grid;
  place-items: center;

  padding: 5px 10px;

  background: #0f4c5c;
  color: #ffffff;

  border-radius: 999px;

  font-weight: 900;
}

.asv-fila-lista {
  display: grid;
  gap: 13px;
}

.asv-fila-card {
  position: relative;

  display: grid;

  grid-template-columns:
    52px
    minmax(0, 1fr)
    auto;

  align-items: center;

  gap: 15px;

  padding: 16px;

  overflow: hidden;

  background:
    linear-gradient(
      145deg,
      #ffffff,
      #fbfdfd
    );

  border:
    1px solid
    #d2e0e3;

  border-radius:
    17px;

  box-shadow:
    0 8px 24px
    rgba(15, 76, 92, 0.07);

  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.asv-fila-card::before {
  content: "";

  position: absolute;

  top: 0;
  bottom: 0;
  left: 0;

  width: 5px;

  background:
    linear-gradient(
      180deg,
      #1b91a7,
      #0f4c5c
    );
}

.asv-fila-card:hover {
  transform: translateY(-2px);

  border-color: #9ec4cb;

  box-shadow:
    0 15px 34px
    rgba(15, 76, 92, 0.13);
}

.asv-fila-card-icon {
  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  border-radius: 15px;

  background:
    linear-gradient(
      145deg,
      #e7f5f7,
      #d7edf1
    );

  color: #0f4c5c;
}

.asv-fila-card-icon svg {
  width: 23px;
  height: 23px;
}

.asv-fila-card-main {
  min-width: 0;
}

.asv-fila-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.asv-fila-card-title > div {
  min-width: 0;
}

.asv-fila-card-title h4 {
  margin: 5px 0 0;

  color: #17313a;

  font-size: 17px;
  line-height: 1.3;
}

.asv-origem-tag {
  display: inline-flex;
  align-items: center;

  padding: 4px 9px;

  background: #e6f5f7;
  color: #0f7185;

  border-radius: 999px;

  font-size: 10px;
  font-weight: 900;

  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.asv-fila-card-main h5 {
  margin: 9px 0 8px;

  color: #294851;
  font-size: 15px;
}

.asv-fila-total {
  flex: 0 0 auto;

  color: #0f4c5c;

  font-size: 20px;
  white-space: nowrap;
}

.asv-fila-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;

  color: #647a82;

  font-size: 12px;
}

.asv-fila-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.asv-fila-meta svg {
  width: 14px;
  height: 14px;
}

.asv-fila-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.asv-fila-card-actions .btn {
  min-height: 39px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  white-space: nowrap;
}

.asv-fila-carregando,
.asv-fila-vazia {
  min-height: 120px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;

  padding: 22px;

  text-align: center;

  color: #6c8289;

  background: rgba(255, 255, 255, 0.7);

  border:
    1px dashed
    #b7cdd2;

  border-radius: 15px;
}

.asv-fila-vazia svg {
  width: 32px;
  height: 32px;

  color: #70949c;
}

.asv-fila-vazia strong {
  color: #294851;
}

.asv-fila-vazia p {
  margin: 4px 0 0;

  font-size: 12px;
}

/* =========================================================
   MODAL DO PEDIDO RECEBIDO
========================================================= */

.asv-modal {
  padding: 14px;
}

.asv-modal-card {
  width:
    min(
      1180px,
      calc(100vw - 28px)
    );

  height:
    min(
      850px,
      calc(100dvh - 28px)
    );

  max-height:
    calc(100dvh - 28px);

  display: flex;
  flex-direction: column;

  overflow: hidden;

  border-radius: 22px;

  background: #ffffff;

  box-shadow:
    0 32px 110px
    rgba(0, 0, 0, 0.3);
}

.asv-modal-card .modal-head {
  flex: 0 0 auto;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;

  padding: 19px 21px;

  background:
    linear-gradient(
      135deg,
      #0f4c5c,
      #157487
    );

  color: #ffffff;

  border-bottom: 0;
}

.asv-modal-card .modal-head h3 {
  margin: 5px 0 0;

  color: #ffffff;

  font-size: 23px;
}

.asv-modal-card .modal-head .asv-fila-label {
  color:
    rgba(255, 255, 255, 0.7);
}

#btnFecharModalPedidoASVendas {
  width: 42px;
  height: 42px;

  min-height: 42px;

  padding: 0;

  display: grid;
  place-items: center;

  border:
    1px solid
    rgba(255, 255, 255, 0.22);

  background:
    rgba(255, 255, 255, 0.1);

  color: #ffffff;
}

.asv-modal-body {
  min-height: 0;
  flex: 1;

  overflow-y: auto;
  overscroll-behavior: contain;

  padding: 20px;

  background: #f4f7f8;
}

.asv-modal-resumo {
  display: grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 12px;

  margin-bottom: 17px;
}

.asv-modal-resumo article {
  display: grid;
  align-content: start;
  gap: 5px;

  min-height: 92px;

  padding: 15px;

  background: #ffffff;

  border:
    1px solid
    #d5e2e5;

  border-radius: 14px;

  box-shadow:
    0 7px 19px
    rgba(15, 76, 92, 0.05);
}

.asv-modal-resumo article:last-child {
  background:
    linear-gradient(
      145deg,
      #e8f6f8,
      #ffffff
    );

  border-color: #bddce2;
}

.asv-modal-resumo span {
  color: #6e838a;

  font-size: 11px;
  font-weight: 800;

  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.asv-modal-resumo strong {
  color: #17313a;

  font-size: 17px;
}

.asv-modal-resumo article:last-child strong {
  color: #0f4c5c;

  font-size: 24px;
}

.asv-modal-resumo small {
  color: #6a7f87;
}

.asv-modal-itens {
  margin-bottom: 17px;
  padding: 17px;

  background: #ffffff;

  border:
    1px solid
    #d5e2e5;

  border-radius: 16px;
}

.asv-modal-itens > h4 {
  margin: 0 0 13px;

  color: #17313a;
}

.asv-modal-itens-lista {
  max-height: 310px;

  display: grid;
  gap: 9px;

  overflow-y: auto;

  padding-right: 3px;
}

.asv-modal-item {
  display: grid;

  grid-template-columns:
    36px
    minmax(0, 1fr)
    auto;

  align-items: center;

  gap: 12px;

  padding: 12px;

  background: #f7fafb;

  border:
    1px solid
    #dce6e8;

  border-radius: 12px;
}

.asv-modal-item-numero {
  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  border-radius: 10px;

  background: #e3f2f5;
  color: #0f4c5c;

  font-size: 12px;
  font-weight: 900;
}

.asv-modal-item > div:nth-child(2) {
  min-width: 0;

  display: grid;
  gap: 4px;
}

.asv-modal-item > div:nth-child(2) strong {
  overflow: hidden;

  color: #294851;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.asv-modal-item small {
  color: #70858c;
}

.asv-modal-item > div:last-child {
  display: grid;
  justify-items: end;
  gap: 4px;

  white-space: nowrap;
}

.asv-modal-item > div:last-child span {
  color: #667d85;

  font-size: 12px;
}

.asv-modal-item > div:last-child strong {
  color: #0f4c5c;
}

.asv-acolhimento-form {
  padding: 17px;

  background: #ffffff;

  border:
    1px solid
    #d5e2e5;

  border-radius: 16px;
}

.asv-form-grid {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 13px;
}

.asv-form-grid label {
  display: grid;
  gap: 7px;
}

.asv-form-grid label > span {
  color: #294851;

  font-size: 13px;
  font-weight: 800;
}

.asv-form-grid input,
.asv-form-grid select,
.asv-form-grid textarea {
  width: 100%;
  min-height: 46px;

  padding: 10px 12px;

  color: #17313a;

  background: #ffffff;

  border:
    2px solid
    #b9cdd3;

  border-radius: 11px;

  outline: none;
}

.asv-form-grid textarea {
  min-height: 90px;
  resize: vertical;
}

.asv-form-grid input:focus,
.asv-form-grid select:focus,
.asv-form-grid textarea:focus {
  border-color: #1b91a7;

  box-shadow:
    0 0 0 4px
    rgba(27, 145, 167, 0.13);
}

.asv-form-observacao {
  grid-column: 1 / -1;
}

.asv-observacao-vendedor {
  margin-top: 14px;
  padding: 13px;

  background: #fff8e5;

  border:
    1px solid
    #ebd797;

  border-radius: 11px;
}

.asv-observacao-vendedor strong {
  color: #785900;
}

.asv-observacao-vendedor p {
  margin: 6px 0 0;

  color: #655631;
  line-height: 1.5;
}

.asv-modal-actions {
  position: sticky;

  left: 0;
  right: 0;
  bottom: -20px;

  z-index: 3;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;

  margin:
    17px -17px
    -17px;

  padding: 14px 17px;

  background:
    rgba(
      255,
      255,
      255,
      0.96
    );

  border-top:
    1px solid
    #d5e2e5;

  box-shadow:
    0 -8px 22px
    rgba(15, 76, 92, 0.08);

  backdrop-filter: blur(8px);
}

.asv-modal-actions .btn {
  min-height: 43px;
}

.btn.asv-excluir-definitivo {
  margin-right: auto;

  border-color: #e0aaa5;

  background: #fff4f2;
  color: #b42318;
}

.btn.asv-excluir-definitivo:hover {
  border-color: #cf665d;

  background: #ffe7e3;
}

/* TABLET */

@media (max-width: 850px) {
  .asv-fila-card {
    grid-template-columns:
      48px
      minmax(0, 1fr);
  }

  .asv-fila-card-actions {
    grid-column: 2;

    justify-content: flex-end;
  }

  .asv-modal-resumo {
    grid-template-columns: 1fr 1fr;
  }

  .asv-modal-resumo article:last-child {
    grid-column: 1 / -1;
  }
}

/* MOBILE */

@media (max-width: 620px) {
  .asv-fila-section {
    padding: 13px;

    border-radius: 16px;
  }

  .asv-fila-head {
    align-items: stretch;
    flex-direction: column;
  }

  .asv-fila-head-actions {
    justify-content: space-between;
  }

  .asv-fila-card {
    grid-template-columns: 1fr;

    padding: 14px;
  }

  .asv-fila-card-icon {
    display: none;
  }

  .asv-fila-card-title {
    flex-direction: column;
  }

  .asv-fila-total {
    font-size: 19px;
  }

  .asv-fila-card-actions {
    grid-column: auto;

    display: grid;

    grid-template-columns:
      1fr
      1fr;
  }

  .asv-fila-card-actions .btn {
    width: 100%;
  }

  .asv-modal {
    padding: 0;
  }

  .asv-modal-card {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;

    border-radius: 0;
  }

  .asv-modal-card .modal-head {
    padding:
      max(
        15px,
        env(safe-area-inset-top)
      )
      15px
      14px;
  }

  .asv-modal-body {
    padding: 13px;
  }

  .asv-modal-resumo {
    grid-template-columns: 1fr;
  }

  .asv-modal-resumo article:last-child {
    grid-column: auto;
  }

  .asv-form-grid {
    grid-template-columns: 1fr;
  }

  .asv-form-observacao {
    grid-column: auto;
  }

  .asv-modal-item {
    grid-template-columns:
      32px
      minmax(0, 1fr);
  }

  .asv-modal-item > div:last-child {
    grid-column: 2;

    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .asv-modal-actions {
    bottom: -13px;

    display: grid;

    grid-template-columns:
      1fr
      1fr;

    margin:
      15px -13px
      -13px;

    padding:
      11px
      12px
      max(
        11px,
        env(safe-area-inset-bottom)
      );
  }

  .btn.asv-excluir-definitivo {
    grid-column: 1 / -1;

    margin-right: 0;
  }
}

/* =========================================================
   AS.VENDAS — FILA DE PEDIDOS E SELEÇÃO EM LOTE
   ========================================================= */

.asv-fila-section {
  overflow: hidden;
}

.asv-fila-lote {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;

  margin: 14px 0;
  padding: 12px 14px;

  background: #f5faf9;
  border: 1px solid #d5e8e4;
  border-radius: 12px;
}

.asv-fila-selecionar-todos {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  color: #344b48;
  font-size: 13px;
  font-weight: 600;

  cursor: pointer;
  user-select: none;
}

.asv-fila-selecionar-todos input,
.asv-fila-selecao input {
  width: 17px;
  height: 17px;
  margin: 0;

  accent-color: #009b74;
  cursor: pointer;
}

#contadorSelecionadosFilaASVendas {
  color: #617773;
  font-size: 13px;
}

#btnAcolherSelecionadosASVendas {
  margin-left: auto;
}

#btnAcolherSelecionadosASVendas:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Cartão */

.asv-fila-card {
  display: grid !important;

  grid-template-columns:
    24px
    44px
    minmax(0, 1fr)
    auto !important;

  align-items: center !important;
  gap: 12px 14px !important;

  width: 100%;
  min-height: auto !important;
  padding: 16px !important;

  box-sizing: border-box;
}

.asv-fila-card.selecionado {
  background: #f0fbf7;
  border-color: #009b74;
  box-shadow:
    0 0 0 1px rgba(0, 155, 116, 0.12);
}

.asv-fila-selecao {
  grid-column: 1;
  grid-row: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  align-self: center;
  cursor: pointer;
}

.asv-fila-card-icon {
  grid-column: 2;
  grid-row: 1;

  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0 !important;
  border-radius: 10px;
}

.asv-fila-card-main {
  grid-column: 3;
  grid-row: 1;

  min-width: 0;
  width: 100%;
}

.asv-fila-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 16px;
  width: 100%;
}

.asv-fila-card-title h4 {
  margin: 4px 0 0;
  word-break: break-word;
}

.asv-fila-total {
  flex-shrink: 0;
  white-space: nowrap;
}

.asv-fila-card-main > h5 {
  margin: 8px 0;
}

.asv-fila-meta {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
}

.asv-fila-card-actions {
  grid-column: 4;
  grid-row: 1;

  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;

  margin: 0 !important;
}

.asv-fila-card-actions .btn {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .asv-fila-section {
    padding: 12px;
    border-radius: 14px;
  }

  .asv-fila-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .asv-fila-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .asv-fila-lote {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;

    padding: 12px;
  }

  .asv-fila-selecionar-todos {
    grid-column: 1;
  }

  #contadorSelecionadosFilaASVendas {
    grid-column: 2;
    text-align: right;
  }

  #btnAcolherSelecionadosASVendas {
    grid-column: 1 / -1;

    width: 100%;
    margin-left: 0;

    justify-content: center;
  }

  .asv-fila-lista {
    gap: 10px;
  }

  .asv-fila-card {
    grid-template-columns:
      24px
      40px
      minmax(0, 1fr) !important;

    grid-template-rows:
      auto
      auto !important;

    align-items: flex-start !important;
    gap: 10px 12px !important;

    padding: 14px 12px !important;
  }

  .asv-fila-selecao {
    grid-column: 1;
    grid-row: 1;
    margin-top: 8px;
  }

  .asv-fila-card-icon {
    grid-column: 2;
    grid-row: 1;

    width: 36px;
    height: 36px;
  }

  .asv-fila-card-main {
    grid-column: 3;
    grid-row: 1;
  }

  .asv-fila-card-title {
    gap: 8px;
  }

  .asv-fila-card-title h4 {
    font-size: 13px;
  }

  .asv-fila-total {
    font-size: 13px;
  }

  .asv-fila-meta {
    gap: 7px 10px;
  }

  .asv-fila-card-actions {
    grid-column: 1 / -1;
    grid-row: 2;

    display: grid !important;
    grid-template-columns: 1fr 1fr;

    width: 100%;
    margin-top: 4px !important;
  }

  .asv-fila-card-actions .btn {
    width: 100%;
    min-height: 40px;

    justify-content: center;
  }
}