/* Tamam 4.2.0 fixes */
/* Important announcement: the header kept the pale red background of 3.7 while the modal title is white. Use a deep red with white text. */
.dm-ann-modal.important .modal-header { background: linear-gradient(135deg, #8f1d15 0%, #c4352b 100%); color: #fff; border-bottom: 3px solid var(--dm-gold, #c9a227); }
.dm-ann-modal.important .modal-title { color: #fff; }
[data-bs-theme="dark"] .dm-ann-modal.important .modal-header { background: linear-gradient(135deg, #6f1710 0%, #a42a21 100%); }

/* Tamam 4.3.1 - live clock */
.dm-clock { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .6rem; border-radius: 999px; cursor: pointer; user-select: none;
  background: rgba(127,127,127,.12); color: inherit; font-size: .85rem; line-height: 1.2; white-space: nowrap; direction: ltr; }
.dm-clock:hover { background: rgba(127,127,127,.2); }
.dm-clock .dm-clock-t { font-variant-numeric: tabular-nums; font-weight: 600; }
.dm-clock .dm-clock-s { opacity: .65; font-weight: 400; }
.dm-clock .dm-clock-d { opacity: .8; font-size: .78rem; }
.dm-clock-hero { background: rgba(255,255,255,.16); color: #fff; margin-inline-start: .6rem; }
.dm-clock-hero:hover { background: rgba(255,255,255,.26); }
@media (max-width: 991.98px) { .dm-clock .dm-clock-d { display: none; } }
@media (max-width: 575.98px) { .dm-clock .dm-clock-s { display: none; } .dm-clock { padding: .2rem .45rem; font-size: .8rem; } }

/* Tamam 4.3.4 - phone fixes */
@media (max-width: 991.98px) {
  /* the home page tools (customize home page / customize menu) sit under the title instead of floating over the cards at the bottom */
  .dm-pagehead:has(#dm-home-custom) { flex-direction: column; align-items: stretch; }
  .dm-pagehead .dm-actions:has(#dm-home-custom) { position: static; inset: auto; z-index: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .dm-actions #dm-home-custom, .dm-actions #dm-menu-custom-btn { min-height: 38px; padding: 6px 12px; font-size: .85rem; }
}
@media (max-width: 767.98px) {
  /* nothing may push the page sideways: that shifted the bottom bar and cut the floating + button off the screen edge */
  html, body.dm-app { overflow-x: clip; }
  .dm-main { min-width: 0; }
  .dm-stats, .dm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dm-stat-value, .dm-kpi-value { overflow-wrap: anywhere; }
  .dm-hero-date { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .dm-hero-date .dm-clock-hero { margin-inline-start: 0; }
}
@media (max-width: 479.98px) {
  .dm-topbar { gap: 8px; padding-inline: 10px; }
  .dm-topbar-end { gap: 6px; }
  .dm-topbar .dm-clock i { display: none; }
  .dm-topbar .dm-clock { padding: .2rem .4rem; }
}

/* ---- 4.4.0 quick actions ---- */
button.dm-fab-item { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.dm-fab-item.fab-custom .dm-fab-ic { background: var(--dm-muted, #667085); }
.dm-qa-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; position: sticky; top: 0; background: var(--dm-card); z-index: 2; padding-bottom: 4px; }
.dm-qa-tools .form-control { flex: 1 1 auto; }
.dm-qa-count { white-space: nowrap; font-size: .85rem; color: var(--dm-muted, #667085); font-weight: 700; }
.dm-qa-ic { width: 1.3em; text-align: center; color: var(--dm-navy); }
.dm-qa-list.dm-qa-filtering .dm-colgrip { visibility: hidden; }

/* numbers: bold, green when positive, red when negative */
.dm-num { font-weight: 700; }
.dm-num.dm-pos { color: #15803d; }
.dm-num.dm-neg { color: #b91c1c; }
[data-bs-theme="dark"] .dm-num.dm-pos { color: #4ade80; }
[data-bs-theme="dark"] .dm-num.dm-neg { color: #f87171; }
.dm-report-table th .dm-sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.dm-report-table th .dm-sort.on { text-decoration: underline; }
