@font-face { font-family: "Cairo"; font-weight: 400; src: url("../vendor/fonts/cairo-arabic-400.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Cairo"; font-weight: 700; src: url("../vendor/fonts/cairo-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Cairo"; font-weight: 400; src: url("../vendor/fonts/cairo-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF; }
@font-face { font-family: "Cairo"; font-weight: 700; src: url("../vendor/fonts/cairo-latin-700.woff2") format("woff2"); unicode-range: U+0000-00FF; }

:root {
  --brand: #1f4e79;
  --brand-2: #2e6da4;
  --ok: #e2f5e2; --warn: #fff6cc; --err: #ffdede; --dup: #ffe6c2; --posted: #ececec;
}
body { font-family: "Cairo", Tahoma, sans-serif; background: #f3f6fa; font-size: .95rem; }
.navbar { background: var(--brand) !important; }
.navbar .nav-link { color: rgba(255,255,255,.85) !important; }
.navbar .nav-link.active, .navbar .nav-link:hover { color: #fff !important; }
.page-title { font-weight: 700; color: var(--brand); margin: 0; font-size: 1.35rem; }
.card { border: 0; box-shadow: 0 1px 3px rgba(16,40,70,.08); }
.card-header { background: #fff; font-weight: 700; color: var(--brand); }
.num { font-variant-numeric: tabular-nums; direction: ltr; text-align: left; white-space: nowrap; }
td.num, th.num { text-align: left; }
.table thead th { background: #e9eff6; color: #1f3550; font-weight: 700; white-space: nowrap; position: sticky; top: 0; z-index: 2; }
.table-sm td, .table-sm th { padding: .3rem .45rem; }
.balance-card .amount { font-size: 1.35rem; font-weight: 700; }
.neg { color: #b42318; }
.pos { color: #11753b; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-2); color: #fff; }
.filters .form-control, .filters .form-select { min-width: 120px; }
.depth-0 { font-weight: 700; } .depth-1 { font-weight: 700; }
.tree-name { display: inline-block; }
tr.group-row td { background: #f5f8fc; }
.subtotal td { background: #eef3f9 !important; font-weight: 700; }
.grand td { background: #dce7f3 !important; font-weight: 700; }

/* شاشة مراجعة الاستيراد */
.imp-table td { vertical-align: middle; }
.imp-table input.form-control, .imp-table select.form-select { padding: .15rem .35rem; font-size: .88rem; }
.imp-table tr.ok td { background: var(--ok); }
.imp-table tr.warn td { background: var(--warn); }
.imp-table tr.err td { background: var(--err); }
.imp-table tr.dup td { background: var(--dup); }
.imp-table tr.posted td { background: var(--posted); color: #555; }
.imp-table tr.excluded td { opacity: .55; }
.imp-table .acc-cell { min-width: 230px; }
.imp-table .ts-control { padding: .15rem .35rem !important; min-height: 30px; font-size: .88rem; }
.chip { display: inline-block; font-size: .75rem; background: #fff; border: 1px solid #c9d6e4; border-radius: 10px; padding: 0 .45rem; margin: 2px 0 0 3px; cursor: pointer; }
.chip:hover { background: var(--brand); color: #fff; }
.legend span { display: inline-block; padding: 0 .5rem; border-radius: 4px; margin-left: .3rem; font-size: .8rem; }
.sticky-actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #dde5ee; padding: .6rem 1rem; z-index: 5; box-shadow: 0 -2px 8px rgba(0,0,0,.06); }

.voucher-print { max-width: 800px; margin: auto; background: #fff; padding: 2rem; border: 1px solid #dde; }
.voucher-print .big { font-size: 1.6rem; font-weight: 700; }

@media print {
  .no-print, .navbar, .filters, .btn, .alert, .sticky-actions { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .card { box-shadow: none; }
  .table thead th { position: static; }
  .print-only { display: block !important; }
  a { text-decoration: none; color: inherit; }
}
.print-only { display: none; }
