/* =========================================================================
   TecnoQuote CSS - Design System Comercial & Orcamentacao Agil
   Padrao Industrial Executivo Martin (#0f172a / #004481 / #0284c7 / #FFC000)
   Martin Tools - Martin Sprocket & Gear (2026)
   ========================================================================= */

/* ===== HERO CANONICO TECNOQUOTE ===== */
.tq-hero {
  background: linear-gradient(135deg, #0f172a 0%, #002d57 52%, #004481 100%);
  padding: 45px 20px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: var(--header-h, 140px);
  color: #ffffff;
  border-bottom: 3px solid #FFC000;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.16);
}
.tq-hero::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.14) 0%, transparent 70%);
  pointer-events: none;
}
.tq-hero-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.tq-hero-content h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 2.7rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.tq-hero-content h1 span {
  color: #38bdf8;
}
.tq-hero .compact-hero-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 192, 0, 0.45);
  color: #f8fafc;
}
.tq-hero .compact-hero-badge i {
  color: #FFC000;
}
.tq-hero-sub {
  color: #cbd5e1 !important;
  font-size: 1.05rem;
  margin: 4px 0 0;
  max-width: 820px;
  line-height: 1.45;
}
.tq-hero-stats {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.tq-hero-stats span {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 6px 14px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tq-hero-stats span i {
  color: #FFC000;
}

@media (max-width: 900px) {
  .tq-hero {
    margin-top: 120px;
    padding: 35px 16px 25px;
  }
  .tq-hero-content h1 {
    font-size: 2.1rem;
  }
}
@media (max-width: 600px) {
  .tq-hero {
    margin-top: 100px;
    padding: 25px 12px 20px;
  }
  .tq-hero-content h1 {
    font-size: 1.7rem;
  }
  .tq-hero-stats {
    gap: 8px;
  }
  .tq-hero-stats span {
    font-size: 0.75rem;
    padding: 4px 10px;
  }
}

.tq-container {
  max-width: 1280px;
  margin: 20px auto 40px;
  padding: 0 16px;
}

/* Barra Superior Alinhada e Responsiva (Padrao Executivo Martin #004481 + #FFC000) */
.tq-top-bar {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: 4px solid #004481;
  border-left: 4px solid #FFC000;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: 0 3px 12px rgba(0, 68, 129, 0.06);
}

.tq-martin-exec-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: linear-gradient(90deg, #f8fafc 0%, #eff6ff 100%);
  border: 1px solid #cbd5e1;
  border-bottom: 3px solid #004481;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.tq-martin-exec-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tq-martin-exec-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.tq-martin-exec-info {
  border-left: 3px solid #FFC000;
  padding-left: 12px;
}

.tq-martin-exec-title {
  font-family: Oswald, sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #004481;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.2;
}

.tq-martin-exec-sub {
  font-size: 11px;
  color: #475569;
  margin: 2px 0 0 0;
  font-weight: 600;
}

.tq-exec-meta-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e1;
}

.tq-exec-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

@media (max-width: 960px) {
  .tq-exec-meta-grid {
    grid-template-columns: 1fr;
  }
}

.tq-exec-meta-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-top: 3px solid #004481;
  border-radius: 6px;
  padding: 10px 12px;
}

.tq-exec-meta-box-title {
  font-size: 11px;
  font-weight: 800;
  color: #004481;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #cbd5e1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tq-seller-preset-bar {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.tq-seller-preset-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #004481;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tq-seller-preset-btn:hover,
.tq-seller-preset-btn.active {
  background: #004481;
  color: #ffffff;
  border-color: #004481;
}

.tq-top-bar-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  align-items: flex-start;
}

@media (max-width: 768px) {
  .tq-top-bar-grid {
    grid-template-columns: 1fr;
  }
}

.tq-input-field {
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tq-input-field:focus,
.tq-adv-field-input:focus {
  border-color: #0284c7;
  outline: none;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.tq-grid {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1000px) {
  .tq-grid {
    grid-template-columns: 1fr;
  }
}

.tq-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: 3px solid #004481;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.05);
  padding: 18px;
  margin-bottom: 18px;
}

.tq-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

/* Abas do Configurador */
.tq-tabs-nav {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 4px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.tq-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.tq-tab-btn:hover {
  color: #004481;
  background: rgba(255, 255, 255, 0.55);
}

.tq-tab-btn.active {
  background: #ffffff;
  color: #004481;
  border-bottom: 2px solid #FFC000;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.tq-tab-content {
  display: none;
}

.tq-tab-content.active {
  display: block;
}

/* Input Bloqueado/Fiscal */
.tq-input-readonly {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  cursor: not-allowed !important;
  font-family: Courier New, monospace !important;
  font-weight: 700 !important;
}

.tq-card-title {
  font-family: Oswald, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* Banner de Inviabilidade Fabril */
.tq-viability-banner {
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 11.5px;
  line-height: 1.5;
  transition: all 0.2s ease;
}

.tq-viability-banner.ok {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
  display: none;
}

.tq-viability-banner.reverse-mount {
  background: #fff7ed;
  border: 2px solid #f97316;
  color: #9a3412;
  display: block;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.14);
}

.tq-viability-banner.reverse-mount h4 {
  margin: 0 0 4px 0;
  font-size: 13px;
  font-weight: 800;
  color: #c2410c;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tq-viability-banner.block {
  background: #450a0a;
  border: 2px solid #ef4444;
  color: #fef2f2;
  display: block;
  animation: tq-pulse-critical 1.8s infinite;
}

.tq-viability-banner.block h4 {
  margin: 0 0 4px 0;
  font-size: 13px;
  font-weight: 800;
  color: #fca5a5;
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes tq-pulse-critical {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Semaforo de Margem (Cores Semanticas de Status Preservadas) */
.tq-semaphore {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.tq-semaphore.green {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}

.tq-semaphore.yellow {
  background: #fefce8;
  border: 1px solid #fde047;
  color: #854d0e;
}

.tq-semaphore.red {
  background: #fef2f2;
  border: 2px solid #ef4444;
  color: #991b1b;
  animation: tq-pulse 2s infinite;
}

@keyframes tq-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.tq-internal-badge {
  background: #eff6ff;
  color: #004481;
  border: 1px solid #bfdbfe;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tq-cost-breakdown {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #004481;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 11px;
}

.tq-cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dashed #e2e8f0;
  color: #475569;
}

.tq-cost-row:last-child {
  border-bottom: none;
  font-weight: 700;
  color: #0f172a;
  padding-top: 6px;
}

/* Modal e Lista de Servicos Adicionais */
.tq-services-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 8px 0;
}

.tq-service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 10.5px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

.tq-service-item:last-child {
  border-bottom: none;
}

.tq-service-item label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 600;
}

/* Area de Nomenclatura Padrao do Item */
.tq-taxonomy-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-left: 3px solid #004481;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.tq-taxonomy-title {
  font-size: 10.5px;
  font-weight: 700;
  color: #004481;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.tq-taxonomy-code {
  font-family: Courier New, monospace;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  background: #ffffff;
  padding: 3px 6px;
  border: 1px solid #bae6fd;
  border-radius: 4px;
  display: inline-block;
}

/* Tabela da Proposta Multi-Itens (Padrao Executivo Martin #004481 + #FFC000) */
.tq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-bottom: 14px;
  border: 1px solid #cbd5e1;
}

.tq-table th {
  background: #004481;
  color: #ffffff;
  padding: 8px 10px;
  font-weight: 700;
  text-align: left;
  border-bottom: 3px solid #FFC000;
  border-right: 1px dotted rgba(255, 255, 255, 0.2);
}

.tq-table td {
  padding: 8px 10px;
  border-bottom: 1px dashed #e2e8f0;
  border-right: 1px dotted #f1f5f9;
  vertical-align: middle;
}

.tq-table tr:nth-child(even) {
  background: #f8fafc;
}

.tq-table tr:hover {
  background: #eff6ff;
}

.tq-badge-ncm {
  font-family: Courier New, monospace;
  font-size: 10px;
  font-weight: 700;
  background: #eff6ff;
  color: #004481;
  border: 1px solid #bfdbfe;
  padding: 2px 6px;
  border-radius: 4px;
}

.tq-btn-remove {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.tq-btn-remove:hover {
  background: #fee2e2;
}

.tq-btn-add {
  background: #004481;
  color: #ffffff;
  border: none;
  border-bottom: 3px solid #FFC000;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 68, 129, 0.22);
}

.tq-btn-add:hover {
  background: #003366;
}

.tq-btn-add:disabled {
  background: #94a3b8;
  border-bottom-color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
}

.tq-action-group {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 8px;
  margin-top: 14px;
}

@media (max-width: 680px) {
  .tq-action-group {
    grid-template-columns: 1fr;
  }
}

.tq-btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.tq-btn-email {
  background: #0284c7;
  color: #ffffff;
}

.tq-btn-email:hover {
  background: #0369a1;
}

.tq-btn-preview {
  background: #f8fafc;
  color: #004481;
  border: 1.5px solid #004481;
}

.tq-btn-preview:hover {
  background: #eff6ff;
}

.tq-btn-pdf {
  background: #004481;
  color: #ffffff;
  border-bottom: 3px solid #FFC000;
}

.tq-btn-pdf:hover {
  background: #003366;
}

.tq-btn-action.tq-btn-print-a4,
.tq-btn-action.tq-btn-print-a4 span {
  background: #1e293b;
  color: #ffffff !important;
  border: 1px solid #475569;
  border-bottom: 3px solid #FFC000;
}

.tq-btn-action.tq-btn-print-a4 span {
  background: transparent;
  border: none;
}

.tq-btn-action.tq-btn-print-a4:hover {
  background: #0f172a;
}

.tq-btn-action:disabled {
  background: #cbd5e1;
  color: #94a3b8;
  border-color: #cbd5e1;
  cursor: not-allowed;
}

.tq-live-preview-wrap {
  margin-top: 20px;
  background: #f1f5f9;
  border: 2px solid #004481;
  border-top: 5px solid #004481;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 68, 129, 0.12);
}

.tq-live-preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #0f172a 0%, #002d57 60%, #004481 100%);
  color: #ffffff;
  border-radius: 6px;
  border-bottom: 3px solid #FFC000;
}

.tq-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
  display: none;
  z-index: 9999;
  border-left: 4px solid #FFC000;
}

/* Tiles de Parametros Fisicos (Design System Sem Sobreposicao) */
.tq-physical-tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

@media (max-width: 520px) {
  .tq-physical-tiles-grid {
    grid-template-columns: 1fr;
  }
}

.tq-param-tile {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-top: 2px solid #004481;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  min-width: 0;
  transition: border-color 0.15s ease;
}

.tq-param-tile:hover {
  border-color: #93c5fd;
}

.tq-param-tile-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #475569;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tq-param-tile-input {
  width: 100%;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  box-sizing: border-box;
  text-align: center;
}

/* Modal de Busca de Clientes e Roteiro PCP */
.tq-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(3px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.tq-modal-dialog {
  background: #ffffff;
  border-radius: 10px;
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-top: 4px solid #004481;
}

.tq-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(90deg, #f8fafc 0%, #eff6ff 100%);
  border-bottom: 3px solid #FFC000;
}

.tq-modal-close-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.tq-modal-close-btn:hover {
  color: #ef4444;
}

.tq-modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
}

.tq-client-table-wrap {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.tq-client-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.tq-client-table thead th {
  background: #004481;
  color: #ffffff;
  border-bottom: 2px solid #FFC000;
  padding: 8px 10px;
  font-weight: 700;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 2;
}

.tq-client-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}

.tq-client-table tbody tr:hover {
  background: #f0f9ff;
}

.tq-client-table tbody td {
  padding: 8px 10px;
  color: #334155;
}

.tq-btn-select-client {
  background: #004481;
  color: #ffffff;
  border: none;
  border-bottom: 2px solid #FFC000;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.tq-btn-select-client:hover {
  background: #002d57;
}

/* Matriz de Escala de Lotes (Padrao Azul & Ouro) */
.tq-scale-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #bae6fd;
}

.tq-scale-mini-table th {
  background: #004481;
  color: #ffffff;
  padding: 4px 6px;
  font-size: 9.5px;
  font-weight: 700;
  text-align: right;
  border-bottom: 2px solid #FFC000;
  border-right: 1px dotted rgba(255, 255, 255, 0.3);
}

.tq-scale-mini-table th:first-child {
  text-align: center;
}

.tq-scale-mini-table td {
  padding: 4px 6px;
  text-align: right;
  border-bottom: 1px dotted #e2e8f0;
  border-right: 1px dotted #f1f5f9;
  color: #334155;
}

.tq-scale-mini-table td:first-child {
  text-align: center;
}

.tq-scale-mini-table tr:hover {
  background: #f0f9ff;
}

.tq-scale-qty-btn {
  background: #eff6ff;
  border: 1px solid #0284c7;
  color: #004481;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tq-scale-qty-btn:hover {
  background: #004481;
  border-color: #004481;
  color: #ffffff;
}

/* =========================================================================
   REVELACAO PROGRESSIVA & GAVETAS DE ENGENHARIA (CLEAN & INDUSTRIAL)
   ========================================================================= */

.tq-eng-accordion {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  margin: 10px 0 14px 0;
  overflow: hidden;
  transition: all 0.2s ease;
}

.tq-eng-accordion:hover {
  border-color: #93c5fd;
}

.tq-eng-header {
  padding: 8px 12px;
  background: #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
  transition: background 0.15s ease;
}

.tq-eng-header:hover {
  background: #e2e8f0;
  color: #004481;
}

.tq-eng-header .tq-chevron {
  font-size: 10px;
  color: #64748b;
  transition: transform 0.25s ease;
}

.tq-eng-accordion.open .tq-chevron {
  transform: rotate(180deg);
}

.tq-eng-body {
  display: none;
  padding: 10px 12px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.tq-eng-accordion.open .tq-eng-body {
  display: block;
}

.tq-eng-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 600px) {
  .tq-eng-grid {
    grid-template-columns: 1fr;
  }
}

.tq-eng-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 8px 10px;
  font-size: 10.5px;
  color: #334155;
  line-height: 1.4;
}

.tq-eng-card-title {
  font-size: 11px;
  font-weight: 700;
  color: #004481;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tq-info-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #004481;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.tq-btn-pcp-link {
  background: #004481;
  color: #ffffff;
  border: none;
  border-bottom: 2px solid #FFC000;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  margin-top: 5px;
}

.tq-btn-pcp-link:hover {
  background: #002d57;
}

/* Tooltips explicativos suaves para nao-experts */
.tq-tip {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted #94a3b8;
}

.tq-tip:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  border-bottom: 2px solid #FFC000;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: normal;
  line-height: 1.3;
  white-space: normal;
  width: max-content;
  max-width: 220px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  z-index: 1000;
  pointer-events: none;
}

/* Grid de Linha Expandida na Tabela de Proposta */
.tq-item-expanded-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 3px solid #004481;
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  font-size: 10.5px;
  color: #334155;
  text-align: left;
}

@media (max-width: 800px) {
  .tq-item-expanded-card {
    grid-template-columns: 1fr;
  }
}

.tq-expanded-col {
  border-right: 1px dotted #cbd5e1;
  padding-right: 10px;
}

.tq-expanded-col:last-child {
  border-right: none;
  padding-right: 0;
}

.tq-expanded-col-title {
  font-size: 11px;
  font-weight: 700;
  color: #004481;
  margin-bottom: 5px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 2px;
}

/* Modal Roteiro de Fabricacao PCP */
.tq-routing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-top: 10px;
}

.tq-routing-table th {
  background: #004481;
  color: #ffffff;
  border-bottom: 2px solid #FFC000;
  padding: 6px 8px;
  font-size: 10.5px;
  font-weight: 700;
  text-align: left;
  border-right: 1px dotted rgba(255, 255, 255, 0.25);
}

.tq-routing-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px dotted #e2e8f0;
}

.tq-routing-table tr:hover {
  background: #f0f9ff;
}

/* =========================================================================
   GAVETA LATERAL RETRATIL (SLIDE-OVER DRAWER) - DESIGN INDUSTRIAL EXECUTIVO
   ========================================================================= */
.tq-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(3px);
  z-index: 10050;
  display: flex;
  justify-content: flex-end;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.tq-drawer-overlay.open {
  display: flex !important;
  visibility: visible;
  opacity: 1;
}

.tq-drawer-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

.tq-drawer-panel {
  position: relative;
  width: 100%;
  max-width: 580px;
  height: 100%;
  background: #ffffff;
  box-shadow: -5px 0 30px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.tq-drawer-overlay.open .tq-drawer-panel {
  transform: translateX(0);
}

.tq-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(135deg, #0f172a 0%, #002d57 60%, #004481 100%);
  color: #ffffff;
  border-bottom: 3px solid #FFC000;
}

.tq-drawer-title {
  font-family: 'Oswald', sans-serif;
  font-size: 15.5px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.4px;
}

.tq-drawer-close,
.tq-drawer-close-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.tq-drawer-close:hover,
.tq-drawer-close-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

.tq-drawer-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
  background: #f8fafc;
}

.tq-drawer-section {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: 2px solid #004481;
  border-radius: 7px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.tq-drawer-section-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #004481;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px dashed #cbd5e1;
  padding-bottom: 5px;
}

.tq-drawer-footer {
  padding: 12px 20px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.tq-btn-drawer-cancel {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tq-btn-drawer-cancel:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.tq-btn-drawer-apply {
  background: #004481;
  border: none;
  border-bottom: 2px solid #FFC000;
  color: #ffffff;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}

.tq-btn-drawer-apply:hover {
  background: #002d57;
}

/* Formularios Avancados Dinamicos Inline */
.tq-adv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

@media (max-width: 500px) {
  .tq-adv-grid {
    grid-template-columns: 1fr;
  }
}

.tq-adv-field-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #334155;
  display: block;
  margin-bottom: 2px;
}

.tq-adv-field-input {
  width: 100%;
  padding: 5px 8px;
  font-size: 11.5px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Oculta terminantemente o relatorio de impressao na tela */
#print-report {
  display: none !important;
}

@media print {
  @page {
    margin: 8mm 10mm;
    size: A4 portrait;
  }
  body * {
    visibility: hidden;
  }
  #print-report, #print-report * {
    visibility: visible;
  }
  #print-report {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .tq-proposal-wrap {
    max-width: 100% !important;
    padding: 4px 6px !important;
    box-shadow: none !important;
  }
}

/* ==========================================================================
   MINI APP: GERADOR DE DESCRICAO TECNICA ERP (DYNAMICS AX / 30 CHARS)
   ========================================================================== */
.tq-erp-tool-btn {
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 6px 11px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  user-select: none;
}

.tq-erp-tool-btn:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.tq-erp-preset-chip {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.tq-erp-preset-chip:hover {
  background: #004481;
  color: #ffffff;
  border-color: #002d57;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 68, 129, 0.25);
}

.tq-erp-tab-btn {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tq-erp-tab-btn:hover {
  color: #f8fafc;
  border-color: #64748b;
}

.tq-erp-tab-btn.is-active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.tq-erp-line-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  padding: 4px 6px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.tq-erp-line-row:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.tq-erp-line-num {
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  font-weight: 800;
  color: #004481;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 4px;
  padding: 4px 5px;
  min-width: 32px;
  text-align: center;
  user-select: none;
}

.tq-erp-line-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.tq-erp-line-input {
  width: 100%;
  box-sizing: border-box;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
  padding: 5px 8px;
  border: 1.5px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tq-erp-line-input:focus {
  border-color: #0284c7;
  outline: none;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.tq-erp-line-input.is-excess {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
  color: #b91c1c !important;
}

.tq-erp-progress-bar-wrap {
  width: 100%;
  height: 3px;
  background: #e2e8f0;
  border-radius: 0 0 4px 4px;
  overflow: hidden;
  margin-top: -3px;
  position: relative;
  z-index: 2;
}

.tq-erp-progress-bar {
  height: 100%;
  width: 0%;
  transition: width 0.15s ease, background-color 0.15s ease;
  background-color: #0284c7;
}

.tq-erp-progress-bar.is-warning {
  background-color: #f59e0b;
}

.tq-erp-progress-bar.is-excess {
  background-color: #ef4444;
}

.tq-erp-char-count {
  font-family: "Courier New", Courier, monospace;
  font-size: 10.5px;
  font-weight: 700;
  min-width: 44px;
  text-align: right;
  padding: 3px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  user-select: none;
}

.tq-erp-char-count.is-warning {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.tq-erp-char-count.is-excess {
  background: #fee2e2;
  color: #dc2626;
  font-weight: 900;
  border: 1px solid #fca5a5;
  animation: pulse-warn 1s infinite alternate;
}

@keyframes pulse-warn {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.tq-erp-line-act-btn {
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  color: #64748b;
  padding: 4px 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tq-erp-line-act-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.tq-erp-line-del-btn:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fca5a5;
}

/* Modulo Custom: painel de impacto vs catalogo (Padrao Azul & Ouro) */
.tq-adv-impact {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-left: 3px solid #004481;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 12px;
  font-size: 11.5px;
  color: #0f172a;
}
.tq-adv-impact-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 6px;
}
.tq-adv-impact-table th,
.tq-adv-impact-table td {
  padding: 3px 6px;
  text-align: right;
  border-bottom: 1px solid #dbeafe;
}
.tq-adv-impact-table th:first-child,
.tq-adv-impact-table td:first-child {
  text-align: left;
  font-weight: 700;
  color: #004481;
}
.tq-adv-impact-table td.tq-adv-up {
  color: #b91c1c;
  font-weight: 700;
}
.tq-adv-impact-table td.tq-adv-down {
  color: #047857;
  font-weight: 700;
}
.tq-adv-impact-none {
  color: #004481;
  font-weight: 600;
}
.tq-adv-impact-ops {
  font-size: 10.5px;
  color: #0369a1;
  margin-top: 4px;
}
.tq-adv-impact-warn {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  border-radius: 4px;
  padding: 4px 6px;
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 600;
}
