/* CSS dùng chung khu vực quản trị CRM (nạp qua config/backpack/base.php → styles) */

/* ── Tooltip mức giảm theo hạng thẻ (App\Services\DiscountInfo::tooltipHtml) ── */
.discount-tip { font-size: 12.5px; line-height: 1.45; color: #111827; text-align: left; }
.discount-tip .dt-title { font-weight: 700; margin-bottom: 6px; color: #0f4a5b; }
.discount-tip table { border-collapse: collapse; width: 100%; }
.discount-tip td { padding: 4px 8px 4px 0; border-top: 1px solid #f1f2f4; vertical-align: top; }
.discount-tip tr:first-child td { border-top: 0; }
.discount-tip .dt-brand { font-weight: 600; white-space: nowrap; }
.discount-tip .dt-rank { color: #1a6879; white-space: nowrap; }
.discount-tip .dt-muted { color: #6b7280; font-size: 11.5px; }
.discount-tip .dt-warn { color: #b91c1c; font-size: 11.5px; margin-top: 2px; }
.popover.discount-popover { max-width: 560px; }
.popover.discount-popover .popover-body { padding: 8px 10px; }

/* ── Thanh thông báo chạy trên topbar ── */
.crm-ticker { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; height: 34px; margin: 0 12px; padding: 0 4px 0 10px;
  border-radius: 17px; background: #f8fafc; border: 1px solid #e5e7eb; overflow: hidden; font-size: 13px; }
.crm-ticker .ct-label { flex: 0 0 auto; font-weight: 700; color: #0f4a5b; margin-right: 8px; white-space: nowrap; }
.crm-ticker .ct-viewport { position: relative; flex: 1 1 auto; overflow: hidden; height: 100%; }
.crm-ticker .ct-track { position: absolute; top: 0; left: 0; height: 100%; display: flex; align-items: center; white-space: nowrap;
  animation: crm-ticker-move var(--ct-duration, 40s) linear infinite; padding-left: 100%; }
.crm-ticker:hover .ct-track { animation-play-state: paused; }
.crm-ticker .ct-item { display: inline-flex; align-items: center; margin-right: 48px; color: #374151; }
.crm-ticker .ct-item i { margin-right: 5px; font-size: 15px; }
.crm-ticker .ct-danger { color: #b91c1c; font-weight: 600; }
.crm-ticker .ct-warning { color: #b45309; }
.crm-ticker .ct-info { color: #1d4ed8; }
@keyframes crm-ticker-move { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (max-width: 767px) { .crm-ticker { display: none; } }
@media (prefers-reduced-motion: reduce) { .crm-ticker .ct-track { animation: none; padding-left: 0; } }

/* Cho khối menu trái trên topbar giãn ra để thanh thông báo có chỗ chạy */
.app-header .navbar-nav.d-md-down-none { flex: 1 1 auto; min-width: 0; }
.app-header .crm-ticker-li { flex: 1 1 auto; min-width: 0; display: flex; }

/* Nút ẩn / mở lại thanh thông báo */
.crm-ticker .ct-close { flex: 0 0 auto; width: 26px; height: 26px; margin-left: 6px; border: 0; border-radius: 50%; background: transparent;
  color: #6b7280; font-size: 18px; line-height: 1; cursor: pointer; }
.crm-ticker .ct-close:hover { background: #e5e7eb; color: #111827; }
.crm-ticker-li .ct-reopen { display: none; position: relative; align-self: center; margin: 0 10px; width: 34px; height: 34px; border: 1px solid #e5e7eb;
  border-radius: 50%; background: #f8fafc; color: #0f4a5b; font-size: 18px; cursor: pointer; }
.crm-ticker-li .ct-reopen:hover { background: #eef6f8; }
.crm-ticker-li .ct-reopen .ct-count { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: #1a6879; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; }
.crm-ticker-li .ct-reopen.ct-urgent .ct-count { background: #dc2626; }
.crm-ticker-li.ct-collapsed { flex: 0 0 auto; }
.crm-ticker-li.ct-collapsed .crm-ticker { display: none; }
.crm-ticker-li.ct-collapsed .ct-reopen { display: inline-block; }
@media (max-width: 767px) { .crm-ticker-li .ct-reopen, .crm-ticker-li.ct-collapsed .ct-reopen { display: none; } }
