body { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif; }

.app-shell { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem;
  border-bottom: 1px solid var(--bs-border-color); background: var(--bs-body-bg);
  position: sticky; top: 0; z-index: 1020;
}
.app-content { padding: 1.25rem 1rem 3rem; max-width: 1280px; width: 100%; margin-inline: auto; }

.app-sidebar { background: var(--bs-tertiary-bg); border-inline-end: 1px solid var(--bs-border-color); }
@media (min-width: 992px) {
  .app-sidebar { width: 250px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
  .app-sidebar .offcanvas-header { display: flex; padding: 1rem; }
}
.app-brand { font-weight: 700; font-size: 1.05rem; }
.app-nav-link {
  display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; margin-bottom: 2px;
  border-radius: .375rem; color: var(--bs-body-color); text-decoration: none;
}
.app-nav-link:hover { background: var(--bs-secondary-bg); }
.app-nav-link.active { background: var(--bs-primary); color: #fff; }
.app-nav-link.disabled { color: var(--bs-secondary-color); cursor: default; }
.app-nav-link.disabled:hover { background: none; }
.app-nav-link small { font-size: .7rem; }

.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.stat { border: 1px solid var(--bs-border-color); border-radius: .5rem; padding: .9rem 1rem; height: 100%; }
.stat-label { color: var(--bs-secondary-color); font-size: .85rem; }
.stat-value { font-size: 1.35rem; font-weight: 600; }
.stat-value small { font-size: .8rem; font-weight: 400; color: var(--bs-secondary-color); }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0; }
dl.facts dt { color: var(--bs-secondary-color); font-weight: 400; }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.cost-bar { display: flex; height: .6rem; border-radius: 1rem; overflow: hidden; background: var(--bs-secondary-bg); }
.cost-bar > span { display: block; }
.dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; margin-inline-end: .35rem; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: var(--bs-tertiary-bg); }
.login-card { width: 100%; max-width: 380px; }

/* .num يعزل الأرقام باتجاه LTR؛ المحاذاة تبقى على اتجاه الصفحة */
.num { text-align: right; }
.num.text-end { text-align: left; }

a.stat:hover { border-color: var(--bs-primary); }
.cash-bar { height: .35rem; margin-block: .2rem; background: var(--bs-secondary-bg); border-radius: 1rem; overflow: hidden; }
.cash-bar > span { display: block; height: 100%; }

@media print {
  .report-table { font-size: .8rem; }
  body { background: #fff !important; color: #000 !important; }
  .app-sidebar, .app-topbar, .alert { display: none !important; }
  .app-content { padding: 0; max-width: none; }
}

.audit-data { display: flex; flex-wrap: wrap; gap: .15rem .9rem; }

/* ترويسة المطبوعات */
.print-header { align-items: center; gap: 1rem; border-bottom: 2px solid #000; padding-bottom: .6rem; margin-bottom: 1rem; }
.print-header img { max-height: 4.5rem; max-width: 9rem; }
.print-company { font-size: 1.35rem; font-weight: 700; }
.print-contact { display: flex; flex-wrap: wrap; gap: .1rem 1rem; font-size: .85rem; }
