/* ============================================
   IMPORTAÇÃO — estilos específicos
   ============================================ */

/* ─── GRID DE IMPORTAÇÕES ─────────────────── */
.import-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

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

.import-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.import-card .upload-zone { flex: 1; }

/* ─── BARRA DE INFO ARMAZENADO ────────────── */
.import-info-bar {
  align-items: center;
  gap: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 11px 16px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #1e40af;
  line-height: 1.45;
}

/* ─── RÓTULOS DE SEÇÃO ───────────────────── */
.import-section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.import-section-label i { font-size: 11px; }

/* ─── UPLOAD ZONE ─────────────────────────── */
.upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 30px 28px;
  text-align: center;
  transition: border-color .25s, background .25s;
  cursor: pointer;
}

.upload-zone.drag-over {
  border-color: var(--blue-primary);
  background: var(--blue-lightest);
}

.upload-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--blue-lightest);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: 24px;
  color: var(--blue-primary);
}

.upload-zone h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.upload-zone p  { color: var(--text-muted); font-size: 13px; margin-bottom: 18px; }

.btn-upload {
  display: inline-flex;
  align-items: center;
  background: var(--blue-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn-upload:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-upload:active { transform: translateY(0); }

.btn-sm-export {
  display: inline-flex;
  align-items: center;
  background: #0f766e;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background .2s;
}
.btn-sm-export:hover { background: #0d5e57; }

.upload-hint {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.upload-hint i { color: var(--blue-light); }

/* ─── BARRA DE SUCESSO ───────────────────── */
.import-success-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 14px 20px;
  margin-bottom: 24px;
}

.import-success-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.import-success-icon {
  font-size: 22px;
  color: #16a34a;
  flex-shrink: 0;
}

.import-success-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-goto {
  display: inline-flex;
  align-items: center;
  background: var(--blue-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  text-decoration: none;
  transition: background .2s;
}
.btn-goto:hover { background: var(--blue-dark); color: #fff; }

/* ─── FILTROS ─────────────────────────────── */
.filter-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.filter-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-primary);
  background: #fff;
  outline: none;
  transition: border-color .2s;
}
.filter-select:focus { border-color: var(--blue-primary); }

.filter-search-wrap {
  position: relative;
}
.filter-search-wrap i {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 12px;
  pointer-events: none;
}
.filter-search-wrap .filter-select { padding-left: 30px; }

/* ─── TABELA PRINCIPAL ───────────────────── */
.table-responsive { overflow-x: auto; }

.table-widget .sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.table-widget .sortable:hover { color: var(--blue-primary); }

.sort-icon { font-size: 10px; color: #cbd5e1; margin-left: 4px; }
.sort-asc  .sort-icon,
.sort-desc .sort-icon { color: var(--blue-primary); }

/* resultado badge */
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}
.result-100  { background: #dcfce7; color: #16a34a; }
.result-alto { background: #dbeafe; color: #1d4ed8; }
.result-med  { background: #fef9c3; color: #b45309; }
.result-low  { background: #fee2e2; color: #dc2626; }

/* detalhe button */
.btn-detail {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-primary);
  background: var(--blue-lightest);
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  font-family: var(--font);
  transition: background .2s;
}
.btn-detail:hover { background: #d2e3fc; }

/* ─── PAGINAÇÃO ──────────────────────────── */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-info { font-size: 13px; color: var(--text-muted); }

.pagination-btns { display: flex; gap: 4px; }

.pg-btn {
  width: 32px; height: 32px;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.pg-btn:hover:not(:disabled) { border-color: var(--blue-primary); color: var(--blue-primary); }
.pg-btn.active { background: var(--blue-primary); border-color: var(--blue-primary); color: #fff; }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ─── OVERLAY DE PROCESSAMENTO ───────────── */
#import-proc-overlay {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  padding: 16px 24px;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-width: 260px;
  max-width: 380px;
  border: 1px solid #e2e8f0;
}

.import-proc-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--blue-primary);
  border-radius: 50%;
  animation: importSpin .75s linear infinite;
}

@keyframes importSpin { to { transform: rotate(360deg); } }

.import-proc-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.import-proc-file {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* ─── BOTÃO CONFIRMAR SUBSTITUIÇÃO ──────── */
.btn-reimportar-confirm {
  display: inline-flex;
  align-items: center;
  background: #f59e0b;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background .2s;
}
.btn-reimportar-confirm:hover { background: #d97706; }

/* ─── NOVA IMPORTAÇÃO ─────────────────────── */
.btn-new-import {
  background: none;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font);
  cursor: pointer;
  transition: all .2s;
}
.btn-new-import:hover { border-color: var(--blue-primary); color: var(--blue-primary); background: var(--blue-lightest); }

/* ─── MODAL DETALHE ──────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 53, .55);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.modal-panel {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 860px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: modalIn .2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 16px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.modal-header h4 { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.modal-header p  { font-size: 13px; color: var(--text-muted); margin: 0; }

.modal-close {
  width: 32px; height: 32px;
  border: none;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.modal-close:hover { background: #fee2e2; color: #dc2626; }

.modal-meta {
  padding: 14px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  flex-shrink: 0;
}

.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--text-muted); }
.meta-value { font-size: 13px; font-weight: 600; color: var(--text-primary); }

.modal-body-scroll { flex: 1; overflow-y: auto; }

.modal-table { width: 100%; border-collapse: collapse; }
.modal-table th {
  padding: 11px 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; color: var(--text-muted);
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  background: #fafbfc;
  position: sticky; top: 0;
}
.modal-table td {
  padding: 11px 20px;
  font-size: 13px; color: var(--text-secondary);
  border-bottom: 1px solid #f8fafc;
  vertical-align: top;
}
.modal-table tbody tr:hover td { background: #f8fafc; }
.modal-table .area-cell { font-weight: 600; color: var(--blue-primary); white-space: nowrap; }
.modal-table .pergunta-cell { color: var(--text-primary); max-width: 280px; }
.modal-table .resposta-cell { font-weight: 600; color: var(--text-primary); }

/* ─── RESPONSIVE ────────────────────────────── */
@media (max-width: 575px) {
  .import-grid { grid-template-columns: 1fr; }
  .upload-zone { padding: 24px 16px; }
  .modal-table th { font-size: 10px; padding: 8px 10px; }
  .modal-table td { font-size: 12px; padding: 9px 10px; }
}
