/* ISP RADIUS + CRM — additions on top of the Mofi theme.
   The theme's own files are untouched; everything project-specific lives here. */

:root {
  --isp-online: #0da759;
  --isp-warn: #e0a100;
  --isp-danger: #e44141;
  --isp-muted: #8a8fa3;
  --isp-line: #eceef3;
  --isp-nav-h: 62px;
}

/* ---------- accessibility ---------- */
.skip-link { position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2000; background: #fff; color: #2b3751; padding: 8px 14px; border-radius: 8px; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.skip-link:focus { clip-path: none; width: auto; height: auto; }
a:focus-visible, button:focus-visible, .form-control:focus-visible, .form-select:focus-visible,
[tabindex]:focus-visible, .form-check-input:focus-visible { outline: 2px solid var(--theme-default); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; font-size: 17px; letter-spacing: .2px; max-width: 100%; }
.brand:hover { color: #fff; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.brand-mark { width: 34px; height: 34px; flex: none; color: #b9b2ee; }
.page-header .header-logo-wrapper .brand { color: #2b3751; }
.page-header .header-logo-wrapper .brand-mark { color: var(--theme-default); }
body.dark-only .page-header .header-logo-wrapper .brand { color: #fff; }
.sidebar-wrapper .logo-wrapper { display: flex; align-items: center; }
.sidebar-wrapper .logo-icon-wrapper .brand span { display: none; }

/* buttons that sit where the theme expects <div>/<a> */
button.toggle-sidebar { border: 0; line-height: 0; }
.link-btn { background: none; border: 0; padding: 0; width: 100%; text-align: inherit; color: inherit; display: flex; align-items: center; gap: 0; font: inherit; }
.profile-dropdown form { margin: 0; }
.profile-dropdown .link-btn svg { margin-right: 10px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #f4f5f8; color: #3d434a; cursor: pointer; font-size: 12px; font-weight: 600; }
body.dark-only .icon-btn { background: #262932; color: #fff; }
.lang-menu { min-width: 140px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(122,112,186,.16); color: var(--theme-default); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex: none; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }

/* header search */
.top-search { position: relative; }
.top-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px !important; height: 16px !important; stroke: var(--isp-muted) !important; }
.top-search input { width: min(38vw, 420px); height: 42px; border-radius: 22px; border: 1px solid transparent; background: #f4f5f8; padding: 0 16px 0 40px; font-size: 14px; }
.top-search input:focus { background: #fff; border-color: var(--theme-default); outline: 0; }
body.dark-only .top-search input { background: #262932; color: #fff; }
body.rtl .top-search svg { left: auto; right: 14px; }
body.rtl .top-search input { padding: 0 40px 0 16px; }

/* sidebar icons are feather svgs */
.sidebar-wrapper .sidebar-link svg.feather { width: 18px; height: 18px; stroke-width: 1.8; margin-right: 12px; vertical-align: -3px; }
body.rtl .sidebar-wrapper .sidebar-link svg.feather { margin-right: 0; margin-left: 12px; }
.sidebar-wrapper .sidebar-submenu a.active { color: #fff !important; font-weight: 500; }

/* ---------- text helpers ---------- */
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace; font-size: .92em; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.text-online { color: var(--isp-online); }
.small-label { font-size: 12.5px; color: var(--isp-muted); display: block; margin-bottom: 2px; }
.card .card-header h4, .card .card-header h5 { margin-bottom: 0; }
.card-header .sub { color: var(--isp-muted); font-size: 13.5px; margin: 2px 0 0; }
.badge.st { font-weight: 500; padding: 6px 10px; border-radius: 20px; font-size: 12px; }
.badge-light-dark { background: rgba(43,55,81,.1); color: #2b3751; }
body.dark-only .badge-light-dark { background: rgba(255,255,255,.12); color: #e6e6e6; }

/* online / offline dot */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #c7cad6; margin-right: 6px; vertical-align: 1px; flex: none; }
.dot.on { background: var(--isp-online); box-shadow: 0 0 0 3px rgba(13,167,89,.18); }
body.rtl .dot { margin-right: 0; margin-left: 6px; }

/* ---------- page toolbar (title actions + filters) ---------- */
.page-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-bar .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters .form-control, .filters .form-select { width: auto; min-width: 150px; height: 40px; padding-top: 6px; padding-bottom: 6px; }
.filters .search { position: relative; flex: 1 1 240px; }
.filters .search input { width: 100%; padding-left: 38px; }
.filters .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--isp-muted); }
body.rtl .filters .search input { padding-left: 12px; padding-right: 38px; }
body.rtl .filters .search svg { left: auto; right: 12px; }
.btn svg.feather { width: 16px; height: 16px; vertical-align: -3px; }
.btn.is-busy { opacity: .65; pointer-events: none; }
.btn-icon { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* status tabs above a list */
.seg { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg a { flex: none; padding: 7px 14px; border-radius: 20px; background: #fff; color: #52526c; font-size: 14px; border: 1px solid var(--isp-line); white-space: nowrap; }
.seg a b { font-weight: 600; margin-left: 6px; color: var(--isp-muted); }
.seg a.active { background: var(--theme-default); border-color: var(--theme-default); color: #fff; }
.seg a.active b { color: rgba(255,255,255,.8); }
body.dark-only .seg a { background: #262932; border-color: #374558; color: #cfd3dc; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table.list { margin: 0; }
.table.list thead th { font-size: 12.5px; font-weight: 600; color: var(--isp-muted); border-bottom: 1px solid var(--isp-line); white-space: nowrap; padding: 12px 14px; background: transparent; }
.table.list tbody td { padding: 12px 14px; vertical-align: middle; border-bottom: 1px solid var(--isp-line); }
.table.list tbody tr:last-child td { border-bottom: 0; }
.table.list tbody tr:hover { background: rgba(122,112,186,.04); }
.table.list .primary a { font-weight: 600; color: #2b3751; }
.table.list .primary small { display: block; color: var(--isp-muted); font-weight: 400; }
body.dark-only .table.list .primary a { color: #fff; }
body.dark-only .table.list thead th, body.dark-only .table.list tbody td { border-color: #374558; }
.table.list td.end, .table.list th.end, .table.list td.r, .table.list th.r { text-align: right; }
body.rtl .table.list td.end, body.rtl .table.list th.end, body.rtl .table.list td.r, body.rtl .table.list th.r { text-align: left; }
.list-foot { border-top: 1px solid var(--isp-line); margin-top: 0; padding: 14px 4px 0; }
body.dark-only .list-foot { border-color: #374558; }

/* phones: every row becomes a card, the column name is shown before each value */
@media (max-width: 767.98px) {
  .table.list.cards thead { display: none; }
  .table.list.cards, .table.list.cards tbody, .table.list.cards tr, .table.list.cards td { display: block; width: 100%; }
  .table.list.cards tr { border: 1px solid var(--isp-line); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; background: #fff; }
  body.dark-only .table.list.cards tr { background: #262932; border-color: #374558; }
  .table.list.cards tbody td { border: 0; padding: 5px 0; display: flex; justify-content: space-between; gap: 14px; text-align: right; }
  .table.list.cards tbody td::before { content: attr(data-label); color: var(--isp-muted); font-size: 12.5px; text-align: left; flex: none; }
  .table.list.cards tbody td.primary { display: block; text-align: left; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px dashed var(--isp-line); font-size: 15.5px; }
  .table.list.cards tbody td.primary::before, .table.list.cards tbody td.check::before, .table.list.cards tbody td.end::before { content: none; }
  .table.list.cards tbody td.check { position: absolute; right: 26px; width: auto; padding-top: 2px; }
  .table.list.cards tr { position: relative; }
  .table.list.cards tbody td.end { justify-content: flex-start; padding-top: 10px; }
  .table.list.cards tbody td:empty { display: none; }
  .table.list.cards .row-actions { justify-content: flex-start; }
  body.rtl .table.list.cards tbody td { text-align: left; }
  body.rtl .table.list.cards tbody td::before, body.rtl .table.list.cards tbody td.primary { text-align: right; }
}

/* bulk action bar */
.bulk-bar { display: none; position: sticky; bottom: calc(var(--isp-nav-h) + 10px); z-index: 20; margin-top: 12px; background: #2b3751; color: #fff; border-radius: 12px; padding: 10px 14px; align-items: center; gap: 10px; flex-wrap: wrap; box-shadow: 0 8px 24px rgba(43,55,81,.3); }
.bulk-bar.show { display: flex; }
.bulk-bar .form-select { width: auto; height: 38px; padding-top: 5px; padding-bottom: 5px; }
@media (min-width: 992px) { .bulk-bar { bottom: 14px; } }

/* ---------- empty state ---------- */
.empty-state { text-align: center; padding: 44px 16px; }
.empty-state .empty-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; background: rgba(122,112,186,.12); color: var(--theme-default); display: flex; align-items: center; justify-content: center; }
.empty-state .empty-icon svg { width: 28px; height: 28px; }
.empty-state h5 { margin-bottom: 6px; }
.empty-state p { max-width: 46ch; margin-left: auto; margin-right: auto; }

/* ---------- forms ---------- */
.form-label { font-weight: 500; margin-bottom: 6px; }
.form-control, .form-select { min-height: 42px; }
textarea.form-control { min-height: 0; }
.form-section { font-size: 15px; font-weight: 600; margin: 6px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--isp-line); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 6px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 16px; }
.input-group .btn { z-index: 0; }
.form-check-input { cursor: pointer; }
.form-switch .form-check-input { width: 2.4em; height: 1.25em; }
.alert.flash { display: flex; align-items: center; gap: 10px; border-radius: 12px; margin-bottom: 16px; }
.alert.flash svg { width: 18px; height: 18px; flex: none; }
.alert-light-success { background: rgba(13,167,89,.1); color: #0a7d43; border: 0; }
.alert-light-danger { background: rgba(228,65,65,.1); color: #b32626; border: 0; }
.alert-light-info, .alert-light-warning { background: rgba(72,163,215,.12); color: #1d6c98; border: 0; }
@media (max-width: 767.98px) {
  /* 16px inputs stop iOS from zooming the page on focus */
  .form-control, .form-select, .top-search input { font-size: 16px; }
  .form-actions { position: sticky; bottom: calc(var(--isp-nav-h) + 8px); background: #fff; padding: 10px; margin: 0 -10px; border-radius: 12px; box-shadow: 0 -6px 18px rgba(43,55,81,.08); z-index: 15; }
  body.dark-only .form-actions { background: #262932; }
  .form-actions .btn { flex: 1 1 auto; }
}

/* ---------- dashboard ---------- */
.pulse { background: linear-gradient(120deg, #2b3751 0%, #3a3f6b 100%); color: #fff; border-radius: 16px; padding: 22px 24px; display: grid; grid-template-columns: minmax(220px, 1.1fr) 2fr; gap: 24px; align-items: center; margin-bottom: 24px; }
.pulse h2 { font-size: 15px; font-weight: 500; color: rgba(255,255,255,.75); margin: 0 0 6px; }
.pulse .big { font-size: clamp(40px, 6vw, 60px); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 12px; }
.pulse .big small { font-size: 15px; font-weight: 400; color: rgba(255,255,255,.7); }
.pulse .live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,.75); margin-top: 10px; }
.pulse .live .dot.on { margin: 0; }
.pulse .meter { height: 8px; border-radius: 8px; background: rgba(255,255,255,.14); overflow: hidden; margin-top: 14px; max-width: 320px; }
.pulse .meter i { display: block; height: 100%; background: #5fe0a0; border-radius: 8px; }
.pulse .facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pulse .fact { background: rgba(255,255,255,.08); border-radius: 12px; padding: 12px 14px; color: #fff; display: block; }
.pulse .fact:hover { background: rgba(255,255,255,.14); color: #fff; }
.pulse .fact b { display: block; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
.pulse .fact span { font-size: 13px; color: rgba(255,255,255,.75); }
.pulse .fact.warn b { color: #ffd166; }
.pulse .fact.bad b { color: #ff9a9a; }
@media (max-width: 991.98px) { .pulse { grid-template-columns: 1fr; padding: 18px; } .pulse .facts { grid-template-columns: repeat(2, 1fr); } }

.tile { display: flex; align-items: center; gap: 14px; }
.tile .ic { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; background: rgba(122,112,186,.12); color: var(--theme-default); }
.tile .ic.green { background: rgba(13,167,89,.12); color: var(--isp-online); }
.tile .ic.amber { background: rgba(224,161,0,.14); color: #b98500; }
.tile .ic.red { background: rgba(228,65,65,.12); color: var(--isp-danger); }
.tile .ic.blue { background: rgba(72,163,215,.14); color: #2f86b9; }
.tile .ic svg { width: 22px; height: 22px; }
.tile b { display: block; font-size: 22px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tile span { color: var(--isp-muted); font-size: 13.5px; }
.card.tile-card .card-body { padding: 18px; }

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--isp-line); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list .who { min-width: 0; }
.mini-list .who a { font-weight: 500; color: inherit; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-list .who small { color: var(--isp-muted); }
body.dark-only .mini-list li { border-color: #374558; }

/* key / value sheet on detail pages */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px 20px; margin: 0; }
.kv div { min-width: 0; }
.kv dt { font-size: 12.5px; font-weight: 400; color: var(--isp-muted); margin-bottom: 2px; }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.profile-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.profile-head h3 { margin: 0; font-size: 22px; }
.profile-head .meta { color: var(--isp-muted); display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.usage-bar { height: 8px; border-radius: 8px; background: var(--isp-line); overflow: hidden; }
.usage-bar i { display: block; height: 100%; background: var(--theme-default); border-radius: 8px; }
.usage-bar.hot i { background: var(--isp-danger); }

.nav-tabs.scroll { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; border-bottom: 1px solid var(--isp-line); }
.nav-tabs.scroll::-webkit-scrollbar { display: none; }
.nav-tabs.scroll .nav-link { white-space: nowrap; color: #52526c; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; }
.nav-tabs.scroll .nav-link.active { color: var(--theme-default); border-bottom-color: var(--theme-default); background: transparent; font-weight: 600; }
body.dark-only .nav-tabs.scroll .nav-link { color: #cfd3dc; }

/* chat-like ticket thread */
.thread { display: flex; flex-direction: column; gap: 12px; }
.thread .msg { max-width: 760px; background: #f4f5f8; border-radius: 14px; padding: 12px 14px; }
.thread .msg.mine { align-self: flex-end; background: rgba(122,112,186,.12); }
.thread .msg .by { font-size: 12.5px; color: var(--isp-muted); margin-bottom: 4px; }
.thread .msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
body.dark-only .thread .msg { background: #1d1e26; }

/* permissions matrix */
.perm-group { border: 1px solid var(--isp-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.perm-group h6 { margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
body.dark-only .perm-group { border-color: #374558; }

/* ---------- phone bottom bar ---------- */
.mobile-nav { display: none; }
@media (max-width: 991.98px) {
  .mobile-nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--isp-nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--isp-line); box-shadow: 0 -4px 18px rgba(43,55,81,.08); }
  .mobile-nav a, .mobile-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; color: #6b7086; background: none; border: 0; min-height: 48px; }
  .mobile-nav svg { width: 21px; height: 21px; }
  .mobile-nav .active { color: var(--theme-default); font-weight: 600; }
  body.dark-only .mobile-nav { background: #1d1e26; border-color: #374558; }
  body.dark-only .mobile-nav a, body.dark-only .mobile-nav button { color: #b8bfcc; }
  .page-wrapper .page-body-wrapper footer.footer { display: none; }
  .page-wrapper .page-body-wrapper .page-body { padding-bottom: calc(var(--isp-nav-h) + 28px) !important; }
  .tap-top { bottom: calc(var(--isp-nav-h) + 16px) !important; }
}

/* ---------- print (invoices / receipts / reports) ---------- */
@media print {
  .page-header, .sidebar-wrapper, .mobile-nav, footer, .tap-top, .no-print, .page-bar .actions, .alert.flash { display: none !important; }
  .page-wrapper .page-body-wrapper .page-body { margin: 0 !important; padding: 0 !important; background: #fff !important; }
  .card { box-shadow: none !important; border: 0 !important; }
  body { background: #fff !important; }
}

/* ---------- theme overrides: sentence case, compact header items ---------- */
.card .card-header h4, .card .card-header h5, .card .card-header h5:not(.mb-0), .card .card-header h5:not(.m-0),
.page-wrapper .page-body-wrapper .sidebar-wrapper .sidebar-main .sidebar-links li a,
.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .sidebar-main .sidebar-links li a span,
.sidebar-main .sidebar-links .simplebar-wrapper .simplebar-mask .simplebar-content-wrapper .simplebar-content > li > a,
.sidebar-main .sidebar-links .simplebar-wrapper .simplebar-mask .simplebar-content-wrapper .simplebar-content li a { text-transform: none; }
.page-wrapper .sidebar-main-title h6 { text-transform: none !important; letter-spacing: .3px; }
.page-wrapper .page-header .header-wrapper .nav-right > ul > li { padding: 0 !important; background: transparent !important; border-radius: 0 !important; margin: 0 !important; }
.page-wrapper .page-header .header-wrapper .nav-right > ul { gap: 10px; display: flex; align-items: center; justify-content: flex-end; }
.page-wrapper .page-header .header-wrapper .nav-right > ul > li .mode { width: 40px; height: 40px; border-radius: 50%; background: #f4f5f8; display: flex; align-items: center; justify-content: center; }
body.dark-only .page-wrapper .page-header .header-wrapper .nav-right > ul > li .mode { background: #262932; }
.page-wrapper .page-header .header-wrapper .nav-right .profile-media .flex-grow-1 span { white-space: nowrap; }
.only-phone { display: none !important; }
@media (max-width: 767.98px) {
  .only-desktop { display: none !important; }
  .only-phone { display: block !important; }
  .page-wrapper .page-header .header-wrapper .nav-right .profile-media .flex-grow-1 { display: none; }
}
.brand span { max-width: 122px; }
.alert.flash .btn { white-space: nowrap; }

/* ---------- compact buttons and icons (the theme's are large) ---------- */
.btn-sm { padding: 6px 12px; font-size: 13px; letter-spacing: .2px; }
.btn-sm svg.feather { width: 14px; height: 14px; }
.row-actions .btn { white-space: nowrap; }
@media (min-width: 768px) { .table.list .row-actions { flex-wrap: nowrap; } }
.kv dd .btn-sm, .btn-icon-sm { padding: 4px 8px; line-height: 1; }
.profile-head h3 { font-weight: 600; }
.profile-head .meta { align-items: center; }
.profile-head .meta svg.feather { width: 15px; height: 15px; vertical-align: -2px; }
.mono { font-size: .93em; }
.table.list .primary small .mono, .mini-list small .mono { font-size: 12.5px; }
.dropdown-menu form { display: block !important; }
.dropdown-menu .dropdown-item { border-radius: 8px; padding: 9px 12px; width: 100%; text-align: left; background: none; border: 0; opacity: 1; }
.dropdown-menu .dropdown-item:hover { background: rgba(122,112,186,.1); }
body.rtl .dropdown-menu .dropdown-item { text-align: right; }
.page-bar .seg { margin-bottom: 0; }
.nav-tabs.scroll { flex-direction: row !important; }
.nav-tabs.scroll .nav-item { flex: none; width: auto !important; }
.form-check.form-switch { padding-left: 3.2em; }
.form-check.form-switch .form-check-input { margin-left: -3.2em; float: left; }
body.rtl .form-check.form-switch { padding-left: 0; padding-right: 3.2em; }
body.rtl .form-check.form-switch .form-check-input { margin-left: 0; margin-right: -3.2em; float: right; }
.code-box { background: #1f2738; color: #e6e9f2; border-radius: 12px; padding: 14px 16px; font-size: 13px; overflow-x: auto; white-space: pre; margin: 0; }
.hint { color: var(--isp-muted); font-size: 13.5px; }
.form-control.mono { font-size: 14.5px; }
@media (min-width: 768px) { .table.list td .mono { white-space: nowrap; } .table.list td.wrap .mono { white-space: normal; } }
.totals { min-width: 260px; }
.totals td { padding: 4px 0 4px 24px; }
.totals td:first-child { color: var(--isp-muted); padding-left: 0; }
.totals td.num { text-align: right; }
.totals tr.grand td { border-top: 1px solid var(--isp-line); padding-top: 8px; font-weight: 600; font-size: 17px; color: inherit; }
@media print { .paper { margin: 0 !important; } .paper .card-body { padding: 0 !important; } .col-xl-8, .col-xl-6 { width: 100% !important; flex: 0 0 100% !important; max-width: 100% !important; } a { color: inherit !important; text-decoration: none !important; } }
a.report-card { color: inherit; display: block; transition: transform .12s ease, box-shadow .12s ease; }
a.report-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(43,55,81,.1); }
.table.list tfoot td { padding: 12px 14px; border-top: 2px solid var(--isp-line); }
@media (max-width: 767.98px) { .table.list.cards tfoot, .table.list.cards tfoot tr, .table.list.cards tfoot td { display: block; width: 100%; } .table.list.cards tfoot td { border: 0; padding: 5px 0; display: flex; justify-content: space-between; gap: 14px; } .table.list.cards tfoot td::before { content: attr(data-label); color: var(--isp-muted); font-size: 12.5px; } .table.list.cards tfoot td:empty { display: none; } .table.list.cards tfoot tr { background: rgba(122,112,186,.08); } }
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; color: inherit; }
.settings-nav a svg { width: 17px; height: 17px; flex: none; }
.settings-nav a:hover { background: rgba(122,112,186,.07); }
.settings-nav a.active { background: rgba(122,112,186,.14); color: var(--theme-default); font-weight: 600; }
@media (max-width: 1199.98px) { .settings-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; } .settings-nav a { flex: none; white-space: nowrap; } }
.brand img.brand-logo { max-height: 36px; max-width: 150px; }
.page-wrapper .page-header .page-title .breadcrumb .breadcrumb-item, .page-wrapper .page-header .page-title h4 { text-transform: none; }
.mini-list .who > span, .mini-list .who > a, .mini-list .who > small { display: block; }
@media (max-width: 767.98px) { .table.list.cards tbody td.hide-sm { display: none; } }

/* ---------- right-to-left (Urdu, Arabic …) ---------- */
body.rtl .sidebar-wrapper .logo-wrapper .toggle-sidebar { right: auto; left: 25px; }
body.rtl .sidebar-wrapper .logo-wrapper .brand span { max-width: 120px; }
.seg a b { margin-left: 0; margin-inline-start: 6px; }
body.rtl .table.list td, body.rtl .kv dd, body.rtl .mini-list small, body.rtl .table.list .primary small { unicode-bidi: plaintext; }
body.rtl .table.list td:not(.r):not(.end) { text-align: right; }
@media (max-width: 767.98px) {
  .table.list.cards tbody td.check { right: auto; inset-inline-end: 14px; top: 10px; }
  .table.list.cards tbody td.check + td.primary { padding-inline-end: 34px; }
  body.rtl .table.list.cards tbody td:not(.primary) { text-align: left; }
}
