/* BillTrix additions on top of the Porto admin theme */
:root { --bt-muted: #6c757d; }
/* Top bar + sidebar: markup and sizes come from the base theme (layouts/app.blade.php) */
@media (max-width: 767px) {
    html.sidebar-left-opened #sidebar-left { z-index: 1020 !important; }
    .sidebar-left .sidebar-header .toggle-sidebar-left { color: #fff; font-size: 1.2rem; cursor: pointer; }
}
.bt-pagebar { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; align-items: center; margin: 0 0 1.25rem; }
.bt-pagebar h2 { font-size: 1.35rem; font-weight: 600; margin: 0; color: #222; }
@media (min-width: 768px) {
    html.fixed .content-body { padding: 24px 28px; }
}
@media (max-width: 767px) { .content-body { padding: 16px 12px; } }
.card-title { font-size: 1.05rem; }
.table > :not(caption) > * > * { vertical-align: middle; }
.table-sm td, .table-sm th { padding: .35rem .5rem; }
.num, .table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot th, .table tfoot td { font-weight: 600; background: #f6f7f9; }
.text-dr { color: #b02a37; } .text-cr { color: #198754; }
.stat-card { border-left: 4px solid var(--bs-primary); }
.stat-card .stat-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--bt-muted); }
.stat-card .stat-value { font-size: 1.45rem; font-weight: 600; line-height: 1.2; }
.filters .form-label { color: var(--bt-muted); }
.select2-container { width: 100% !important; }
.select2-container .select2-selection--single { height: 38px; }
.select2-container--bootstrap .select2-selection--single .select2-selection__rendered { line-height: 24px; }
.form-control-sm + .select2-container .select2-selection--single { height: 31px; }

/* Invoice editor */
#lines td { padding: .25rem; }
#lines input.form-control, #lines select.form-select { padding: .25rem .4rem; font-size: .9rem; min-width: 60px; }
#lines .col-product { min-width: 220px; }
#lines .col-amount { min-width: 110px; }
#lines .stock-badge { font-size: .72rem; }
#lines tr.row-warn td { background: #fff7e6; }
.totals-table td { padding: .3rem .5rem; }
.totals-table .grand td { font-size: 1.2rem; font-weight: 700; border-top: 2px solid #333; }
.scan-box { font-size: 1.05rem; }
.kbd { font-family: monospace; font-size: .75rem; padding: 0 .3rem; border: 1px solid #ccc; border-radius: 3px; background: #f8f9fa; }

/* Chart of accounts tree */
.coa-tree .lvl-1 td:first-child { padding-left: 1.6rem; }
.coa-tree .lvl-2 td:first-child { padding-left: 3rem; }
.coa-tree .lvl-3 td:first-child { padding-left: 4.4rem; }
.coa-tree .group td { font-weight: 600; background: #fafbfc; }

@media print {
    .sidebar-left, .page-header, .bt-pagebar, .no-print, .alert, form.filters { display: none !important; }
    .content-body { padding: 0 !important; margin: 0 !important; }
    html.fixed .inner-wrapper { padding-top: 0 !important; }
    .card { border: 0 !important; box-shadow: none !important; }
}

/* Urdu: Nastaliq type, right-to-left content; the sidebar keeps its place for a stable layout */
.lang-ur .content-body, .lang-ur .bt-pagebar { direction: rtl; }
.lang-ur .content-body, .lang-ur .sidebar-left .nav-main, .lang-ur .page-header .userbox, .lang-ur .modal-block {
    font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", Poppins, sans-serif; line-height: 2;
}
/* The sidebar keeps the theme's left-to-right layout (icon, then label) in Urdu too */
.lang-ur .sidebar-left .nav-main { direction: ltr; }
.lang-ur .sidebar-left .nav-main a { text-align: left; }
.lang-ur .content-body .num, .lang-ur input[type=number], .lang-ur input[type=date], .lang-ur .stat-value { direction: ltr; font-family: Poppins, sans-serif; }
.lang-ur .content-body .num { text-align: left; }
.lang-ur .table, .lang-ur .form-label { text-align: right; }
.lang-ur .text-end { text-align: left !important; }

/* User menu */
.page-header .userbox .dropdown-menu { min-width: 200px; }
.page-header .userbox .dropdown-menu .list-unstyled > li > a,
.page-header .userbox .dropdown-menu .list-unstyled > li > form > button { display: block; width: 100%; padding: 6px 12px; color: #555; text-align: start; white-space: nowrap; text-decoration: none; }
.page-header .userbox .dropdown-menu i { width: 18px; text-align: center; }
