/* Bunyad additions shared by every module (module CSS lives in modules/<name>/styles/). */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.page-title { margin: 0; font-weight: 700; color: var(--kx-ink); display: flex; align-items: center; gap: 8px; font-size: 1.15rem; }
.page-title .bi { color: var(--kx-teal); }
.page-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.stat-grid.compact { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat-tile .stat-value { font-variant-numeric: tabular-nums; }
.pos-table td.n, .pos-table th.n, .table td.n, .table th.n { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.entries-table td { vertical-align: middle; }
.badge-void { background: var(--kx-brick); color: #fff; }
tr.is-void td { color: #9aa3ad; text-decoration: line-through; text-decoration-color: rgba(220, 53, 69, .55); }
tr.is-void td.keep { text-decoration: none; }
.lang-toggle { white-space: nowrap; font-weight: 600; }
.ur { font-family: 'Noto Naskh Arabic', 'Jameel Noori Nastaleeq', serif; direction: rtl; unicode-bidi: isolate; }
@font-face { font-family: 'Noto Naskh Arabic'; font-weight: 400; font-display: swap; src: url('../vendor/fonts/urdu/noto-naskh-arabic-400.woff2') format('woff2'); }
@font-face { font-family: 'Noto Naskh Arabic'; font-weight: 700; font-display: swap; src: url('../vendor/fonts/urdu/noto-naskh-arabic-700.woff2') format('woff2'); }
/* touch screens: bigger controls */
@media (pointer: coarse) {
  .form-control, .form-select, .btn { min-height: 44px; font-size: 16px; }
  .form-control-sm, .form-select-sm, .btn-sm { min-height: 38px; font-size: 15px; }
  .table td, .table th { padding-top: .55rem; padding-bottom: .55rem; }
}
@media (max-width: 575.98px) {
  .app-content { padding: 10px !important; }
  .page-title { font-size: 1.02rem; }
  .topbar-search-wrap { display: none; }
  .brand-sub { display: none; }
}
@media print {
  .app-content { padding: 0 !important; }
  .pos-card { box-shadow: none !important; }
  .entries-layout > .col-lg-8 { width: 100% !important; }
  a[href]:after { content: none !important; }
}
/* names and notes typed in Urdu or English keep their own direction without flipping the cell or the page alignment */
.bidi { unicode-bidi: plaintext; text-align: left; }
body.is-rtl .bidi { text-align: right; }
.bidi.text-end, td.n.bidi { text-align: end; }

/* ── Cash & Carry look, shared by every page ─────────────────────────────────────────────────────── */
/* total rows: navy like the table header (printing keeps the light print style from theme.css) */
@media screen {
  .pos-table tfoot td, .pos-table tfoot th {
    background: var(--kx-ink) !important; color: #fff !important; font-weight: 700;
    border-color: var(--kx-ink) !important; padding-top: 10px; padding-bottom: 10px;
  }
  .pos-table tfoot td:first-child { text-transform: uppercase; letter-spacing: .02em; }
  .pos-table tfoot .text-muted, .pos-table tfoot .small { color: rgba(255, 255, 255, .75) !important; }
  .pos-table tfoot .text-success { color: #6ee7a8 !important; }
  .pos-table tfoot .text-danger { color: #fca5a5 !important; }
}
/* filter bars: search box takes the spare width; extra pieces (quick ranges, checkboxes) keep their size */
.app-content .date-filter-bar > .date-filter-grow, .app-content .date-filter-bar > .flex-grow-1 { flex: 1 1 240px; }
.app-content .date-filter-bar > .form-check, .app-content .date-filter-bar > div:has(> .form-check-input) { flex: 0 0 auto; min-width: 0; align-self: center; }
.app-content .date-filter-bar > .ms-auto { margin-inline-start: auto !important; }
.app-content .date-filter-bar .form-control-sm, .app-content .date-filter-bar .form-select-sm { height: 38px; font-size: 13.5px; }
