/* ERP VISION cyan/gray shell. Status colors remain semantic. */
body {
    --bs-primary: #007f96;
    --bs-primary-rgb: 0, 127, 150;
    --bs-link-color: #007f96;
    --bs-link-hover-color: #008ba5;
    background-color: #f4f6f7 !important;
}
body .dash-content { background-color: #f4f6f7; }
body .gotbl-sidebar {
    background: #007f96 !important;
    scrollbar-color: #6dacb8 #007f96;
}
body .gotbl-sidebar .gotbl-sidebar__logo-area {
    background: #FFFFFF;
}
body .gotbl-sidebar .gotbl-sidebar__hamburger,
body .gotbl-sidebar .gotbl-sidebar__logo-company {
    color: #007f96 !important;
}
body .gotbl-sidebar :is(.gotbl-sidebar__item > a, .gotbl-sidebar__submenu li > a, .gotbl-sidebar__nested-submenu li > a, .gotbl-sidebar__menu--bottom li > a) {
    color: #FFFFFF !important;
}
body .gotbl-sidebar :is(.gotbl-sidebar__item > a, .gotbl-sidebar__submenu li > a, .gotbl-sidebar__nested-submenu li > a, .gotbl-sidebar__menu--bottom li > a):hover {
    background: #008ba5 !important;
    color: #FFFFFF !important;
}
body .gotbl-sidebar :is(.gotbl-sidebar__item.active > a, .gotbl-sidebar__submenu li.active > a, .gotbl-sidebar__submenu a.active, .gotbl-sidebar__nested-submenu a.active) {
    background: #e5f5f8 !important;
    color: #007f96 !important;
    box-shadow: inset 4px 0 0 #bcebf2;
}
body .gotbl-sidebar :is(.gotbl-sidebar__item > a, .gotbl-sidebar__submenu li > a, .gotbl-sidebar__nested-submenu li > a) > :is(i, span) {
    color: inherit !important;
}
body .gotbl-sidebar .gotbl-sidebar__left-menu-bottom {
    background: #008ba5 !important;
}
body .gotbl-sidebar .gotbl-sidebar__item.has-submenu.open {
    background: rgba(255, 255, 255, 0.06);
}
body .text-primary,
body.theme-3 .text-primary,
body.theme-3 a:not([class]),
body.theme-3 a:not([class]):hover,
body .link-primary {
    color: #007f96 !important;
}
body .document-number { color: #000 !important; }
body .page-item.active .page-link,
body .dataTable-pagination li.active a,
body .datatable-pagination li.datatable-active a {
    background: #007f96 !important;
    border-color: #007f96 !important;
    color: #FFFFFF !important;
}
body .form-check-input:checked {
    background-color: #007f96;
    border-color: #ff02b5;
}
body :is(.form-control, .form-select):focus {
    border-color: #007F96 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 127, 150, 0.16) !important;
    outline: 0;
}
body :is(.custom-select, .dataTable-selector, .dataTable-input):focus,
body :is(.select2-container--focus, .select2-container--open) .select2-selection,
body .choices.is-focused .choices__inner,
body .choices.is-open .choices__inner {
    border-color: #007F96 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 127, 150, 0.16) !important;
    outline: 0;
}
html body .was-validated :is(.form-control, .form-select, .custom-select, .dataTable-selector, .dataTable-input):valid:focus,
html body :is(.form-control, .form-select, .custom-select, .dataTable-selector, .dataTable-input).is-valid:focus {
    border-color: #007F96 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 127, 150, 0.16) !important;
}
body .gotbl-footer__zoom-btn {
    background: #e5f5f8;
    color: #007f96;
}
body .gotbl-footer__zoom-btn:hover:not(:disabled) {
    background: #bcebf2;
    color: #1f3b41;
}
body .gotbl-footer__zoom-scale input[type=range] { accent-color: #007f96; }

/* Override legacy theme hover colors on labels, icons and expanded menus. */
body[class] .gotbl-sidebar :is(.gotbl-sidebar__item, .gotbl-sidebar__submenu li, .gotbl-sidebar__nested-submenu li) > a:is(:hover, :focus-visible) {
    background: #008ba5 !important;
    color: #FFFFFF !important;
}
body[class] .gotbl-sidebar :is(.gotbl-sidebar__item.active, .gotbl-sidebar__item.has-submenu.open, .gotbl-sidebar__submenu li.active, .gotbl-sidebar__nested-submenu li.active) > a {
    background: #e5f5f8 !important;
    color: #007f96 !important;
}
body[class] .gotbl-sidebar :is(.gotbl-sidebar__item, .gotbl-sidebar__submenu li, .gotbl-sidebar__nested-submenu li) > a:is(:hover, :focus-visible, .active) > :is(i, span),
body[class] .gotbl-sidebar :is(.gotbl-sidebar__item.active, .gotbl-sidebar__item.has-submenu.open, .gotbl-sidebar__submenu li.active, .gotbl-sidebar__nested-submenu li.active) > a > :is(i, span) {
    color: inherit !important;
}

/* Nested report toggles also override legacy open/active green rules. */
body[class] .gotbl-sidebar .gotbl-sidebar__submenu-item.has-submenu > a.nested-submenu-toggle {
    background: transparent !important;
    color: #FFFFFF !important;
}
body[class] .gotbl-sidebar .gotbl-sidebar__submenu-item.has-submenu > a.nested-submenu-toggle:is(:hover, :focus-visible) {
    background: #008ba5 !important;
    color: #FFFFFF !important;
}
body[class] .gotbl-sidebar .gotbl-sidebar__submenu-item.has-submenu:is(.active, .open) > a.nested-submenu-toggle {
    background: #e5f5f8 !important;
    color: #007f96 !important;
}
body[class] .gotbl-sidebar .gotbl-sidebar__submenu-item.has-submenu:is(.active, .open) > a.nested-submenu-toggle > :is(i, span),
body[class] .gotbl-sidebar .gotbl-sidebar__submenu-item.has-submenu > a.nested-submenu-toggle:is(:hover, :focus-visible) > :is(i, span) {
    color: inherit !important;
}

body .header-settings-menu > button { border: 0; cursor: pointer; }
body .header-settings-menu .dropdown-menu {
    width: min(290px, calc(100vw - 24px));
    min-width: 0;
    max-height: calc(100vh - 82px);
    padding: 44px 8px 8px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #d3e6ea;
    border-radius: 12px;
    box-shadow: 0 8px 24px #1f3b4122;
}
body .header-settings-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 7px;
    color: #007f96;
    font-size: 13px;
}
body .header-settings-menu .dropdown-item:is(:hover, :focus) {
    background: #e5f5f8;
    color: #007f96;
}
body .header-settings-menu .dropdown-item i { font-size: 18px; }
body .header-settings-menu__top { position:absolute; top:8px; right:8px; z-index:2; display:flex; margin:0; padding:0; }
body .header-settings-menu__close { display:grid; place-items:center; width:30px; height:30px; padding:0; border:1px solid #c9dfe4; border-radius:9px; background:#f7fbfc; color:#456a74; font:600 20px/1 sans-serif; cursor:pointer; }
body .header-settings-menu__close:hover { border-color:#79bdca; background:#eaf7f9; color:#087f98; }
body .header-settings-menu__close:focus-visible { outline:2px solid #087f98; outline-offset:2px; }
body .header-settings-menu form { margin: 0; }

/* Header surfaces follow the cyan/gray shell without changing navigation. */
body[class] .gotbl-header {
    position: relative;
    background: #f4f6f7 !important;
    border-bottom: 1px solid #d3e6ea;
    color: #1f3b41;
    box-shadow: 0 2px 10px rgba(34, 106, 121,.06);
}
body[class] .gotbl-header .gotbl-header__search {
    background: #FFFFFF !important;
    border: 1px solid #cce2e6 !important;
    border-radius: 12px;
}
body[class] .gotbl-header .gotbl-header__search:focus-within {
    border-color: #6dacb8 !important;
    box-shadow: 0 0 0 3px rgba(34, 106, 121,.1);
}
body[class] .gotbl-header .gotbl-header__search input {
    color: #1f3b41 !important;
}
body[class] .gotbl-header .gotbl-header__search input::placeholder { color: #4e94a2; opacity: 1; }
body[class] .gotbl-header :is(.gotbl-header__search i, .gotbl-header__nav-btn i, .gotbl-sidebar__profile-arrow) {
    color: #007f96 !important;
}
body[class] .gotbl-header .gotbl-header__nav-btn {
    border-radius: 8px;
    transition: background-color .15s;
}
body[class] .gotbl-header .gotbl-header__nav-btn:hover { background: #e5f5f8 !important; }
body[class] .gotbl-header .gotbl-header__date { color: #007f96; font-size: 12px; font-weight: 500; }
body[class] .gotbl-header .gotbl-sidebar__profile {
    background: #FFFFFF;
    border: 1px solid #dbeaed;
    box-shadow: 0 2px 6px rgba(34, 106, 121,.05);
}
body[class] .gotbl-header .gotbl-sidebar__profile:hover { background: #e5f5f8; }
body[class] .gotbl-header .gotbl-sidebar__profile-name { color: #1f3b41; }
body[class] .gotbl-header .gotbl-sidebar__profile-email { color: #4e94a2; }
body[class] .gotbl-header :is(.gotbl-header__lang, .gotbl-header__weather, .gotbl-header__time) { color: #3a6e79; }
body[class] .gotbl-header .gotbl-header__action {
    background: #e5f5f8 !important;
    border: 1px solid #cce2e6;
    border-radius: 10px;
    transition: background-color .15s;
}
body[class] .gotbl-header .gotbl-header__action i { color: #007f96 !important; }
body[class] .gotbl-header .gotbl-header__action:is(:hover, [aria-expanded="true"]) {
    background: #bcebf2 !important;
    border-color: #bcebf2;
}
body[class] .gotbl-header :is(button, input, a):focus-visible { outline: 2px solid #6dacb8; outline-offset: 2px; }

/* Dashboard cards share the sidebar palette and compact spacing. */
body :is(.dashboard-summary-card, .dashboard-bills-info-card, .dashboard-chart-card) {
    border: 1px solid #dbeaed;
    border-radius: 14px;
    box-shadow: 0 3px 14px rgba(34, 106, 121,.06);
    background: #FFFFFF;
}
body :is(.dashboard-summary-card, .dashboard-bills-info-card) .card-body {
    padding: 16px;
    min-height: 0;
}
body .dashboard-summary-card .card-body > .d-flex { flex-wrap: wrap; }
body .dashboard-summary-card .card-body > .d-flex:last-child { margin-bottom: 0 !important; }
body :is(.dashboard-summary-card .card-label, .dashboard-bills-info-card .bill-label) {
    color: #3a6e79;
    font-size: 13px;
    font-weight: 500;
}
body :is(.dashboard-summary-card .card-icon, .dashboard-bills-info-card .bill-icon) {
    width: 40px;
    height: 40px;
    font-size: 20px;
    border-radius: 10px;
}
body :is(.dashboard-summary-card .icon-sales, .dashboard-summary-card .icon-cum-sales, .dashboard-bills-info-card .icon-sales) { color: #1f3b41; }
body :is(.dashboard-summary-card .card-amount, .dashboard-bills-info-card .bill-total) { font-size: 24px; line-height: 1.3; }
body .dashboard-summary-card .period-select {
    background: #f4f6f7;
    color: #007f96;
    border-color: #cce2e6;
    min-height: 28px;
}
body .dashboard-chart-card .chart-title { color: #007f96; font-size: 15px; }
body .gotbl-header {
    border-bottom: 2px solid #dbeaed;
}
body .gotbl-header .gotbl-header__nav-buttons { display: flex; gap: 4px; }
body[class] .gotbl-header .gotbl-header__nav-btn:hover {
    background: #e5f5f8 !important;
    box-shadow: inset 0 -2px #bcebf2;
}

/* Join the topbar to the live sidebar edge, including collapsed widths. */
body[class] .gotbl-header {
    margin-left: var(--erp-sidebar-edge, 0px) !important;
    width: calc(100% - var(--erp-sidebar-edge, 0px)) !important;
    max-width: none;
    box-sizing: border-box;
    border-radius: 0;
    padding: 10px 16px !important;
    gap: 12px;
}
body[class] .gotbl-header .gotbl-header__center {
    margin-left: 0 !important;
    gap: 12px;
}
body[class] .gotbl-header .gotbl-header__right { gap: 12px; }
body[class] .gotbl-header :is(.gotbl-header__lang, .gotbl-header__weather, .gotbl-header__time, .gotbl-header__action, .gotbl-sidebar__profile) {
    margin-left: 0 !important;
}
body[class] .gotbl-header .gotbl-header__search--wide { min-width: 120px; max-width: 360px; }
@media (max-width: 1000px) {
    body[class] .gotbl-header { flex-wrap: wrap; gap: 8px 12px; }
}

/* User/date information lives in the footer, leaving the topbar for navigation. */
body .gotbl-footer__container {
    max-width: none;
    gap: 12px 20px;
    padding: 8px 20px;
    flex-wrap: wrap;
}
body .gotbl-footer__status {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 8px 16px;
    min-width: 0;
    color: #3a6e79;
    font-size: 12px;
}
body .gotbl-footer .gotbl-header__date { color: #007f96; font-size: 12px; font-weight: 500; }
body .gotbl-footer .gotbl-sidebar__profile {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 4px 10px;
    border: 1px solid #dbeaed;
    border-radius: 20px;
    background: #FFFFFF;
    min-width: 0;
}
body .gotbl-footer .gotbl-sidebar__profile-pic { width: 28px; height: 28px; }
body .gotbl-footer .gotbl-sidebar__profile-name { color: #1f3b41; }
body .gotbl-footer .gotbl-sidebar__profile-email { color: #4e94a2; }
body .gotbl-footer .gotbl-sidebar__profile-arrow { color: #007f96; }
body .gotbl-footer :is(.gotbl-header__lang, .gotbl-header__weather, .gotbl-header__time) {
    display: inline-block;
    margin: 0;
    color: #3a6e79;
    font-size: 12px;
    white-space: nowrap;
}
body .gotbl-footer__right { flex-wrap: wrap; gap: 12px; }

/* Compact text-only user information in the footer. */
body .gotbl-footer__container {
    padding: 4px 16px;
    gap: 4px 12px;
    font-size: 11px;
    line-height: 1.4;
}
body .gotbl-footer__status { gap: 4px 12px; font-size: 11px; }
body .gotbl-footer__user { display: flex; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
body .gotbl-footer__user-name { color: #007f96; font-weight: 500; }
body .gotbl-footer__user-email { color: #4e94a2; overflow-wrap: anywhere; }
body .gotbl-footer :is(.gotbl-header__date, .gotbl-header__lang, .gotbl-header__weather, .gotbl-header__time, .gotbl-footer__version, .gotbl-footer__zoom-scale) { font-size: 11px; }
body .gotbl-footer__right { gap: 8px; }
body .gotbl-footer__zoom-btn { width: 20px; height: 20px; }
body .gotbl-footer__zoom-scale input[type=range] { width: 80px; }

/* Compact dashboard rhythm: no stacked card/column/row bottom margins. */
body .erp-dashboard { padding-top: 14px; }
body .erp-dashboard > .col-sm-12 > .row {
    --bs-gutter-x: 10px;
    --bs-gutter-y: 10px;
    margin-bottom: 10px !important;
}
body .erp-dashboard > .col-sm-12 > .row > [class*="col-"] {
    margin-bottom: 0 !important;
    min-width: 0;
}
body .erp-dashboard :is(.dashboard-summary-card, .dashboard-bills-info-card, .dashboard-chart-card) {
    margin-bottom: 0 !important;
    border-radius: 12px;
    border: 1px solid #dbeaed;
    box-shadow: 0 2px 8px rgba(34, 106, 121,.04);
}
body .erp-dashboard :is(.dashboard-summary-card, .dashboard-bills-info-card) {
    border-top: 3px solid #007f96;
    min-height: 0 !important;
}
body .erp-dashboard :is(.dashboard-summary-card, .dashboard-bills-info-card):has(.icon-sales, .icon-cum-sales) {
    border-top-color: #bcebf2;
}
body .erp-dashboard :is(.dashboard-summary-card, .dashboard-bills-info-card) .card-body {
    padding: 14px !important;
    min-height: 0 !important;
}
body .erp-dashboard .dashboard-summary-card .card-body > .d-flex { gap: 10px !important; }
body .erp-dashboard :is(.card-amount, .bill-total) { font-size: 22px; overflow-wrap: anywhere; }
body .erp-dashboard :is(.card-icon, .bill-icon) {
    width: 36px;
    height: 36px;
    font-size: 18px;
    border-radius: 9px;
}
body .erp-dashboard :is(.icon-purchase, .icon-cum-purchase) { background: #e5f5f8; color: #007f96; }
body .erp-dashboard :is(.icon-sales, .icon-cum-sales) { background: #FFF3CC; color: #946200; }
body .erp-dashboard .dashboard-chart-card .card-body { padding: 16px; }

/* Give page headings breathing room beneath the topbar. */
body .dash-content > .page-header-card {
    margin-top: 16px !important;
    margin-bottom: 18px !important;
    border-radius: 14px !important;
    border: 1px solid #dbeaed;
    box-shadow: 0 2px 8px rgba(34, 106, 121,.04);
}
body .page-header-card > .card-header { padding: 14px 18px; border-bottom: 0; }
body .page-header-card .breadcrumb { margin-bottom: 0 !important; }
body .page-header-card .action-btn-col { flex-wrap: wrap; gap: 10px !important; }
body .header-action-group { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
body .header-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0 !important;
    border-radius: 9px;
    margin: 0 !important;
}
body .header-icon-action > i { font-size: 18px; line-height: 1; }
body .btn-primary-subtle {
    background: #e5f5f8 !important;
    color: #007f96 !important;
    border-color: #cce2e6 !important;
}
body .btn-primary-subtle:is(:hover, :focus-visible) {
    background: #d5e9ed !important;
    color: #007f96 !important;
}
body .btn-primary-subtle i { color: inherit !important; }

/* Compact role editor, scoped to both create and edit dialogs. */
body .modal-dialog:has(.role-permission-form) {
    width: calc(100% - 32px) !important;
    max-width: 900px !important;
    margin: 20px auto;
}
body .modal-content:has(.role-permission-form) { border-radius: 14px; overflow: hidden; }
body .modal-content:has(.role-permission-form) > .modal-header { padding: 14px 18px; background: #e5f5f8; color: #007f96; }
body .modal-content:has(.role-permission-form) .modal-title { font-size: 16px; color: #007f96; }
body .role-permission-form .modal-body { padding: 16px 18px !important; max-height: 70dvh; overflow-y: auto; }
body .role-permission-form .form-group { margin-bottom: 12px; }
body .role-permission-form .form-label { font-size: 13px; margin-bottom: 5px; }
body .role-permission-form textarea.form-control { height: 64px !important; min-height: 64px !important; }
body .role-permission-form .nav-pills { gap: 6px; margin-bottom: 12px !important; }
body .role-permission-form .nav-pills .nav-link {
    margin: 0 !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    line-height: 1.5;
    border: 1px solid #cce2e6 !important;
    border-radius: 7px;
    background: #f4f6f7 !important;
    color: #007f96 !important;
}
body .role-permission-form .nav-pills .nav-link:hover { background: #e5f5f8 !important; }
body .role-permission-form .nav-pills .nav-link.active { background: #007f96 !important; color: #FFFFFF !important; border-color: #007f96 !important; }
body .role-permission-form .modal-footer { padding: 10px 18px; gap: 8px; background: #f4f6f7; }
body .role-permission-form :is(td, .form-check-label) { font-size: 12px; }

/* Permission matrix colors, including select-all and individual checkboxes. */
body[class] .role-permission-form .form-check-input {
    accent-color: #007f96;
    border-color: #a4cbd3 !important;
    background-color: #FFFFFF !important;
}
body[class] .role-permission-form .form-check-input:is(:checked, :indeterminate) {
    background-color: #007f96 !important;
    border-color: #007f96 !important;
}
body[class] .role-permission-form .form-check-input:focus-visible {
    outline: 2px solid #bcebf2;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(34, 106, 121,.12);
}
body[class] .role-permission-form .form-check-input:disabled { opacity: .5; }
body[class] .role-permission-form .table {
    --bs-table-color: #1f3b41;
    --bs-table-bg: #FFFFFF;
    --bs-table-striped-color: #1f3b41;
    --bs-table-striped-bg: #f4f6f7;
    --bs-table-hover-bg: #e5f5f8;
    border-color: #dbeaed;
}
body[class] .role-permission-form .table tbody tr:nth-child(odd) { background: #f4f6f7 !important; }
body[class] .role-permission-form .table tbody tr:nth-child(even) { background: #FFFFFF !important; }
body[class] .role-permission-form .table tbody tr > td {
    background-color: inherit !important;
    color: #1f3b41 !important;
    border-bottom-color: #dbeaed;
}
body[class] .role-permission-form .table tbody tr:hover { background: #e5f5f8 !important; }
body[class] .role-permission-form .table :is(label, .custom-control-label) { color: #1f3b41; }

/* Loading surfaces must use the same palette before page content appears. */
html { background-color: #f4f6f7; }
body[class] .loader-bg { background: #f4f6f7 !important; }
body[class] .loader-track { background: #e5f5f8 !important; }
body[class] .loader-fill { background: #007f96 !important; }
body[class] .loader-fill::after { background: #bcebf2 !important; }

/* Locally rendered SVG navigation icons replace the old icon font. */
body .gotbl-sidebar .erp-menu-icon {
    width: 22px; height: 22px; flex: 0 0 22px; color: inherit !important;
}
body .gotbl-sidebar :is(.gotbl-sidebar__submenu, .gotbl-sidebar__nested-submenu) .erp-menu-icon {
    width: 19px; height: 19px; flex-basis: 19px;
}
body .gotbl-sidebar .erp-menu-chevron {
    width: 14px; height: 14px; flex-basis: 14px; margin-left: auto;
}
#report-drawer .report-drawer-links .erp-menu-icon {
    width: 20px; height: 20px; flex: 0 0 20px; color: #007f96;
    padding: 5px; box-sizing: content-box; background: #e5f5f8; border-radius: 8px;
}
body .gotbl-sidebar.collapsed .erp-menu-chevron { display: none; }

body .gotbl-header__greeting {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px 10px;
    color: #007f96;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    min-width: 0;
    overflow-wrap: anywhere;
}
body .gotbl-header__greeting-separator { color: #6dacb8; }
@media (max-width: 575.98px) {
    body .gotbl-header__greeting { justify-content: flex-start; }
}

/* Command-style global menu search, with names and module context only. */
body[class] .gotbl-header .gotbl-header__search {
    min-height: 38px;
    border-radius: 14px;
    background: linear-gradient(#FFFFFF, #fcfdfd) !important;
    border: 1px solid #cce2e6 !important;
    box-shadow: 0 2px 8px rgba(34, 106, 121,.05);
    padding-inline: 14px;
    gap: 10px;
}
body[class] .gotbl-header .gotbl-header__search:focus-within {
    border-color: #6dacb8 !important;
    box-shadow: 0 0 0 3px #e5f5f8, 0 4px 16px rgba(34, 106, 121,.08);
}
body[class] .gotbl-header .gotbl-header__search input {
    margin: 0;
    min-width: 0;
    flex: 1;
    font-size: 13px;
}
body .erp-search-suggest {
    box-sizing: border-box;
    margin-top: 10px;
    padding: 6px;
    border: 1px solid #dbeaed;
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: 0 12px 32px rgba(31, 59, 65,.16);
    max-height: min(360px, 55dvh);
    overflow-y: auto;
}
body .erp-search-suggest li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    color: #007f96;
}
body .erp-search-suggest li:is(:hover, .is-active) {
    background: #e5f5f8;
    box-shadow: inset 3px 0 #bcebf2;
}
body .erp-search-suggest .suggest-main { min-width: 0; flex: 1; gap: 3px; }
body .erp-search-suggest .suggest-label { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
body .erp-search-suggest .suggest-path { font-size: 11px; color: #4e94a2; white-space: normal; }
body .erp-search-suggest .suggest-open { color: #6dacb8; font-size: 18px; margin-left: auto; }
body .erp-search-suggest mark { background: #FFF3CC; color: #007f96; border-radius: 3px; }

/* Compact global search suggestions. */
body header #erp-search-suggest {
    padding: 4px;
    margin-top: 6px;
    border-radius: 10px;
    max-height: min(260px, 45dvh);
}
body header #erp-search-suggest li {
    padding: 6px 8px;
    gap: 8px;
    border-radius: 6px;
    line-height: 1.4;
    min-height: 0;
}
body header #erp-search-suggest .suggest-label { font-size: 12px; }
body header #erp-search-suggest .suggest-path { font-size: 10px; }
body header #erp-search-suggest .suggest-main { gap: 1px; }
body header #erp-search-suggest :is(li > i, .suggest-open) { font-size: 14px; }
body header #erp-search-suggest .erp-search-no-result {
    justify-content: center;
    min-height: 48px;
    color: #68858b;
    background: #f7fbfc;
    cursor: default;
    pointer-events: none;
}
body header #erp-search-suggest .erp-search-no-result > i { color: #af003d; }

/* Settings control and standalone actions have their own spacing. */
body .gotbl-header .header-settings-icon { width: 22px; height: 22px; color: #007f96; }
body .gotbl-header__plan-expiry {
    position: absolute; z-index: 2; left: 50%; top: 50%;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    max-width: 460px; transform: translate(-50%, -50%);
    color: #315d66; font-size: 12px; font-weight: 500; white-space: nowrap;
}
body .gotbl-header__plan-expiry.is-expired {
    min-height: 46px;
    padding: 5px 7px 5px 16px;
    border: 1px solid #9ed5df;
    border-radius: 14px;
    background: #fff;
    color: #007f96;
    font-weight: 600;
    box-shadow: 0 7px 20px rgba(0,127,150,.2), 0 2px 5px rgba(34,106,121,.1);
}
body .gotbl-header__plan-expiry.is-expired::before {
    content: '';
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #00a2be;
    box-shadow: 0 0 0 4px #e0f4f7;
}
body .gotbl-header__plan-button,
body .topbar-plan-select {
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #007f96; border-radius: 9px;
    background: #007f96; color: #fff; font-weight: 600; text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,127,150,.18);
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
body .gotbl-header__plan-button {
    gap: 6px;
    min-width: 104px;
    min-height: 32px;
    padding: 5px 11px;
    border-color: #ff02b5;
    border-radius: 9px;
    background: #ff02b5;
    font-size: 12px;
    line-height: 1;
}
body .gotbl-header__plan-button svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body .gotbl-header__plan-button span { color: #fff; line-height: 1; }
body .gotbl-header__plan-expiry.is-expired .gotbl-header__plan-button {
    min-height: 32px;
    padding-inline: 11px;
    border-color: #ff02b5;
    background: #ff02b5;
    box-shadow: none;
}
body .gotbl-header__plan-button { box-shadow: none; }
body .gotbl-header__plan-button:hover { background: #d9009a; border-color: #d9009a; color: #fff; box-shadow: none; transform: none; }
body .topbar-plan-select:hover { background: #006b7f; border-color: #006b7f; color: #fff; box-shadow: 0 6px 16px rgba(0,127,150,.24); transform: translateY(-1px); }
body .gotbl-header__plan-button:focus-visible { outline: 3px solid rgba(255,2,181,.22); outline-offset: 2px; }
body .topbar-plan-select:focus-visible { outline: 3px solid rgba(0,127,150,.2); outline-offset: 2px; }
/* Give the package action its own flex space beside search controls. */
body .gotbl-header .gotbl-header__plan-expiry,
body .gotbl-header .gotbl-header__plan-expiry.is-expired {
    position:static;
    inset:auto;
    flex:0 0 auto;
    width:auto;
    height:auto;
    min-height:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
    transform:none;
    overflow:visible;
}
body .gotbl-header .gotbl-header__plan-expiry::before,
body .gotbl-header .gotbl-header__plan-expiry.is-expired::before {
    content:none;
}
body .gotbl-header .gotbl-header__plan-expiry > span {
    display:block;
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip-path:inset(50%);
    white-space:nowrap;
}
body .gotbl-header .gotbl-header__plan-expiry .gotbl-header__plan-button {
    position:relative;
    inset:auto;
    min-width:0;
    min-height:28px;
    padding:5px 9px;
    border:1px solid #FF02B5;
    border-radius:7px;
    background:#FF02B5;
    box-shadow:none;
    color:#fff;
    transform:none;
    font-size:11px;
    font-weight:700;
    text-shadow:none;
    gap:4px;
}
body .gotbl-header .gotbl-header__plan-expiry .gotbl-header__plan-button svg {
    width:13px;
    height:13px;
    flex-basis:13px;
}
body .gotbl-header .gotbl-header__plan-expiry .gotbl-header__plan-button:hover {
    background:#db009c;
    border-color:#db009c;
}
body .gotbl-header .gotbl-header__plan-expiry .gotbl-header__plan-button:focus-visible {
    outline:3px solid rgba(255,2,181,.25);
    outline-offset:3px;
}
@media (max-width:750px) {
    body .gotbl-header .gotbl-header__plan-expiry,
    body .gotbl-header .gotbl-header__plan-expiry.is-expired {
        order:1;
        margin-inline:auto;
    }
}
body .topbar-plan-modal .modal-content { overflow: hidden; border: 1px solid #d4e7ea; border-radius: 16px; box-shadow: 0 18px 50px rgba(27,72,81,.18); }
body .topbar-plan-modal .modal-header { padding: 16px 20px; border-bottom-color: #e1edef; background: #f8fbfc; }
body .topbar-plan-modal .modal-header p { margin-top: 3px; color: #68858b; font-size: 12px; }
body .topbar-plan-modal .modal-body { padding: 18px 20px 20px; }
body .topbar-plan-tabs { display: inline-flex; gap: 4px; margin-bottom: 16px; padding: 4px; border: 1px solid #d4e7ea; border-radius: 11px; background: #edf7f9; }
body .topbar-plan-tab { min-height: 36px; padding: 6px 16px; border: 0; border-radius: 8px; background: transparent; color: #37636c; font-weight: 600; }
body .topbar-plan-tab.active { background: #007f96; color: #fff; box-shadow: 0 3px 8px rgba(0,127,150,.18); }
body .topbar-plan-tab span { margin-left: 5px; padding: 2px 6px; border-radius: 999px; background: #af003d; color: #fff; font-size: 10px; }
body .topbar-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
body .topbar-plan-card { display: flex; flex-direction: column; min-height: 210px; padding: 18px; border: 1px solid #d4e7ea; border-radius: 14px; background: #fff; box-shadow: 0 5px 16px rgba(25,78,88,.07); }
body .topbar-plan-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
body .topbar-plan-card h6 { margin: 0 0 16px; color: #244b53; font-size: 17px; }
body .topbar-plan-current { padding: 3px 7px; border-radius: 999px; background: #e5f5f8; color: #007f96; font-size: 10px; font-weight: 600; white-space: nowrap; }
body .topbar-plan-price { color: #af003d; font-size: 25px; font-weight: 700; }
body .topbar-plan-duration { margin-top: 2px; color: #68858b; font-size: 12px; }
body .topbar-plan-benefits { display:grid; gap:6px; margin:12px 0 4px; padding:0; list-style:none; color:#3a6e79; font-size:12px; }
body .topbar-plan-benefits li { display:flex; align-items:flex-start; gap:6px; }
body .topbar-plan-benefits i { flex:0 0 auto; margin-top:2px; color:#007f96; font-size:15px; }
body .topbar-plan-select { align-self: flex-end; min-height: 36px; margin-top: auto; padding: 7px 14px; font-size: 12px; }
body .topbar-plan-select--disabled,
body .topbar-plan-select--disabled:hover { border-color: #c9dadd; background: #edf3f4; color: #68858b; box-shadow: none; transform: none; cursor: default; }
body .topbar-plan-empty { padding: 28px 16px; border: 1px dashed #bddce2; border-radius: 12px; background: #f7fbfc; color: #68858b; text-align: center; }
@media (max-width: 1500px) { body .gotbl-header__plan-expiry:not(.is-expired) > span { display: none; } }
@media (max-width: 1100px) { body .gotbl-header__plan-expiry.is-expired > span { display: none; } }
@media (max-width: 767px) {
    body .gotbl-header__plan-button { padding-inline: 10px; }
    body .topbar-plan-tabs { display: flex; width: 100%; }
    body .topbar-plan-tab { flex: 1; padding-inline: 8px; }
    body .topbar-plan-grid { grid-template-columns: 1fr; }
}
body[class] .gotbl-header .header-settings-menu > .gotbl-header__action {
    width: 40px;
    height: 36px;
    padding: 7px;
    flex-shrink: 0;
    border-radius: 10px;
}
body .dash-content > .standalone-page-actions {
    padding-top: 16px;
    padding-bottom: 2px;
    gap: 10px;
    flex-wrap: wrap;
}
body .standalone-page-actions > .btn {
    min-height: 32px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 20px;
}

/* Compact editable zoom control. */
body .gotbl-footer__zoom-scale {
    gap: 6px;
    padding: 3px 6px;
    border: 1px solid #dbeaed;
    border-radius: 10px;
    background: #FFFFFF;
}
body .gotbl-footer__zoom-btn {
    width: 24px;
    height: 24px;
    border-radius: 7px;
}
body .gotbl-footer .zoom-number-control {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0 6px;
    border: 1px solid #cce2e6;
    border-radius: 6px;
    background: #f4f6f7;
    color: #007f96;
    height: 26px;
}
body .gotbl-footer #zoomValue {
    width: 38px;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #007f96;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    appearance: textfield;
    -moz-appearance: textfield;
}
body .gotbl-footer #zoomValue::-webkit-inner-spin-button,
body .gotbl-footer #zoomValue::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
body .zoom-number-control:focus-within { outline: 2px solid #bcebf2; outline-offset: 1px; }

/* Fine-line navigation icons: smaller artwork without filled badges. */
body .gotbl-sidebar .erp-menu-icon {
    width: 19px; height: 19px; flex: 0 0 19px; stroke-width: 1.35;
}
body .gotbl-sidebar .gotbl-sidebar__menu > .gotbl-sidebar__item > a > .erp-menu-icon {
    stroke-width: 1;
}
body .gotbl-sidebar:not(.collapsed) .gotbl-sidebar__menu > .gotbl-sidebar__item > a {
    gap: 10px !important;
}
body .gotbl-sidebar :is(.gotbl-sidebar__submenu, .gotbl-sidebar__nested-submenu) .erp-menu-icon {
    width: 17px; height: 17px; flex-basis: 17px;
}
body .gotbl-sidebar .erp-menu-chevron {
    width: 12px; height: 12px; flex-basis: 12px;
}
#report-drawer .report-drawer-links .erp-menu-icon {
    width: 17px; height: 17px; flex: 0 0 17px;
    padding: 0; background: transparent; border-radius: 0; stroke-width: 1.35;
}

/* Compact dashboard with actionable follow-ups. */
body .erp-dashboard .dashboard-summary-card .card-body { padding: 12px !important; }
body .erp-dashboard .dashboard-summary-card .card-body > .d-flex { margin-bottom: 0 !important; }
body .erp-dashboard .dashboard-summary-card .card-body { display: flex; flex-direction: column; justify-content: center; }
body .erp-dashboard .dashboard-summary-card .card-body > .card-amount { margin-top: 8px !important; }
body .erp-dashboard .dashboard-bills-info-card .card-body { padding: 12px 14px !important; }
body .erp-dashboard .dashboard-follow-ups { margin: 0 0 16px; padding: 14px; border: 1px solid #dbeaed; border-radius: 12px; box-shadow: none; }
body .dashboard-follow-ups h5 { font-size: 14px; color: #007f96; margin-bottom: 10px; }
body .dashboard-follow-up-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 8px; }
body .dashboard-follow-up-grid a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px; background: #f4f6f7; border-radius: 8px; color: #007f96; font-size: 12px; }
body .dashboard-follow-up-grid a:hover { background: #e5f5f8; }
body .dashboard-follow-up-grid a:focus-visible { outline: 2px solid #bcebf2; outline-offset: 2px; }
body .dashboard-follow-up-grid strong { white-space: nowrap; font-size: 16px; }
body .dashboard-follow-up-grid span small { display: block; margin-top: 3px; }
body .dashboard-follow-ups small, body .dashboard-chart-note { color: #4c909d; font-size: 11px; }
body #purchaseSalesEmpty { padding: 65px 16px; text-align: center; color: #4c909d; font-size: 13px; }
body #dashboard-summary-error { padding: 12px; color: #A02C46; background: #FFF1F4; border-radius: 8px; }
@media (max-width: 480px) { body .dashboard-follow-up-grid { grid-template-columns: 1fr; } }
body .erp-dashboard :is(.dashboard-summary-card, .dashboard-bills-info-card) { position: relative; }
body .erp-dashboard :is(.dashboard-summary-card, .dashboard-bills-info-card):has(.dashboard-card-link) .card-body { padding-bottom: 30px !important; }
body .dashboard-card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; color: #4c909d; }
body .dashboard-card-link span { position: absolute; right: 12px; bottom: 8px; font-size: 11px; }
body .dashboard-card-link:hover { background: rgba(34, 106, 121,.025); color: #007f96; }
body .dashboard-card-link:focus-visible { outline: 2px solid #bcebf2; outline-offset: 2px; }
body .erp-dashboard .dashboard-period-select { position: relative; z-index: 2; max-width: 150px; font-size: 12px; padding: 5px 8px; color: #007f96; background: #f4f6f7; border: 1px solid #cce2e6; border-radius: 7px; }
body .dashboard-chart-card .card-body > .d-flex { flex-wrap: wrap; gap: 10px; }
body #purchaseSalesEmpty { position: relative; min-height: 200px; padding: 42px 16px; overflow: hidden; border-radius: 10px; background: #f9fbfc; }
body .dashboard-empty-art { position: absolute; inset: 0; width: 100%; height: 100%; color: #007f96; opacity: .09; pointer-events: none; }
body .dashboard-empty-content { position: relative; }
body .dashboard-empty-content strong { color: #007f96; font-size: 14px; }
body .dashboard-empty-content p { margin: 8px 0 14px; font-size: 12px; }
body .dashboard-empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
body .dashboard-transaction-link { padding: 7px 14px; border-radius: 8px; background: #007f96; color: white; font-size: 12px; }
body .dashboard-transaction-sales { background: #bcebf2; color: #1f3b41; }
body .dashboard-transaction-link:hover { filter: brightness(.94); color: white; }
body .dashboard-transaction-sales:hover { color: #1f3b41; }
body .dashboard-transaction-link:focus-visible { outline: 2px solid #007f96; outline-offset: 3px; }
body .outstanding-total { display: block; margin: 8px 0; font-size: 23px; }
body .outstanding-detail { font-size: 11px; color: #007f96; }
body .outstanding-detail:focus-visible { outline: 2px solid #bcebf2; outline-offset: 3px; }
body .outstanding-empty { position: relative; min-height: 240px; display: grid; place-items: center; border-radius: 10px; background: #f9fbfc; margin-bottom: 10px; }
body .outstanding-empty svg { position: absolute; width: 85%; height: 150px; color: #007f96; opacity: .08; }
body .outstanding-empty span { position: relative; color: #4c909d; font-size: 12px; }

/* Priority work panel at the beginning of the dashboard. */
body .erp-dashboard .dashboard-follow-ups {
    padding: 14px;
    border: 1px solid #c8e4ea;
    border-top: 0;
    background: #fcfdfd;
    box-shadow: 0 3px 12px rgba(34, 106, 121, .08);
    overflow: hidden;
}
body .dashboard-follow-up-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: -14px -14px 14px;
    padding: 12px 14px;
    background: #AF003D;
    border-left: 4px solid #900032;
    color: #FFFFFF;
}
body .dashboard-follow-up-heading h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #FFFFFF;
    font-size: 15px;
}
body .dashboard-follow-up-heading svg { width: 18px; height: 18px; flex: 0 0 18px; color: #FFCF50; }
body .dashboard-follow-up-heading > span { color: #FFFFFF; font-size: 11px; }
body .dashboard-follow-up-grid a { background: #FFFFFF; border: 1px solid #dbeaed; }
body .dashboard-follow-up-grid a.has-pending-items { border-left: 3px solid #bcebf2; }
body .dashboard-follow-up-grid a.has-pending-items strong { color: #007f96; background: #FFF3CC; padding: 3px 7px; border-radius: 6px; }

/* Soft summary surfaces with decorative line artwork. */
body .erp-dashboard :is(.dashboard-summary-card, .dashboard-bills-info-card) {
    --dashboard-art-color: #5199a7;
    border: 1px solid #e0edf0;
    border-top: 1px solid #e0edf0;
    background: linear-gradient(120deg, #FFFFFF 45%, #f5f8f9 100%);
    box-shadow: 0 2px 7px rgba(34, 106, 121, .025);
}
body .erp-dashboard :is(.dashboard-summary-card, .dashboard-bills-info-card):has(.icon-sales, .icon-cum-sales) {
    --dashboard-art-color: #B88C36;
    border-color: #EEE6D7;
    background: linear-gradient(120deg, #FFFFFF 45%, #FFFAEF 100%);
}
body .erp-dashboard .dashboard-card-art {
    position: absolute;
    right: 6px;
    bottom: 24px;
    width: 120px;
    height: 100px;
    max-width: 40%;
    color: var(--dashboard-art-color);
    opacity: .13;
    pointer-events: none;
}
body .erp-dashboard :is(.dashboard-summary-card, .dashboard-bills-info-card) .card-body {
    position: relative;
}
body .erp-dashboard :is(.icon-purchase, .icon-cum-purchase) { background: #edf3f4; color: #5199a7; }
body .erp-dashboard :is(.icon-sales, .icon-cum-sales) { background: #FFF5DF; color: #967129; }
body .erp-dashboard .dashboard-bills-info-card .bill-count-badge {
    background: #edf3f4 !important;
    color: #498b98 !important;
}
body .erp-dashboard .dashboard-bills-info-card:has(.icon-sales) .bill-count-badge {
    background: #FFF5DF !important;
    color: #866722 !important;
}
body .erp-dashboard .dashboard-card-link:hover { background: rgba(81, 153, 167, .015); }

/* Period controls fit their card and retain room for the native arrow. */
body .erp-dashboard .dashboard-period-select {
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    min-width: 0;
    flex: 0 1 auto;
    height: 30px;
    min-height: 30px;
    padding: 3px 28px 3px 10px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 8px;
}
body .erp-dashboard .dashboard-summary-card .card-body > .d-flex:has(> .dashboard-period-select) {
    align-items: center !important;
    flex-wrap: nowrap !important;
    flex-direction: row;
    gap: 8px !important;
}
body .erp-dashboard .dashboard-summary-card .card-body > .d-flex:has(> .dashboard-period-select) > .d-flex {
    flex: 0 0 auto;
    min-width: max-content;
    gap: 8px !important;
}
body .erp-dashboard .dashboard-period-select:focus-visible {
    outline: 2px solid #b8d9df;
    outline-offset: 2px;
    border-color: #71aeba;
}
body .erp-dashboard .dashboard-summary-card .dashboard-period-select {
    flex: 0 0 auto;
    width: auto;
    padding-left: 8px;
    padding-right: 22px;
    font-size: 11px;
}
body .erp-dashboard .dashboard-summary-card:has(.dashboard-period-select) .card-label {
    white-space: nowrap;
    font-size: 12px;
}
body .erp-dashboard .dashboard-summary-card:has(.dashboard-period-select) .card-icon {
    width: 28px;
    height: 28px;
    font-size: 16px;
}
@media (max-width: 767px) {
    body .erp-dashboard .row > div:has(> .dashboard-summary-card .dashboard-period-select) {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }
}

/* Size cards from available content width, including sidebar and application zoom. */
body .erp-dashboard .dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
    gap: 10px;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
}
body .erp-dashboard .dashboard-summary-grid > div {
    margin-top: 0 !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    padding: 0;
    margin-bottom: 0 !important;
}
body .erp-dashboard .dashboard-summary-card .card-body > .d-flex:has(> .dashboard-period-select) {
    display: grid !important;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 10px !important;
}
body .erp-dashboard .dashboard-summary-card .dashboard-period-select {
    width: 130px !important;
    max-width: 100% !important;
    min-width: 0 !important;
    justify-self: end;
}

/* Full-value aging breakdown: numbers never depend on chart axis space. */
body .outstanding-breakdown { margin: 8px 0 12px; border: 1px solid #e5f5f8; border-radius: 10px; overflow: hidden; }
body .outstanding-breakdown-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 5px 16px; padding: 9px 12px; background: #FFFFFF; }
body .outstanding-breakdown-row + .outstanding-breakdown-row { border-top: 1px solid #edf2f3; }
body .outstanding-breakdown-row:nth-child(even) { background: #f9fbfc; }
body .outstanding-bucket-label { display: flex; align-items: center; gap: 8px; color: #417b87; font-size: 12px; }
body .outstanding-breakdown-row strong { margin-left: auto; color: #007f96; font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
body .outstanding-swatch { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 3px; }
body .outstanding-swatch-0 { background: #92c1cb; }
body .outstanding-swatch-1 { background: #FFCD64; }
body .outstanding-swatch-2 { background: #D99B44; }
body .outstanding-swatch-3 { background: #62a6b4; }
body .outstanding-swatch-4 { background: #007f96; }
body .outstanding-swatch-5 { background: #a1cad2; }
body .dashboard-outstanding-row .outstanding-total { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* All six metrics share one responsive grid. */
body .erp-dashboard .dashboard-summary-grid { grid-auto-rows: 1fr; }
body .erp-dashboard .dashboard-summary-grid .dashboard-bills-info-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 12px 30px !important;
}
body .erp-dashboard .dashboard-summary-grid .dashboard-bills-info-card .card-body > .d-flex { gap: 10px !important; }
body .erp-dashboard .dashboard-summary-grid .dashboard-bills-info-card .flex-grow-1 { min-width: 0; }
body .erp-dashboard .dashboard-summary-grid .dashboard-bills-info-card .flex-grow-1 > .d-flex {
    flex-wrap: wrap;
    gap: 6px 8px;
}
body .erp-dashboard .dashboard-summary-grid .bill-label { font-size: 12px; line-height: 1.5; }
body .erp-dashboard .dashboard-summary-grid .bill-count-badge { white-space: nowrap; }
body .erp-dashboard .dashboard-summary-grid .dashboard-card-art { bottom: 28px; height: 85px; }

body .erp-dashboard .dashboard-follow-ups { margin-bottom: 10px !important; }

/* Compact topbar navigation group. */
body[class] .gotbl-header { padding-left: 10px !important; gap: 8px; }
body[class] .gotbl-header .gotbl-header__center { gap: 8px; }
body[class] .gotbl-header .gotbl-header__nav-buttons {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border: 1px solid #dbeaed;
    border-radius: 10px;
    background: #f0f4f5;
}
body[class] .gotbl-header .gotbl-header__nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #44828e;
}
body[class] .gotbl-header .gotbl-header__nav-btn i { font-size: 17px; line-height: 1; color: inherit !important; }
body[class] .gotbl-header .gotbl-header__nav-btn:hover { background: #FFFFFF !important; opacity: 1; }
body[class] .gotbl-header .gotbl-header__nav-btn:focus-visible { outline: 2px solid #71aeba; outline-offset: 1px; }

/* Print designer controls; document artwork retains its saved colors. */
body .print-designer-page .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 32px; padding: 6px 11px; border-radius: 8px !important;
    font-size: 12px; line-height: 1.4;
}
body .print-designer-page .btn i { font-size: 16px; flex-shrink: 0; }
body .print-designer-page :is(.card-header, .container-fluid > .d-flex, .card-header > .d-flex) { flex-wrap: wrap; gap: 8px; }
body .print-designer-page > .d-flex { flex-wrap: wrap; gap: 12px; }
body .print-designer-page > .d-flex > .d-flex { flex-wrap: wrap; }
body .print-designer-page :is(.btn-outline-success, .btn-outline-secondary, .btn-outline-primary) {
    color: #43808c !important; border: 1px solid #cce2e6 !important; background: #f6f9f9 !important;
}
body .print-designer-page .btn-primary { color: #FFFFFF !important; background: #007f96 !important; border-color: #007f96 !important; }
body .print-designer-page .btn-outline-success { background: #FFF5DF !important; color: #80601F !important; border-color: #EAD8AA !important; }
body .print-designer-page .btn-outline-danger { background: #FFF3F5 !important; color: #A13B55 !important; border-color: #EBCDD5 !important; }
body .print-designer-page .btn:hover:not(:disabled) { filter: brightness(.96); }
body .print-designer-page .btn:focus-visible { outline: 2px solid #83b9c4; outline-offset: 2px; }
body .print-designer-page .btn:disabled { opacity: .55; }
body .print-designer-page #field_library_tabs .nav-link {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    color: #43808c !important; border: 1px solid #d3e8ec !important;
    background: #f6f9f9 !important; border-radius: 7px; font-size: 11px; min-height: 29px;
}
body .print-designer-page #field_library_tabs .nav-link.active { background: #eaf1f2 !important; color: #007f96 !important; border-color: #83b9c4 !important; }
body .print-designer-page .alert-info, body .print-designer-page .alert-success { background: #eef4f5 !important; border-color: #d3e9ed !important; color: #43808c !important; }
body .print-designer-page .field-item { border: 1px solid #e0edf0; border-radius: 9px; }
body .print-designer-page .field-item:hover { background: #f6f9f9; border-color: #a3cad2; }

/* Print template listing and preset dialog. */
body .print-template-page > .d-flex { flex-wrap: wrap; gap: 12px; }
body .print-template-page > .d-flex > .d-flex { flex-wrap: wrap; }
body .print-template-page h3 { font-size: 22px; color: #007f96; }
body .print-template-page .card { border: 1px solid #dbeaed; border-radius: 12px; box-shadow: 0 2px 8px rgba(34, 106, 121,.03); }
body .print-template-page .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; line-height: 1.4; min-height: 32px; padding: 6px 11px; border-radius: 8px !important; white-space: nowrap; }
body .print-template-page .btn i { font-size: 16px; }
body .print-template-page :is(.btn-outline-primary, .btn-outline-secondary, .btn-outline-dark) { background: #f6f9f9 !important; color: #43808c !important; border: 1px solid #cce2e6 !important; }
body .print-template-page .btn-primary { background: #007f96 !important; color: #FFFFFF !important; border-color: #007f96 !important; }
body .print-template-page .btn-outline-success { background: #FFF5DF !important; color: #80601F !important; border-color: #EAD8AA !important; }
body .print-template-page .btn:hover { filter: brightness(.96); }
body .print-template-page .btn:focus-visible { outline: 2px solid #83b9c4; outline-offset: 2px; }
body .print-template-page .badge { border-radius: 6px; padding: 5px 8px; font-weight: 500; font-size: 11px; }
body .print-template-page :is(.badge.bg-primary, .badge.bg-info, .badge.bg-secondary) { background: #e5f5f8 !important; color: #43808c !important; }
body .print-template-page :is(.badge.bg-success, .badge.bg-warning) { background: #FFF3D6 !important; color: #80601F !important; }
body .print-template-page .badge.bg-dark { background: #edf0f1 !important; color: #4a8d9a !important; }
body .print-template-page .alert-success { background: #eef4f5 !important; color: #43808c !important; border-color: #d3e9ed !important; }
body .print-template-page .form-check-input:checked { background-color: #519aa9 !important; border-color: #519aa9 !important; }
body .print-template-page .modal-content { border: 1px solid #dbeaed; border-radius: 12px; }
body .print-template-page .modal-header { background: #f6f9f9; color: #007f96; }
body .print-template-page .print-template-actions { gap: 6px; }
body .print-template-page form.row[method="GET"] { display: flex; flex-wrap: nowrap; gap: 10px; margin: 0; overflow-x: auto; padding-bottom: 4px; }
body .print-template-page form.row[method="GET"] > div { flex: 1 0 150px; width: auto; padding: 0; margin: 0; }
body .print-template-page form.row[method="GET"] > div:last-child { flex: 0 0 auto; }
body .print-template-page .print-template-filter-actions { flex-wrap: nowrap; }

/* Keep table row actions together; responsive table wrappers handle overflow. */
@media screen {
    body #appvue table td:has(.action-btn),
    body #appvue table td:has(.print-template-actions),
    body #appvue table td:has(> .btn),
    body #appvue table td:has(> form > .btn),
    body #appvue table td:has(> .d-flex > .btn),
    body #appvue table td:has(> .d-flex > form > .btn) {
        white-space: nowrap;
        width: 1%;
    }
    body #appvue table td :is(.print-template-actions, .d-flex:has(> .btn), .d-flex:has(> .action-btn), .d-flex:has(> form > .btn)) {
        display: flex;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 6px;
        width: max-content;
        min-width: max-content;
    }
    body #appvue table td .print-template-actions { margin-left: auto; }
    body #appvue table td :is(.print-template-actions, .d-flex:has(> .btn), .d-flex:has(> .action-btn), .d-flex:has(> form > .btn)) > * {
        flex-shrink: 0;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    body #appvue table td .btn { white-space: nowrap; }
    body #appvue table td .print-template-actions form { align-self: center; }
}

body .dashboard-follow-up-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body .dashboard-follow-up-grid a { min-width: 0; }
body .dashboard-follow-up-grid a > span { min-width: 0; overflow-wrap: anywhere; }
body .dashboard-follow-up-grid a.follow-up-draft { border-left: 3px solid #9cc7cf; }
body .dashboard-follow-up-grid a.follow-up-draft strong { background: #e5f5f8; color: #43808c; }
body .dashboard-follow-up-grid a.follow-up-overdue { border-left: 3px solid #E5A064; }
body .dashboard-follow-up-grid a.follow-up-overdue strong { background: #FFF0E3; color: #96531F; }
body .dashboard-follow-up-grid a.follow-up-upcoming { border-left: 3px solid #EAC463; }
body .dashboard-follow-up-grid a.follow-up-upcoming strong { background: #FFF5DA; color: #80601F; }
@media (max-width: 1000px) { body .dashboard-follow-up-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { body .dashboard-follow-up-grid { grid-template-columns: 1fr; } }

/* Readable quotation detail and explicit action contrast. */
body .quotation-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body .quotation-detail-actions .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 7px 12px; min-height: 34px; border-radius: 8px !important;
    font-size: 13px; line-height: 1.4; font-weight: 600;
}
body .quotation-detail-actions :is(.btn-dark, .btn-primary) { color: #FFFFFF !important; background: #007f96 !important; border: 1px solid #007f96 !important; }
body .quotation-detail-actions :is(.btn-info, .btn-secondary) { color: #007f96 !important; background: #edf3f4 !important; border: 1px solid #cce2e6 !important; }
body .quotation-detail-actions .btn > :is(i, svg, span) { color: inherit !important; }
body .quotation-detail-actions .btn:is(:disabled, .disabled) {
    opacity: 1 !important; background: #edf0f1 !important; color: #4a8d9a !important;
    border-color: #c8e0e5 !important; box-shadow: none; cursor: not-allowed;
}
body .quotation-detail-actions .btn:hover:not(:disabled):not(.disabled) { filter: brightness(.95); }
body .quotation-detail-actions .btn:focus-visible { outline: 2px solid #71aeba; outline-offset: 3px; }
body .quotation-detail-card { border: 1px solid #dbeaed; border-radius: 12px; }
body .quotation-detail-card > .card-header { padding: 12px 16px; background: #f6f9f9; border-bottom: 1px solid #dbeaed; border-radius: 12px 12px 0 0; }
body .quotation-detail-card > .card-header h5 { color: #007f96; font-size: 16px; }
body .quotation-detail-card > .card-body { padding: 16px; }
body .quotation-detail-card h6 { color: #007f96; font-size: 14px; font-weight: 600; padding: 0 0 9px; margin: 0 0 6px; border-bottom: 1px solid #e0edf0; }
body .quotation-detail-card .table-borderless { table-layout: auto; width: 100%; margin-bottom: 12px; }
body .quotation-detail-card .table-borderless td {
    padding: 8px 10px !important; font-size: 13px; line-height: 1.6;
    vertical-align: top; white-space: normal; overflow-wrap: anywhere;
    color: #1f3b41; background: transparent !important; box-shadow: none !important;
}
body .quotation-detail-card .table-borderless td:first-child { width: 35%; color: #417b87; }
body .quotation-detail-card .table-borderless td strong { font-weight: 500; }
body .quotation-detail-card .table-borderless tr:nth-child(even) { background: #f9fbfc; }
@media (max-width: 575px) {
    body .quotation-detail-card .table-borderless td { padding: 7px 6px !important; }
    body .quotation-detail-card .table-borderless td:first-child { width: 40%; }
}

/* Shared search/filter controls, including report and modal filters. */
@media screen {
    body :is(.erp-search-form, .erp-filter-toolbar, .erp-server-table-toolbar, form[method="GET" i]) :is(input.form-control, select.form-control, .form-select, .choices__inner, .select2-selection--single),
    body :is(.dataTables_filter, .dt-search, .datatable-search, .dataTable-search) input {
        border: 1px solid #cce2e6 !important;
        border-radius: 9px !important;
        background-color: #fdfdfd !important;
        color: #305b63 !important;
        font-size: 13px;
        min-height: 34px !important;
        box-sizing: border-box;
        transition: border-color .15s ease, box-shadow .15s ease;
    }
    body :is(.erp-search-form, .erp-filter-toolbar, .erp-server-table-toolbar, form[method="GET" i]) :is(input, select):focus,
    body :is(.dataTables_filter, .dt-search, .datatable-search, .dataTable-search) input:focus {
        border-color: #71aeba !important;
        box-shadow: 0 0 0 3px rgba(76, 144, 157,.12) !important;
        outline: none;
    }
    body :is(.erp-search-form, .erp-filter-toolbar, .erp-server-table-toolbar, form[method="GET" i]) input::placeholder {
        color: #61a5b3; opacity: 1;
    }
    body :is(#appvue, .modal) input:is(.date-picker, .datepicker, .flatpickr-input, [type="date"], [type="datetime-local"]) {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23008BA5' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18M8 15h2M14 15h2M8 18h2'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: 10px center !important;
        background-size: 17px 17px !important;
        padding-left: 35px !important;
        border: 1px solid #cce2e6;
        border-radius: 9px;
        min-height: 34px;
        color: #305b63;
        background-color: #fdfdfd;
    }
    /* Native calendar remains clickable at the right; decoration sits at the left. */
    body :is(#appvue, .modal) input:is([type="date"], [type="datetime-local"])::-webkit-calendar-picker-indicator { opacity: .65; cursor: pointer; }
    body :is(#appvue, .modal) input:is(.date-picker, .datepicker, .flatpickr-input):focus {
        border-color: #71aeba !important;
        box-shadow: 0 0 0 3px rgba(76, 144, 157,.12) !important;
    }
    body :is(.erp-search-form, .erp-filter-toolbar, form[method="GET" i]) :is(input, select):disabled {
        background-color: #edf2f3 !important; color: #59a1af !important; cursor: not-allowed;
    }
    body .flatpickr-calendar { border: 1px solid #dbeaed; border-radius: 12px; box-shadow: 0 8px 24px rgba(34, 106, 121,.12); }
    body .flatpickr-day:is(.selected, .startRange, .endRange),
    body .flatpickr-day:is(.selected, .startRange, .endRange):hover { background: #007f96; border-color: #007f96; color: #FFF; }
    body .flatpickr-day.today { border-color: #71aeba; }
}

/* Flatpickr uses the same purple palette as the application. */
@media screen {
    body .flatpickr-calendar { background:#FFF; border:1px solid #cce2e6; border-radius:12px; box-shadow:0 8px 24px rgba(34, 106, 121,.14); }
    body .flatpickr-calendar :is(.flatpickr-months, .flatpickr-month, .flatpickr-weekdays, .flatpickr-weekday, .flatpickr-monthDropdown-months) {
        background:#e5f5f8 !important; color:#007f96 !important; fill:#007f96 !important;
    }
    body .flatpickr-calendar .flatpickr-months { border-radius:11px 11px 0 0; }
    body .flatpickr-calendar :is(.flatpickr-prev-month, .flatpickr-next-month),
    body .flatpickr-calendar :is(.flatpickr-prev-month, .flatpickr-next-month) svg { color:#007f96 !important; fill:#007f96 !important; }
    body .flatpickr-calendar .flatpickr-day { color:#305b63; border-radius:8px; }
    body .flatpickr-calendar .flatpickr-day:hover { background:#e5f5f8; border-color:#cce2e6; }
    body .flatpickr-calendar .flatpickr-day:is(.selected, .startRange, .endRange) { background:#007f96 !important; border-color:#007f96 !important; color:#FFF !important; }
    body .flatpickr-calendar .flatpickr-day:is(.prevMonthDay, .nextMonthDay, .flatpickr-disabled) { color:#9cc7cf; }
    body .flatpickr-calendar.arrowTop::before { border-bottom-color:#cce2e6; }
    body .flatpickr-calendar.arrowTop::after { border-bottom-color:#e5f5f8; }
}

/* Compact calendar on desktop; retain comfortable day targets on touch screens. */
@media screen {
    body .flatpickr-calendar { font-size:12px; }
    body .flatpickr-calendar .flatpickr-current-month { font-size:14px; padding-top:7px; }
    body .flatpickr-calendar .flatpickr-current-month :is(input.cur-year, .flatpickr-monthDropdown-months) { font-size:14px; font-weight:500; }
    body .flatpickr-calendar span.flatpickr-weekday { font-size:11px; font-weight:500; }
    body .flatpickr-calendar .flatpickr-day { font-size:12px; }
}
@media screen and (pointer:fine) {
    body .flatpickr-calendar:not(.multiMonth) { width:266px; }
    body .flatpickr-calendar:not(.multiMonth) :is(.flatpickr-days, .dayContainer) { width:264px; min-width:264px; max-width:264px; }
    body .flatpickr-calendar:not(.multiMonth) .flatpickr-day { max-width:37.7px; height:32px; line-height:32px; }
    body .flatpickr-calendar:not(.multiMonth) .flatpickr-weekdays { height:24px; }
}

/* Logo palette: cyan surfaces, dark cyan readable actions, burgundy accents. */
body {
    --erp-brand-cyan: #00acc4;
    --erp-brand-dark: #008ba5;
    --erp-brand-accent: #af003d;
    --erp-brand-gray: #a5aaad;
}
body .gotbl-sidebar { background: #008ba5 !important; }
body .gotbl-sidebar :is(.gotbl-sidebar__item.active > a, .gotbl-sidebar__submenu li.active > a, .gotbl-sidebar__submenu a.active, .gotbl-sidebar__nested-submenu a.active) {
    box-shadow: inset 4px 0 0 #af003d;
}
body .loader-fill::after { background: #00acc4 !important; }

/* Shared create actions: burgundy background with white labels and icons. */
body[class] .btn:is([data-ui-action="create"], .erp-create-action, .erp-document-create, .asset-action-create) {
    background: #AF003D !important;
    border-color: #AF003D !important;
    color: #FFFFFF !important;
}
body[class] .btn:is([data-ui-action="create"], .erp-create-action, .erp-document-create, .asset-action-create):is(:hover, :active) {
    background: #900032 !important;
    border-color: #900032 !important;
    color: #FFFFFF !important;
}
body[class] .btn:is([data-ui-action="create"], .erp-create-action, .erp-document-create, .asset-action-create) :is(i, svg, span) {
    color: inherit !important;
}
body[class] .btn:is([data-ui-action="create"], .erp-create-action, .erp-document-create, .asset-action-create):focus-visible {
    outline: 2px solid #AF003D;
    outline-offset: 3px;
}

/* Follow-up cards: readable amounts and prominent task counts. */
body .dashboard-follow-up-grid { gap: 14px; margin-bottom: 14px; }
body .dashboard-follow-up-grid a {
    --follow-up-accent: #007f96;
    --follow-up-tint: #eef9fb;
    background: linear-gradient(115deg, #fff 55%, var(--follow-up-tint));
    border: 1px solid #d5e3e7;
    border-left: 5px solid var(--follow-up-accent) !important;
    border-radius: 12px;
    padding: 18px 16px;
    min-height: 112px;
    box-shadow: 0 3px 10px rgba(38, 50, 56, .06);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
body .dashboard-follow-up-grid a.follow-up-overdue {
    --follow-up-accent: #AF003D;
    --follow-up-tint: #fff0f5;
}
body .dashboard-follow-up-grid a.follow-up-upcoming {
    --follow-up-accent: #8a6000;
    --follow-up-tint: #fff8e5;
}
body .dashboard-follow-up-grid a > span { color: #263238; font-size: 14px; font-weight: 600; line-height: 1.55; }
body .dashboard-follow-up-grid a > span small { color: #52616b; font-size: 12px; font-weight: 400; margin-top: 7px; line-height: 1.6; }
body .dashboard-follow-up-grid a strong {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex-shrink: 0; min-width: 70px; min-height: 72px;
    padding: 10px 12px; border-radius: 10px;
    background: var(--follow-up-tint); color: var(--follow-up-accent);
    font-size: 28px; font-weight: 700; line-height: 1.15;
}
body .dashboard-follow-up-grid a.has-pending-items strong {
    background: var(--follow-up-accent); color: #fff; padding: 10px 12px; border-radius: 10px;
}
body .dashboard-follow-up-grid a strong small { color: inherit; font-size: 11px; font-weight: 500; margin-top: 5px; }
body .dashboard-follow-up-grid a:hover { background: var(--follow-up-tint); border-color: var(--follow-up-accent); box-shadow: 0 5px 16px rgba(38, 50, 56, .12); }
body .dashboard-follow-up-grid a:focus-visible { outline: 3px solid var(--follow-up-accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { body .dashboard-follow-up-grid a { transition: none; } }
@media (max-width: 380px) {
    body .dashboard-follow-up-grid a { padding: 14px 10px; gap: 8px; }
    body .dashboard-follow-up-grid a strong { min-width: 56px; font-size: 24px; }
}

/* Shared readable typography on light application surfaces. */
@media screen {
    body {
        --bs-body-color: #263238;
        --bs-secondary-color: #52616b;
        color: #263238;
    }
    body .card-body { color: #263238; }
    body :is(.dash-content, #appvue, .modal, .table-popup) table > thead > tr > :is(th, td),
    body :is(.dash-content, #appvue, .modal, .table-popup) thead :is(.dt-column-title, .dataTable-sorter, .datatable-sorter, .erp-table-sort) {
        color: #164e5b !important;
        font-weight: 700 !important;
    }
    body :is(.dash-content, #appvue, .modal, .table-popup) table > tbody > tr > td {
        color: #263238;
        font-weight: 500;
    }
    body :is(.card-body, .modal-body, .login-panel) :is(.form-label, .col-form-label) {
        color: #263238 !important;
        font-weight: 600 !important;
    }
    body :is(.card-body, .modal-body, .login-panel) :is(input.form-control, textarea.form-control, select.form-control, .form-select) {
        color: #263238 !important;
        font-weight: 500;
    }
    body :is(.card-body, .modal-body, .login-panel) :is(input, textarea)::placeholder {
        color: #626f78 !important;
        opacity: 1 !important;
    }
    body :is(.card-body, .modal-body) :is(.text-muted, .form-text) {
        color: #52616b !important;
    }
}
