/* ==========================================================================
   RUKIA F10 — modal.css
   --------------------------------------------------------------------------
   F10.4.3-J — camada visual do modal de pedido.

   Responsabilidade:
   - Raízes de modal
   - Overlay/painel base
   - Header/body/footer do modal
   - Resumo do pedido
   - Abas do modal
   - Campos internos específicos do modal
   - Campo monetário visual

   NÃO contém:
   - Regras JS do modal
   - Importação XLSX
   - Cliente Público
   - Grid/Tabela
   - KPIs
   ========================================================================== */

/* Modal Grande */

.modal-root,
.import-modal-root {
  position: relative;
  z-index: 100;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  padding: 22px;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(10px);
  place-items: center;
}

.modal-panel {
  display: flex;
  flex-direction: column;
  width: min(1180px, 100%);
  max-height: calc(100vh - 44px);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.modal-panel.modal-large {
  width: min(1440px, 100%);
}

.modal-panel > form[data-form="pedido-modal"] {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
}

.modal-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  margin: 0;
  color: var(--text-strong);
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.modal-subtitle {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.modal-close {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: var(--text-muted);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  place-items: center;
}

.modal-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-surface-soft);
  border-bottom: 1px solid var(--border-subtle);
}

.summary-pill {
  min-width: 0;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.summary-label {
  margin: 0;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-value {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 20px 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-tab {
  padding: 10px 12px;
  color: var(--text-muted);
  font-weight: 850;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
}

.modal-tab:hover {
  color: var(--text-main);
}

.modal-tab.is-active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.modal-body {
  flex: 1;
  min-height: 0;
  padding: 18px 20px;
  overflow: auto;
}

.modal-section {
  display: grid;
  gap: 14px;
}

.modal-section.is-active {
  display: grid;
}

.modal-section-title {
  margin: 0;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 850;
}

.modal-footer {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding: 16px 20px;
  background: var(--bg-surface-soft);
  border-top: 1px solid var(--border-subtle);
}

.modal-panel > form[data-form="pedido-modal"] > .modal-header,
.modal-panel > form[data-form="pedido-modal"] > .modal-summary,
.modal-panel > form[data-form="pedido-modal"] > .modal-tabs,
.modal-panel > form[data-form="pedido-modal"] > .modal-footer {
  flex: 0 0 auto;
}

.modal-body .form-grid {
  align-items: start;
}

.modal-body .form-grid .field.field--compact {
  grid-column: span 3;
}

.modal-body .form-grid .field.field--medium {
  grid-column: span 4;
}

.modal-body .form-grid .field.field--wide {
  grid-column: span 6;
}

.modal-body .form-grid .field.field--full {
  grid-column: span 12;
}

.currency-input {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-prefix {
  position: absolute;
  left: 12px;
  z-index: 1;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 850;
  pointer-events: none;
}

.input.input-currency {
  padding-left: 40px;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.field-hint {
  margin-top: -2px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.35;
}


/* ========================================================================== 
   F10.5 — Cliente Gestão: modal de acompanhamento e comunicação
   --------------------------------------------------------------------------
   Escopo exclusivo: .modal-panel--cliente-gestao
   ========================================================================== */

.modal-panel--cliente-gestao {
  width: min(1120px, 100%);
  border-color: color-mix(in srgb, var(--brand) 16%, var(--border-subtle) 84%);
}

.modal-panel--cliente-gestao .modal-header {
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--brand-soft) 78%, transparent), transparent 28rem),
    var(--bg-surface);
}

.modal-panel--cliente-gestao .modal-subtitle {
  max-width: 620px;
}

.modal-panel--cliente-gestao .modal-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.modal-panel--cliente-gestao .summary-pill {
  border-color: color-mix(in srgb, var(--brand) 12%, var(--border-subtle) 88%);
}

.modal-panel--cliente-gestao .modal-tab.is-active {
  color: var(--brand);
}

.modal-panel--cliente-gestao .field[data-field="SinalizacaoCliente"] {
  border: 1px solid color-mix(in srgb, var(--warning) 18%, var(--border-subtle) 82%);
  border-radius: var(--radius-md);
  padding: 12px;
  background: color-mix(in srgb, var(--warning-soft) 28%, var(--bg-surface) 72%);
}

.modal-panel--cliente-gestao .field[data-field="SinalizacaoCliente"] .field-label::after {
  margin-left: 8px;
  color: var(--warning-text);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  content: "canal cliente";
}
