@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/cairo/cairo-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC, U+200C-200E;
}

@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/cairo/cairo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC;
}

:root {
  --emhatta-sidebar-width: 260px;
}

body {
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  background-color: #f5f6f8;
  scrollbar-gutter: stable;
}

.emhatta-sidebar {
  --bs-offcanvas-width: var(--emhatta-sidebar-width);
  width: var(--emhatta-sidebar-width);
  flex-shrink: 0;
  min-height: 100vh;
}

@media (max-width: 991.98px) {
  .d-flex.justify-content-between.align-items-center {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .card-header.d-flex.justify-content-between.align-items-center {
    row-gap: 0.5rem;
  }

  .modal-dialog {
    margin: 0.75rem;
  }

  .table-responsive table {
    font-size: 0.9rem;
  }
}

@media (max-width: 575.98px) {
  h2 {
    font-size: 1.35rem;
  }
}

.emhatta-sidebar .nav-link {
  color: #dfe3e8;
  border-radius: 0.375rem;
  font-size: 0.85rem;
}

.emhatta-sidebar .nav-link.active,
.emhatta-sidebar .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sidebar-section-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: none; color: #9aa3ad; text-transform: uppercase;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em;
  padding: 0.45rem 0.5rem; cursor: pointer; border-radius: 0.375rem;
}
.sidebar-section-toggle:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.sidebar-section-chevron { width: 14px; height: 14px; flex: none; transition: transform 0.15s ease; }
.sidebar-section-toggle.collapsed .sidebar-section-chevron { transform: rotate(-90deg); }
.sidebar-section-body .nav {
  padding-inline-start: 0.6rem; margin-inline-start: 0.65rem;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.1);
}

.emhatta-main {
  min-height: 100vh;
  min-width: 0;
}

.stat-card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.table thead th {
  white-space: nowrap;
  font-weight: 600;
}

.badge-status-open { background-color: #0d6efd; }
.badge-status-closed { background-color: #6c757d; }
.badge-status-reconciled { background-color: #198754; }
.badge-status-unpaid { background-color: #dc3545; }
.badge-status-partial { background-color: #fd7e14; }
.badge-status-paid { background-color: #198754; }
.badge-status-void { background-color: #6c757d; }

/* ---- grouped invoice tables (AP supplier statement) ---- */
.invoice-group-header td {
  background: #f8f9fa;
  font-weight: 700;
  padding-top: 0.8rem;
  padding-bottom: 0.6rem;
  border-top: 2px solid #dee2e6;
}
.invoice-group-header.group-blue td { border-top-color: #0d6efd; }
.invoice-group-header.group-teal td { border-top-color: #0fa3a3; }
.invoice-group-header.group-orange td { border-top-color: #fd7e14; }
.invoice-group-header.group-purple td { border-top-color: #6f42c1; }
.invoice-group-header.group-indigo td { border-top-color: #4a5cf5; }
.invoice-group-header.group-green td { border-top-color: #198754; }
.invoice-group-header.group-pink td { border-top-color: #d63384; }
.invoice-group-header.group-secondary td { border-top-color: #6c757d; }
.invoice-group-header.group-yellow td { border-top-color: #f4a300; }

.invoice-group-label { display: inline-flex; align-items: center; gap: 0.5rem; }
.invoice-group-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.group-blue .invoice-group-dot, .invoice-group-dot.group-blue { background: #0d6efd; }
.group-teal .invoice-group-dot, .invoice-group-dot.group-teal { background: #0fa3a3; }
.group-orange .invoice-group-dot, .invoice-group-dot.group-orange { background: #fd7e14; }
.group-purple .invoice-group-dot, .invoice-group-dot.group-purple { background: #6f42c1; }
.group-indigo .invoice-group-dot, .invoice-group-dot.group-indigo { background: #4a5cf5; }
.group-green .invoice-group-dot, .invoice-group-dot.group-green { background: #198754; }
.group-pink .invoice-group-dot, .invoice-group-dot.group-pink { background: #d63384; }
.group-secondary .invoice-group-dot, .invoice-group-dot.group-secondary { background: #6c757d; }
.group-yellow .invoice-group-dot, .invoice-group-dot.group-yellow { background: #f4a300; }

/* Reusable text-color utilities matching the group-* dot palette above,
   for amounts/labels that need to visually match their section's color
   without living inside a .table (which would trigger Bootstrap's
   higher-specificity cell-color override). */
.text-group-blue { color: #0d6efd; }
.text-group-teal { color: #0fa3a3; }
.text-group-orange { color: #fd7e14; }
.text-group-purple { color: #6f42c1; }
.text-group-indigo { color: #4a5cf5; }
.text-group-green { color: #198754; }
.text-group-pink { color: #d63384; }
.text-group-secondary { color: #6c757d; }
.text-group-yellow { color: #c98400; }

.invoice-group-count { font-weight: 400; font-size: 0.78rem; color: #adb5bd; }
.invoice-group-subtotal td { background: #fbfbfc; color: #495057; font-weight: 600; border-bottom: 1px solid #e9ecef; }
.invoice-group-subheader th {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6c757d;
  background: #fcfcfd;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e9ecef;
}

.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}
.balance-pill-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.balance-pill-due { background: #fff1e6; color: #c2540a; }
.balance-pill-due .balance-pill-dot { background: #fd7e14; box-shadow: 0 0 0 3px rgba(253, 126, 20, 0.18); }
.balance-pill-clear { background: #e8f7ee; color: #15794a; }
.balance-pill-clear .balance-pill-dot { background: #198754; box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.18); }

/* ---- dashboard ---- */
.dash-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #495057;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.dash-section-title .bar { width: 4px; height: 1.1rem; border-radius: 2px; background-color: #0d6efd; display: inline-block; }

.stat-card { transition: box-shadow 0.15s ease, transform 0.15s ease; position: relative; }
.stat-card:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.09); transform: translateY(-1px); }
.stat-card.stat-card-link:hover { cursor: pointer; }
.stat-card.stat-card-link:hover .stat-card-arrow { opacity: 1; transform: translateX(0); }

.stat-card-arrow {
  position: absolute;
  inset-inline-end: 0.9rem;
  inset-block-start: 0.9rem;
  color: #ced4da;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: translateX(4px);
}
[dir="rtl"] .stat-card-arrow { transform: translateX(-4px); }
[dir="rtl"] .stat-card.stat-card-link:hover .stat-card-arrow { transform: translateX(0); }
.stat-card-arrow svg { width: 16px; height: 16px; }

.hbar-row-link { text-decoration: none; display: block; border-radius: 8px; margin: -0.35rem -0.5rem; padding: 0.35rem 0.5rem; transition: background-color 0.15s ease; }
.hbar-row-link:hover { background-color: #f8f9fa; }
.hbar-row-link:hover .hbar-name { color: #0d6efd; }

.chart-card-header-link { font-size: 0.8rem; font-weight: 600; color: #0d6efd; text-decoration: none; }
.chart-card-header-link:hover { text-decoration: underline; }

.stat-card .card-body { display: flex; align-items: flex-start; gap: 0.9rem; padding: 1.15rem 1.25rem; }

.stat-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-icon svg { width: 22px; height: 22px; }

.stat-icon-blue   { background: #e8f0fe; color: #0d6efd; }
.stat-icon-teal   { background: #e3f6f4; color: #0fa3a3; }
.stat-icon-orange { background: #fef1e6; color: #fd7e14; }
.stat-icon-red    { background: #fdecec; color: #dc3545; }
.stat-icon-green  { background: #e8f7ee; color: #198754; }
.stat-icon-purple { background: #f1ecfb; color: #6f42c1; }
.stat-icon-indigo { background: #eaecfd; color: #4a5cf5; }
.stat-icon-pink   { background: #fce8f1; color: #d63384; }
.stat-icon-gold   { background: #fdf6e3; color: #b8860b; }

.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.25; color: #212529; }
.stat-label { font-size: 0.82rem; color: #868e96; font-weight: 600; margin-bottom: 0.2rem; }
.stat-sub { font-size: 0.78rem; color: #adb5bd; margin-top: 0.15rem; }

/* ---- dashboard dual-currency cards ---- */
.dual-currency-row { display: flex; align-items: stretch; gap: 1rem; margin-top: 0.3rem; }
.dual-currency-block { flex: 1; min-width: 0; }
.dual-currency-value {
  font-size: 1.3rem; font-weight: 700; color: #212529;
  font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.dual-currency-unit { font-size: 0.72rem; color: #adb5bd; font-weight: 600; margin-top: 0.15rem; }
.dual-currency-divider { width: 1px; background: #e9ecef; flex: none; }

@media (max-width: 991.98px) {
  .dual-currency-row { flex-direction: column; gap: 0.35rem; }
  .dual-currency-divider { display: none; }
  .dual-currency-value { white-space: normal; overflow: visible; text-overflow: clip; }
}

.chart-card .card-header {
  background: #fff;
  border-bottom: 1px solid #f1f3f5;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chart-bar-wrap { display: flex; align-items: flex-end; gap: 10px; height: 200px; }
.chart-bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; flex: 1 1 0; height: 100%; }
.chart-bar {
  width: 100%;
  max-width: 46px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #5b9bff 0%, #0d6efd 100%);
  transition: opacity 0.15s ease;
}
.chart-bar:hover { opacity: 0.85; }
.chart-bar-amount { font-size: 0.78rem; font-weight: 700; color: #495057; margin-bottom: 0.35rem; }
.chart-bar-label { font-size: 0.75rem; color: #adb5bd; margin-top: 0.5rem; }

.donut-wrap { display: flex; align-items: center; justify-content: center; gap: 1.75rem; flex-wrap: wrap; padding: 0.5rem 0; }
.donut-svg circle.donut-seg { transition: stroke-width 0.15s ease; }
.donut-svg circle.donut-seg:hover { stroke-width: 15; }
.donut-center-value { font-size: 1.35rem; font-weight: 700; fill: #212529; }
.donut-center-label { font-size: 0.68rem; fill: #adb5bd; }

.donut-legend { display: flex; flex-direction: column; gap: 0.65rem; }
.donut-legend-item { display: flex; align-items: center; gap: 0.55rem; font-size: 0.85rem; }
.donut-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.donut-legend-label { color: #495057; font-weight: 600; }
.donut-legend-value { color: #868e96; margin-inline-start: auto; padding-inline-start: 1rem; white-space: nowrap; }

.hbar-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.9rem; }
.hbar-row:last-child { margin-bottom: 0; }
.hbar-name { font-size: 0.85rem; color: #495057; font-weight: 600; width: 130px; min-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { flex: 1; background: #f1f3f5; border-radius: 6px; height: 10px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #ff8a65, #dc3545); }
.hbar-fill-red { background: linear-gradient(90deg, #ff8a65, #dc3545); }
.hbar-fill-purple { background: linear-gradient(90deg, #b39ddb, #6f42c1); }
.hbar-value { font-size: 0.8rem; font-weight: 700; color: #495057; width: 76px; min-width: 76px; text-align: start; }

.charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 991.98px) { .charts-grid { grid-template-columns: 1fr; } }
.chart-card { height: 100%; }
.chart-empty { color: #adb5bd; text-align: center; padding: 2.5rem 0; margin: 0; }

/* ---- financial reports ---- */
.report-table td, .report-table th { vertical-align: middle; }
.report-table tbody tr:nth-of-type(odd) { background-color: rgba(0,0,0,0.015); }
.report-table thead th { background-color: #f1f3f5; border-bottom: 2px solid #dee2e6; }
.report-table tbody tr.report-row-revenue td.report-amount { color: #198754; font-weight: 600; }
.report-table tbody tr.report-row-expense td.report-amount { color: #dc3545; font-weight: 600; }
.report-table tfoot td { font-weight: 700; border-top: 2px solid #dee2e6; background-color: #f8f9fa; }

/* ---- service sales history ---- */
.report-table tbody tr.svc-row-cash { border-inline-start: 3px solid #198754; }
.report-table tbody tr.svc-row-credit { border-inline-start: 3px solid #dc3545; }
.report-table tbody tr.svc-row-wish { border-inline-start: 3px solid #0dcaf0; }
.report-table tbody tr.svc-row-visa { border-inline-start: 3px solid #fd7e14; }
.report-table tbody tr.svc-row-mobile_app { border-inline-start: 3px solid #d63384; }

.svc-pay-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.svc-pay-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.svc-pay-cash { background: #e8f7ee; color: #15794a; }
.svc-pay-cash .svc-pay-dot { background: #198754; }
.svc-pay-credit { background: #fdecec; color: #b02a37; }
.svc-pay-credit .svc-pay-dot { background: #dc3545; }
.svc-pay-wish { background: #e6f9fd; color: #0a7c93; }
.svc-pay-wish .svc-pay-dot { background: #0dcaf0; }
.svc-pay-visa { background: #fef1e6; color: #b8590c; }
.svc-pay-visa .svc-pay-dot { background: #fd7e14; }
.svc-pay-mobile_app { background: #fce8f1; color: #a3275f; }
.svc-pay-mobile_app .svc-pay-dot { background: #d63384; }

.report-table td.svc-amount-usd { font-weight: 700; color: #0d47a1; font-variant-numeric: tabular-nums; }

/* ---- cash sales page: per-section left-accent + colored bold amount ---- */
.cash-sales-table tbody tr.cash-row-blue { border-inline-start: 3px solid #0d6efd; }
.cash-sales-table tbody tr.cash-row-purple { border-inline-start: 3px solid #6f42c1; }
.cash-sales-table tbody tr.cash-row-indigo { border-inline-start: 3px solid #4a5cf5; }
.cash-sales-table tbody tr.cash-row-yellow { border-inline-start: 3px solid #f4a300; }
.cash-sales-table tbody tr.cash-row-green { border-inline-start: 3px solid #198754; }
.cash-sales-table td.cash-amt-blue { font-weight: 700; color: #0d6efd; font-variant-numeric: tabular-nums; }
.cash-sales-table td.cash-amt-purple { font-weight: 700; color: #6f42c1; font-variant-numeric: tabular-nums; }
.cash-sales-table td.cash-amt-indigo { font-weight: 700; color: #4a5cf5; font-variant-numeric: tabular-nums; }
.cash-sales-table td.cash-amt-yellow { font-weight: 700; color: #c98400; font-variant-numeric: tabular-nums; }
.cash-sales-table td.cash-amt-green { font-weight: 700; color: #198754; font-variant-numeric: tabular-nums; }

.tb-badge-asset { background-color: #cfe2ff; color: #0d47a1; }
.tb-badge-liability { background-color: #ffe8cc; color: #b45309; }
.tb-badge-equity { background-color: #cff4fc; color: #087990; }
.tb-badge-revenue { background-color: #d1e7dd; color: #198754; }
.tb-badge-expense { background-color: #f8d7da; color: #dc3545; }

.report-table tbody tr.tb-row-asset td.tb-balance { color: #0d47a1; font-weight: 600; }
.report-table tbody tr.tb-row-liability td.tb-balance { color: #b45309; font-weight: 600; }
.report-table tbody tr.tb-row-equity td.tb-balance { color: #087990; font-weight: 600; }
.report-table tbody tr.tb-row-revenue td.tb-balance { color: #198754; font-weight: 600; }
.report-table tbody tr.tb-row-expense td.tb-balance { color: #dc3545; font-weight: 600; }
.report-summary-card { border-radius: 0.5rem; }
.report-summary-card .report-net-profit { font-size: 1.6rem; font-weight: 800; }
.report-summary-card .report-net-profit.text-success { color: #198754 !important; }
.report-summary-card .report-net-profit.text-danger { color: #dc3545 !important; }
.report-balance-check { font-weight: 700; }
.report-balance-check.ok { color: #198754; }
.report-balance-check.mismatch { color: #dc3545; }
.print-only { display: none; }

.report-print-header {
  display: flex; align-items: center; gap: 1rem;
  background: linear-gradient(135deg, #2f6fed 0%, #4a5cf5 100%);
  color: #fff; padding: 1.1rem 1.4rem; border-radius: 0.5rem;
}
.report-print-header .report-print-logo { width: 52px; height: 52px; flex: none; }
.report-print-header h2 { color: #fff; margin: 0; }
.report-print-header .report-print-meta { color: rgba(255,255,255,0.85); font-size: 0.9rem; }
.report-section-heading {
  color: #2f6fed; border-bottom: 3px solid #2f6fed; padding-bottom: 0.35rem; margin-bottom: 1rem;
}

/* ---- chart of accounts ---- */
.coa-table tbody tr { border-inline-start: 3px solid transparent; }
.coa-table tbody tr.coa-row-asset { border-inline-start-color: #0d47a1; }
.coa-table tbody tr.coa-row-liability { border-inline-start-color: #b45309; }
.coa-table tbody tr.coa-row-equity { border-inline-start-color: #087990; }
.coa-table tbody tr.coa-row-revenue { border-inline-start-color: #198754; }
.coa-table tbody tr.coa-row-expense { border-inline-start-color: #dc3545; }
.coa-table tbody tr:nth-of-type(odd) { background-color: rgba(0,0,0,0.015); }
.coa-table thead th { background-color: #f1f3f5; border-bottom: 2px solid #dee2e6; }
.coa-table tbody tr:not(.coa-row-inactive):hover { background-color: #f8f9fb; }
.coa-table tbody tr.coa-row-inactive { opacity: 0.6; }
.coa-table td.coa-code { font-weight: 700; color: #495057; }

.coa-status-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.22rem 0.65rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  white-space: nowrap;
}
.coa-status-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.coa-status-active { background: #e8f7ee; color: #15794a; }
.coa-status-active .coa-status-dot { background: #198754; }
.coa-status-inactive { background: #f1f3f5; color: #6c757d; }
.coa-status-inactive .coa-status-dot { background: #adb5bd; }

.coa-control-badge {
  display: inline-flex; padding: 0.16rem 0.55rem; border-radius: 0.35rem;
  font-size: 0.72rem; font-weight: 700; background: #fef1e6; color: #b8590c; white-space: nowrap;
}

/* ---- journal entries list ---- */
.je-table tbody tr { border-inline-start: 3px solid transparent; }
.je-table tbody tr.je-row-posted { border-inline-start-color: #198754; }
.je-table tbody tr.je-row-draft { border-inline-start-color: #f4a300; }
.je-table tbody tr.je-row-void { border-inline-start-color: #adb5bd; opacity: 0.75; }
.je-table tbody tr:nth-of-type(odd) { background-color: rgba(0,0,0,0.015); }
.je-table thead th { background-color: #f1f3f5; border-bottom: 2px solid #dee2e6; }
.je-table td.je-number { font-weight: 700; color: #495057; font-variant-numeric: tabular-nums; }
.je-amount-usd { font-weight: 700; color: #0d47a1; font-variant-numeric: tabular-nums; }

.je-source-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.24rem 0.65rem; border-radius: 999px; font-size: 0.76rem; font-weight: 600;
  white-space: nowrap;
}
.je-source-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }

.je-source-fuel_sale { background: #e8f0fe; color: #0d47a1; }
.je-source-fuel_sale .je-source-dot { background: #0d6efd; }
.je-source-fuel_purchase { background: #eaecfd; color: #3341c9; }
.je-source-fuel_purchase .je-source-dot { background: #4a5cf5; }
.je-source-lpg_sale { background: #e3f6f4; color: #0b7a7a; }
.je-source-lpg_sale .je-source-dot { background: #0fa3a3; }
.je-source-lpg_purchase { background: #f1ecfb; color: #59339e; }
.je-source-lpg_purchase .je-source-dot { background: #6f42c1; }
.je-source-shop_sale { background: #e8f7ee; color: #15794a; }
.je-source-shop_sale .je-source-dot { background: #198754; }
.je-source-shop_purchase { background: #fce8f1; color: #a3275f; }
.je-source-shop_purchase .je-source-dot { background: #d63384; }
.je-source-service_sale { background: #fdf6e3; color: #8a6400; }
.je-source-service_sale .je-source-dot { background: #f4a300; }
.je-source-ar_payment { background: #e6f9fd; color: #0a7c93; }
.je-source-ar_payment .je-source-dot { background: #0dcaf0; }
.je-source-ap_payment { background: #fdecec; color: #b02a37; }
.je-source-ap_payment .je-source-dot { background: #dc3545; }
.je-source-payroll { background: #f1f3f5; color: #495057; }
.je-source-payroll .je-source-dot { background: #6c757d; }
.je-source-manual { background: #fdf6e3; color: #7a5c00; }
.je-source-manual .je-source-dot { background: #b8860b; }
.je-source-default { background: #f1f3f5; color: #495057; }
.je-source-default .je-source-dot { background: #adb5bd; }

.je-status-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.22rem 0.65rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.je-status-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.je-status-posted { background: #e8f7ee; color: #15794a; }
.je-status-posted .je-status-dot { background: #198754; }
.je-status-draft { background: #fff8e1; color: #a15c00; }
.je-status-draft .je-status-dot { background: #f4a300; }
.je-status-void { background: #f1f3f5; color: #6c757d; }
.je-status-void .je-status-dot { background: #adb5bd; }

/* ---- payroll periods ---- */
.payroll-table tbody tr { border-inline-start: 3px solid transparent; }
.payroll-table tbody tr.payroll-row-open { border-inline-start-color: #0d6efd; }
.payroll-table tbody tr.payroll-row-processed { border-inline-start-color: #198754; }
.payroll-table tbody tr.payroll-row-closed { border-inline-start-color: #adb5bd; }
.payroll-table tbody tr:nth-of-type(odd) { background-color: rgba(0,0,0,0.015); }
.payroll-table thead th { background-color: #f1f3f5; border-bottom: 2px solid #dee2e6; }
.payroll-period-name { font-weight: 700; color: #343a40; }
.payroll-table td.payroll-net-amount { font-weight: 700; color: #0d47a1; font-variant-numeric: tabular-nums; }

.payroll-status-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.24rem 0.7rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.payroll-status-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.payroll-status-open { background: #e8f0fe; color: #0d47a1; }
.payroll-status-open .payroll-status-dot { background: #0d6efd; }
.payroll-status-processed { background: #e8f7ee; color: #15794a; }
.payroll-status-processed .payroll-status-dot { background: #198754; }
.payroll-status-closed { background: #f1f3f5; color: #6c757d; }
.payroll-status-closed .payroll-status-dot { background: #adb5bd; }

.payroll-paid-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.22rem 0.65rem; border-radius: 999px; font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.payroll-paid-pill .payroll-status-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.payroll-paid-full { background: #e8f7ee; color: #15794a; }
.payroll-paid-full .payroll-status-dot { background: #198754; }
.payroll-paid-partial { background: #fff8e1; color: #a15c00; }
.payroll-paid-partial .payroll-status-dot { background: #f4a300; }

/* ---- payroll period detail ---- */
.payslip-table tbody tr { border-inline-start: 3px solid transparent; }
.payslip-table tbody tr.payslip-row-draft { border-inline-start-color: #f4a300; }
.payslip-table tbody tr.payslip-row-approved { border-inline-start-color: #0d6efd; }
.payslip-table tbody tr.payslip-row-paid { border-inline-start-color: #198754; }
.payslip-table tbody tr:nth-of-type(odd) { background-color: rgba(0,0,0,0.015); }
.payslip-table thead th { background-color: #f1f3f5; border-bottom: 2px solid #dee2e6; }
.payslip-table tfoot td { font-weight: 700; border-top: 2px solid #dee2e6; background-color: #f8f9fa; }
.payslip-table td.payslip-net { font-weight: 700; color: #0d47a1; font-variant-numeric: tabular-nums; }
.payslip-table td.payslip-deduction { color: #b45309; font-variant-numeric: tabular-nums; }

.payslip-status-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.22rem 0.65rem; border-radius: 999px; font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.payslip-status-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.payslip-status-draft { background: #fff8e1; color: #a15c00; }
.payslip-status-draft .payslip-status-dot { background: #f4a300; }
.payslip-status-approved { background: #e8f0fe; color: #0d47a1; }
.payslip-status-approved .payslip-status-dot { background: #0d6efd; }
.payslip-status-paid { background: #e8f7ee; color: #15794a; }
.payslip-status-paid .payslip-status-dot { background: #198754; }

/* ---- shop items & categories ---- */
.shop-table tbody tr:nth-of-type(odd) { background-color: rgba(0,0,0,0.015); }
.shop-table thead th { background-color: #f1f3f5; border-bottom: 2px solid #dee2e6; }
.shop-table td.shop-sku { font-weight: 700; color: #495057; }
.shop-table td.shop-price { font-weight: 700; color: #198754; font-variant-numeric: tabular-nums; }
.shop-stock-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.shop-stock-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.shop-stock-ok { background: #e8f7ee; color: #15794a; }
.shop-stock-ok .shop-stock-dot { background: #198754; }
.shop-stock-low { background: #fff8e1; color: #a15c00; }
.shop-stock-low .shop-stock-dot { background: #f4a300; }
.shop-stock-out { background: #fdecec; color: #b02a37; }
.shop-stock-out .shop-stock-dot { background: #dc3545; }
.shop-category-badge {
  display: inline-flex; padding: 0.18rem 0.6rem; border-radius: 0.4rem;
  font-size: 0.78rem; font-weight: 600; background: #eaecfd; color: #3341c9; white-space: nowrap;
}
.shop-status-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.shop-status-pill .shop-stock-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.shop-status-active { background: #e8f7ee; color: #15794a; }
.shop-status-active .shop-stock-dot { background: #198754; }
.shop-status-inactive { background: #f1f3f5; color: #6c757d; }
.shop-status-inactive .shop-stock-dot { background: #adb5bd; }

/* ---- exchange rate ---- */
.fx-rate-card { border-radius: 0.75rem; overflow: hidden; border: 1px solid #dee2e6; }
.fx-rate-card .fx-rate-header {
  background: linear-gradient(135deg, #e8f0fe 0%, #eef2ff 100%);
  color: #0d47a1; padding: 1.1rem 1.4rem; border-bottom: 1px solid #dee2e6;
}
.fx-rate-card .fx-rate-header .fx-rate-label { color: #4a6da8; font-size: 0.85rem; margin-bottom: 0.15rem; font-weight: 600; }
.fx-rate-card .fx-rate-header .fx-rate-value { font-size: 2rem; font-weight: 800; color: #0d47a1; }
.fx-rate-card .fx-rate-header .fx-rate-sub { color: #4a6da8; font-size: 0.8rem; margin-top: 0.15rem; }

.fx-table tbody tr:nth-of-type(odd) { background-color: rgba(0,0,0,0.015); }
.fx-table thead th { background-color: #f1f3f5; border-bottom: 2px solid #dee2e6; }
.fx-table .fx-value { font-weight: 700; color: #0d47a1; font-variant-numeric: tabular-nums; }
.fx-change-pill { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.18rem 0.55rem; border-radius: 999px; font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.fx-change-up { background: #fdecec; color: #b02a37; }
.fx-change-down { background: #e8f7ee; color: #15794a; }
.fx-change-same { background: #f1f3f5; color: #6c757d; }

/* ---- purchase history (shop/lpg) ---- */
.purch-table tbody tr { border-inline-start: 3px solid transparent; }
.purch-table tbody tr.purch-row-unpaid { border-inline-start-color: #dc3545; }
.purch-table tbody tr.purch-row-partial { border-inline-start-color: #fd7e14; }
.purch-table tbody tr.purch-row-paid { border-inline-start-color: #198754; }
.purch-table tbody tr.purch-row-void { border-inline-start-color: #adb5bd; opacity: 0.7; }
.purch-table tbody tr:nth-of-type(odd) { background-color: rgba(0,0,0,0.015); }
.purch-table thead th { background-color: #f1f3f5; border-bottom: 2px solid #dee2e6; }
.purch-amount { font-weight: 700; color: #0d47a1; font-variant-numeric: tabular-nums; }

/* ---- page header banner ---- */
.page-header-banner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
  background: linear-gradient(135deg, #2f6fed 0%, #4a5cf5 100%);
  color: #fff; padding: 1rem 1.4rem; border-radius: 0.6rem; margin-bottom: 1rem;
}
.page-header-banner h2 { color: #fff; margin: 0; font-size: 1.4rem; font-weight: 700; }
.page-header-banner .page-header-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.page-header-banner .btn-light { font-weight: 600; }
.page-header-banner .btn-outline-light { font-weight: 600; }

/* ---- shifts ---- */
.shift-table tbody tr:nth-of-type(odd) { background-color: rgba(0,0,0,0.015); }
.shift-table thead th { background-color: #f1f3f5; border-bottom: 2px solid #dee2e6; }
.shift-table tbody tr { border-inline-start: 3px solid transparent; }
.shift-table tbody tr.shift-row-open { border-inline-start-color: #0d6efd; }
.shift-table tbody tr.shift-row-closed { border-inline-start-color: #fd7e14; }
.shift-table tbody tr.shift-row-reconciled { border-inline-start-color: #198754; }
.shift-table td.shift-amount, .je-detail-table td.shift-amount { font-weight: 700; color: #0d47a1; font-variant-numeric: tabular-nums; }
.shift-fuel-badge {
  display: inline-flex; padding: 0.16rem 0.55rem; border-radius: 0.4rem;
  font-size: 0.74rem; font-weight: 600; background: #eaecfd; color: #3341c9; white-space: nowrap;
}

.shift-recon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
@media (max-width: 767.98px) { .shift-recon-grid { grid-template-columns: 1fr; } }
.shift-recon-stat { border-radius: 0.5rem; padding: 0.9rem 1.1rem; }
.shift-recon-stat .label { font-size: 0.8rem; color: #6c757d; margin-bottom: 0.2rem; }
.shift-recon-stat .value { font-size: 1.25rem; font-weight: 800; }
.shift-recon-expected { background: #e8f0fe; }
.shift-recon-expected .value { color: #0d47a1; }
.shift-recon-actual { background: #e3f6f4; }
.shift-recon-actual .value { color: #0b7a7a; }
.shift-recon-variance-ok { background: #e8f7ee; }
.shift-recon-variance-ok .value { color: #198754; }
.shift-recon-variance-bad { background: #fdecec; }
.shift-recon-variance-bad .value { color: #dc3545; }

/* ---- journal entry detail ---- */
.je-detail-table tbody tr:nth-of-type(odd) { background-color: rgba(0,0,0,0.015); }
.je-detail-table thead th { background-color: #f1f3f5; border-bottom: 2px solid #dee2e6; }
.je-detail-table tfoot td { font-weight: 700; border-top: 2px solid #dee2e6; background-color: #f8f9fa; }
.je-detail-table td.je-debit { font-weight: 700; color: #0d47a1; font-variant-numeric: tabular-nums; }
.je-detail-table td.je-credit { font-weight: 700; color: #b45309; font-variant-numeric: tabular-nums; }
.je-detail-table td.je-zero { color: #adb5bd; }

/* ---- ledger (per-account-group) detail ---- */
.ledger-table tbody tr { border-inline-start: 3px solid transparent; }
.ledger-table tbody tr.ledger-row-usd { border-inline-start-color: #0d6efd; }
.ledger-table tbody tr.ledger-row-lbp { border-inline-start-color: #b8860b; }
.ledger-currency-badge {
  display: inline-flex; padding: 0.14rem 0.5rem; border-radius: 0.35rem;
  font-size: 0.68rem; font-weight: 700; margin-inline-start: 0.4rem; white-space: nowrap;
}
.ledger-currency-badge.usd { background: #e8f0fe; color: #0d47a1; }
.ledger-currency-badge.lbp { background: #fdf6e3; color: #8a6400; }

/* ---- users ---- */
.user-table tbody tr:nth-of-type(odd) { background-color: rgba(0,0,0,0.015); }
.user-table thead th { background-color: #f1f3f5; border-bottom: 2px solid #dee2e6; }
.user-table td.user-username { font-weight: 700; color: #495057; }
.user-role-badge {
  display: inline-flex; padding: 0.18rem 0.6rem; border-radius: 0.4rem;
  font-size: 0.78rem; font-weight: 600; background: #f1ecfb; color: #6f42c1; white-space: nowrap;
}

@page {
  size: landscape;
  margin: 12mm;
}

@media print {
  .emhatta-sidebar, nav.navbar, .no-print { display: none !important; }
  .emhatta-main, main { margin: 0 !important; padding: 0 !important; width: 100% !important; }
  .print-only { display: block !important; }
  .tab-content > .tab-pane { display: block !important; opacity: 1 !important; margin-bottom: 1.5rem; }
  .tab-content > .tab-pane + .tab-pane { border-top: 2px dashed #ced4da; padding-top: 1.25rem; }
  .card { border: 1px solid #dee2e6 !important; box-shadow: none !important; margin-bottom: 0.75rem !important; }
  .report-summary-card { break-inside: avoid; }
  .table-responsive { overflow: visible !important; }
  .report-table thead { display: table-header-group; }
  .report-table tfoot { display: table-row-group; }
  .report-table tr { break-inside: avoid; }
  body { background: #fff !important; }
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
}
