/* ==========================================================================
   Tal2aa Business ERP - UI theme (inspired by modern admin dashboards)
   Brand: Tal2aa red #990F1E
   ========================================================================== */
:root {
  --brand: #990f1e;
  --brand-rgb: 153, 15, 30;
  --brand-600: #7f0c19;
  --brand-50: #fbeef0;
  --bs-primary: #990f1e;
  --bs-primary-rgb: 153, 15, 30;
  --bs-link-color: #990f1e;
  --bs-link-color-rgb: 153, 15, 30;
  --bs-link-hover-color: #7f0c19;
  --body-bg: #f3f4f8;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --border: #eceef3;
  --text: #1f2433;
  --muted: #6e7891;
  --sidebar-bg: var(--surface);
  --sidebar-text: #536079;
  --sidebar-title: var(--text);
  --sidebar-muted: var(--muted);
  --sidebar-border: var(--border);
  --sidebar-hover-bg: var(--surface-2);
  --sidebar-active-color: var(--brand);
  --sidebar-active-bg: rgba(var(--brand-rgb), .08);
  --header-bg: var(--surface);
  --header-text: var(--muted);
  --header-title: var(--text);
  --header-border: var(--border);
  --header-hover-bg: var(--surface-2);
  --header-active: var(--brand);
  --header-search-bg: var(--surface-2);
  --header-h: 64px;
  --sidebar-w: 260px;
  --radius: .6rem;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .04);
  --font: "Inter", "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
[dir="rtl"] { --font: "Cairo", "Inter", system-ui, Tahoma, Arial, sans-serif; }
[data-bs-theme="dark"] {
  --body-bg: #14161f;
  --surface: #1b1e2a;
  --surface-2: #222636;
  --border: #2b3042;
  --text: #e6e8ef;
  --muted: #9aa3b8;
  --sidebar-text: #aab2c5;
  --brand: #d7263a;
  --bs-primary: #d7263a;
  --bs-primary-rgb: 215, 38, 58;
  --bs-link-color: #ef5a6b;
  --bs-body-bg: #1b1e2a;
}

html, body { height: 100%; }
body { --sb-w-eff: var(--sidebar-w); --hdr-start: var(--sb-w-eff); --box-off: 0px; --hnav-h: 0px; }
body {
  font-family: var(--font);
  background: var(--body-bg);
  color: var(--text);
  font-size: .875rem;
}
a { text-decoration: none; }

/* ---------- Bootstrap primary override ---------- */
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600); --bs-btn-active-bg: var(--brand-600); --bs-btn-active-border-color: var(--brand-600); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand); --bs-btn-active-border-color: var(--brand); }
.bg-primary { background-color: var(--brand) !important; }
.text-primary { color: var(--brand) !important; }
.border-primary { border-color: var(--brand) !important; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-control:focus, .form-select:focus { border-color: rgba(var(--brand-rgb), .5); box-shadow: 0 0 0 .2rem rgba(var(--brand-rgb), .12); }
.page-link { color: var(--brand); }
.active > .page-link, .page-link.active { background-color: var(--brand); border-color: var(--brand); }
.nav-pills .nav-link.active { background: var(--brand); }
.nav-tabs .nav-link.active { color: var(--brand); border-bottom: 2px solid var(--brand); }
.progress-bar { background-color: var(--brand); }

/* transparent badges */
.bg-primary-transparent { background: rgba(var(--brand-rgb), .1) !important; }
.bg-secondary-transparent { background: rgba(108, 117, 125, .12) !important; }
.bg-success-transparent { background: rgba(25, 135, 84, .12) !important; }
.bg-info-transparent { background: rgba(13, 110, 253, .1) !important; }
.bg-warning-transparent { background: rgba(255, 153, 0, .14) !important; }
.bg-danger-transparent { background: rgba(220, 53, 69, .12) !important; }
.bg-dark-transparent { background: rgba(33, 37, 41, .12) !important; }
.text-info { color: #0d6efd !important; }
.text-warning { color: #c77700 !important; }
[data-bs-theme="dark"] .bg-dark-transparent { background: rgba(255, 255, 255, .08) !important; }
[data-bs-theme="dark"] .text-dark { color: #cfd4e0 !important; }
.badge { font-weight: 600; padding: .38em .65em; border-radius: .35rem; }

/* ---------- Layout ---------- */
.app-sidebar {
  position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar-w);
  background: var(--sidebar-bg); background-size: cover; background-position: center; border-inline-end: 1px solid var(--sidebar-border); z-index: 1040;
  display: flex; flex-direction: column; transition: transform .2s ease, width .2s ease;
}
.app-sidebar .brand { height: var(--header-h); display: flex; align-items: center; gap: .6rem; padding: 0 1.25rem; border-bottom: 1px solid var(--sidebar-border); flex-shrink: 0; }
.app-sidebar .brand img { height: 38px; }
.app-sidebar .brand .brand-text { font-weight: 800; color: var(--sidebar-title); line-height: 1.05; font-size: 1.05rem; }
.app-sidebar .brand .brand-text small { display: block; font-weight: 500; color: var(--sidebar-active-color); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.side-menu { overflow-y: auto; flex: 1; padding: .75rem .75rem 2rem; scrollbar-width: thin; }
.side-menu .menu-header { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--sidebar-muted); padding: 1rem .75rem .35rem; font-weight: 700; }
.side-menu .menu-link {
  display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: .45rem;
  color: var(--sidebar-text); font-weight: 500; cursor: pointer; user-select: none;
}
.side-menu .menu-link i.menu-icon { font-size: 1.05rem; width: 1.25rem; text-align: center; opacity: .9; }
.side-menu .menu-link:hover { background: var(--sidebar-hover-bg); color: var(--sidebar-active-color); }
.side-menu .menu-link.active, .side-menu .menu-item.open > .menu-link { background: var(--sidebar-active-bg); color: var(--sidebar-active-color); }
.side-menu .menu-link .arrow { margin-inline-start: auto; transition: transform .2s; font-size: .75rem; }
.side-menu .menu-item.open > .menu-link .arrow { transform: rotate(90deg); }
[dir="rtl"] .side-menu .menu-item.open > .menu-link .arrow { transform: rotate(-90deg); }
.side-menu .submenu { display: none; padding: .2rem 0 .35rem; margin-inline-start: 1.35rem; border-inline-start: 1px dashed var(--sidebar-border); }
.side-menu .menu-item.open > .submenu { display: block; }
.side-menu .submenu a { display: block; padding: .38rem .9rem; color: var(--sidebar-text); border-radius: .35rem; font-size: .83rem; position: relative; }
.side-menu .submenu a:hover, .side-menu .submenu a.active { color: var(--sidebar-active-color); }
.side-menu .submenu a.active { font-weight: 600; background: var(--sidebar-active-bg); }
.side-menu .submenu .submenu-section { display: flex; align-items: center; gap: .4rem; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--sidebar-muted); padding: .55rem .9rem .2rem; }
.side-menu .submenu .submenu-section:first-child { padding-top: .2rem; }
.side-menu .submenu .submenu-section i { font-size: .75rem; opacity: .8; }
.side-menu .submenu a + .submenu-section { margin-top: .3rem; border-top: 1px dashed var(--sidebar-border); }

.app-header {
  position: fixed; top: 0; inset-inline-end: var(--box-off); inset-inline-start: calc(var(--box-off) + var(--hdr-start)); height: var(--header-h);
  background: var(--header-bg); color: var(--header-title); border-bottom: 1px solid var(--header-border); z-index: 1030; transition: inset .2s ease;
  display: flex; align-items: center; padding: 0 1.25rem; gap: .75rem;
}
.app-header .header-btn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--header-text); background: transparent; border: 0; position: relative; }
.app-header .header-btn:hover { background: var(--header-hover-bg); color: var(--header-active); }
.app-header .header-btn .dot { position: absolute; top: 6px; inset-inline-end: 6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--brand); color: #fff; font-size: .62rem; line-height: 16px; padding: 0 4px; }
.app-header .search-box { max-width: 360px; flex: 1; }
.app-header .search-box .form-control { background: var(--header-search-bg); color: var(--header-title); border-color: transparent; padding-inline-start: 2.2rem; border-radius: 2rem; }
.app-header .search-box i { position: absolute; inset-inline-start: .85rem; top: 50%; transform: translateY(-50%); color: var(--header-text); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: rgba(var(--brand-rgb), .12); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex-shrink: 0; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.1rem; }

.app-content { margin-inline-start: calc(var(--box-off) + var(--sb-w-eff)); margin-inline-end: var(--box-off); padding: calc(var(--header-h) + var(--hnav-h) + 1.25rem) 1.5rem 1.5rem; background: var(--body-bg); transition: margin .2s ease; min-height: 100vh; display: flex; flex-direction: column; }
.app-content > main { flex: 1; }
.app-footer { padding: 1rem 0 0; color: var(--muted); font-size: .78rem; }

.page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem; }
.page-header h1 { font-size: 1.25rem; font-weight: 700; margin: 0; }
.breadcrumb { margin: 0; font-size: .78rem; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--muted); }
[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before { float: right; padding-left: .5rem; padding-right: 0; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.card-header { background: transparent; border-bottom: 1px solid var(--border); padding: .9rem 1.15rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.card-title { font-size: .95rem; font-weight: 700; margin: 0; }
.card-body { padding: 1.15rem; }
.card-footer { background: transparent; border-top: 1px solid var(--border); }

.stat-card .stat-icon { width: 48px; height: 48px; border-radius: .6rem; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.stat-card .stat-value { font-size: 1.35rem; font-weight: 800; line-height: 1.2; }
.stat-card .stat-label { color: var(--muted); font-size: .78rem; font-weight: 500; }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; color: var(--text); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .6rem .75rem; border-bottom-color: var(--border); }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; background: var(--surface-2); white-space: nowrap; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: rgba(var(--brand-rgb), .03); }
.table td.num, .table th.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 700; background: var(--surface-2); }
.table-responsive { border-radius: 0 0 var(--radius) var(--radius); }
.sort-link { color: inherit; }
.sort-link:hover { color: var(--brand); }

.lines-table input, .lines-table select { min-width: 70px; }
.lines-table td { vertical-align: middle; }
.lines-table .item-col { min-width: 240px; }
.totals-box { background: var(--surface-2); border-radius: var(--radius); padding: 1rem; }
.totals-box .row-t { display: flex; justify-content: space-between; padding: .25rem 0; }
.totals-box .grand { border-top: 1px dashed var(--border); margin-top: .35rem; padding-top: .55rem; font-size: 1.05rem; font-weight: 800; }

.form-label { font-weight: 600; font-size: .8rem; color: var(--text); margin-bottom: .3rem; }
.form-label .req { color: var(--brand); }
.form-control, .form-select { border-color: var(--border); background-color: var(--surface); color: var(--text); font-size: .86rem; }
.form-text { font-size: .74rem; }
.input-group-text { background: var(--surface-2); border-color: var(--border); }

.dropdown-menu { border-color: var(--border); box-shadow: 0 8px 24px rgba(16, 24, 40, .1); font-size: .85rem; border-radius: .5rem; }
.notif-menu { width: 340px; max-height: 420px; overflow-y: auto; }
.notif-item { display: flex; gap: .6rem; padding: .65rem .9rem; border-bottom: 1px solid var(--border); color: var(--text); }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: rgba(var(--brand-rgb), .04); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding-inline-start: 1.5rem; padding-bottom: .9rem; border-inline-start: 2px solid var(--border); margin-inline-start: .4rem; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.timeline li:last-child { border-color: transparent; }

.kanban { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .5rem; }
.kanban-col { min-width: 260px; flex: 1; background: var(--surface-2); border-radius: var(--radius); padding: .75rem; }
.kanban-card { background: var(--surface); border: 1px solid var(--border); border-radius: .45rem; padding: .65rem .75rem; margin-bottom: .55rem; box-shadow: var(--shadow); }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.5rem; opacity: .5; }

.doc-status-bar { display: flex; flex-wrap: wrap; gap: .4rem; }
.doc-status-bar .step { padding: .3rem .8rem; border-radius: 2rem; background: var(--surface-2); color: var(--muted); font-size: .75rem; font-weight: 600; }
.doc-status-bar .step.done { background: rgba(var(--brand-rgb), .1); color: var(--brand); }
.doc-status-bar .step.current { background: var(--brand); color: #fff; }

.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: start; }

/* POS */
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.pos-item { background: var(--surface); border: 1px solid var(--border); border-radius: .55rem; padding: .75rem; cursor: pointer; text-align: center; transition: .15s; }
.pos-item:hover { border-color: var(--brand); box-shadow: 0 4px 12px rgba(var(--brand-rgb), .12); }
.pos-item .price { color: var(--brand); font-weight: 800; }
.pos-cart { position: sticky; top: calc(var(--header-h) + 1rem); }

/* Tom Select theming */
.ts-wrapper.form-select, .ts-wrapper.form-control { padding: 0; border: 0; background: none; }
.ts-control { border-color: var(--border) !important; background: var(--surface) !important; color: var(--text) !important; min-height: 36px; font-size: .86rem; border-radius: .375rem; }
.ts-dropdown { background: var(--surface); color: var(--text); border-color: var(--border); font-size: .85rem; z-index: 1060; }
.ts-dropdown .active { background: rgba(var(--brand-rgb), .08); color: var(--brand); }
.ts-control input { color: var(--text) !important; }
.lines-table .ts-control { min-width: 220px; }

/* ---------- Login (cover style) ---------- */
.auth-page { min-height: 100vh; display: flex; background: var(--surface); }
.auth-cover {
  flex: 1 1 50%; position: relative; overflow: hidden; color: #fff; display: flex; align-items: center; justify-content: center; padding: 3rem;
  background: radial-gradient(1000px 520px at 10% 0%, #b8192b 0%, transparent 60%), radial-gradient(800px 480px at 100% 100%, #4a060e 0%, transparent 60%), linear-gradient(140deg, #990f1e 0%, #5e0912 100%);
}
.auth-cover::before, .auth-cover::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .12); }
.auth-cover::before { width: 520px; height: 520px; top: -140px; inset-inline-end: -160px; }
.auth-cover::after { width: 380px; height: 380px; bottom: -120px; inset-inline-start: -120px; background: rgba(255, 255, 255, .04); }
.auth-cover .cover-inner { position: relative; z-index: 1; max-width: 540px; width: 100%; text-align: center; }
.auth-cover .cover-brand { display: inline-flex; background: #fff; border-radius: 14px; padding: .55rem .9rem; box-shadow: 0 14px 36px rgba(0, 0, 0, .25); margin-bottom: 1.5rem; }
.auth-cover .cover-brand img { height: 44px; display: block; }
.auth-cover .cover-art { width: 100%; max-width: 500px; height: auto; display: block; margin: 0 auto 1.5rem; }
.auth-cover .cover-features { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.auth-cover .cover-features li { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: .4rem .85rem; font-size: .82rem; font-weight: 600; }
.auth-cover .cover-features i { margin-inline-end: .4rem; }
.auth-cover .cover-logo { width: 120px; height: 120px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); margin-bottom: 1.75rem; }
.auth-cover .cover-logo img { width: 96px; }
.auth-cover h2 { font-weight: 800; font-size: 1.85rem; margin-bottom: .75rem; }
.auth-cover p { opacity: .85; font-size: .95rem; }
.auth-cover .cover-dots { display: flex; gap: .5rem; justify-content: center; margin-top: 2rem; }
.auth-cover .cover-dots span { width: 8px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .4); }
.auth-cover .cover-dots span.on { width: 24px; background: #fff; }
.auth-form-side { flex: 1 1 50%; display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; background: var(--surface); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .auth-logo { height: 56px; margin-bottom: 1.75rem; }
.auth-card h1 { font-size: 1.55rem; font-weight: 800; }
.auth-card .form-control { padding: .7rem .95rem; font-size: .9rem; }
.auth-card .btn-primary { padding: .7rem; font-weight: 700; }
.auth-card .pw-toggle { position: absolute; inset-inline-end: .6rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); }
.auth-lang { position: absolute; top: 1.25rem; inset-inline-end: 1.5rem; }

/* ---------- Responsive ---------- */
.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); }
  [dir="rtl"] .app-sidebar { transform: translateX(100%); }
  body.sidebar-open .app-sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 1035; }
  .app-header { inset-inline-start: 0; }
  .app-content { margin-inline-start: 0; padding-inline: 1rem; }
  .auth-cover { display: none; }
}
@media (min-width: 992px) {
  body.sidebar-mini { --sidebar-w: 76px; }
  body.sidebar-mini .side-menu .menu-header, body.sidebar-mini .side-menu .menu-text, body.sidebar-mini .side-menu .arrow, body.sidebar-mini .brand-text, body.sidebar-mini .submenu { display: none !important; }
  body.sidebar-mini .side-menu .menu-link { justify-content: center; }
}

/* ---------- Print ---------- */
@media print {
  .app-sidebar, .app-header, .no-print, .app-footer, .page-header .btn, .alert { display: none !important; }
  .app-content { margin: 0; padding: 0; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .card { border: 0; box-shadow: none; }
  .table thead th { background: #eee !important; color: #000; }
  a { color: #000; }
}
.print-only { display: none; }
@media print { .print-only { display: block; } }
.print-doc .doc-head { border-bottom: 3px solid var(--brand); padding-bottom: 1rem; margin-bottom: 1rem; }

/* ---------------- Mailbox ---------------- */
.mail-side { position: sticky; top: calc(var(--header-h, 64px) + 1rem); }
.mail-folders { display: flex; flex-direction: column; gap: 2px; }
.mail-folder { display: flex; align-items: center; border-radius: 8px; }
.mail-folder > a { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; color: var(--text); text-decoration: none; font-size: .86rem; border-radius: 8px; }
.mail-folder > a i { color: var(--muted); }
.mail-folder:hover { background: var(--surface-2); }
.mail-folder.active { background: rgba(var(--brand-rgb), .09); }
.mail-folder.active > a, .mail-folder.active > a i { color: var(--brand); font-weight: 600; }
.mail-folder .dropdown { opacity: 0; transition: opacity .15s; }
.mail-folder:hover .dropdown, .mail-folder .dropdown:focus-within { opacity: 1; }
.mail-toolbar { background: var(--surface); min-height: 48px; }
.mail-list { min-height: 200px; }
.mail-row { display: flex; align-items: center; gap: .55rem; padding: .55rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface); }
.mail-row:hover { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--brand); }
[dir="rtl"] .mail-row:hover { box-shadow: inset -3px 0 0 var(--brand); }
.mail-row.unread { background: rgba(var(--brand-rgb), .035); }
.mail-row.unread .mail-from, .mail-row.unread .mail-subject { font-weight: 700; color: var(--text); }
.mail-star { border: 0; background: none; padding: 0 .15rem; color: var(--muted); line-height: 1; }
.mail-star.on, .mail-star:hover { color: #f5a623; }
.mail-link { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(120px, 210px) 1fr auto; gap: .9rem; align-items: center; color: var(--text); text-decoration: none; font-size: .86rem; }
.mail-link:hover { color: var(--text); }
.mail-from { color: var(--text); }
.mail-subject { color: var(--muted); }
.mail-meta { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .76rem; white-space: nowrap; }
@media (max-width: 767.98px) {
  .mail-link { grid-template-columns: 1fr auto; grid-template-areas: "from meta" "subj subj"; gap: .1rem .5rem; }
  .mail-from { grid-area: from; } .mail-subject { grid-area: subj; } .mail-meta { grid-area: meta; }
  .mail-side { position: static; }
}
.mail-frame { width: 100%; min-height: 160px; border: 0; background: #fff; border-radius: 8px; display: block; }
.mail-att { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--border); border-radius: 10px; padding: .45rem .6rem; max-width: 300px; background: var(--surface-2); }
.mail-att .text-truncate { min-width: 0; flex: 1; }
.mail-field { display: flex; align-items: center; gap: .6rem; border-bottom: 1px solid var(--border); padding: .35rem 0; }
.mail-field > label { width: 70px; flex-shrink: 0; color: var(--muted); font-size: .82rem; margin: 0; }
.mail-field > .form-control { border: 0; box-shadow: none; background: transparent; padding-inline: 0; }
.mail-field > .form-control:focus { box-shadow: none; }
.mail-editor { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.mail-editor-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: .35rem .5rem; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.mail-editor-bar button, .mail-editor-bar .color-btn { border: 0; background: none; width: 32px; height: 30px; border-radius: 6px; color: var(--text); display: inline-flex; align-items: center; justify-content: center; margin: 0; cursor: pointer; position: relative; }
.mail-editor-bar button:hover, .mail-editor-bar .color-btn:hover { background: rgba(var(--brand-rgb), .1); color: var(--brand); }
.mail-editor-bar .color-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.mail-editor-bar .sep { width: 1px; height: 20px; background: var(--border); margin: 0 .3rem; }
.mail-editor-area { min-height: 320px; max-height: 60vh; overflow: auto; padding: 1rem; outline: none; background: var(--surface); color: var(--text); font-size: .92rem; line-height: 1.6; }
.mail-editor-area blockquote { color: var(--muted); }
.mail-editor-area img { max-width: 100%; }
.mail-unread-badge { font-size: .65rem; }
.avatar-img { background: var(--surface-2); overflow: hidden; padding: 0; }
.avatar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-xl { width: 96px; height: 96px; font-size: 2rem; }
.avatar-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: .5rem; }
.avatar-pick label { cursor: pointer; border-radius: 50%; padding: 3px; border: 2px solid transparent; display: block; transition: border-color .15s, transform .15s; }
.avatar-pick label:hover { transform: scale(1.06); }
.avatar-pick input:checked + label { border-color: var(--brand); }
.avatar-pick img { width: 100%; display: block; border-radius: 50%; }
/* country / currency flags */
.flag { width: 20px; height: 15px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); flex-shrink: 0; vertical-align: -2px; }
.with-flag { display: inline-flex; align-items: center; gap: .45rem; }
.with-flag .flag { vertical-align: 0; }
.ts-dropdown .with-flag, .ts-control .with-flag { display: flex; }
.lang-switch { gap: .35rem; }
.lang-btn { display: inline-flex; align-items: center; border-radius: 8px; padding: .3rem .65rem; margin-inline: .15rem; font-size: .82rem; white-space: nowrap; }
/* calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.cal-head { padding: .55rem; text-align: center; font-size: .75rem; font-weight: 600; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cal-cell { min-height: 110px; padding: .4rem; border-inline-end: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell:nth-child(7n) { border-inline-end: 0; }
.cal-cell.empty { background: var(--surface-2); }
.cal-cell.today { background: rgba(var(--brand-rgb), .05); }
.cal-cell.today .cal-day { background: var(--brand); color: #fff; }
.cal-day { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600; }
.cal-ev { display: block; font-size: .72rem; padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.cal-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 4px; }
@media (max-width: 767.98px) { .cal-cell { min-height: 70px; } .cal-ev { font-size: .62rem; padding: 1px 3px; } }
/* messages */
.msg-people { max-height: 65vh; overflow: auto; }
.msg-people .active-peer { background: rgba(var(--brand-rgb), .08); color: var(--brand); font-weight: 600; }
.msg-pane { display: flex; flex-direction: column; min-height: 420px; }
.msg-thread { flex: 1; overflow: auto; max-height: 58vh; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: var(--surface-2); }
.msg { display: flex; flex-direction: column; max-width: 75%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.theirs { align-self: flex-start; align-items: flex-start; }
.msg-bubble { padding: .5rem .8rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: .9rem; word-break: break-word; }
.msg.mine .msg-bubble { background: var(--brand); color: #fff; border-color: var(--brand); }
.msg-time { font-size: .68rem; color: var(--muted); margin-top: 2px; }
.msg-bubble-media { padding: 3px; background: transparent !important; border-color: var(--border) !important; }
.msg-file + div { margin-top: .35rem; }
.msg-media { display: block; max-width: 280px; }
.msg-media img, video.msg-media { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; background: #000; }
.msg-media img { background: transparent; }
.msg-audio { display: block; width: 260px; max-width: 100%; height: 40px; }
.msg-doc { display: flex; align-items: center; gap: .6rem; min-width: 200px; max-width: 280px; padding: .45rem .55rem; border-radius: 10px; background: rgba(0,0,0,.05); color: inherit; text-decoration: none; }
.msg.mine .msg-doc { background: rgba(255,255,255,.16); }
.msg-doc > i { font-size: 1.7rem; line-height: 1; }
.msg-file-meta { font-size: .72rem; opacity: .8; color: inherit; }
.msg.mine .msg-bubble a { color: #fff; }
.msg-pending { display: flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-top: 1px solid var(--border); font-size: .82rem; background: var(--surface-2); }
.msg-pane textarea { resize: none; }
/* brand logo: full banner, icon only when the menu is collapsed */
.app-sidebar .brand .brand-banner { height: 40px; width: auto; max-width: 100%; border-radius: 6px; }
.app-sidebar .brand .brand-icon { display: none; height: 38px; }
.header-brand img { height: 36px; width: auto; border-radius: 6px; }
@media (min-width: 992px) {
  body.sidebar-mini .brand .brand-banner,
  [data-nav-layout="vertical"][data-nav-style^="icon-"] .brand .brand-banner,
  [data-vertical-style="doublemenu"] .brand .brand-banner,
  [data-vertical-style="icontext"] .brand .brand-banner,
  [data-vertical-style="overlay"] .app-sidebar:not(:hover) .brand .brand-banner { display: none !important; }
  body.sidebar-mini .brand .brand-icon,
  [data-nav-layout="vertical"][data-nav-style^="icon-"] .brand .brand-icon,
  [data-vertical-style="doublemenu"] .brand .brand-icon,
  [data-vertical-style="icontext"] .brand .brand-icon,
  [data-vertical-style="overlay"] .app-sidebar:not(:hover) .brand .brand-icon { display: block !important; }
}
/* image fields (company logo) */
.image-preview { width: 160px; height: 80px; border: 1px dashed var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); padding: 6px; flex-shrink: 0; }
.image-preview img, .image-thumb { max-width: 100%; max-height: 100%; object-fit: contain; }
.image-thumb { max-height: 56px; max-width: 160px; border-radius: 6px; }
.image-photo .image-preview { width: 120px; height: 120px; border-radius: 50%; padding: 0; overflow: hidden; }
.image-photo .image-preview img, .image-photo-thumb { width: 100%; height: 100%; object-fit: cover; }
.image-photo-thumb { width: 110px; height: 110px; max-width: none; max-height: none; border-radius: 50%; border: 1px solid var(--border); }
.form-section { border-top: 1px solid var(--border); padding-top: .9rem; margin-top: .6rem; }
.form-section h6 { margin: 0; font-weight: 600; color: var(--brand); text-transform: uppercase; font-size: .78rem; letter-spacing: .04em; }
.form-section-first { border-top: 0; padding-top: 0; margin-top: 0; }
.form-section-toggle { display: flex; align-items: center; gap: .45rem; width: 100%; background: none; border: 0; padding: 0; text-align: start; color: var(--brand); cursor: pointer; }
.form-section-toggle .bi { font-size: .8rem; transition: transform .15s; }
.form-section-toggle[aria-expanded="false"] .bi { transform: rotate(-90deg); }
[dir="rtl"] .form-section-toggle[aria-expanded="false"] .bi { transform: rotate(90deg); }
.form-section-toggle:hover h6 { text-decoration: underline; }
.form-section-tools { display: flex; justify-content: flex-end; gap: .75rem; }
.form-section-tools button { background: none; border: 0; padding: 0; font-size: .8rem; color: var(--brand); }
.sec-hidden { display: none !important; }
[data-show-if][hidden] { display: none !important; }
.co-switch .sw-sep{margin:0 .4rem;opacity:.45}
.co-switch-menu{max-height:70vh;overflow-y:auto;min-width:240px}
.dash-tabs{gap:.25rem;flex-wrap:nowrap;overflow-x:auto;white-space:nowrap;padding-bottom:.25rem}
.dash-tabs .nav-link{border:1px solid var(--bs-border-color);background:var(--bs-body-bg);padding:.3rem .8rem}
.dash-tabs .nav-link.active{background:var(--bs-primary);border-color:var(--bs-primary);color:#fff}
.perm-table .perm-page td{background:transparent}

/* high-priority notifications */
.bg-orange-transparent { background-color: rgba(253, 126, 20, .14) !important; }
.text-orange { color: #e8590c !important; }
.border-orange { border-color: #fd7e14 !important; }
.bg-orange { background-color: #fd7e14 !important; color: #fff; }

/* ---------- interactive list pages (grid) ---------- */
.grid-toolbar { display: block; }
.grid-toolbar .btn-icon { width: 38px; padding-inline: 0; }
.grid-search .input-group { flex-wrap: nowrap; min-width: 240px; max-width: 360px; }
.grid-search-opts { min-width: 260px; }
.grid-colpick { max-height: 220px; overflow: auto; border: 1px solid var(--bs-border-color); border-radius: 6px; padding: 6px 10px; }
.grid-dot { position: absolute; top: -5px; inset-inline-end: -5px; background: var(--brand); color: #fff; border-radius: 10px; font-size: 10px; line-height: 16px; min-width: 16px; padding: 0 4px; }
.grid-table th.grid-check, .grid-table td.grid-check { width: 36px; padding-inline-end: 0; }
.grid-table tbody tr.grid-selected > td { background: rgba(var(--brand-rgb), .06); }
.grid-item.grid-selected { border-color: var(--brand) !important; box-shadow: 0 0 0 1px var(--brand); }
.grid-hf { border: 0; background: transparent; color: var(--muted); padding: 0 2px; font-size: 12px; line-height: 1; opacity: .55; }
.grid-hf:hover, .grid-hf.active { color: var(--brand); opacity: 1; }
.grid-actions .btn { margin-inline-start: 2px; }
.grid-pop { position: absolute; z-index: 1080; width: 260px; }
.grid-pop-list { max-height: 260px; overflow: auto; }
.grid-pop-list .form-check { padding: 3px 4px 3px 1.9em; margin: 0; border-radius: 4px; }
[dir=rtl] .grid-pop-list .form-check { padding: 3px 1.9em 3px 4px; }
.grid-pop-list .form-check:hover { background: rgba(var(--brand-rgb), .05); }
.grid-sel-menu { min-width: 220px; }
.grid-menu { min-width: 200px; }
.grid-menu .dropend, .grid-menu .dropstart { position: relative; }
.grid-menu .grid-sub { position: absolute; top: 0; inset-inline-start: 100%; margin-top: -6px; }
.grid-menu .dropstart > .grid-sub { inset-inline-start: auto; inset-inline-end: 100%; }
.grid-menu .grid-sub.show { display: block; }
.doc-actions .doc-sub { position: absolute; top: 0; inset-inline-end: 100%; inset-inline-start: auto; margin-top: -6px; }
.doc-actions .doc-sub.show { display: block; }
@media (max-width: 575.98px) { .doc-actions .doc-sub { position: static; box-shadow: none; border: 0; padding-inline-start: 1rem; } }
@media (max-width: 575.98px) { .grid-menu .grid-sub, .grid-menu .dropstart > .grid-sub { position: static; box-shadow: none; border: 0; padding-inline-start: 1rem; } .grid-search { width: 100%; } .grid-search .input-group { max-width: none; } }
.grid-dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: .85rem; }
.grid-dl dt { font-weight: 500; color: var(--muted); }
.grid-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.grid-cols-list { max-height: 300px; overflow: auto; }
.btn-primary-light { background: rgba(var(--brand-rgb), .1); color: var(--brand); border: 0; }
.btn-primary-light:hover, .btn-primary-light:focus, .btn-primary-light.show { background: rgba(var(--brand-rgb), .18); color: var(--brand); }
.grid-chips .badge { font-size: .78rem; }
.grid-menu .dropdown-item.active, .grid-menu .dropdown-item:active { background: rgba(var(--brand-rgb), .1); color: var(--brand); }
/* filter builder and multiple sort rows: balanced field widths */
.grid-fb-row > [data-fb="k"] { flex: 0 0 32%; min-width: 0; }
.grid-fb-row > [data-fb="op"] { flex: 0 0 26%; min-width: 0; }
.grid-fb-row > [data-fb-val] { flex: 1 1 0; min-width: 0; }
.grid-fb-row > [data-fb-val] > * { flex: 1 1 0; min-width: 0; }
.grid-fb-row > [data-fb-val] > span { flex: 0 0 auto; }
.grid-fb-row > [data-fb-del] { flex: 0 0 auto; }
.grid-sort-row > [data-sort-label] { flex: 0 0 72px; }
.grid-sort-row > [data-sort-k] { flex: 1 1 60%; min-width: 0; }
.grid-sort-row > [data-sort-d] { flex: 1 1 40%; min-width: 0; }
@media (max-width: 575.98px) { .grid-fb-row > [data-fb="k"], .grid-fb-row > [data-fb="op"] { flex: 1 1 45%; } .grid-fb-row > [data-fb-val] { flex: 1 1 80%; } }

.je-history li { display: flex; gap: .75rem; position: relative; padding-bottom: 1rem; }
.je-history li:last-child { padding-bottom: 0; }
.je-history li:not(:last-child)::before { content: ""; position: absolute; inset-inline-start: 15px; top: 34px; bottom: 2px; border-inline-start: 2px dashed var(--border); }
.je-h-icon { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }

/* child records edited on the master form (e.g. Cash & Banks > accounts) */
.crud-inline-row { border: 1px solid var(--bs-border-color, #e9ecef); border-radius: .5rem; padding: .75rem 1rem 1rem; margin-bottom: .75rem; background: var(--bs-tertiary-bg, #fafafa); }
.crud-inline-row .form-label { font-size: .75rem; margin-bottom: .2rem; }

/* child lists inside a master record's page */
iframe.child-grid { display: block; width: 100%; height: 260px; border: 0; margin-bottom: 1.25rem; background: transparent; }

/* edit a list cell in place */
td.grid-cell-edit { position: relative; padding-inline-end: 30px; }
.grid-cell-pen { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--bs-body-bg, #fff); color: var(--bs-primary, #990F1E); font-size: .75rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .12s; }
td.grid-cell-edit:hover .grid-cell-pen, td.grid-cell-edit.cell-editing .grid-cell-pen, .grid-cell-pen:focus-visible { opacity: 1; pointer-events: auto; }
.grid-cell-pen:hover { background: rgba(var(--brand-rgb), .08); }
/* the pencil shows only while the pointer is over the cell (a tap counts as hover on touch screens) */
td.grid-cell-edit.cell-editing { box-shadow: inset 0 0 0 2px rgba(var(--brand-rgb), .55); }
td.grid-cell-edit.cell-saved { animation: cellSaved 1.4s ease; }
@keyframes cellSaved { from { background: rgba(25, 135, 84, .22); } to { background: transparent; } }
.grid-cell-pop { position: absolute; z-index: 1080; width: 300px; max-width: calc(100vw - 16px); }
.grid-cell-pop .form-label { font-weight: 600; }
.grid-cell-pop .form-check.form-switch.mt-4 { margin-top: .25rem !important; }
.grid-cell-arrow { position: absolute; width: 12px; height: 12px; background: var(--bs-card-bg, #fff); transform: rotate(45deg); left: calc(50% - 6px); top: -7px; border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
.grid-cell-pop.above .grid-cell-arrow { top: auto; bottom: -7px; border: 0; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------------- organizational chart */
.org-scroll { overflow: auto; padding: 1.25rem .75rem 1.5rem; background: var(--surface-2); }
.org-canvas { width: max-content; min-width: 100%; margin: 0 auto; }
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; }
.org-row { display: flex; justify-content: center; position: relative; }
.org-row > li { position: relative; padding: 22px 8px 0; display: flex; flex-direction: column; align-items: center; }
.org-row > li::before, .org-row > li::after { content: ''; position: absolute; top: 0; width: 50%; height: 22px; border-top: 2px solid var(--org-line, #c5cbd6); }
.org-row > li::before { inset-inline-end: 50%; }
.org-row > li::after { inset-inline-start: 50%; border-inline-start: 2px solid var(--org-line, #c5cbd6); }
.org-row > li:only-child::before, .org-row > li:only-child::after { display: none; }
.org-row > li:only-child { padding-top: 0; }
.org-row > li:first-child::before, .org-row > li:last-child::after { border: 0 none; }
.org-row > li:last-child::before { border-inline-end: 2px solid var(--org-line, #c5cbd6); border-start-end-radius: 6px; }
.org-row > li:first-child::after { border-start-start-radius: 6px; }
li > .org-row { padding-top: 22px; }
li > .org-row::before { content: ''; position: absolute; top: 0; inset-inline-start: 50%; border-inline-start: 2px solid var(--org-line, #c5cbd6); height: 22px; }
.org-tree.org-row { padding-top: 0; }
.org-stack { align-self: stretch; margin: 10px 0 0; padding-inline-start: 18px; position: relative; display: flex; flex-direction: column; gap: 10px; }
.org-stack::before { content: ''; position: absolute; top: -10px; bottom: 26px; inset-inline-start: 6px; border-inline-start: 2px solid var(--org-line, #c5cbd6); }
.org-stack > li { position: relative; }
.org-stack > li::before { content: ''; position: absolute; top: 24px; inset-inline-start: -12px; width: 12px; border-top: 2px solid var(--org-line, #c5cbd6); }
.org-node { width: 236px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 1px 3px rgba(16, 24, 40, .06); text-align: start; position: relative; }
.org-node-head { padding: .55rem .7rem .5rem; border-radius: 10px 10px 0 0; border-top: 4px solid var(--brand); position: relative; }
.org-management .org-node-head { background: var(--brand); color: #fff; border-top-color: var(--brand); }
.org-management .org-node-head a, .org-management .org-node-type, .org-management .org-node-mgr { color: #fff; }
.org-department .org-node-head { background: rgba(var(--brand-rgb), .08); }
.org-section .org-node-head { border-top-color: rgba(var(--brand-rgb), .45); }
.org-node-type { font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.org-node-name { display: block; font-weight: 700; font-size: .9rem; color: inherit; text-decoration: none; line-height: 1.25; padding-inline-end: 26px; }
.org-node-name:hover { text-decoration: underline; }
.org-node-mgr { font-size: .75rem; color: var(--muted); margin-top: .15rem; }
.org-fold { position: absolute; top: .45rem; inset-inline-end: .45rem; border: 1px solid var(--border); background: var(--surface); color: var(--brand); border-radius: 6px; font-size: .7rem; padding: 0 .3rem; line-height: 1.4; display: flex; align-items: center; gap: 2px; }
.org-pos-list { list-style: none; margin: 0; padding: .35rem .7rem .55rem; }
.org-pos { padding: .3rem 0; border-top: 1px dashed var(--border); font-size: .8rem; }
.org-pos:first-child { border-top: 0; }
.org-pos-title { color: inherit; text-decoration: none; }
.org-pos-title:hover { text-decoration: underline; }
.org-pos-head .org-pos-title { font-weight: 700; }
.org-pos-head .bi-star-fill { color: #f59e0b; font-size: .7rem; }
.org-pos .badge { font-weight: 600; align-self: flex-start; }
.org-people { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.org-people a { font-size: .75rem; color: var(--muted); text-decoration: none; display: flex; align-items: center; gap: .3rem; }
.org-people a:hover { color: var(--brand); }
.org-people img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }
.org-vacant { font-size: .72rem; color: #b45309; font-style: italic; }
.org-empty { padding: .5rem .7rem; font-size: .75rem; color: var(--muted); }
.org-pos-flat { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .25rem 1rem; padding: 0; }
.org-legend { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-inline-end: .3rem; }
.org-legend-mgmt { background: var(--brand); }
.org-legend-dept { background: rgba(var(--brand-rgb), .25); border-top: 3px solid var(--brand); }
.org-legend-sec { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid rgba(var(--brand-rgb), .45); }
[data-bs-theme="dark"] .org-scroll { background: rgba(255, 255, 255, .02); }
@media print {
  .org-scroll { overflow: visible; background: #fff; padding: 0; }
  .org-canvas { zoom: .55 !important; }
  .org-node { box-shadow: none; break-inside: avoid; }
  .org-fold { display: none; }
}

.grid-table .image-photo-thumb, .grid-card .image-photo-thumb { width: 34px; height: 34px; border-width: 1px; }

/* items on document lines: code · SKU · brand / name / barcode */
.item-card { line-height: 1.25; }
.item-card .ic-top { font-size: .72rem; color: var(--bs-secondary-color, #6c757d); font-weight: 600; }
.item-card .ic-name { font-weight: 500; }
.item-card .ic-bc { font-size: .72rem; color: var(--bs-secondary-color, #6c757d); }
.ts-wrapper .item-card { white-space: normal; }
/* the selected item in a line's item picker keeps the three rows (the picker lays items out in a row) */
.ts-control > .item-card.item, .ts-control > .item:has(> .item-card) { display: block; flex: 1 1 100%; min-width: 0; white-space: normal; text-align: start; }
.ts-wrapper.single .ts-control:has(.item-card) { align-items: flex-start; }
.ts-dropdown .option .item-card { white-space: normal; }

/* Tax Rule picker in the Lines bar, beside Scan barcode */
.doc-tax-rule .ts-wrapper .ts-control { min-height: 31px !important; padding: .25rem 2rem .25rem .5rem !important; font-size: .875rem; border: 1px solid var(--bs-border-color) !important; border-radius: var(--bs-border-radius-sm, .25rem) !important; background-color: var(--bs-body-bg) !important; }
/* document Activity: change details */
.doc-activity .act-changes { list-style: none; padding: 0; margin: .25rem 0 0; }
.doc-activity .timeline .act-changes li { padding: 0 0 .15rem; margin: 0; border: 0; }
.doc-activity .timeline .act-changes li::before { content: none; }
.doc-activity .act-changes .act-changes { padding-inline-start: .75rem; margin-top: .1rem; }
.doc-activity .act-field { color: var(--text-muted, #6c757d); }
.doc-activity .act-old { text-decoration: line-through; color: #b54747; }
.doc-activity .act-new { color: #1e7a46; font-weight: 600; }
.doc-activity .act-note { background: var(--surface-2, rgba(0,0,0,.04)); border-radius: .35rem; padding: .25rem .5rem; margin-top: .2rem; }
.doc-activity .card-body { max-height: 32rem; overflow-y: auto; }
/* document lines: posting account and cost center */
.line-gl { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: .25rem; align-items: center; }
.line-gl .ts-wrapper .ts-control, .line-gl .form-select-sm { font-size: .72rem; min-height: 1.6rem; padding-top: .1rem; padding-bottom: .1rem; }
.line-gl-badge { font-size: .62rem; font-weight: 500; }
