/* =========================
   FILAS DEL BUZÓN
========================= */
.buzon-row {
  transition: background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
  border-bottom: 1px solid #edf2f7;
}

.buzon-row:hover {
  background: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.fila-no-leida {
  background: linear-gradient(180deg, #fafdff 0%, #f7fbff 100%);
}

.fila-no-leida:hover {
  background: #eef6ff !important;
}

.fila-no-leida td:first-child {
  border-left: 4px solid #2563eb;
}

.fila-leida {
  background: #ffffff;
}

/* =========================
   TEXTO
========================= */
.texto-no-leido {
  font-weight: 700 !important;
  color: #0f172a !important;
}

.texto-no-leido-sec {
  font-weight: 600 !important;
  color: #334155 !important;
}

.texto-leido {
  font-weight: 500;
  color: #475569;
}

.fecha-no-leida {
  font-weight: 700;
  color: #334155 !important;
}

/* =========================
   COLUMNA RADICADO
========================= */
.mail-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mail-codigo-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.buzon-codigo {
  display: inline-block;
  font-size: 13px;
  line-height: 1.3;
  word-break: break-word;
  letter-spacing: 0.1px;
}

.buzon-codigo.texto-no-leido {
  font-weight: 800 !important;
  color: #0b57d0 !important;
}

.buzon-fecha {
  font-size: 11px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.2;
}

.buzon-fecha i {
  font-size: 10px;
  opacity: 0.9;
  color: #94a3b8;
}

/* =========================
   ASUNTO
========================= */
.mail-asunto {
  line-height: 1.4;
  word-break: break-word;
  color: #111827;
  font-size: 13px;
}

/* =========================
   REMITENTE / DESTINO
========================= */
.mail-remitente,
.mail-destino {
  line-height: 1.35;
  word-break: break-word;
  color: #1f2937;
  font-size: 12px;
}

.mail-remitente i,
.mail-destino i {
  margin-right: 5px;
  color: #94a3b8;
  font-size: 11px;
}

/* =========================
   TIPO DOCUMENTO
========================= */
.mail-tipo-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mail-secundario {
  font-size: 11px;
  color: #64748b;
  line-height: 1.25;
}

/* =========================
   BADGES
========================= */
.buzon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 24px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.badge-de {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

.badge-se {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.badge-si,
.badge-ss {
  background: #ede9fe;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.badge-default {
  background: #f3f4f6;
  color: #374151;
  border-color: #e5e7eb;
}

/* =========================
   SEMÁFOROS
========================= */
.semaforoNeutro,
.semaforoVerde,
.semaforoAmarillo,
.semaforoRojo {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  margin-top: 3px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8);
}

.semaforoNeutro {
  background: #cbd5e1;
}

.semaforoVerde {
  background: #22c55e;
}

.semaforoAmarillo {
  background: #f59e0b;
}

.semaforoRojo {
  background: #ef4444;
}

/* =========================
   CHECKBOX
========================= */
.td-check {
  text-align: center;
  vertical-align: middle !important;
  width: 42px;
}

.checkbox-item {
  cursor: pointer;
  transform: scale(1.02);
}

.checkbox-item:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* =========================
   ACCIONES
========================= */
.buzon-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}

.mi-boton-mini {
  width: 32px;
  height: 32px;
  padding: 0 !important;
  border-radius: 9px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px !important;
  background: #ffffff;
  border: 1px solid #dbe4ee !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.mi-boton-mini i {
  font-size: 12px;
  color: #475569;
}

.mi-boton-mini:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  background: #f8fbff;
  border-color: #bfd7f5 !important;
}

.mi-boton-mini:hover i {
  color: #2563eb;
}

.mi-boton {
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.mi-boton:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

/* =========================
   TOOLTIP
========================= */
.tooltip-buzon .tooltip-inner {
  background: #1f2937;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  padding: 7px 10px;
  border-radius: 9px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  max-width: 220px;
}

.tooltip-buzon.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: #1f2937 !important;
}

.tooltip-buzon.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: #1f2937 !important;
}

.tooltip-buzon.bs-tooltip-start .tooltip-arrow::before {
  border-left-color: #1f2937 !important;
}

.tooltip-buzon.bs-tooltip-end .tooltip-arrow::before {
  border-right-color: #1f2937 !important;
}

/* =========================
   AJUSTES DE CELDAS
========================= */
.buzon-table {
  border-collapse: separate;
  border-spacing: 0;
}

.buzon-table tbody td {
  vertical-align: top;
  padding-top: 13px;
  padding-bottom: 13px;
  border-bottom: 1px solid #edf2f7;
}

.buzon-table tbody td:last-child {
  vertical-align: middle;
}

.buzon-table tbody tr:last-child td {
  border-bottom: none;
}

/* =========================
   MEJORAS VISUALES EXTRA
========================= */
.buzon-table tbody tr {
  position: relative;
}

.buzon-table tbody tr td {
  background-clip: padding-box;
}

.mail-meta,
.mail-tipo-wrap,
.mail-remitente,
.mail-destino,
.mail-asunto {
  min-width: 0;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 992px) {
  .buzon-actions {
    gap: 5px;
  }

  .mi-boton-mini {
    width: 30px;
    height: 30px;
  }

  .buzon-codigo {
    font-size: 12px;
  }

  .mail-asunto {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .buzon-actions {
    gap: 4px;
  }

  .mi-boton-mini {
    width: 28px;
    height: 28px;
    border-radius: 8px !important;
  }

  .mail-meta {
    gap: 4px;
  }

  .mail-secundario {
    font-size: 10px;
  }

  .buzon-badge {
    padding: 4px 9px;
    font-size: 9px;
    min-height: 22px;
  }

  .buzon-codigo {
    font-size: 11px;
  }

  .mail-asunto,
  .mail-remitente,
  .mail-destino {
    font-size: 11px;
  }

  .buzon-fecha {
    font-size: 10px;
  }
}