/* E.Muwafaq Accounting Phase 2 — additive, isolated presentation layer.
   Never style Quick Import, finance search, multi-entity switcher or Dolibarr core globally. */
/* Dolibarr-native dashboard: own layout, not emuwafaqtheme UI primitives. */
#emup2-dashboard{--p2-navy:#153851;--p2-ink:#172c43;--p2-muted:#65788d;--p2-line:#dfe7ef;
  --p2-bronze:#b3884e;color:var(--p2-ink);max-width:1580px;margin:0 auto 36px;
  font-family:"Segoe UI","Noto Sans Arabic",Tahoma,Arial,sans-serif;line-height:1.5;}
#emup2-dashboard *{box-sizing:border-box;}
#emup2-dashboard .emup2-dashboard-heading{display:flex;gap:18px;align-items:flex-start;
  justify-content:space-between;flex-wrap:wrap;padding:18px 22px;margin-bottom:16px;
  border-radius:12px;color:white;background:var(--p2-navy);}
#emup2-dashboard .emup2-dashboard-heading h1{color:white;font-size:clamp(1.3rem,2vw,1.9rem);
  margin:5px 0;font-weight:750;}
#emup2-dashboard .emup2-eyebrow{letter-spacing:.07em;opacity:.8;font-size:11px;margin:0;}
#emup2-dashboard .emup2-dashboard-description{color:#dbe7ed;margin:3px 0 0;}
#emup2-dashboard .emup2-dashboard-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;max-width:720px;}
#emup2-dashboard .emup2-dashboard-action{display:inline-flex;padding:8px 13px;min-height:38px;
  align-items:center;text-decoration:none;border-radius:6px;border:1px solid #8097a9;
  color:white;background:rgba(255,255,255,.09);font-weight:650;}
#emup2-dashboard .emup2-dashboard-action:hover{background:rgba(255,255,255,.2);}
#emup2-dashboard .emup2-dashboard-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;margin-bottom:14px;}
#emup2-dashboard .emup2-dashboard-kpi{min-width:0;display:flex;flex-direction:column;gap:10px;
  background:#fff;border:1px solid var(--p2-line);border-radius:11px;padding:17px 18px;
  text-decoration:none;color:var(--p2-ink);box-shadow:0 4px 18px rgba(19,52,72,.035);}
#emup2-dashboard a.emup2-dashboard-kpi:hover{border-color:var(--p2-bronze);}
#emup2-dashboard .emup2-dashboard-label{font-size:12px;color:var(--p2-muted);font-weight:650;}
#emup2-dashboard .emu-money-number{display:inline;white-space:nowrap;}
#emup2-dashboard .emu-money-currency{display:inline-block;margin-inline-start:.35em;font-size:.75em;color:var(--p2-muted);white-space:nowrap;}
#emup2-dashboard .emup2-dashboard-value{font-size:clamp(1.15rem,2vw,1.5rem);
  overflow-wrap:anywhere;font-variant-numeric:tabular-nums;text-align:start;}
#emup2-dashboard .emup2-dashboard-columns{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:12px;}
#emup2-dashboard .emup2-dashboard-panel{background:white;border:1px solid var(--p2-line);
  border-radius:11px;padding:18px 20px;margin:0 0 14px;min-width:0;}
#emup2-dashboard .emup2-dashboard-panel>header{display:flex;justify-content:space-between;align-items:center;gap:8px;
  padding-bottom:11px;border-bottom:1px solid #e9eef3;margin-bottom:8px;}
#emup2-dashboard .emup2-dashboard-panel h2{font-size:1.07rem;color:var(--p2-ink);margin:0;}
#emup2-dashboard .emup2-dashboard-panel>header>span{font-size:12px;color:var(--p2-muted);}
#emup2-dashboard .emup2-dashboard-statlist{margin:0;}
#emup2-dashboard .emup2-dashboard-statlist>div{display:flex;justify-content:space-between;gap:12px;
  border-bottom:1px solid #f0f3f6;padding:9px 0;align-items:center;}
#emup2-dashboard .emup2-dashboard-statlist dt{color:var(--p2-muted);}
#emup2-dashboard .emup2-dashboard-statlist dd{margin:0;white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:700;}
#emup2-dashboard .emup2-dashboard-attention{display:grid;gap:8px;padding-top:6px;}
#emup2-dashboard .emup2-dashboard-attention>a{display:flex;justify-content:space-between;gap:8px;
  padding:11px 12px;border:1px solid #e9eef3;border-radius:7px;color:var(--p2-ink);text-decoration:none;}
#emup2-dashboard .emup2-dashboard-attention>a:hover{background:#f2f7fa;border-color:#c9d8e5;}
#emup2-dashboard .emup2-dashboard-attention strong{font-variant-numeric:tabular-nums;color:#946a36;}
#emup2-dashboard .emup2-dashboard-note{margin:12px 0 0;color:var(--p2-muted);font-size:12px;}
#emup2-dashboard .emup2-dashboard-warning{color:#963e2f;font-weight:650;}
#emup2-dashboard .emup2-dashboard-links>div{display:flex;gap:8px;flex-wrap:wrap;}
#emup2-dashboard .emup2-dashboard-links a{display:inline-flex;align-items:center;padding:8px 13px;
  min-height:38px;border-radius:6px;color:var(--p2-ink);background:#f8fafc;
  border:1px solid var(--p2-line);text-decoration:none;}
#emup2-dashboard .emup2-dashboard-links a:hover{background:#edf3f7;}
#emup2-dashboard a:focus-visible,#emup2-dashboard button:focus-visible{outline:3px solid #4b91c6;outline-offset:2px;}
@media(max-width:1060px){#emup2-dashboard .emup2-dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:700px){#emup2-dashboard .emup2-dashboard-kpis,#emup2-dashboard .emup2-dashboard-columns{grid-template-columns:1fr;}
 #emup2-dashboard .emup2-dashboard-heading{padding:15px;}}

/* Native draft journal grid: scoped to the existing element; never alter its form posting. */
#emux-jgrid {--emup2-navy:#153851;--emup2-border:#d9e2eb;--emup2-bronze:#ae834b;
  border:1px solid var(--emup2-border);border-radius:12px;background:#fff;
  box-shadow:0 3px 15px rgba(21,56,81,.045);padding:16px;}
#emux-jgrid > h3 {color:var(--emup2-navy);margin:0 0 7px;font-size:1.1rem;}
#emux-jgrid .emuxjg-table thead th {position:sticky;top:0;z-index:1;
  color:#fff;background:var(--emup2-navy);font-weight:650;border-color:#32546b;}
#emux-jgrid .emuxjg-table tbody tr:nth-child(2n) {background:#f8fafc;}
#emux-jgrid .emuxjg-table tbody tr:hover {background:#eef4f9;}
#emux-jgrid .emuxjg-table .emuxjg-idx {font-variant-numeric:tabular-nums;color:#526b82;}
#emux-jgrid input.emuxjg-cell {min-height:36px;border:1px solid #d3dde8;border-radius:5px;
  font-variant-numeric:tabular-nums;background:white;color:#172c43;}
#emux-jgrid input.emuxjg-cell:focus-visible {outline:2px solid #27648b;outline-offset:1px;border-color:#27648b;}
#emux-jgrid input.emuxjg-cell[aria-invalid="true"] {border-color:#b53b43;background:#fff7f7;}
#emux-jgrid tr.emup2-row-error {box-shadow:inset 3px 0 #c95357;}
#emux-jgrid .emup2-grid-feedback {margin:8px 0 2px;font-size:12px;line-height:1.6;color:#8c3338;}
#emux-jgrid .emup2-grid-feedback[hidden] {display:none;}
#emux-jgrid .emuxjg-actions button {min-height:36px;}
#emux-jgrid [dir="rtl"] .emuxjg-cell {text-align:start;}

/* Report scope only: no universal tables, no inherited action styling elsewhere. */
#emup2-ledger {--emup2-navy:#153851;--emup2-border:#d9e2eb;--emup2-ink:#142b43;
  --emup2-bronze:#b58a50;--emup2-muted:#667891;--emup2-bg:#f6f8fb;
  font-family: "Segoe UI","Noto Sans Arabic",Tahoma,Arial,sans-serif;color:var(--emup2-ink);
  max-width:1680px;margin:0 auto 32px;line-height:1.5;}
#emup2-ledger * {box-sizing:border-box;}
#emup2-ledger .emup2-heading {display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:4px 0 18px;}
#emup2-ledger h2 {font-size:clamp(1.25rem,2vw,1.75rem);margin:0;color:var(--emup2-ink);font-weight:750;}
#emup2-ledger .emup2-subtitle {color:var(--emup2-muted);margin:4px 0 0;}
#emup2-ledger .emup2-actions {display:flex;gap:7px;flex-wrap:wrap;align-items:center;}
#emup2-ledger .emup2-action {display:inline-flex;gap:6px;align-items:center;justify-content:center;
  padding:8px 13px;border:1px solid #cfdbe5;border-radius:6px;background:white;color:var(--emup2-ink);
  font-weight:600;text-decoration:none;min-height:38px;}
#emup2-ledger .emup2-action:hover {border-color:#8fa5b8;background:#f4f8fb;}
#emup2-ledger .emup2-action-primary {background:var(--emup2-navy);border-color:var(--emup2-navy);color:#fff;}
#emup2-ledger .emup2-action-primary:hover {background:#265773;color:#fff;}
#emup2-ledger .emup2-panel {background:#fff;border:1px solid var(--emup2-border);border-radius:11px;
  box-shadow:0 3px 14px rgba(17,40,63,.03);padding:15px 17px;margin-bottom:15px;}
#emup2-ledger .emup2-filters {display:flex;gap:12px;align-items:end;flex-wrap:wrap;}
#emup2-ledger .emup2-field {display:flex;flex-direction:column;gap:4px;flex:1 1 180px;max-width:300px;}
#emup2-ledger .emup2-field label {font-size:12px;font-weight:700;color:#53667c;}
#emup2-ledger .emup2-field input {width:100%;min-height:38px;border:1px solid #cdd8e3;border-radius:6px;
  padding:7px 10px;background:white;color:var(--emup2-ink);font:inherit;}
#emup2-ledger .emup2-metrics {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:15px 0;}
#emup2-ledger .emup2-metric {background:#fff;border:1px solid var(--emup2-border);border-radius:10px;padding:16px 18px;}
#emup2-ledger .emup2-metric-label {color:var(--emup2-muted);font-size:12px;margin-bottom:8px;}
#emup2-ledger .emup2-metric-number {font-size:clamp(1.1rem,2vw,1.45rem);color:var(--emup2-ink);font-weight:760;
  font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate;display:inline-block;}
#emup2-ledger .emup2-metric.emup2-total .emup2-metric-number {color:#946a36;}
#emup2-ledger .emup2-table-panel {padding:0;overflow:hidden;}
#emup2-ledger .emup2-table-scroll {overflow:auto;max-height:68vh;}
#emup2-ledger .emup2-table {border-collapse:separate;border-spacing:0;width:100%;min-width:850px;font-size:13px;}
#emup2-ledger .emup2-table thead th {position:sticky;top:0;z-index:2;background:var(--emup2-navy);
  color:#fff;text-align:start;padding:12px 13px;white-space:nowrap;border:0;}
#emup2-ledger .emup2-table tbody td,#emup2-ledger .emup2-table tfoot td {padding:10px 13px;
  border-bottom:1px solid #e9edf2;vertical-align:middle;}
#emup2-ledger .emup2-table tbody tr:nth-child(even) {background:#f8fafc;}
#emup2-ledger .emup2-table tbody tr:hover {background:#eef4f8;}
#emup2-ledger .emup2-table .emup2-num {text-align:end;white-space:nowrap;font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate;}
#emup2-ledger .emup2-table .emup2-opening {background:#fff8ee;}
#emup2-ledger .emup2-table tfoot {font-weight:700;background:#eaf0f5;}
#emup2-ledger .emup2-table tfoot td {position:sticky;bottom:0;z-index:1;border-top:1px solid #cedae6;}
#emup2-ledger .emup2-ref {color:#145a90;text-decoration:underline;text-underline-offset:2px;}
#emup2-ledger .emup2-detail-button {background:transparent;border:0;color:#1a5a8a;text-decoration:underline;
  cursor:pointer;padding:3px;text-align:inherit;font:inherit;}
#emup2-ledger .emup2-detail-button:hover {color:#093e65;}
#emup2-ledger .emup2-detail {border-top:1px solid var(--emup2-border);background:#f8fafc;padding:16px;}
#emup2-ledger .emup2-detail[hidden] {display:none;}
#emup2-ledger .emup2-detail-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px 18px;}
#emup2-ledger .emup2-detail dt {font-size:11px;color:var(--emup2-muted);}
#emup2-ledger .emup2-detail dd {font-weight:650;margin:0;overflow-wrap:anywhere;}
#emup2-ledger .emup2-alert {padding:12px 14px;border-radius:8px;background:#fff8ed;color:#6c4e2b;margin:12px 0;}
#emup2-ledger a:focus-visible,#emup2-ledger button:focus-visible,#emup2-ledger input:focus-visible {outline:3px solid #427ba6;outline-offset:2px;}
@media(max-width:760px){
  #emup2-ledger .emup2-metrics {grid-template-columns:1fr;gap:8px;}
  #emup2-ledger .emup2-detail-grid {grid-template-columns:1fr 1fr;}
  #emup2-ledger .emup2-panel {padding:12px;}
  #emup2-ledger .emup2-table-panel {padding:0;}
  #emup2-ledger .emup2-actions {width:100%;}
  #emup2-ledger .emup2-action {flex:1 1 auto;}

}
@media(prefers-reduced-motion:reduce){#emup2-dashboard * {scroll-behavior:auto;}}

/* Dashboard-only refinements. No selectors address import/search widgets or page body. */
#emup2-dashboard .emup2-dashboard-heading{background:#fff;color:var(--p2-ink);border:1px solid var(--p2-line);border-inline-start:4px solid var(--p2-bronze)}
#emup2-dashboard .emup2-dashboard-heading h1{color:var(--p2-ink)}
#emup2-dashboard .emup2-eyebrow{color:#596c7e;opacity:1}
#emup2-dashboard .emup2-dashboard-description{color:#596c7e}
#emup2-dashboard .emup2-dashboard-action{color:var(--p2-ink);background:#f8fafc;border-color:var(--p2-line)}
#emup2-dashboard .emup2-dashboard-action:hover{background:#edf2f6}
#emup2-dashboard .emup2-kpi-caption{color:#596c7e;font-size:11px;min-height:1.5em}
#emup2-dashboard .emup2-period-form,#emup2-dashboard #emup2-custom-dates{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
#emup2-dashboard [hidden]{display:none!important}
#emup2-dashboard .emup2-period-form label{font-size:13px;font-weight:600}
#emup2-dashboard .emup2-period-form select,#emup2-dashboard .emup2-period-form input,#emup2-dashboard .emup2-nav-search input{font:inherit;min-height:38px;border:1px solid #c6d3df;border-radius:6px;padding:6px 10px;background:#fff;color:var(--p2-ink);max-width:100%}
#emup2-dashboard .emup2-local-button{font:inherit;min-height:38px;padding:7px 14px;border:1px solid var(--p2-navy);border-radius:6px;background:var(--p2-navy);color:#fff;cursor:pointer}
#emup2-dashboard .emup2-reset,#emup2-dashboard .emup2-text-link{color:#1c527b;text-underline-offset:3px;font-size:13px}
#emup2-dashboard .emup2-text-link{display:inline-block;margin-top:12px}
#emup2-dashboard .emup2-nav-groups{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px!important}
#emup2-dashboard .emup2-nav-group{min-width:0}
#emup2-dashboard .emup2-nav-group h3{color:#596c7e;font-size:13px;margin:3px 0 8px}
#emup2-dashboard .emup2-nav-group>div{display:flex;flex-wrap:wrap;gap:7px}
#emup2-dashboard .emup2-nav-search{max-width:100%}
#emup2-dashboard .emup2-nav-search input{width:260px}
#emup2-dashboard .emup2-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#emup2-dashboard input:focus-visible,#emup2-dashboard select:focus-visible{outline:3px solid #427ba6;outline-offset:2px}
#emup2-dashboard .emup2-dashboard-statlist dd{white-space:normal;text-align:end}
#emup2-dashboard .emup2-dashboard-panel>header{flex-wrap:wrap}
#emup2-dashboard .emup2-period-form[aria-busy="true"]{opacity:.75}
@media(max-width:1000px){#emup2-dashboard .emup2-nav-groups{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#emup2-dashboard .emup2-nav-groups{grid-template-columns:1fr}#emup2-dashboard .emup2-period-form{align-items:stretch}#emup2-dashboard .emup2-period-form>label{flex-basis:100%}#emup2-dashboard .emup2-nav-search,#emup2-dashboard .emup2-nav-search input{width:100%}}

#emux-jgrid .emup2-grid-summary{font-size:13px;color:#465c70;padding:10px 12px;background:#f6f8fb;border:1px solid #dfe7ef;border-radius:6px;font-variant-numeric:tabular-nums}
#emux-jgrid .emup2-grid-summary.emup2-grid-balanced{border-inline-start:3px solid #587965}
#emux-jgrid #emuxjg-status[hidden]{display:none}

#emux-jgrid .emup2-amount-hint{font-size:12px;color:#52677a;margin:5px 0 8px}
