/* ============================================================
   AUDITUS — Frente 4 (Conciliação) — extensões de _shared.css
   ============================================================ */

/* =========================== DROPZONE GRANDE =========================== */
.dropzone-hero {
  border: 2px dashed var(--ink-300);
  border-radius: var(--r-lg);
  padding: 48px 32px;
  text-align: center;
  background: linear-gradient(135deg, var(--ink-50), var(--white));
  transition: all 0.2s;
  cursor: pointer;
}
.dropzone-hero:hover,
.dropzone-hero.over {
  border-color: var(--brand-600);
  background: linear-gradient(135deg, var(--brand-50), var(--white));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.dropzone-hero-icon {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--ink-200);
  display: grid; place-items: center;
  margin: 0 auto 18px;
  color: var(--brand-600);
  box-shadow: var(--shadow-sm);
}
.dropzone-hero:hover .dropzone-hero-icon {
  color: var(--brand-700);
  border-color: var(--brand-600);
}
.dropzone-hero-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.dropzone-hero-desc {
  font-size: 14px;
  color: var(--ink-500);
  margin-bottom: 18px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}
.dropzone-hero-formats {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-700);
  font-family: 'JetBrains Mono', monospace;
}
.dropzone-hero-formats b { color: var(--brand-700); }

/* =========================== STATUS DE LINHA OFX =========================== */
.ofx-row {
  display: grid;
  grid-template-columns: 36px 100px 1fr 220px 110px 130px 110px 36px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink-100);
  transition: background 0.12s;
  cursor: pointer;
}
.ofx-row:hover { background: var(--ink-50); }
.ofx-row.header {
  background: var(--ink-50);
  border-bottom: 1px solid var(--ink-200);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-500);
  cursor: default;
}
.ofx-row.header:hover { background: var(--ink-50); }

.ofx-status-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ofx-status-icon.auto-matched { background: var(--success-600); color: var(--white); }
.ofx-status-icon.suggested { background: var(--warn-600); color: var(--white); }
.ofx-status-icon.no-match { background: var(--ink-300); color: var(--white); }
.ofx-status-icon.ignored { background: var(--ink-200); color: var(--ink-500); }

.ofx-desc {
  font-weight: 600;
  color: var(--ink-900);
  font-size: 13px;
}
.ofx-desc-meta {
  font-size: 11.5px;
  color: var(--ink-500);
  margin-top: 2px;
}

.ofx-match {
  font-size: 12px;
}
.ofx-match-titulo {
  color: var(--ink-900);
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.ofx-match-meta {
  color: var(--ink-500);
  font-size: 11px;
  margin-top: 2px;
}
.ofx-match-empty {
  color: var(--ink-400);
  font-style: italic;
  font-size: 12px;
}

.ofx-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 22px;
  border-radius: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 10.5px;
  flex-shrink: 0;
}
.ofx-score.high { background: var(--success-600); color: var(--white); }
.ofx-score.med  { background: var(--warn-600); color: var(--white); }
.ofx-score.low  { background: var(--ink-300); color: var(--ink-700); }

.ofx-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 13.5px;
}
.ofx-value.credit { color: var(--success-700); }
.ofx-value.debit  { color: var(--danger-700); }

.ofx-action-btn {
  width: 30px; height: 30px;
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--ink-500);
  transition: all 0.12s;
}
.ofx-action-btn:hover {
  background: var(--ink-100);
  color: var(--brand-700);
}

/* =========================== STATUS SUMMARY (4 cards de status) =========================== */
.ofx-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.ofx-summary-card {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.ofx-summary-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}
.ofx-summary-card.auto    { --accent: var(--success-600); }
.ofx-summary-card.sugg    { --accent: var(--warn-600); }
.ofx-summary-card.manual  { --accent: var(--ink-400); }
.ofx-summary-card.ignored { --accent: var(--ink-300); }

.ofx-summary-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
  color: var(--white);
}
.ofx-summary-card.auto .ofx-summary-icon    { background: var(--success-600); }
.ofx-summary-card.sugg .ofx-summary-icon    { background: var(--warn-600); }
.ofx-summary-card.manual .ofx-summary-icon  { background: var(--ink-400); }
.ofx-summary-card.ignored .ofx-summary-icon { background: var(--ink-300); }

.ofx-summary-num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ofx-summary-card.auto    .ofx-summary-num { color: var(--success-700); }
.ofx-summary-card.sugg    .ofx-summary-num { color: var(--warn-700); }
.ofx-summary-card.manual  .ofx-summary-num { color: var(--ink-700); }
.ofx-summary-card.ignored .ofx-summary-num { color: var(--ink-500); }

.ofx-summary-label {
  font-size: 11.5px;
  color: var(--ink-700);
  font-weight: 600;
  margin-top: 4px;
}
.ofx-summary-meta {
  font-size: 11px;
  color: var(--ink-500);
  margin-top: 2px;
}

/* =========================== UPLOAD STEP PROGRESS =========================== */
.upload-detected {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  overflow: hidden;
}
.upload-detected-item {
  padding: 14px 16px;
  border-right: 1px solid var(--ink-200);
  display: flex;
  align-items: center;
  gap: 10px;
}
.upload-detected-item:last-child { border-right: none; }
.upload-detected-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--brand-50);
  color: var(--brand-700);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.upload-detected-content { min-width: 0; }
.upload-detected-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-500);
}
.upload-detected-value {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-900);
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
}

/* =========================== MATCH MODAL =========================== */
.match-modal {
  width: 880px;
  max-width: 96vw;
}
.match-target-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--info-50);
  border: 1px solid #c5dbef;
  border-radius: var(--r-md);
  margin-bottom: 16px;
}
.match-target-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--info-600);
  color: var(--white);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.match-target-info { flex: 1; min-width: 0; }
.match-target-desc {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
}
.match-target-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-700);
  margin-top: 4px;
}
.match-target-meta .sep { color: var(--ink-300); }
.match-target-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.match-target-value.credit { color: var(--success-700); }
.match-target-value.debit  { color: var(--danger-700); }

.match-candidate {
  display: grid;
  grid-template-columns: 32px 1fr 130px 120px 90px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--white);
}
.match-candidate:hover {
  border-color: var(--brand-600);
  background: var(--brand-50);
}
.match-candidate.recommended {
  border-color: var(--success-600);
  background: var(--success-50);
}
.match-candidate-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-900);
  display: flex;
  align-items: center;
  gap: 8px;
}
.match-candidate-meta {
  font-size: 11.5px;
  color: var(--ink-500);
  margin-top: 2px;
  display: flex; align-items: center; gap: 6px;
}
.match-candidate-meta .sep { color: var(--ink-300); }
.match-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--ink-200);
  background: var(--white);
}
.match-tag.tag-yes { background: var(--success-50); color: var(--success-700); border-color: #a8d9bb; }
.match-tag.tag-near { background: var(--warn-50); color: var(--warn-700); border-color: #f3d999; }

.match-value-comp {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 13px;
}
.match-date-comp {
  font-size: 12px;
  color: var(--ink-700);
  font-variant-numeric: tabular-nums;
}

/* Sem candidatos -> opção de criar */
.no-match-empty {
  text-align: center;
  padding: 32px 24px;
  background: var(--ink-50);
  border: 1px dashed var(--ink-300);
  border-radius: var(--r-md);
}
.no-match-empty-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--ink-200);
  display: grid; place-items: center;
  margin: 0 auto 12px;
  color: var(--ink-400);
}
.no-match-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-700);
  margin-bottom: 6px;
}
.no-match-empty-desc {
  font-size: 13px;
  color: var(--ink-500);
  margin-bottom: 18px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* Quick create form inline */
.quick-create-form {
  background: var(--ink-50);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-top: 8px;
}
.quick-create-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}

/* =========================== MODE TOGGLE (Conciliação/Conferência) =========================== */
.mode-toggle {
  display: inline-flex;
  background: var(--ink-100);
  border-radius: 999px;
  padding: 3px;
  gap: 0;
}
.mode-toggle-option {
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-700);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}
.mode-toggle-option.active {
  background: var(--white);
  color: var(--brand-800);
  box-shadow: var(--shadow-sm);
}

/* =========================== CONCILIAÇÃO INTERNA — LINHA =========================== */
.conc-row {
  display: grid;
  grid-template-columns: 36px 70px 110px 1fr 220px 110px 130px 110px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ink-100);
  transition: background 0.12s;
}
.conc-row:hover { background: var(--ink-50); }
.conc-row.header {
  background: var(--ink-50);
  border-bottom: 1px solid var(--ink-200);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-500);
}
.conc-row.header:hover { background: var(--ink-50); }
.conc-row.selected { background: var(--brand-50); }

.conc-checkbox {
  width: 18px; height: 18px;
  border: 1.5px solid var(--ink-300);
  border-radius: 4px;
  background: var(--white);
  display: grid; place-items: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.conc-checkbox:hover { border-color: var(--brand-600); }
.conc-checkbox.checked {
  background: var(--brand-700);
  border-color: var(--brand-700);
}
.conc-checkbox.checked::after {
  content: '';
  width: 5px; height: 9px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}

/* Status badges */
.conc-status-stack {
  display: flex; flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}
.conc-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.conc-pill .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.conc-pill.conciliado    { background: var(--success-50); color: var(--success-700); }
.conc-pill.conferido     { background: var(--brand-50); color: var(--brand-800); }
.conc-pill.pendente      { background: var(--warn-50); color: var(--warn-700); }
.conc-pill.nao-conferido { background: var(--ink-100); color: var(--ink-700); }

/* =========================== SUGGESTION CHIP =========================== */
.suggestion-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--warn-50);
  border: 1px solid #f3d999;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--warn-700);
  cursor: pointer;
  transition: all 0.12s;
}
.suggestion-chip:hover {
  background: #fce8b8;
}
.suggestion-chip .score {
  background: var(--warn-600);
  color: var(--white);
  padding: 0 5px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
}
