/* TecnoRolo CSS - Design System Martin Tools (Azul Royal Canonico & Engenharia de Precisao) */

.container.rolo-container {
  max-width: 1540px;
  width: 95%;
  margin: 0 auto;
  padding-top: 140px;
  padding-bottom: 60px;
}

/* CARDS E SECOES */
.card-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #004481;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
}

.info-box {
  background: #f8fafc;
  border-left: 4px solid #004481;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 13px;
  color: #334155;
  line-height: 1.5;
}

/* DROP ZONE */
.rolo-drop-zone {
  border: 2px dashed #004481;
  background: rgba(0, 68, 129, 0.02);
  border-radius: 10px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 16px;
  position: relative;
}

.rolo-drop-zone:hover, .rolo-drop-zone.dragover {
  background: rgba(0, 68, 129, 0.06);
  border-color: #002b55;
  transform: translateY(-1px);
}

.rolo-drop-zone i {
  font-size: 42px;
  color: #004481;
  margin-bottom: 12px;
  display: inline-block;
}

.rolo-drop-zone h4 {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 6px 0;
}

.rolo-drop-zone p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.rolo-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 14px;
}

.status-pill-ok {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status-pill-warn {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* LINHA DO TEMPO */
.rolo-timeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin: 24px 0 10px 0;
  padding: 0 20px;
}

.rolo-timeline::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: #e2e8f0;
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  text-align: center;
  cursor: pointer;
}

.timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px auto;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  transition: all 0.2s ease;
}

.timeline-step.active .timeline-dot {
  background: #004481;
  border-color: #004481;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(0, 68, 129, 0.2);
}

.timeline-step.completed .timeline-dot {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

.timeline-label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

/* GRID DE DADOS E PARAMETROS */
.rolo-two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 980px) {
  .rolo-two-col-grid {
    grid-template-columns: 1fr;
  }
}

.form-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.form-label {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
  display: block;
}

.form-input {
  width: 100%;
  font-size: 12px;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  color: #0f172a;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: #004481;
  box-shadow: 0 0 0 2px rgba(0, 68, 129, 0.15);
}

/* KPIS */
.rolo-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.rolo-kpi-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  border-left: 4px solid #004481;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rolo-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.rolo-kpi-card .kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.rolo-kpi-card .kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: #004481;
  margin-top: 6px;
  font-family: 'JetBrains Mono', monospace;
}

/* TABELAS */
.rolo-table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
}

.rolo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.rolo-table th {
  background: #004481;
  color: #ffffff;
  padding: 9px 10px;
  font-weight: 600;
  white-space: nowrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.rolo-table th:last-child {
  border-right: none;
}

.rolo-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #f1f5f9;
  vertical-align: middle;
}

.rolo-table td:last-child {
  border-right: none;
}

.rolo-table tr:hover {
  background: #f8fafc;
}

.rolo-table input, .rolo-table select {
  font-size: 12px;
  padding: 5px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
}

.rolo-table input:focus, .rolo-table select:focus {
  outline: none;
  border-color: #004481;
}

.override-active {
  border-color: #f59e0b !important;
  background-color: #fffbeb !important;
  font-weight: 700;
  color: #b45309;
}

/* BOTOES DE EXEMPLO E ACOES */
.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.example-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.example-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}

.badge-new {
  background: #004481;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

/* ==========================================================================
   PAINEL DE FLAGS DO CORPO DA PROPOSTA (MODELO ANTIGO) & PREVIEW A4
   ========================================================================== */
.rolo-flags-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1120px) {
  .rolo-flags-grid {
    grid-template-columns: 1fr;
  }
}

.rolo-flag-group {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 14px 16px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.rolo-flag-group-title {
  font-size: 12px;
  font-weight: 800;
  color: #004481;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rolo-flag-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #334155;
  line-height: 1.4;
  padding: 4px 6px;
  border-radius: 5px;
  transition: background 0.15s ease;
}

.rolo-flag-item:hover {
  background: #e2e8f0;
}

.rolo-flag-item input[type="checkbox"] {
  accent-color: #004481;
  margin-top: 2px;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  cursor: pointer;
}

.rolo-a4-preview-sheet {
  background: #ffffff;
  border: 1px solid #94a3b8;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 28px 34px;
  max-width: 960px;
  margin: 0 auto;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
  max-height: 780px;
  overflow-y: auto;
}

/* RODAPE CORPORATIVO LIMPO (ZERO SOBREPOSICAO E ZERO LINKS HTML) */
.rolo-doc-footer {
  position: relative !important;
  clear: both;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 10px;
  border-top: 2px solid #004481;
  font-size: 9.5px;
  color: #334155;
  background: #ffffff;
  page-break-inside: avoid;
  break-inside: avoid;
}

/* RASTREABILIDADE TECNOFD & BARRA DE REVISOES */
.rolo-fd-badge {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 11px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.rolo-fd-badge:hover {
  background: #d1fae5;
  border-color: #10b981;
}

.rolo-rev-bar {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #0d9488;
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.rolo-rev-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 3px 9px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.15s ease;
}

.rolo-rev-pill:hover {
  border-color: #004481;
  color: #004481;
}

.rolo-rev-pill.active {
  background: #004481;
  border-color: #004481;
  color: #ffffff;
}

/* MODAL EXECUTIVO DA COTACAO MAE (NIVEL 4+) */
.rolo-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
  z-index: 9999;
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rolo-modal-card {
  background: #ffffff;
  border-radius: 10px;
  max-width: 1060px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  border: 1px solid #cbd5e1;
  padding: 24px;
}

/* ==========================================================================
   RELATORIO OFICIAL / IMPRESSAO (A4 CORPORATIVO MARTIN - ZERO LINKS HTML)
   ========================================================================== */
#print-report {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0mm;
  }

  body {
    background: #fff !important;
    margin: 0 !important;
    padding: 8mm 10mm !important;
  }

  #header-container,
  #footer-container,
  footer,
  main.rolo-container,
  #notification-container,
  .rolo-modal-overlay {
    display: none !important;
  }

  #print-report, #print-report * {
    visibility: visible !important;
  }

  #print-report {
    display: block !important;
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    color: #000 !important;
    font-family: Arial, Helvetica, sans-serif !important;
  }

  .print-page-break-inside-avoid {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .print-page-break-before {
    page-break-before: always;
    break-before: page;
  }
}


