.input:not(.login-field-input, [x-ref="spotSearch"]), select:not(#ndp-month-select, #ndp-year-select), textarea{
    /*height: 45px !important;*/
    /*padding-left: 0.5rem;*/
    /*padding-right: 0.5rem;*/
    /*padding-top: 1.2rem;*/
    /*padding: 0 !important;*/
    height: 28px !important;
    border-radius: 3px !important;
    border-width: 1px !important;
    /*font-size: 0.875rem !important;*/
    /*padding: 0.3rem !important;*/
    /*min-width: 100px !important;*/
    font-size: 10px !important;
}

.select {
    min-height: 28px !important;
}

.select:focus, textarea {
    outline-width: 1px !important;
    outline-offset: 0 !important;
}

select:is(#ndp-month-select, #ndp-year-select) {
    border: 1px solid black !important;
    border-radius: 5px !important;
}

/*.account-entry-save .input:not(.custom-input){*/
/*    height: 45px;*/
/*    padding-left: 0.5rem;*/
/*    padding-right: 0.5rem;*/
/*    padding-top: 1.2rem;*/
/*    border-radius: 5px;*/
/*    font-size: 0.875rem;*/
/*}*/
.account-entry-save {
    max-height: 100vh;
    overflow: hidden;
}

.account-entry-save .modal-box {
    min-width: 50rem;
}

.select2 {
    height: 35px !important;
    width: 250px !important;
    /* min-width: 226px !important; */
    /* width: 100%; */
    max-width: 100% !important;
}

.account_ledger .select2 {
    height: 35px !important;
    width: 100% !important;
}


.btn {
    height: 2.5rem !important;
    min-height: 2.5rem !important;
    padding-left: 0.5rem !important;
    padding-right: 1rem !important;
    gap: 0.2rem !important;
}

.height-base {
    height: 2.5rem !important;
}

td .btn, .drawer-side .btn:is(.btn-ghost) {
    height: 2rem !important;
    min-height: 2rem !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    gap: 0.2rem !important;
}

.mega-box .content .row header, .navigation-bar li a {
    font-size: 16px;
}

/* Mega menu section headers (Entry / Reports / etc.) to match sidebar submenu headers */
.mega-box .content .row header {
    display: block;
    color: #047857 !important;
    background: #ecfdf5;
    border-bottom: 1px solid #d1fae5;
    border-radius: 0.375rem 0.375rem 0 0;
    padding: 0.45rem 0.7rem;
    margin-bottom: 0.35rem;
    line-height: 1.15;
}

.dark .mega-box .content .row header {
    color: #a7f3d0 !important;
    background: rgba(5, 150, 105, 0.14);
    border-bottom-color: rgba(52, 211, 153, 0.2);
}

/* Header quick-tools context selectors (FY / Branch): shared look across web + mobile */
.header-tools-panel .header-context-select-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    box-sizing: border-box !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    height: 2.25rem !important;
    border-radius: 0.5rem !important;
    padding-inline: 0.75rem !important;
    border: 1px solid rgb(209 213 219) !important;
    background: #ffffff !important;
    color: rgb(55 65 81) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06) !important;
    line-height: 1.15 !important;
    font-weight: 500 !important;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease !important;
    outline: none !important;
    text-decoration: none !important;
}

.header-tools-panel .header-context-select-btn i {
    flex-shrink: 0;
}

.header-tools-panel .header-context-select-btn > span:last-child {
    min-width: 0;
}

.header-tools-panel .header-context-select-btn:hover {
    background: rgb(249 250 251) !important;
    border-color: rgb(209 213 219) !important;
    color: rgb(31 41 55) !important;
}

.header-tools-panel .header-context-select-btn:focus,
.header-tools-panel .header-context-select-btn:active,
.header-tools-panel .header-context-select-btn:focus-visible {
    outline: none !important;
    border-color: rgb(209 213 219) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06) !important;
}

.header-tools-panel .header-context-select-btn::-moz-focus-inner {
    border: 0 !important;
    padding: 0 !important;
}

.dark .header-tools-panel .header-context-select-btn {
    border-color: rgb(75 85 99) !important;
    background: rgb(31 41 55) !important;
    color: rgb(243 244 246) !important;
}

.dark .header-tools-panel .header-context-select-btn:hover {
    background: rgb(55 65 81) !important;
    border-color: rgb(107 114 128) !important;
    color: rgb(255 255 255) !important;
}

.dark .header-tools-panel .header-context-select-btn:focus,
.dark .header-tools-panel .header-context-select-btn:active,
.dark .header-tools-panel .header-context-select-btn:focus-visible {
    border-color: rgb(75 85 99) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06) !important;
}

@media (min-width: 1200px) {
    .navigation-header .top-header-right {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        min-width: 0 !important;
        gap: 0.3rem !important;
        justify-content: flex-end !important;
    }

    .navigation-header .top-header-right > .header-tools-panel {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: calc(100% - 12rem) !important;
    }

    .navigation-header .top-header-right .header-sms-wallet {
        flex: 0 1 19rem !important;
        max-width: 19rem !important;
        min-width: 0 !important;
        overflow: visible !important;
    }

    .navigation-header .top-header-right .header-sms-wallet-pill {
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
        justify-content: flex-start !important;
        gap: 0.45rem !important;
        padding-inline: 0.65rem !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        outline: none !important;
    }

    .navigation-header .top-header-right .header-sms-wallet-pill:focus,
    .navigation-header .top-header-right .header-sms-wallet-pill:focus-visible,
    .navigation-header .top-header-right .header-sms-wallet-pill[aria-expanded="true"] {
        outline: none !important;
        box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.22) !important;
        border-color: rgba(217, 119, 6, 0.55) !important;
    }

    .navigation-header .top-header-right .header-sms-wallet-pill > span {
        min-width: 0 !important;
        white-space: nowrap !important;
    }

    .navigation-header .top-header-right .header-sms-wallet-pill .header-sms-wallet-amount {
        margin-left: 0.35rem !important;
    }

    .navigation-header .top-header-right .header-sms-wallet-pill .header-sms-wallet-status {
        margin-left: 0.25rem !important;
    }

    .navigation-header .top-header-right .header-sms-wallet-pill .header-sms-wallet-separator {
        opacity: 0.55;
        margin-left: 0.1rem;
        margin-right: 0.05rem;
    }

    .navigation-header .top-header-right .header-sms-wallet-pill > span:last-child {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .header-tools-panel li {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .header-tools-panel .header-tool-fiscal,
    .header-tools-panel .header-tool-branch {
        flex: 1 1 11.5rem !important;
        max-width: 13rem !important;
        min-width: 0 !important;
    }

    .header-tools-panel .header-tool-language,
    .header-tools-panel .header-tool-count-notification,
    .header-tools-panel .header-tool-user-notification,
    .header-tools-panel .header-tool-favorites {
        flex: 0 0 auto !important;
    }

    .header-tools-panel .header-context-select-btn {
        width: 100% !important;
        justify-content: flex-start !important;
        min-width: 0 !important;
    }

    .header-tools-panel .header-context-select-btn > span:last-child,
    .header-tools-panel .header-context-value {
        display: block !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
}

@media (min-width: 1200px) and (max-width: 1600px) {
    .navigation-header .top-header-right .header-sms-wallet {
        flex-basis: 14.75rem !important;
        max-width: 14.75rem !important;
    }

    .navigation-header .top-header-right .header-sms-wallet-pill {
        padding-inline: 0.5rem !important;
        gap: 0.3rem !important;
        font-size: 0.8rem !important;
    }

    .navigation-header .top-header-right .header-sms-wallet-pill > span {
        min-width: 0 !important;
    }

    .navigation-header .top-header-right .header-sms-wallet-pill .header-sms-wallet-status {
        display: none !important;
    }

    .navigation-header .top-header-right .header-sms-wallet-pill .header-sms-wallet-amount {
        max-width: 8rem !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* App-only desktop balancing after adding date chip in header */
@media (min-width: 1200px) {
    .app-layout .navigation-header .top-header-right .header-tools-group {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .app-layout .navigation-header .top-header-right .header-tool-nepali-datetime {
        flex: 0 0 auto !important;
        min-width: 0 !important;
    }

    .app-layout .navigation-header .top-header-right .header-tool-nepali-datetime .np-datetime-dock-toggle {
        max-width: 8rem !important;
    }
}

@media (min-width: 1200px) and (max-width: 1750px) {
    .app-layout .navigation-header .top-header-right .header-sms-wallet {
        flex-basis: 12.5rem !important;
        max-width: 12.5rem !important;
    }

    .app-layout .navigation-header .top-header-right .header-sms-wallet-pill {
        gap: 0.3rem !important;
        padding-inline: 0.5rem !important;
    }

    .app-layout .navigation-header .top-header-right .header-sms-wallet-pill .header-sms-wallet-status {
        display: none !important;
    }

    .app-layout .navigation-header .top-header-right .header-sms-wallet-pill .header-sms-wallet-amount {
        max-width: 6.8rem !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* App-only medium desktop compaction to prevent header control collapse */
@media (min-width: 1200px) and (max-width: 1900px) {
    .app-layout .navigation-header .top-header-left .org-meta {
        display: none !important;
    }

    .app-layout .navigation-header .top-header-left .org-title {
        display: block !important;
        max-width: min(40vw, 34rem) !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .app-layout .navigation-header .top-header-right .header-sms-wallet {
        flex-basis: 10.5rem !important;
        max-width: 10.5rem !important;
    }

    .app-layout .navigation-header .top-header-right .header-sms-wallet-pill {
        gap: 0.28rem !important;
        padding-inline: 0.42rem !important;
    }

    .app-layout .navigation-header .top-header-right .header-sms-wallet-pill .header-sms-wallet-label,
    .app-layout .navigation-header .top-header-right .header-sms-wallet-pill .header-sms-wallet-separator,
    .app-layout .navigation-header .top-header-right .header-sms-wallet-pill .header-sms-wallet-status {
        display: none !important;
    }

    .app-layout .navigation-header .top-header-right .header-sms-wallet-pill .header-sms-wallet-amount {
        margin-left: 0 !important;
        max-width: 100% !important;
    }

    /* Never applied: `sm\\:inline` (double backslash) is an invalid selector, so browsers dropped it and
       Tailwind 4's minifier warned on every build. The correct `sm\:inline` would HIDE the "FY:" /
       "Branch Unit:" labels on 1024–1900px screens, which would change the header. Kept off on purpose.
    .app-layout .header-tools-panel .header-tool-fiscal > button > .hidden.sm\:inline,
    .app-layout .header-tools-panel .header-tool-branch > button > .hidden.sm\:inline {
        display: none !important;
    }
    */
}

.header-sms-wallet-popover {
    min-width: 14rem;
    max-width: 18rem;
    pointer-events: auto;
}

@media (max-width: 1199px) {
    .header-tools-panel {
        overflow: visible !important;
    }

    .header-tools-panel .header-sms-wallet {
        position: relative !important;
        z-index: 240 !important;
        overflow: visible !important;
        margin-bottom: 0.35rem !important;
    }

    .header-tools-panel .header-sms-wallet-pill {
        width: 100% !important;
        max-width: 100% !important;
        justify-content: flex-start !important;
        gap: 0.45rem !important;
        padding-inline: 0.6rem !important;
        position: relative !important;
        z-index: 241 !important;
    }

    .header-tools-panel .header-sms-wallet-pill > span {
        min-width: 0 !important;
        white-space: nowrap !important;
    }

    .header-tools-panel .header-sms-wallet-popover {
        left: 0 !important;
        right: auto !important;
        z-index: 260 !important;
    }

    .header-tools-panel > .relative.inline-flex {
        position: relative !important;
        z-index: 120 !important;
    }

    .header-tools-panel > .relative.inline-flex li {
        position: relative !important;
        z-index: 121 !important;
    }
}

/* Header select popups (Fiscal Year / Branch Unit): keep visible row separators */
.header-select-popup-row {
    border-bottom-width: 2px !important;
    border-bottom-color: #dbdee5 !important;
}

.header-select-popup-row:hover {
    border-bottom-color: #dbdee5 !important;
}

.dark .header-select-popup-row {
    border-bottom-color: #4b5563 !important;
}

.dark .header-select-popup-row:hover {
    border-bottom-color: #6b7280 !important;
}

/* Preserve active row border when selected */
.header-select-popup-row[class*='!bg-indigo-600'] {
    border-bottom-color: #3730a3 !important;
}

.header-menu-mode-active {
    background: #4f46e5 !important;
    color: #ffffff !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) !important;
}

.header-menu-mode-inactive {
    color: rgb(75 85 99) !important;
}

.header-menu-mode-inactive:hover {
    background: rgb(243 244 246) !important;
}

.dark .header-menu-mode-inactive {
    color: rgb(209 213 219) !important;
}

.dark .header-menu-mode-inactive:hover {
    background: rgb(55 65 81) !important;
}

.header-tool-favorites .origin-top-right {
    z-index: 1200 !important;
}

.header-tools-panel .app-quick-tools-row .header-tool-favorites .origin-top-right,
.header-tools-panel .customer-quick-tools-row .header-tool-favorites .origin-top-right {
    z-index: 1500 !important;
}

.admin-layout .navigation-header .top-header-right .admin-quick-tools-panel {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
}

.admin-layout .navigation-header .top-header-right .header-tools-group {
    width: auto;
    max-width: 100%;
}

.header-tool-nepali-datetime,
.header-tools-date-mobile {
    position: relative;
}

.np-datetime-dock-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f766e;
    border-radius: 0.55rem;
    min-height: 2.25rem;
    padding: 0.36rem 0.62rem;
    box-shadow: none;
    max-width: 100%;
    min-width: 0;
    line-height: 1.15;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.np-datetime-dock-toggle > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.np-datetime-dock-toggle:hover {
    background: #ecfeff;
    border-color: #a7f3d0;
}

.np-datetime-dock-toggle:focus,
.np-datetime-dock-toggle:focus-visible {
    outline: none;
    background: #ecfeff;
    border-color: #5eead4;
}

.dark .np-datetime-dock-toggle {
    color: #99f6e4;
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(148, 163, 184, 0.45);
}

.dark .np-datetime-dock-toggle:hover,
.dark .np-datetime-dock-toggle:focus,
.dark .np-datetime-dock-toggle:focus-visible {
    background: rgba(20, 184, 166, 0.18);
    border-color: rgba(153, 246, 228, 0.45);
}

.np-datetime-dock-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    bottom: auto;
    width: min(18.25rem, calc(100dvw - 1.25rem));
    border-radius: 0.8rem;
    border: 1px solid #99f6e4;
    background: #f0fdfa;
    color: #0f172a;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
    padding: 0.65rem;
    z-index: 2400;
}

.np-datetime-row {
    border-radius: 0.6rem;
    border: 1px solid #ccfbf1;
    background: #ffffff;
    padding: 0.45rem 0.55rem;
}

.np-datetime-row + .np-datetime-row {
    margin-top: 0.45rem;
}

.np-datetime-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0f766e;
}

.np-datetime-value {
    margin-top: 0.16rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
}

.np-datetime-grid {
    margin-top: 0.18rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
}

.np-datetime-date {
    min-width: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.np-datetime-time {
    font-size: 0.96rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #0f766e;
    white-space: nowrap;
}

.dark .np-datetime-dock-panel {
    border-color: rgba(45, 212, 191, 0.28);
    background: #0f172a;
    color: #e5e7eb;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.55);
}

.dark .np-datetime-row {
    border-color: rgba(148, 163, 184, 0.18);
    background: #1e293b;
}

.dark .np-datetime-label {
    color: #5eead4;
}

.dark .np-datetime-value {
    color: #e5e7eb;
}

.dark .np-datetime-date {
    color: #e5e7eb;
}

.dark .np-datetime-time {
    color: #5eead4;
}

@media (max-width: 1199px) {
    /* compact header (date + Quick Tools toggle) below 1200px: the full header needs ~1200px */
    .app-layout .navigation-header .top-header-main {
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        row-gap: 0.35rem !important;
    }

    .customer-layout .navigation-header .top-header-main,
    .admin-layout .navigation-header .top-header-main {
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        row-gap: 0.35rem !important;
    }

    .app-layout .navigation-header .top-header-right {
        width: 100% !important;
        max-width: 100% !important;
    }

    .customer-layout .navigation-header .top-header-right,
    .admin-layout .navigation-header .top-header-right {
        width: 100% !important;
        max-width: 100% !important;
    }

    .navigation-header .top-header-right {
        min-width: 0 !important;
        max-width: 100% !important;
        gap: 0.25rem !important;
        flex-wrap: wrap !important;
        justify-content: flex-end !important;
        overflow: visible !important;
    }

    .navigation-header .top-header-right .header-tools-group {
        width: 100% !important;
        max-width: 100% !important;
        order: 2 !important;
    }

    .navigation-header .top-header-right .header-user-group {
        order: 1 !important;
    }

    .header-tools-group {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 0.5rem;
        row-gap: 0.45rem;
    }

    .header-tools-date-mobile {
        display: inline-flex;
        order: 1;
        flex: 0 1 auto;
        align-items: center;
        justify-self: start;
        grid-column: 1 !important;
        min-width: 0;
        max-width: 100%;
        width: auto;
    }

    .header-tools-date-mobile .np-datetime-dock-toggle {
        white-space: nowrap;
        width: auto;
        max-width: 10rem;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        justify-content: center;
        padding-inline: 0.62rem;
        gap: 0.28rem;
    }

    .header-tools-group .header-tools-toggle {
        order: 2;
        grid-column: 2 !important;
        justify-self: end;
        margin-left: 0;
        white-space: nowrap;
        max-width: 100%;
    }

    .header-tools-group .header-tools-panel {
        order: 3;
        width: 100%;
        grid-column: 1 / -1;
    }

    .header-tools-date-mobile .np-datetime-dock-panel {
        left: 0;
        right: auto;
    }

    /* Prevent date popovers from overflowing viewport on mobile in all layouts. */
    .navigation-header .np-datetime-dock-panel {
        left: auto !important;
        right: 0.35rem !important;
        width: min(17rem, calc(100dvw - 1rem)) !important;
        max-width: calc(100dvw - 1rem) !important;
    }

    .navigation-header .header-tools-group,
    .navigation-header .header-tools-panel,
    .navigation-header .admin-quick-tools-panel,
    .navigation-header .header-tool-nepali-datetime,
    .navigation-header .header-tools-date-mobile {
        overflow: visible !important;
    }

    .navigation-header .top-header-right .header-tool-nepali-datetime {
        display: none !important;
    }

    .admin-layout .navigation-header .top-header-right .admin-quick-tools-panel {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        align-items: center !important;
        column-gap: 0.4rem !important;
        row-gap: 0.35rem !important;
        border: 1px solid #dbe4ef !important;
        border-radius: 0.75rem !important;
        background: #f8fafc !important;
        padding: 0.45rem !important;
    }

    .admin-layout .navigation-header .top-header-right .header-tools-group {
        order: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .admin-layout .navigation-header .top-header-right .header-tools-group .header-tools-date-mobile .np-datetime-dock-panel {
        left: auto !important;
        right: 0.35rem !important;
        width: min(17rem, calc(100dvw - 1rem)) !important;
        max-width: calc(100dvw - 1rem) !important;
    }

    .admin-layout .navigation-header .top-header-right .admin-quick-tools-panel .header-tool-admin-date {
        display: none !important;
    }

    .admin-layout .navigation-header .top-header-right .admin-quick-tools-panel .header-tool-admin-org {
        grid-column: 1 !important;
        grid-row: 1 !important;
        width: 100% !important;
    }

    .admin-layout .navigation-header .top-header-right .admin-quick-tools-panel .header-tool-admin-festive {
        grid-column: 2 !important;
        grid-row: 1 !important;
        width: 100% !important;
    }

    .admin-layout .navigation-header .top-header-right .admin-quick-tools-panel .header-tool-admin-language {
        grid-column: 1 !important;
        grid-row: 2 !important;
        width: 100% !important;
    }

    .admin-layout .navigation-header .top-header-right .admin-quick-tools-panel .header-tool-favorites {
        grid-column: 2 !important;
        grid-row: 2 !important;
        justify-self: stretch !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 0.125rem !important;
    }

    .admin-layout .navigation-header .top-header-right .admin-quick-tools-panel .header-tool-favorites > button {
        width: 100% !important;
        height: 100% !important;
        min-width: 2.25rem !important;
        min-height: 2.25rem !important;
    }

    .admin-layout .navigation-header .top-header-right .admin-quick-tools-panel .header-tool-admin-date .np-datetime-dock-toggle {
        width: auto !important;
        max-width: 8.8rem !important;
    }

    .admin-layout .navigation-header .top-header-right .admin-quick-tools-panel .header-tool-admin-date .np-datetime-dock-panel {
        left: 0 !important;
        right: auto !important;
        width: min(17rem, calc(100dvw - 1.25rem)) !important;
        max-width: calc(100dvw - 1.25rem) !important;
        z-index: 2600 !important;
    }

    .admin-layout .navigation-header .top-header-right > hr {
        display: none !important;
    }

    .header-tools-panel .app-quick-tools-row .header-tool-language,
    .header-tools-panel .app-quick-tools-row .header-tool-favorites,
    .customer-layout .header-tools-panel .customer-quick-tools-row .header-tool-language,
    .customer-layout .header-tools-panel .customer-quick-tools-row .header-tool-favorites {
        display: flex !important;
        align-items: center !important;
    }

    .navigation-header .np-datetime-dock-panel .np-datetime-date {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        line-height: 1.25 !important;
    }
}

.header-tool-nepali-datetime,
.header-tools-date-mobile {
    overflow: visible !important;
}

.navigation-header .np-datetime-dock-panel {
    box-sizing: border-box;
    z-index: 2600;
}

@media (min-width: 1200px) {
    .navigation-header .top-header-right .header-tools-date-mobile {
        display: none !important;
    }
}

.toast {
    z-index: 999 !important;
}

.navigation-bar {
    display: flex;
    gap: 0;
}

.navigation-bar .nav-wrapper {
    width: 100% !important;
}

.profile-bar {
    display: flex;
    flex-direction: row-reverse;
    gap: 3rem;
    align-items: center;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    margin-right: 0.5rem;
}


@media print {
    .navigation-bar {
        display: none;
    }
}

/*.login-logo{*/
/*    filter: drop-shadow(0.3rem 0.3rem #f59e0b) drop-shadow(-0.2rem -0.2rem #10b981);*/
/*}*/

.watermark {
    font-size: 12em;
    color: rgba(255, 5, 5, 0.17);
    position: fixed;
    text-transform: uppercase;
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-filter: grayscale(100%);
    filter: grayscale(100%);
    opacity: .15;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
}

@media print {
    .watermark {
        top: 25%;
    }

    .print_header_img {
        width: 6rem !important;
        height: 6rem !important;
    }
}

.mcoa_table_grid {
    grid-template-columns: 7rem 1fr 14rem 14rem 14rem;
}

.mcoa_primary_group {
    font-size: 12px;
    background: #009E8B;
}

.mcoa_group {
    background: #82A878;
}

.mcoa_sub_group {
    background: #9BB0A5;
}

.mcoa_ledger_group {
    background: #CBD8C7;
}

.mcoa_ledgers {
    background: #D2F5FF;
}

.mcoa_table_grid {
    padding: 0.2rem !important;
}

.accountLedgerModal .modal-box {
    min-width: 90dvw !important;
    min-height: 90dvh !important;
}

.costCenterModal .modal-box {
    min-width: 50dvw !important;
    min-height: 50dvh !important;
}

.extra-menu-options button {
    font-size: 0.675rem !important;
}

.extra-menu-options button.btn {
    min-height: 1rem !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

input.bg-base-200.btn.capitalize.input.input-bordered.join-item {
    width: 105px !important;
}

#receipt_payment_mode {
    width: 3rem !important;
}

/*thead tr:nth-child(1) th, */
.custom-sticky-header{
    background: white !important;
    position: sticky !important;
    top: -0.5rem !important;
    z-index: 4 !important;
}
tfoot tr:last-child th{
    background: white !important;
    position: sticky !important;
    bottom: -2rem !important;
    z-index: 4 !important;
}

.loanAdvanceTable thead tr:nth-child(1) th{
    top: -2rem !important;
}

.addAccountEntryRows, .addAccountEntryRows .rounded-r-lg {
    height: 29px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.addAccountEntryRows .rounded-r-lg {
    overflow: hidden !important;
    border-top-right-radius: 5px !important;
    border-bottom-right-radius: 5px !important;
}

.addAccountEntryRows input[type="text"] {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

button[name="addAccountEntryRows"] {
    margin: 0 !important;
    text-align: left !important;
    border: none !important;
    border-radius: 0 !important;
}

.paginate select {
    width: 6rem !important;
}

.paginate label {
    margin-top: -0.25rem !important;
}

/* Select2 Customization Begins Here */
.select2-container .select2-selection--multiple,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 28px !important;
    display: flex;
    justify-content: center;
    align-content: center;
    flex-direction: column;
    font-size: 10px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: revert;
}

button.select2-selection__clear {
    position: absolute;
    right: 0;
    top: 2px;
}

.select2-results__option {
    padding-top: 3px;
    padding-bottom: 3px;
    font-size: 0.875rem;
}

/* Select2 Customization Ends Here */

/*div:has(> button.btn) {*/
/*    height: 28px !important;*/
/*    overflow: hidden;*/
/*    border-radius: 5px !important;*/
/*}*/

/*button{*/
/*    height: 20px !important;*/
/*}*/

.tag-input-component {
    display: flex;
    flex-direction: column;
}

.tags-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: flex;
    align-items: center;
    background-color: #f1f1f1;
    border-radius: 5px;
    padding: 0.2rem 0.5rem;
}

.tag button {
    background: none;
    border: none;
    margin-left: 0.5rem;
    cursor: pointer;
}

#basic-setup + div > div:first-child, #aathharabhata-sataapa + div > div:first-child {
    padding-top: 0.5rem !important;
}

#basic-setup + div > div:first-child > a[role="tab"], #aathharabhata-sataapa + div > div:first-child > a[role="tab"] {
    min-width: 150px !important;
}

.invoice-master label{
    font-size: 11px !important;
}

/* BEGIN: moved from app.blade.php inline style */
.desktop-sidebar-brand,
        .navigation-bar .nav-links .desktop-sidebar-brand {
            display: none !important;
        }

        @media (min-width: 1024px) {
            html.desktop-sidebar-menu-preload:not(.desktop-sidebar-hidden-preload) body:not(.desktop-sidebar-menu) .navigation-header > header {
                left: 23rem !important;
                width: calc(100% - 23rem) !important;
            }

            html.desktop-sidebar-menu-preload:not(.desktop-sidebar-hidden-preload) body:not(.desktop-sidebar-menu) .page-content-scroll {
                margin-left: 23.75rem !important;
                margin-right: 0.75rem !important;
                width: auto !important;
            }

            body.desktop-sidebar-menu .navigation-header > header {
                left: 23rem !important;
                width: calc(100% - 23rem) !important;
            }

            body.desktop-sidebar-menu .navigation-header .top-header-left { display: none !important; }
            body.desktop-sidebar-menu .navigation-header .top-header-main { justify-content: flex-end !important; }
            body.desktop-sidebar-menu .navigation-header .top-header-right {
                margin-left: auto !important;
                width: auto !important;
                max-width: calc(100% - 1rem);
                justify-content: flex-end !important;
            }

            body.desktop-sidebar-menu .navigation-bar {
                position: fixed;
                top: 0;
                left: 0;
                width: 23rem;
                z-index: 25;
                padding: 0;
                height: 100vh;
            }

            body.desktop-sidebar-menu .navigation-bar .nav-wrapper {
                display: block;
                padding: 0;
            }

            body.desktop-sidebar-menu .navigation-bar .nav-wrapper > div:first-child {
                display: none;
            }

            body.desktop-sidebar-menu .navigation-bar .nav-links {
                position: static !important;
                inset: auto !important;
                width: 100% !important;
                max-width: none !important;
                height: 100vh !important;
                max-height: 100vh !important;
                transform: none !important;
                overflow-x: hidden !important;
                overflow-y: auto !important;
                scrollbar-width: thin;
                margin: 0 !important;
                padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0px)) !important;
                background: #f8fafc !important;
                display: block !important;
                left: 0 !important;
                border: 0 !important;
                border-radius: 0 !important;
                box-shadow: inset -1px 0 0 #e2e8f0 !important;
            }

            body.desktop-sidebar-menu .navigation-bar .desktop-sidebar-brand {
                display: block !important;
                position: sticky;
                top: 0;
                z-index: 80;
                margin: 4px 0 0 8px !important;
                padding: 0;
                border-radius: 0.5rem;
                background: #047857;
                color: #fff;
                box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
                overflow: hidden;
                border-bottom: 0;
                isolation: isolate;
            }

            body.desktop-sidebar-menu .navigation-bar .desktop-sidebar-brand .brand-row {
                display: flex;
                gap: 0.65rem;
                align-items: flex-start;
                position: sticky;
                top: 0;
                z-index: 81;
                width: 100%;
                background: #047857;
                border-radius: 0.5rem;
                border: 1px solid rgba(255,255,255,0.14);
                margin: 0;
                padding: 8px 8px 8px 10px;
            }

            body.desktop-sidebar-menu .navigation-bar .desktop-sidebar-brand .brand-row > .min-w-0 {
                flex: 1 1 auto;
                min-width: 0;
                display: flex;
                flex-direction: column;
                align-items: flex-end;
                text-align: right;
                justify-content: center;
            }

            body.desktop-sidebar-menu .navigation-bar .desktop-sidebar-brand img {
                width: 36px;
                height: 36px;
                object-fit: contain;
                border-radius: 6px;
                background: rgba(255,255,255,0.12);
                padding: 3px;
                flex-shrink: 0;
            }

            body.desktop-sidebar-menu .navigation-bar .desktop-sidebar-brand .brand-title {
                font-size: 12px;
                font-weight: 700;
                line-height: 1.15;
                color: #fff;
                margin-bottom: 0.2rem;
                width: 100%;
                text-align: right;
            }

            body.desktop-sidebar-menu .navigation-bar .desktop-sidebar-brand .brand-sub {
                font-size: 11px;
                line-height: 1.25;
                color: rgba(255,255,255,0.88);
            }

            body.desktop-sidebar-menu .navigation-bar .desktop-sidebar-brand .brand-meta-row {
                display: flex;
                align-items: baseline;
                gap: 0.25rem;
                min-width: 0;
                line-height: 1.1;
                justify-content: flex-end;
                width: 100%;
            }

            body.desktop-sidebar-menu .navigation-bar .desktop-sidebar-brand .brand-meta-label {
                font-size: 10px;
                font-weight: 700;
                color: rgba(255,255,255,0.78);
                letter-spacing: 0.02em;
                flex-shrink: 0;
                min-width: 2.95rem;
                text-align: right;
            }

            body.desktop-sidebar-menu .navigation-bar .desktop-sidebar-brand .brand-meta-value {
                min-width: 0;
                font-size: 11px;
                line-height: 1.2;
                color: rgba(255,255,255,0.94);
                text-align: right;
            }

            body.desktop-sidebar-menu .navigation-bar .nav-links > .close-btn {
                display: none !important;
            }

            body.desktop-sidebar-menu .navigation-bar .mobile-menu-trigger,
            body.desktop-sidebar-menu .navigation-bar .mobile-menu-search-trigger,
            body.desktop-sidebar-menu .navigation-bar #menu-btn,
            body.desktop-sidebar-menu .navigation-bar #close-btn {
                display: none !important;
            }

            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item {
                width: 100%;
                margin: 3px 8px 0 !important;
                float: none !important;
                display: block !important;
                position: relative;
                z-index: 1;
            }

            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item.is-open {
                z-index: 4;
            }

            body.desktop-sidebar-menu .navigation-bar .desktop-sidebar-brand + .top-menu-module-item { margin-top: 4px !important; }
            body.desktop-sidebar-menu .navigation-bar .desktop-sidebar-brand + .top-menu-module-item { padding-top: 2px !important; }
            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item:last-child { margin-bottom: 6px !important; }

            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .desktop-item,
            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mega-box {
                display: none !important;
            }

            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-item {
                display: flex !important;
                width: 100%;
                align-items: center;
                justify-content: space-between;
                border: 0;
                background: #059669;
                color: #ffffff;
                font-size: clamp(14px, 1.05vw, 15px) !important;
                font-weight: 500;
                line-height: 1.2;
                padding: 8px 11px !important;
                border-left: 2px solid transparent;
                border-radius: 0.4rem;
                text-align: left;
                cursor: pointer;
                transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
            }

            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item.active > .mobile-item,
            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-item:hover {
                background: #047857;
                border-left-color: #ffffff;
                color: #ffffff;
                box-shadow: none !important;
            }

            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-submenu {
                position: static !important;
                background: #edf2f7;
                /*margin: 0 8px 4px !important;*/
                margin: 0 0 0 4px !important;
                /*padding: 3px 0;*/
                padding: 0 !important;
                border-left: 2px solid #cbd5e1;
                border-radius: 0.4rem;
                border: 1px solid #e2e8f0;
                box-shadow: none !important;
            }

            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-section {
                padding: 0;
            }

            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-section > header {
                color: #047857;
                background: #dce9e2;
                border-bottom: 1px solid #d1fae5;
                font-size: clamp(13px, 0.9vw, 14px);
                font-weight: 700;
                text-transform: uppercase;
                letter-spacing: 0.045em;
                padding: 5px 10px;
                line-height: 1.25;
            }

            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-section > header button {
                line-height: 1.25 !important;
                min-height: 1.45rem !important;
            }

            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-links {
                list-style: none;
                margin: 0;
                padding: 0;
            }

            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-links li {
                margin: 0 !important;
                padding: 0 !important;
            }

            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-links li a {
                color: #334155 !important;
                display: block;
                padding: 6px 10px !important;
                font-size: clamp(12px, 0.82vw, 13px) !important;
                line-height: 1.25;
                border-left: 2px solid transparent;
                text-decoration: none;
                white-space: normal;
                transition: background-color 0.18s ease, border-color 0.18s ease;
            }

            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-links li a:hover,
            body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-links li a.link-active {
                background: #059669;
                border-left-color: #059669;
                color: #ffffff !important;
            }

            .dark body.desktop-sidebar-menu .navigation-bar .nav-links {
                background: #111827 !important;
                box-shadow: inset -1px 0 0 #374151 !important;
            }

            .dark body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-item {
                background: #1f2937;
                color: #a7f3d0;
                border-left-color: transparent;
            }

            .dark body.desktop-sidebar-menu .navigation-bar .top-menu-module-item.active > .mobile-item,
            .dark body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-item:hover {
                background: #f8fafc;
                color: #047857;
                border-left-color: #10b981;
            }

            .dark body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-submenu {
                background: #1f2937;
                border-color: #374151;
                border-left-color: #4b5563;
            }

            .dark body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-section > header {
                color: #86efac;
                background: rgba(5, 150, 105, 0.12);
                border-bottom-color: rgba(52, 211, 153, 0.18);
            }

            .dark body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-links li a {
                color: #cbd5e1 !important;
            }

            .dark body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-links li a:hover,
            .dark body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-links li a.link-active {
                background: #f8fafc;
                color: #047857 !important;
                border-left-color: #10b981;
            }

            body.desktop-sidebar-menu .page-content-scroll {
                margin-left: 23.75rem !important;
                margin-right: 0.75rem !important;
                width: auto !important;
                margin-top: 3.75rem !important;
            }

            body.desktop-sidebar-menu.desktop-sidebar-hidden .navigation-bar {
                display: block !important;
                width: 0 !important;
                min-width: 0 !important;
                overflow: visible !important;
                background: #047857 !important;
                box-shadow: none !important;
                border-right: 1px solid rgba(255,255,255,0.12) !important;
            }

            body.desktop-sidebar-menu.desktop-sidebar-hidden .navigation-bar .nav-wrapper {
                width: 10px !important;
                min-width: 10px !important;
                overflow: visible !important;
            }

            body.desktop-sidebar-menu.desktop-sidebar-hidden .navigation-bar .nav-links {
                display: none !important;
            }

            body.desktop-sidebar-menu.desktop-sidebar-hidden .navigation-header > header {
                left: 0 !important;
                width: 100% !important;
            }

            body.desktop-sidebar-menu.desktop-sidebar-hidden .navigation-header .top-header-left {
                display: flex !important;
            }

            body.desktop-sidebar-menu.desktop-sidebar-hidden .navigation-header .top-header-main {
                justify-content: space-between !important;
            }

            body.desktop-sidebar-menu.desktop-sidebar-hidden .navigation-header .top-header-right {
                max-width: none !important;
            }

            body.desktop-sidebar-menu.desktop-sidebar-hidden .page-content-scroll {
                margin-left: 2.1rem !important;
                margin-right: 0.75rem !important;
                width: auto !important;
            }

            body.desktop-sidebar-menu .desktop-sidebar-toggle-trigger {
                display: inline-flex !important;
                position: fixed;
                top: auto;
                bottom: 18px;
                left: calc(23rem - 1px);
                z-index: 120;
                width: 28px;
                height: 48px;
                align-items: center;
                justify-content: center;
                border-radius: 0 12px 12px 0;
                border: 1px solid rgba(15, 23, 42, 0.18);
                border-left: 0;
                background: linear-gradient(180deg, #059669 0%, #047857 100%);
                color: #fff;
                box-shadow: 4px 8px 14px rgba(0,0,0,0.16);
                transition: left .2s ease, background-color .2s ease, box-shadow .2s ease;
            }

            body.desktop-sidebar-menu .desktop-sidebar-toggle-trigger::before {
                content: "";
                position: absolute;
                left: -7px;
                top: 50%;
                width: 14px;
                height: 14px;
                transform: translateY(-50%) rotate(45deg);
                background: linear-gradient(180deg, #059669 0%, #047857 100%);
                border-left: 1px solid rgba(15, 23, 42, 0.2);
                border-bottom: 1px solid rgba(15, 23, 42, 0.2);
                border-radius: 0 0 0 8px;
            }

            body.desktop-sidebar-menu .desktop-sidebar-toggle-trigger::after {
                content: none;
            }

            body.desktop-sidebar-menu .desktop-sidebar-toggle-trigger:hover {
                background: #047857;
                box-shadow: 5px 9px 18px rgba(0,0,0,0.2);
            }

            body.desktop-sidebar-menu .desktop-sidebar-toggle-trigger:hover::before {
                background: #047857;
            }

            body.desktop-sidebar-menu .desktop-sidebar-toggle-trigger:hover::after {
                content: none;
            }

            body.desktop-sidebar-menu.desktop-sidebar-hidden .desktop-sidebar-toggle-trigger {
                left: 8px;
                bottom: 18px;
            }

            body.desktop-sidebar-menu .desktop-sidebar-toggle-trigger .icon-open {
                display: none;
            }

            body.desktop-sidebar-menu .desktop-sidebar-toggle-trigger .icon-close {
                display: inline;
            }

            body.desktop-sidebar-menu.desktop-sidebar-hidden .desktop-sidebar-toggle-trigger .icon-open {
                display: inline;
            }

            body.desktop-sidebar-menu.desktop-sidebar-hidden .desktop-sidebar-toggle-trigger .icon-close {
                display: none;
            }
        }

        @media (max-width: 767px) {
            .customer-layout .navigation-header .top-header-right {
                flex-wrap: wrap !important;
                justify-content: flex-end !important;
                row-gap: 0.35rem !important;
            }

            .customer-layout .navigation-header .top-header-right .header-user-group {
                order: 1 !important;
            }

            .customer-layout .navigation-header .top-header-right .header-tools-group {
                order: 2 !important;
                width: 100% !important;
            }

            .header-tools-panel .header-tool-fiscal {
                order: 1 !important;
                grid-column: span 1 / span 1 !important;
            }

            .header-tools-panel .header-tool-branch {
                order: 2 !important;
                grid-column: span 1 / span 1 !important;
            }

            .header-tools-panel .header-tool-language {
                order: 3 !important;
                grid-column: 1 / -1 !important;
            }

            .header-tools-panel .header-tool-count-notification {
                order: 4 !important;
                grid-column: span 1 / span 1 !important;
            }

            .header-tools-panel .header-tool-user-notification {
                order: 5 !important;
                grid-column: span 1 / span 1 !important;
            }

            /* Keep FY + Branch visually identical in mobile quick-tools */
            .header-tools-panel .header-tool-fiscal > button,
            .header-tools-panel .header-tool-branch > button {
                display: inline-flex !important;
                width: 100% !important;
                min-width: 0 !important;
                height: 2.5rem !important;
                justify-content: center !important;
                align-items: center !important;
                gap: 0.45rem !important;
                border-radius: 0.5rem !important;
                padding: 0 0.75rem !important;
                border: 1px solid rgb(209 213 219) !important;
                background: #ffffff !important;
                color: rgb(55 65 81) !important;
                box-shadow: 0 1px 2px rgba(0,0,0,0.06) !important;
            }

            .dark .header-tools-panel .header-tool-fiscal > button,
            .dark .header-tools-panel .header-tool-branch > button {
                border-color: rgb(75 85 99) !important;
                background: rgb(31 41 55) !important;
                color: rgb(243 244 246) !important;
            }

            /* Prevent mobile nav link styles from breaking the language switch layout */
            .header-tools-panel .header-tool-language > div {
                display: inline-flex !important;
                flex-direction: row !important;
                align-items: center !important;
                width: 100% !important;
                overflow: hidden !important;
            }

            .header-tools-panel .header-tool-language > div > span:first-child {
                display: inline-flex !important;
                flex: 1 1 auto !important;
                min-width: 0 !important;
                justify-content: center !important;
            }

            .header-tools-panel .header-tool-language > div > a {
                display: inline-flex !important;
                flex: 0 0 auto !important;
                width: auto !important;
                min-width: 3.25rem !important;
                height: 100% !important;
                padding-left: 0.75rem !important;
                padding-right: 0.75rem !important;
                text-decoration: none !important;
            }

            .customer-layout .header-tools-panel .customer-quick-tools-row {
                display: grid !important;
                grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
                align-items: stretch !important;
                column-gap: 0.5rem !important;
            }

            .customer-layout .header-tools-panel .customer-quick-tools-row .header-tool-language {
                order: 1 !important;
                grid-column: span 1 / span 1 !important;
            }

            .customer-layout .header-tools-panel .customer-quick-tools-row .header-tool-language > div {
                background: rgb(248 250 252) !important;
                border-color: rgb(203 213 225) !important;
            }

            .dark .customer-layout .header-tools-panel .customer-quick-tools-row .header-tool-language > div {
                background: rgb(31 41 55) !important;
                border-color: rgb(75 85 99) !important;
            }

            .customer-layout .header-tools-panel .customer-quick-tools-row .header-tool-favorites {
                order: 2 !important;
                grid-column: span 1 / span 1 !important;
                width: 100% !important;
                min-width: 0 !important;
                padding: 0.125rem !important;
            }

            .customer-layout .header-tools-panel .customer-quick-tools-row .header-tool-favorites > button {
                width: 100% !important;
                height: 100% !important;
                min-height: 2.25rem !important;
            }

            .header-tools-panel .app-quick-tools-row {
                display: flex !important;
                flex-wrap: wrap !important;
                align-items: stretch !important;
                gap: 0.5rem !important;
            }

            .header-tools-panel .app-quick-tools-row .header-tool-fiscal {
                order: 1 !important;
                flex: 1 1 calc(50% - 0.25rem) !important;
                min-width: 0 !important;
            }

            .header-tools-panel .app-quick-tools-row .header-tool-branch {
                order: 2 !important;
                flex: 1 1 calc(50% - 0.25rem) !important;
                min-width: 0 !important;
            }

            .header-tools-panel .app-quick-tools-row .header-tool-language {
                order: 3 !important;
                flex: 1 1 calc(50% - 0.25rem) !important;
                min-width: 0 !important;
            }

            .header-tools-panel .app-quick-tools-row .header-tool-language > div {
                background: rgb(248 250 252) !important;
                border-color: rgb(203 213 225) !important;
            }

            .dark .header-tools-panel .app-quick-tools-row .header-tool-language > div {
                background: rgb(31 41 55) !important;
                border-color: rgb(75 85 99) !important;
            }

            .header-tools-panel .app-quick-tools-row .header-tool-favorites {
                order: 4 !important;
                flex: 1 1 calc(50% - 0.25rem) !important;
                width: 100% !important;
                min-width: 0 !important;
                padding: 0.125rem !important;
                position: relative !important;
                z-index: 1400 !important;
            }

            .header-tools-panel .app-quick-tools-row .header-tool-count-notification {
                order: 5 !important;
                flex: 1 1 calc(50% - 0.25rem) !important;
                min-width: 0 !important;
                position: relative !important;
                z-index: 100 !important;
            }

            .header-tools-panel .app-quick-tools-row .header-tool-user-notification {
                order: 6 !important;
                flex: 1 1 calc(50% - 0.25rem) !important;
                min-width: 0 !important;
                position: relative !important;
                z-index: 100 !important;
            }

            .header-tools-panel .app-quick-tools-row .header-tool-favorites > button {
                width: 100% !important;
                height: 100% !important;
                min-height: 2.25rem !important;
            }
        }
/* END: moved from app.blade.php inline style */

/* Keep customer/admin mobile active menu styles consistent with app layout. */
html:not(.nav-accordion) .customer-layout .navigation-bar .top-menu-module-item .mobile-links li a.link-active,
html:not(.nav-accordion) .customer-layout .navigation-bar .top-menu-module-item .mobile-links li a:hover,
html:not(.nav-accordion) .admin-layout .navigation-bar .top-menu-module-item .mobile-links li a.link-active,
html:not(.nav-accordion) .admin-layout .navigation-bar .top-menu-module-item .mobile-links li a:hover {
    background: #059669 !important;
    color: #ffffff !important;
    border-left-color: #059669 !important;
}

html:not(.nav-accordion) .customer-layout .navigation-bar .top-menu-module-item.active > .mobile-item,
html:not(.nav-accordion) .customer-layout .navigation-bar .top-menu-module-item .mobile-item:hover,
html:not(.nav-accordion) .admin-layout .navigation-bar .top-menu-module-item.active > .mobile-item,
html:not(.nav-accordion) .admin-layout .navigation-bar .top-menu-module-item .mobile-item:hover {
    background: #059669 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

/* ── Admin mega-menu: better breathing room ─────────────────────────────── */
@media screen and (min-width: 1024px) {
    /* Give each column internal padding so headers and items don't hug edges */
    .admin-layout .mega-box .content .row {
        padding: 0.5rem 0.25rem !important;
        line-height: 1.5 !important;
    }

    /* Slightly looser li padding vs the generic 0 20px */
    .admin-layout .row .mega-links li {
        padding: 0 0.875rem !important;
    }

    /* Comfortable item size — override the generic compact rules */
    .admin-layout .row .mega-links li a {
        font-size: 0.835rem !important;
        height: auto !important;
        min-height: 2.1rem !important;
        line-height: 1.4 !important;
        padding: 0.3rem 0.6rem !important;
        white-space: normal !important;
        display: flex !important;
        align-items: center !important;
    }

    /* Section header — a little more vertical breathing */
    .admin-layout .mega-box .content .row header {
        padding: 0.55rem 0.75rem !important;
        margin-bottom: 0.4rem !important;
        font-size: 0.78rem !important;
    }
}

/* Override compact-font responsive rules specifically for admin */
@media screen and (min-width: 1024px) and (max-width: 1440px) {
    .admin-layout .row .mega-links li a {
        font-size: 0.835rem !important;
        min-height: 2.1rem !important;
    }
}

@media screen and (min-width: 1024px) and (max-width: 1280px) {
    .admin-layout .row .mega-links li a {
        font-size: 0.82rem !important;
        min-height: 2rem !important;
    }
}

/* ── end admin mega-menu ─────────────────────────────────────────────────── */

/* ── single page scrollbar (desktop) ─────────────────────────────────────────
   .page-content-scroll is the only scroller on desktop. Its height comes from
   --page-scroll-top, measured by public/assets/js/page-scroll-fit.js (fallback:
   the 6.5rem header). The window itself is locked, and overscroll-behavior stops
   wheel scroll at the box's end from chaining into the window (bottom flicker).
   Below 1024px responsive-overrides.css drops the max-height and the page scrolls.
   min-height = the same size: on a short page the box used to shrink to its content, and date-picker
   popups (moved into this box by popup-scroll-anchor.js) opening near its bottom were cut off. Filling
   the space below the header adds no scrollbar - it only scrolls when the content really is taller. */
@media screen and (min-width: 1024px) {
    .page-content-scroll.overflow-auto {
        max-height: calc(100vh - var(--page-scroll-top, 6.5rem) - 0.5rem);
        max-height: calc(100dvh - var(--page-scroll-top, 6.5rem) - 0.5rem);
        min-height: calc(100vh - var(--page-scroll-top, 6.5rem) - 0.5rem);
        min-height: calc(100dvh - var(--page-scroll-top, 6.5rem) - 0.5rem);
        overscroll-behavior: contain;
    }

    html:has(.page-content-scroll.overflow-auto),
    html:has(.page-content-scroll.overflow-auto) body {
        overflow-y: hidden;
    }
}

/* ── modal scrollbar ─────────────────────────────────────────────────────────
   A modal box only a few px taller than its limit showed/hid its scrollbar as
   hover/focus styles nudged the height; the bar stole width, labels re-wrapped,
   the height flipped back - a flicker loop. Reserving the gutter on the box keeps
   its width constant. The page behind is locked, so DaisyUI's root gutter
   (`:root:has(.modal[open]) { scrollbar-gutter: stable }`) only paints an empty
   track down the right edge of the window - switched off. */
.modal-box {
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
}

/* desktop only (the rule in the single-page-scrollbar block above already covers it). Below 1024px this box does
   not scroll - the window does - and `contain` stopped the mouse wheel from reaching the window, so pages taller
   than the screen could not be wheel-scrolled at those widths. */
@media screen and (min-width: 1024px) {
    .page-content-scroll.overflow-auto {
        overscroll-behavior: contain;
    }
}

:root:has(:is(.modal-open, .modal:target, .modal-toggle:checked + .modal, .modal[open])) {
    scrollbar-gutter: auto !important;
}

/* ── mega menu: compositor-only open animation ───────────────────────────────
   app.css opens the menu with `transition: all .3s` and animates `top` (a layout
   property). Every frame of that repaints whatever sits under the menu - cheap on
   most pages, but on Bill Home it is a 100-row table with sticky, shadowed cells,
   so hovering the menu stuttered there only. Here the panel sits at its final
   position on its own layer and only opacity/transform animate. Desktop only
   (below 1024px the menu is the mobile drawer). */
@media screen and (min-width: 1024px) {
    .nav-links li .mega-box,
    .nav-links li .mega-box-profile {
        top: 3rem;
        transform: translate3d(0, 10px, 0);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
        will-change: opacity, transform;
    }

    .nav-links li .mega-box-profile {
        top: 2.9rem;
    }

    .nav-links li:hover .mega-box,
    .nav-links li:hover .mega-box-profile {
        transform: none;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
    }

    .nav-links li:hover .mega-box {
        top: 3rem;
    }

    .nav-links li:hover .mega-box-profile {
        top: 2.9rem;
    }
}

/* ── Menu favourite star (desktop panel + mobile/sidebar accordion) ───────────────────────────────
   The glyph used to be an Alpine x-text per item (~550 bindings). top-menu.js now marks favourites with
   `li.is-fav` and the star is drawn here. */
.navigation-bar .menu-fav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.375rem;
    color: #f59e0b;
    font-size: 0.875rem;
    line-height: 1;
    cursor: pointer;
}
.navigation-bar .menu-fav-toggle::before { content: "\2606"; }
.navigation-bar li.is-fav .menu-fav-toggle::before { content: "\2605"; }
.navigation-bar .menu-fav-toggle:hover { background: rgb(254 243 199 / 0.7); }
.dark .navigation-bar .menu-fav-toggle:hover { background: rgb(55 65 81 / 0.6); }

/* ── Desktop mega menu ────────────────────────────────────────────────────────────────────────────
   Opened by the hover-intent coordinator in public/assets/js/top-menu.js (li.keyboard-open), not by
   :hover — a pointer crossing the bar no longer flashes every panel, and travelling diagonally into an
   open panel no longer switches modules. Placement comes from JS as variables:
     --mega-x      panel left, relative to .nav-wrapper (first column sits under its own trigger,
                   shifted left only as far as the window edge requires)
     --mega-top    bottom of the menu bar
     --mega-caret  trigger centre, relative to the panel (the little pointer on top)
     --mega-cols   columns that fit the window (sections wrap to a new row beyond that)
   Replaces the server-side --columns / --subtract_value widths. Only opacity/transform animate. */
@media screen and (min-width: 1024px) {
    body:not(.desktop-sidebar-menu) .navigation-bar .nav-links .top-menu-module-item > .module-mega-box {
        --mega-col-w: 13.5rem; /* minimum column width; keep in sync with COL_W in top-menu.js */
        position: absolute;
        left: var(--mega-x, 0px);
        top: var(--mega-top, 3rem);
        width: max-content;
        min-width: 0;
        max-width: calc(100vw - 24px);
        max-height: none;
        padding: 0.45rem 0 0; /* transparent strip under the bar: holds the caret and keeps the hover inside the <li> */
        margin: 0;
        /* Slide, not fade. Closed = rolled up under the bar (clip-path hides it from the top edge down) and nudged
           by --mega-from-x / --mega-from-y, which top-menu.js sets: first open drops down from the bar; moving to a
           neighbouring tab slides the new panel in sideways from the side the pointer came from. Only transform and
           clip-path animate (compositor-friendly); the negative insets leave room for the shadow. */
        opacity: 1;
        visibility: hidden;
        pointer-events: none;
        transform: translate3d(var(--mega-from-x, 0px), var(--mega-from-y, -10px), 0);
        clip-path: inset(0 -48px 100% -48px);
        transition: transform 0.16s cubic-bezier(0.4, 0, 1, 1), clip-path 0.16s cubic-bezier(0.4, 0, 1, 1), visibility 0s linear 0.16s;
        will-change: auto;
        z-index: 510;
    }

    body:not(.desktop-sidebar-menu) .navigation-bar .nav-links .top-menu-module-item.keyboard-open > .module-mega-box {
        visibility: visible;
        pointer-events: auto;
        transform: none;
        clip-path: inset(0 -48px -48px -48px);
        opacity: 1;
        z-index: 512;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), clip-path 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease, visibility 0s;
    }

    /* Mega panels asleep: a panel that was never opened skips its contents' style and layout. Closed panels are
       only visibility: hidden, so their ~2,000 links were restyled on every redraw (resize, dev-tools device switch,
       theme change). placeMega() (top-menu.js) adds .mega-awake before it measures and opens the panel. */
    body:not(.desktop-sidebar-menu) .navigation-bar .nav-links .top-menu-module-item > .module-mega-box:not(.mega-awake) > * {
        content-visibility: hidden;
    }

    /* Switching tabs = one synced cross-slide (280 ms, same curve; SLIDE_MS in top-menu.js):
       incoming (.mega-switch) starts unrolled, transparent and offset towards the direction of travel, slides in;
       outgoing (.mega-switch-out) slides the other way and fades out, underneath the incoming one. */
    body:not(.desktop-sidebar-menu) .navigation-bar .nav-links .top-menu-module-item:not(.keyboard-open) > .module-mega-box.mega-switch {
        clip-path: inset(0 -48px -48px -48px);
        opacity: 0;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .nav-links .top-menu-module-item:not(.keyboard-open) > .module-mega-box.mega-switch-out {
        clip-path: inset(0 -48px -48px -48px);
        opacity: 0;
        z-index: 509;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, visibility 0s linear 0.28s;
    }

    /* the panel being replaced disappears at once, so two panels never overlap mid-animation */
    body:not(.desktop-sidebar-menu) .navigation-bar .nav-links .top-menu-module-item > .module-mega-box.mega-instant {
        transition: none !important;
    }

    /* items appear with a short stagger by column as the panel lands */
    body:not(.desktop-sidebar-menu) .navigation-bar .top-menu-module-item > .module-mega-box .content > .row {
        transform: translate3d(0, -4px, 0);
        transition: transform 0.16s ease;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .top-menu-module-item.keyboard-open > .module-mega-box .content > .row {
        transform: none;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .top-menu-module-item.keyboard-open > .module-mega-box .content > .row:nth-child(2) { transition-delay: 0.02s; }
    body:not(.desktop-sidebar-menu) .navigation-bar .top-menu-module-item.keyboard-open > .module-mega-box .content > .row:nth-child(3) { transition-delay: 0.04s; }
    body:not(.desktop-sidebar-menu) .navigation-bar .top-menu-module-item.keyboard-open > .module-mega-box .content > .row:nth-child(n+4) { transition-delay: 0.06s; }

    /* pointer to the trigger */
    body:not(.desktop-sidebar-menu) .navigation-bar .top-menu-module-item > .module-mega-box::after {
        content: "";
        position: absolute;
        top: 0.1rem;
        left: calc(var(--mega-caret, 2rem) - 7px);
        width: 14px;
        height: 14px;
        background: #059669;
        transform: rotate(45deg);
        border-radius: 2px;
        z-index: -1;
    }

    body:not(.desktop-sidebar-menu) .navigation-bar .top-menu-module-item > .module-mega-box > .content {
        display: grid;
        /* a column is at least --mega-col-w and grows to its longest label (links are capped at 22rem below),
           so labels stay on one line unless they are really long */
        grid-template-columns: repeat(var(--mega-cols, 3), minmax(var(--mega-col-w), max-content));
        align-items: start;
        justify-content: start;
        width: max-content;
        max-width: none;
        min-height: 0;
        max-height: calc(100dvh - 7.5rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 0.75rem 1rem 0.9rem;
        background-color: var(--color-base-100, #fff);
        color: var(--color-base-content, #1f2937);
        border: 1px solid rgb(5 150 105 / 0.18);
        border-top: 3px solid #059669;
        border-radius: 0.25rem 0.25rem 0.85rem 0.85rem;
        box-shadow: 0 22px 44px -14px rgb(2 44 34 / 0.32), 0 6px 14px -6px rgb(0 0 0 / 0.12);
    }

    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .content .row {
        width: auto;
        overflow: visible;
        padding: 0.25rem 0.4rem !important;
        margin: 0;
        line-height: 1.4 !important;
    }

    /* columns are separated by space, not lines */
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .content {
        column-gap: 0.75rem;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .content .row,
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .content .row + .row {
        border: 0 !important;
    }

    /* each section is a soft card, so its items visibly belong to its header */
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-section {
        background: #f8fbfa;
        border: 1px solid rgb(5 150 105 / 0.1);
        border-radius: 0.8rem;
        padding: 0.35rem 0.35rem 0.45rem;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-section + .mega-section {
        margin-top: 0.75rem;
    }
    .dark body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-section {
        background: rgb(255 255 255 / 0.03);
        border-color: rgb(255 255 255 / 0.08);
    }

    /* section header: mint pill + soft ring + accent dot (colours shared with sidebar / mobile nav, see "menu section headers" at the end) */
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .content .row header {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.92rem !important;
        font-weight: 700;
        letter-spacing: 0.01em;
        text-transform: none;
        border: 0;
        border-radius: 0.6rem;
        padding: 0.5rem 0.85rem !important;
        margin-bottom: 0.4rem !important;
        line-height: 1.25;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .content .row header::before {
        content: "";
        flex: none;
        width: 0.45rem;
        height: 0.45rem;
        border-radius: 999px;
    }

    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-links {
        border-left: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-links li {
        padding: 0 !important;
    }

    /* the whole row (label + star) is one rounded hit area; hover tints it and nudges the label */
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-links li > div {
        border-radius: 0.55rem;
        padding-right: 0.15rem;
        transition: background-color 0.15s ease;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-links li > div:hover,
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-links li > div:focus-within {
        background-color: #dcf5e9;
    }
    .dark body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-links li > div:hover,
    .dark body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-links li > div:focus-within {
        background-color: rgb(5 150 105 / 0.16);
    }

    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-links li a {
        display: flex !important;
        align-items: center !important;
        height: auto !important;
        min-height: 2.2rem !important;
        padding: 0.4rem 0.7rem !important;
        font-size: 0.86rem !important;
        line-height: 1.35 !important;
        white-space: normal !important;
        max-width: 22rem;
        color: var(--color-base-content, #1f2937);
        background: transparent !important;
        border-radius: 0.55rem !important;
        box-shadow: none !important;
        outline: none;
        transition: color 0.15s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-links li > div:hover > a:not(.link-active),
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-links li a:focus-visible {
        color: #047857 !important;
        transform: translateX(3px);
    }
    .dark body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-links li > div:hover > a {
        color: #a7f3d0 !important;
    }

    /* current page: solid row, white text and star */
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-links li.is-current > div {
        background-color: #059669;
        box-shadow: 0 6px 14px -8px rgb(5 150 105 / 0.8);
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-links li a.link-active {
        color: #fff !important;
        font-weight: 600;
        transform: none;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-links li.is-current > div .menu-fav-toggle {
        color: #fef3c7;
    }

    /* stars: hidden until the row is hovered, always shown when it is a favourite */
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .menu-fav-toggle {
        opacity: 0;
        transition: opacity 0.15s ease;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box li > div:hover .menu-fav-toggle,
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box li > div:focus-within .menu-fav-toggle,
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box li.is-fav .menu-fav-toggle,
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box li.is-current > div .menu-fav-toggle {
        opacity: 1;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .menu-fav-toggle:hover {
        background: rgb(254 243 199 / 0.6);
    }
    html.dark body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .menu-fav-toggle:hover {
        background: rgb(245 158 11 / 0.18);
        color: rgb(252 211 77);
    }
    /* the label stops at 22rem, so the star is pushed to the row end instead of floating mid-row in wide columns */
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-links li > div > .menu-fav-toggle {
        margin-left: auto;
        flex: none;
    }

    /* ── Menu bar tabs ──
       Soft pills instead of the square dark block with a white edge; a white "glide" bar (positioned by top-menu.js)
       slides under whichever tab is hovered / open / current, so the eye follows the pointer along the bar. */
    body:not(.desktop-sidebar-menu) .navigation-bar .nav-links > .top-menu-module-item > .desktop-item {
        position: relative;
        padding: 0.42rem 0.85rem;
        margin: 0 1px;
        border-radius: 0.55rem !important;
        color: rgb(255 255 255 / 0.86);
        font-weight: 500;
        letter-spacing: 0.01em;
        background: transparent;
        box-shadow: none !important;
        transition: background-color 0.2s ease, color 0.2s ease;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .nav-links > .top-menu-module-item > .desktop-item:hover,
    body:not(.desktop-sidebar-menu) .navigation-bar .nav-links > .top-menu-module-item > .desktop-item:focus-visible {
        background: rgb(255 255 255 / 0.12);
        color: #fff;
        outline: none;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .nav-links > .top-menu-module-item.active > .desktop-item {
        background: rgb(255 255 255 / 0.16);
        color: #fff;
        font-weight: 600;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .nav-links > .top-menu-module-item.keyboard-open > .desktop-item {
        background: rgb(255 255 255 / 0.2);
        color: #fff;
    }

    body:not(.desktop-sidebar-menu) .navigation-bar .nav-glide {
        position: absolute;
        left: 0;
        top: var(--glide-top, calc(100% - 4px));
        width: var(--glide-w, 0px);
        height: 3px;
        border-radius: 3px 3px 0 0;
        background: #fff;
        box-shadow: 0 0 10px rgb(255 255 255 / 0.55);
        transform: translate3d(var(--glide-x, 0px), 0, 0);
        opacity: var(--glide-o, 0);
        pointer-events: none;
        z-index: 2;
        transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1), width 0.34s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    }
}

@media (prefers-reduced-motion: reduce) {
    .navigation-bar .module-mega-box,
    .navigation-bar .nav-glide { transition: none !important; }
}

/* ── maryUI <x-file crop-after-change> dialog ─────────────────────────────────────────────────────
   Cropper.js sizes its stage from the source <img>'s box when it starts. The img had no height limit, so a tall
   photo made the stage taller than the window and pushed the Cancel/Crop buttons out of view. Capping the source
   image (only it, not the images Cropper draws inside .cropper-container) makes Cropper fit the photo into a
   window-sized stage; the actions stay visible. */
dialog[id^="maryCrop"] .modal-box {
    max-height: calc(100dvh - 2rem);
    width: min(56rem, calc(100vw - 2rem));
    max-width: none;
}
dialog[id^="maryCrop"] .modal-box img:not(.cropper-container img) {
    display: block;
    max-width: 100%;
    max-height: min(62dvh, 640px);
    margin: 0 auto;
}
dialog[id^="maryCrop"] .cropper-container {
    max-width: 100%;
    margin: 0 auto;
}

/* ── Accordion menu: desktop sidebar mode AND the mobile drawer ───────────────────────────────────
   Same look as the desktop mega panel: section cards, chip headers, rounded rows, stars on hover.
   `html.nav-accordion body` is set by public/assets/js/top-menu.js whenever the accordion is the active menu
   (up to 1024px, or sidebar mode on desktop), so one set of rules serves both. It comes later in the cascade than
   the sidebar rules above and responsive-overrides.css, at equal or higher specificity. */
html.nav-accordion body .navigation-bar .nav-links {
    background: #f4f8f6 !important;
    box-shadow: inset -1px 0 0 rgb(5 150 105 / 0.14) !important;
}

/* module rows: no more 100% width + side margin (that overflowed the right edge) */
html.nav-accordion body .navigation-bar .nav-links > .top-menu-module-item {
    width: auto !important;
    margin: 3px 10px 0 !important;
}
html.nav-accordion body .navigation-bar .nav-links > .top-menu-module-item:last-of-type {
    margin-bottom: 10px !important;
}

html.nav-accordion body .navigation-bar .top-menu-module-item > .mobile-item {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.62rem 0.85rem !important;
    border: 0 !important;
    border-radius: 0.7rem !important;
    background: transparent !important;
    color: #065f46 !important;
    font-size: 0.95rem !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
html.nav-accordion body .navigation-bar .top-menu-module-item > .mobile-item:hover {
    background: #e3f7ee !important;
}
/* current module while collapsed: tinted with an accent edge; the OPEN module is the solid one */
html.nav-accordion body .navigation-bar .top-menu-module-item.active:not(.is-open) > .mobile-item {
    background: #e3f7ee !important;
    color: #047857 !important;
    box-shadow: inset 3px 0 0 #10b981 !important;
}
html.nav-accordion body .navigation-bar .top-menu-module-item.is-open > .mobile-item {
    background: linear-gradient(135deg, #059669, #047857) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px -10px rgb(4 120 87 / 0.9) !important;
}
html.nav-accordion body .navigation-bar .mobile-item-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    font-size: 0.7rem;
    background: rgb(5 150 105 / 0.1);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}
html.nav-accordion body .navigation-bar .top-menu-module-item.is-open > .mobile-item .mobile-item-caret {
    background: rgb(255 255 255 / 0.2);
}

/* the open module's sections hang off a thin guide line */
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-submenu {
    margin: 0.35rem 0 0.25rem 0.85rem !important;
    padding: 0 0 0 0.6rem !important;
    background: transparent !important;
    border: 0 !important;
    border-left: 2px solid rgb(16 185 129 / 0.25) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-section {
    background: #fff;
    border: 1px solid rgb(5 150 105 / 0.1);
    border-radius: 0.75rem;
    padding: 0.25rem !important;
    margin: 0 0 0.4rem;
}
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-section > header {
    background: none !important;
    border: 0 !important;
    padding: 0 !important;
    text-transform: none !important;
    letter-spacing: 0.01em !important;
}
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-section > header button {
    min-height: 2.1rem !important;
    padding: 0.45rem 0.65rem !important;
    border-radius: 0.55rem;
    background: #e3f7ee;
    color: #047857;
    font-size: 0.85rem !important;
    font-weight: 700;
    line-height: 1.25 !important;
    transition: background-color 0.2s ease;
}
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-section > header button:hover {
    background: #d3f2e3;
}
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-section > header button > span:last-child {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-section[data-open="1"] .mobile-links {
    padding-top: 0.2rem !important;
}
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links li > div {
    border-radius: 0.55rem;
    transition: background-color 0.15s ease;
}
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links li > div:hover {
    background: #dcf5e9;
}
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links li a {
    display: block;
    padding: 0.45rem 0.65rem !important;
    font-size: 0.85rem !important;
    line-height: 1.35 !important;
    color: #334155 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0.55rem !important;
    transition: color 0.15s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links li > div:hover > a:not(.link-active) {
    color: #047857 !important;
    transform: translateX(3px);
}
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links li.is-current > div {
    background: #059669;
    box-shadow: 0 6px 14px -8px rgb(5 150 105 / 0.8);
}
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links li a.link-active {
    color: #fff !important;
    font-weight: 600;
    transform: none;
}
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links .menu-fav-toggle {
    opacity: 0;
    transition: opacity 0.15s ease;
}
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links li > div:hover .menu-fav-toggle,
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links li.is-fav .menu-fav-toggle,
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links li.is-current > div .menu-fav-toggle {
    opacity: 1;
}
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links li.is-current > div .menu-fav-toggle {
    color: #fef3c7;
}
@media (hover: none) {
    /* touch screens have no hover: keep the stars visible */
    html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links .menu-fav-toggle { opacity: 0.6; }
}

/* links drift in when a section opens */
@keyframes nav-item-in {
    from { opacity: 0; transform: translate3d(-6px, 0, 0); }
    to { opacity: 1; transform: none; }
}
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-section[data-open="1"] .mobile-links li {
    animation: nav-item-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}
html.nav-accordion body .navigation-bar .mobile-section[data-open="1"] .mobile-links li:nth-child(2) { animation-delay: 0.02s; }
html.nav-accordion body .navigation-bar .mobile-section[data-open="1"] .mobile-links li:nth-child(3) { animation-delay: 0.04s; }
html.nav-accordion body .navigation-bar .mobile-section[data-open="1"] .mobile-links li:nth-child(4) { animation-delay: 0.06s; }
html.nav-accordion body .navigation-bar .mobile-section[data-open="1"] .mobile-links li:nth-child(5) { animation-delay: 0.08s; }
html.nav-accordion body .navigation-bar .mobile-section[data-open="1"] .mobile-links li:nth-child(n+6) { animation-delay: 0.1s; }

/* dark */
html.dark.nav-accordion body .navigation-bar .nav-links { background: #0f172a !important; box-shadow: inset -1px 0 0 #1f2937 !important; }
html.dark.nav-accordion body .navigation-bar .top-menu-module-item > .mobile-item { color: #a7f3d0 !important; }
html.dark.nav-accordion body .navigation-bar .top-menu-module-item > .mobile-item:hover { background: rgb(5 150 105 / 0.16) !important; }
html.dark.nav-accordion body .navigation-bar .top-menu-module-item .mobile-section { background: rgb(255 255 255 / 0.03); border-color: rgb(255 255 255 / 0.08); }
html.dark.nav-accordion body .navigation-bar .top-menu-module-item .mobile-section > header button { background: rgb(5 150 105 / 0.2); color: #a7f3d0; }
html.dark.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links li a { color: #cbd5e1 !important; }
html.dark.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links li > div:hover { background: rgb(5 150 105 / 0.16); }
html.dark.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links li > div:hover > a:not(.link-active) { color: #a7f3d0 !important; }

/* ── Desktop sidebar: collapse handle + slide ──
   The handle sat at the bottom-left at z-index 120, under the dashboards' cards, so it could not be clicked there.
   It now sits on the sidebar's edge, vertically centred, above the page wrapper (.drawer is
   z-index 520 in app.css) and steps aside while a right-side drawer is open. Dialogs use the top layer, so stay above. */
@media (min-width: 1024px) {
    body.desktop-sidebar-menu .desktop-sidebar-toggle-trigger {
        top: 50% !important;
        bottom: auto !important;
        left: 23rem !important;
        width: 20px !important;
        height: 64px !important;
        transform: translateY(-50%);
        z-index: 530 !important;
        border: 0 !important;
        border-radius: 0 12px 12px 0 !important;
        background: linear-gradient(180deg, #10b981, #047857) !important;
        color: #fff !important;
        box-shadow: 4px 0 14px -6px rgb(2 44 34 / 0.35) !important;
        transition: left 0.32s cubic-bezier(0.16, 1, 0.3, 1), width 0.2s ease, background-color 0.2s ease, color 0.2s ease !important;
    }
    body.desktop-sidebar-menu .desktop-sidebar-toggle-trigger::before { content: none !important; }
    body.desktop-sidebar-menu .desktop-sidebar-toggle-trigger:hover {
        width: 24px !important;
        background: linear-gradient(180deg, #059669, #065f46) !important;
    }
    body.desktop-sidebar-menu.desktop-sidebar-hidden .desktop-sidebar-toggle-trigger {
        left: 0 !important;
    }
    html.has-open-drawer body.desktop-sidebar-menu .desktop-sidebar-toggle-trigger {
        opacity: 0;
        pointer-events: none;
    }
    body.desktop-sidebar-menu .desktop-sidebar-toggle-trigger svg { width: 14px; height: 14px; }

    /* (sidebar slide-in replaced by the synced collapse below) */
}

@media (prefers-reduced-motion: reduce) {
    html.nav-accordion body .navigation-bar .mobile-links li { animation: none !important; }
}

/* ── Menu boot guard: html.nav-booting (top-menu.js, ~300 ms after DOMContentLoaded) ──
   While the page sets itself up (Alpine init opens the current module's accordion, the layout applies sidebar mode,
   the glide bar finds its tab) nothing in the menu, header or page frame animates; it just appears in its final state. */
html.nav-booting .navigation-bar,
html.nav-booting .navigation-bar *,
html.nav-booting .navigation-bar *::before,
html.nav-booting .navigation-bar *::after,
html.nav-booting .page-content-scroll,
html.nav-booting .navigation-header > header,
html.nav-booting .desktop-sidebar-toggle-trigger {
    transition: none !important;
    animation: none !important;
}

/* ── Breakpoint switch: html.bp-switching (top-menu.js, ~360 ms after the window crosses 1024px) ──
   The frame lands in its final place at once; only the page content fades in (opacity: compositor only, no restyle). */
html.bp-switching .navigation-bar,
html.bp-switching .navigation-bar *,
html.bp-switching .page-content-scroll,
html.bp-switching .navigation-header > header,
html.bp-switching .navigation-header > header *,
html.bp-switching .desktop-sidebar-toggle-trigger,
html.bp-switching .mnav,
html.bp-switching .mnav * {
    transition: none !important;
}
@media (prefers-reduced-motion: no-preference) {
    html.bp-switching .page-content-scroll {
        animation: ui-bp-fade 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
}
@keyframes ui-bp-fade {
    from { opacity: 0.25; }
    to   { opacity: 1; }
}

/* ── Desktop sidebar: synced collapse ──
   Before: hiding set the sidebar to width 0 and removed its links, so it vanished in one frame while the page jumped.
   Now the sidebar keeps its width and slides out with transform; the page content, the header and the handle move
   with it on the same 320 ms curve, so all four travel together. */
@media (min-width: 1024px) {
    body.desktop-sidebar-menu .navigation-bar {
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
    }
    body.desktop-sidebar-menu.desktop-sidebar-hidden .navigation-bar {
        width: 23rem !important;
        transform: translate3d(-100%, 0, 0);
        visibility: hidden;
        background: transparent !important;
        border-right: 0 !important;
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.32s;
    }
    body.desktop-sidebar-menu.desktop-sidebar-hidden .navigation-bar .nav-wrapper {
        width: auto !important;
        min-width: 0 !important;
    }
    body.desktop-sidebar-menu.desktop-sidebar-hidden .navigation-bar .nav-links {
        display: block !important;
    }
    body.desktop-sidebar-menu .page-content-scroll {
        transition: margin-left 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    }
    body.desktop-sidebar-menu .navigation-header > header {
        transition: left 0.32s cubic-bezier(0.16, 1, 0.3, 1), width 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.desktop-sidebar-menu .navigation-bar,
    body.desktop-sidebar-menu .page-content-scroll,
    body.desktop-sidebar-menu .navigation-header > header { transition: none !important; }
}

/* ── Accordion menu: the app's standard scrollbar (scrollbar-thin / thumb-custom / track-custom-light) ── */
html.nav-accordion body .navigation-bar .nav-links {
    scrollbar-width: thin;
    scrollbar-color: #10b981 #d1fae5;
}
html.nav-accordion body .navigation-bar .nav-links::-webkit-scrollbar { width: 6px; }
html.nav-accordion body .navigation-bar .nav-links::-webkit-scrollbar-track { background: #d1fae5; }
html.nav-accordion body .navigation-bar .nav-links::-webkit-scrollbar-thumb { background: #10b981; border-radius: 6px; box-shadow: none; }
html.dark.nav-accordion body .navigation-bar .nav-links { scrollbar-color: #10b981 #1f2937; }
html.dark.nav-accordion body .navigation-bar .nav-links::-webkit-scrollbar-track { background: #1f2937; }

/* ── Accordion menu: focus ──
   A mouse click left the browser's default black focus box on module and section buttons. Keyboard focus gets a
   soft green ring instead; mouse focus shows nothing. */
html.nav-accordion body .navigation-bar .top-menu-module-item button:focus {
    outline: none !important;
}
html.nav-accordion body .navigation-bar .top-menu-module-item button:focus-visible,
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links a:focus-visible {
    outline: 2px solid rgb(16 185 129 / 0.55) !important;
    outline-offset: 2px !important;
}

/* ── Header tools: one consistent set (desktop / tablet, ≥768px) ──────────────────────────────────
   Measured before: heights 32–34px, three border colours, radii 0 / 5.25 / 7 / 7.7 / 8.75px, white / off-white /
   transparent backgrounds. Now every tool — FY, Branch Unit, language, pending items, notifications, favourites,
   date, user, and the conditional ones (SMS Wallet, project switch) — is the same 34px rounded tile with the
   same border, and hovering tints it emerald. The mobile "Quick Tools" panel keeps its own grid layout. */
@media (min-width: 768px) {
    .navigation-header .top-header-right {
        gap: 0.5rem !important;
        align-items: center !important;
    }
    .navigation-header .top-header-right .app-quick-tools-row {
        gap: 0.5rem !important;
        align-items: center !important;
    }
    .navigation-header .top-header-right > hr {
        height: 1.5rem;
        width: 1px;
        border: 0;
        background: rgb(226 232 240);
        margin: 0 0.15rem;
    }

    .navigation-header .top-header-right :is(
        .header-context-select-btn,
        .header-tool-language > div,
        .header-tool-count-notification,
        .header-tool-user-notification,
        .header-tool-favorites > button,
        .header-tool-nepali-datetime .np-datetime-dock-toggle,
        .header-user-group > button
    ) {
        height: 34px !important;
        min-height: 34px !important;
        box-sizing: border-box !important;
        border: 1px solid rgb(226 232 240) !important;
        border-radius: 10px !important;
        background: #fff !important;
        color: rgb(51 65 85) !important;
        box-shadow: 0 1px 2px rgb(15 23 42 / 0.05) !important;
        transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease !important;
    }
    /* square icon tiles */
    .navigation-header .top-header-right :is(.header-tool-count-notification, .header-tool-user-notification, .header-tool-favorites > button) {
        width: 34px !important;
        min-width: 34px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .navigation-header .top-header-right :is(.header-tool-count-notification, .header-tool-user-notification) svg {
        width: 1.2rem !important;
        height: 1.2rem !important;
    }
    .navigation-header .top-header-right .header-tool-count-notification > *,
    .navigation-header .top-header-right .header-tool-user-notification > * {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0 !important;
    }

    .navigation-header .top-header-right :is(
        .header-context-select-btn,
        .header-tool-language > div,
        .header-tool-count-notification,
        .header-tool-user-notification,
        .header-tool-nepali-datetime .np-datetime-dock-toggle,
        .header-user-group > button
    ):hover {
        border-color: rgb(167 243 208) !important;
        background: rgb(240 253 244) !important;
        color: rgb(4 120 87) !important;
        box-shadow: 0 2px 6px -2px rgb(5 150 105 / 0.25) !important;
    }
    .navigation-header .top-header-right :is(.header-context-select-btn, .np-datetime-dock-toggle) i,
    .navigation-header .top-header-right .header-tool-language .fa-repeat {
        color: rgb(5 150 105) !important;
    }
    .navigation-header .top-header-right :is(.header-tool-count-notification, .header-tool-user-notification) :is(svg, .notification-bell-icon) {
        color: rgb(71 85 105);
    }
    .navigation-header .top-header-right :is(.header-tool-count-notification, .header-tool-user-notification):hover :is(svg, .notification-bell-icon) {
        color: rgb(4 120 87);
    }
    html body .navigation-header .top-header-right .header-tool-favorites > button.inline-flex {
        color: rgb(245 158 11) !important;
    }
    html body .navigation-header .top-header-right .header-tool-favorites > button.inline-flex:hover {
        border-color: rgb(253 230 138) !important;
        background: rgb(255 251 235) !important;
    }
    html body .navigation-header .top-header-right .header-tool-favorites > button.inline-flex[aria-pressed="true"] {
        border-color: rgb(252 211 77) !important;
        background: rgb(254 243 199) !important;
        color: rgb(180 83 9) !important;
    }
    /* SMS wallet keeps its status colours (green / amber / red from the controller); only the shape is unified */
    .navigation-header .top-header-right .header-sms-wallet-pill {
        height: 34px !important;
        border-radius: 10px !important;
    }
    .navigation-header .top-header-right .header-tool-language > div > a:hover {
        background: rgb(220 252 231) !important;
    }
    /* unread badges sit on the tile's corner */
    .navigation-header .top-header-right .header-tool-count-notification .badge-error {
        left: auto !important;
        right: -6px !important;
        top: -7px !important;
        min-width: 1.15rem;
        height: 1.15rem;
        padding: 0 0.3rem;
        font-size: 0.68rem;
        font-weight: 700;
        box-shadow: 0 0 0 2px #fff;
    }

    /* dark */
    .dark .navigation-header .top-header-right :is(
        .header-context-select-btn,
        .header-tool-language > div,
        .header-tool-count-notification,
        .header-tool-user-notification,
        .header-tool-favorites > button,
        .header-tool-nepali-datetime .np-datetime-dock-toggle,
        .header-user-group > button
    ) {
        border-color: rgb(55 65 81) !important;
        background: rgb(31 41 55) !important;
        color: rgb(226 232 240) !important;
        box-shadow: none !important;
    }
    .dark .navigation-header .top-header-right :is(
        .header-context-select-btn,
        .header-tool-language > div,
        .header-tool-count-notification,
        .header-tool-user-notification,
        .header-tool-nepali-datetime .np-datetime-dock-toggle,
        .header-user-group > button
    ):hover {
        border-color: rgb(16 185 129 / 0.5) !important;
        background: rgb(6 78 59 / 0.45) !important;
        color: rgb(167 243 208) !important;
    }
    html.dark body .navigation-header .top-header-right .header-tool-favorites > button.inline-flex {
        color: rgb(251 191 36) !important;
    }
    html.dark body .navigation-header .top-header-right .header-tool-favorites > button.inline-flex:hover {
        border-color: rgb(245 158 11 / 0.5) !important;
        background: rgb(120 53 15 / 0.45) !important;
        color: rgb(253 230 138) !important;
    }
    html.dark body .navigation-header .top-header-right .header-tool-favorites > button.inline-flex[aria-pressed="true"] {
        border-color: rgb(251 191 36 / 0.6) !important;
        background: rgb(245 158 11 / 0.2) !important;
        color: rgb(253 230 138) !important;
    }
    .dark .navigation-header .top-header-right > hr { background: rgb(55 65 81); }
    .dark .navigation-header .top-header-right .header-tool-count-notification .badge-error { box-shadow: 0 0 0 2px rgb(31 41 55); }
}
@media (min-width: 768px) {
    html body .navigation-header .top-header-right > .relative.inline-flex.header-user-group > button {
        height: 34px !important;
        border: 1px solid rgb(226 232 240) !important;
        border-radius: 10px !important;
        padding: 0 0.6rem !important;
        gap: 0.4rem;
    }
    html.dark body .navigation-header .top-header-right > .relative.inline-flex.header-user-group > button { border-color: rgb(55 65 81) !important; }
}

/* Current page row while hovered: stays solid (a shade darker) with white text, in the mega panel and the
   sidebar/drawer — the generic row hover turned its text green on green. */
body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-links li.is-current > div:hover,
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-links li.is-current > div:hover {
    background: #047857 !important;
}
.navigation-bar .mega-links li > div > a.link-active,
.navigation-bar .mobile-links li > div > a.link-active,
.navigation-bar .mega-links li > div:hover > a.link-active,
.navigation-bar .mobile-links li > div:hover > a.link-active {
    color: #fff !important;
}

/* Sidebar / drawer scrolling: momentum stays inside the menu (no hand-off to the page), smooth programmatic
   scrolls (top-menu.js scrolls only this box, never the window). */
html.nav-accordion body .navigation-bar .nav-links {
    overscroll-behavior: contain;
    scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
    html.nav-accordion body .navigation-bar .nav-links { scroll-behavior: auto; }
}

/* ── Header pickers: Fiscal Year / Branch Unit (#headerFiscalYearModal, #headerBranchUnitModal) ──
   The search icon sat under the input (invisible), the list touched the search box, and rows were indigo blocks with
   a heavy bottom border. Now: icon inside the field, 0.75rem between search and list, calm rows with breathing room,
   emerald for the current one (the app's accent), check mark on it. IDs out-rank the rows' inline !utilities. */
:is(#headerFiscalYearModal, #headerBranchUnitModal) .modal-box {
    width: min(32rem, calc(100vw - 2rem));
    max-width: none;
}
:is(#headerFiscalYearModal, #headerBranchUnitModal) .modal-box > div:not(.modal-action) > div[x-data] > .relative {
    position: relative;
}
:is(#headerFiscalYearModal, #headerBranchUnitModal) .relative > :is(i, svg).fa-magnifying-glass,
:is(#headerFiscalYearModal, #headerBranchUnitModal) .relative > svg[data-icon="magnifying-glass"] {
    position: absolute !important;
    left: 0.85rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 2 !important;
    width: 0.8rem;
    height: 0.8rem;
    color: rgb(100 116 139) !important;
    pointer-events: none;
}
:is(#headerFiscalYearModal, #headerBranchUnitModal) input:is(#headerFiscalYearSearch, #headerBranchUnitSearch) {
    height: 2.6rem !important;
    min-height: 2.6rem !important;
    padding-left: 2.4rem !important;
    padding-right: 0.85rem !important;
    border: 1px solid rgb(226 232 240) !important;
    border-radius: 0.7rem !important;
    background: rgb(248 250 252) !important;
    font-size: 0.9rem !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
:is(#headerFiscalYearModal, #headerBranchUnitModal) input:is(#headerFiscalYearSearch, #headerBranchUnitSearch):focus {
    outline: none !important;
    background: #fff !important;
    border-color: rgb(16 185 129) !important;
    box-shadow: 0 0 0 3px rgb(16 185 129 / 0.18) !important;
}
:is(#headerFiscalYearModal, #headerBranchUnitModal) :is([x-ref="fyList"], [x-ref="branchList"]) {
    margin-top: 0.75rem !important;
    gap: 0.4rem !important;
    padding: 0.15rem 0.25rem 0.15rem 0 !important;
    scrollbar-width: thin;
    scrollbar-color: #10b981 #d1fae5;
}

:is(#headerFiscalYearModal, #headerBranchUnitModal) .header-select-popup-row {
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.65rem !important;
    min-height: 2.75rem !important;
    height: auto !important;
    padding: 0.55rem 2.4rem 0.55rem 0.9rem !important;
    border: 1px solid rgb(226 232 240) !important;
    border-radius: 0.7rem !important;
    background: #fff !important;
    color: rgb(51 65 85) !important;
    font-weight: 500 !important;
    text-transform: none !important;
    box-shadow: none !important;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease !important;
}
:is(#headerFiscalYearModal, #headerBranchUnitModal) .header-select-popup-row :is(i, svg) {
    color: rgb(5 150 105) !important;
}
:is(#headerFiscalYearModal, #headerBranchUnitModal) .header-select-popup-row:hover {
    background: rgb(240 253 244) !important;
    border-color: rgb(167 243 208) !important;
    color: rgb(4 120 87) !important;
    transform: translateX(2px);
}
/* current: the row carries !bg-indigo-600 from the view */
:is(#headerFiscalYearModal, #headerBranchUnitModal) .header-select-popup-row[class*="!bg-indigo-600"] {
    background: linear-gradient(135deg, #059669, #047857) !important;
    border-color: #047857 !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: 0 8px 18px -10px rgb(4 120 87 / 0.9) !important;
    transform: none;
}
:is(#headerFiscalYearModal, #headerBranchUnitModal) .header-select-popup-row[class*="!bg-indigo-600"] :is(i, svg) {
    color: #fff !important;
}
:is(#headerFiscalYearModal, #headerBranchUnitModal) .header-select-popup-row[class*="!bg-indigo-600"]::after {
    content: "\2713";
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    font-weight: 700;
}

.dark :is(#headerFiscalYearModal, #headerBranchUnitModal) input:is(#headerFiscalYearSearch, #headerBranchUnitSearch) {
    background: rgb(31 41 55) !important;
    border-color: rgb(55 65 81) !important;
    color: rgb(226 232 240) !important;
}
.dark :is(#headerFiscalYearModal, #headerBranchUnitModal) .header-select-popup-row:not([class*="!bg-indigo-600"]) {
    background: rgb(31 41 55) !important;
    border-color: rgb(55 65 81) !important;
    color: rgb(226 232 240) !important;
}
.dark :is(#headerFiscalYearModal, #headerBranchUnitModal) .header-select-popup-row:not([class*="!bg-indigo-600"]):hover {
    background: rgb(6 78 59 / 0.45) !important;
    border-color: rgb(16 185 129 / 0.5) !important;
    color: rgb(167 243 208) !important;
}

/* ── Button rows without a gap ──
   56 views put two or more buttons straight into a `flex` row with no gap-* / space-x-* (Save | Close touched).
   Adjacent buttons there get 0.5rem between them. Zero specificity (:where), so any gap-/ml- utility in a view still
   wins; skipped for button groups (.join), vertical stacks and table action cells (spaced by ui-skin). */
:where(.flex:not([class*="gap-"], [class*="space-x-"], .join, .flex-col, .ui-td-actions)) > :where(.btn ~ .btn, .btn ~ button, button ~ .btn) {
    margin-inline-start: 0.5rem;
}

/* ── Category + list split pages (Checkpoint, Tariff / Event Charge / Discount-Penalty setups, Picnic rate, Ticket
   entry rate…) ─────────────────────────────────────────────────────────────────────────────────────────────────
   Ten views share the old markup `.flex > .w-1/5.text-center.border.rounded.bg-white` (category panel) +
   `.w-4/5` (list). Billing › Event Charge Parameters already has the compact panel; the others now get the same look,
   without touching their markup:
     - panel: min 18rem, light background, divider on the right, "Category" heading bar, scrollable list of cards,
       selected category highlighted;
     - list side: takes all the remaining width; a table in a flex row fills it instead of shrinking to its content
       (`mary-table-root`, added by App\View\Components\MaryTable). */
.flex > .w-1\/5.text-center.border.rounded.bg-white {
    flex: 0 0 auto;
    width: 20%;
    min-width: 18rem;
    max-height: calc(100vh - 12rem);
    display: flex;
    flex-direction: column;
    text-align: left;
    border: 0;
    border-right: 1px solid rgb(229 231 235);
    border-radius: 0;
    background: rgb(248 250 252 / 0.7);
}
.flex > .w-1\/5.text-center.border.rounded.bg-white > label:first-child {
    display: block;
    margin: 0;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgb(31 41 55);
    background: #fff;
    border-bottom: 1px solid rgb(229 231 235);
}
.flex > .w-1\/5.text-center.border.rounded.bg-white > ul {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 !important;
    padding: 0.75rem 1.25rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #10b981 #d1fae5;
}
.flex > .w-1\/5.text-center.border.rounded.bg-white > ul > li {
    list-style: none;
    max-width: none;
}
/* category cards (x-list items) */
.flex > .w-1\/5.text-center.border.rounded.bg-white > ul > li:not(:first-child) {
    padding: 0.5rem 0.75rem;
    border: 1px solid rgb(229 231 235);
    border-radius: 0.375rem;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.flex > .w-1\/5.text-center.border.rounded.bg-white > ul > li:not(:first-child):hover {
    border-color: rgb(110 231 183);
    background: rgb(236 253 245 / 0.6);
}
/* the selected category's button carries .font-bold (Alpine) — highlight its card */
.flex > .w-1\/5.text-center.border.rounded.bg-white > ul > li:has(button.font-bold) {
    border-color: rgb(52 211 153);
    background: rgb(236 253 245);
    box-shadow: 0 1px 3px rgb(15 23 42 / 0.1);
}
.flex > .w-1\/5.text-center.border.rounded.bg-white > ul > li > .flex {
    align-items: flex-start;
    min-width: 0;
}
.flex > .w-1\/5.text-center.border.rounded.bg-white > ul > li > .flex > button {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
}
.flex > .w-1\/5.text-center.border.rounded.bg-white > ul > li > .flex > .badge {
    flex: none;
    margin-top: 0.1rem;
}

.flex > .w-1\/5.text-center.border.rounded.bg-white + .w-4\/5,
.flex > .w-1\/5 + .w-4\/5 {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
}

/* a table placed in a flex row takes the free width */
.flex:not(.flex-col) > .mary-table-root {
    flex: 1 1 auto;
    min-width: 0;
}

.dark .flex > .w-1\/5.text-center.border.rounded.bg-white { background: rgb(17 24 39 / 0.6); border-right-color: rgb(55 65 81); }
.dark .flex > .w-1\/5.text-center.border.rounded.bg-white > label:first-child { background: rgb(31 41 55); color: rgb(229 231 235); border-bottom-color: rgb(55 65 81); }
.dark .flex > .w-1\/5.text-center.border.rounded.bg-white > ul > li:not(:first-child) { background: rgb(31 41 55); border-color: rgb(55 65 81); }
/* …and inside plain wrappers (e.g. <x-slot:actions><div x-show="…"> Save Close </div>, 17 views): inline buttons
   with only a whitespace between them. */
:where(:is(div, span):not(.flex, .inline-flex, .grid, .inline-grid, .join, .ui-td-actions, [class*="gap-"], [class*="space-x-"])) > :where(.btn ~ .btn, .btn ~ button, button ~ .btn) {
    margin-inline-start: 0.5rem;
}

/* ── Empty-state message, one look across the project ─────────────────────────────────────────────
   891 of the ~1,000 hand-written "No … Found..." messages (reports, lists, Alpine tables) share the markup
   <span class="font-medium py-8 text-gray-400 text-xl">. They now look like the table's standard empty state
   (App\View\Components\MaryTable: inbox icon over calm grey text) — on screen only; printed reports stay plain text. The remaining on-screen ones carry .ui-empty-state. */
@media screen {
    span.font-medium.py-8.text-gray-400.text-xl,
    .ui-empty-state {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        padding: 2rem 0.5rem;
        font-size: 0.875rem;
        font-weight: 400;
        line-height: 1.25rem;
        color: rgb(107 114 128);
        text-align: center;
    }
    span.font-medium.py-8.text-gray-400.text-xl::before,
    .ui-empty-state::before {
        content: "";
        display: block;
        width: 2rem;
        height: 2rem;
        background: currentColor;
        opacity: 0.4;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M2.25 13.5h3.86a2.25 2.25 0 0 1 2.012 1.244l.256.512a2.25 2.25 0 0 0 2.013 1.244h3.218a2.25 2.25 0 0 0 2.013-1.244l.256-.512a2.25 2.25 0 0 1 2.013-1.244h3.859m-19.5.338V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18v-4.162c0-.224-.034-.447-.1-.661L19.24 5.338a2.25 2.25 0 0 0-2.15-1.588H6.911a2.25 2.25 0 0 0-2.15 1.588L2.35 13.177a2.25 2.25 0 0 0-.1.661Z'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M2.25 13.5h3.86a2.25 2.25 0 0 1 2.012 1.244l.256.512a2.25 2.25 0 0 0 2.013 1.244h3.218a2.25 2.25 0 0 0 2.013-1.244l.256-.512a2.25 2.25 0 0 1 2.013-1.244h3.859m-19.5.338V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18v-4.162c0-.224-.034-.447-.1-.661L19.24 5.338a2.25 2.25 0 0 0-2.15-1.588H6.911a2.25 2.25 0 0 0-2.15 1.588L2.35 13.177a2.25 2.25 0 0 0-.1.661Z'/%3E%3C/svg%3E") center / contain no-repeat;
    }
    .dark :is(span.font-medium.py-8.text-gray-400.text-xl, .ui-empty-state) { color: rgb(156 163 175); }
    /* the other on-screen messages (68, wrapped in .ui-empty-state): same look, a little less padding in small panels */
    .ui-empty-state { padding: 1.25rem 0.5rem; }
    /* the bordered box many of them sit in: the table already frames the message */
    div.flex.justify-center.items-center.border.rounded-xl > span.font-medium.py-8.text-gray-400.text-xl {
        width: 100%;
    }
}

/* daisyUI 5 drawer (<x-drawer>): its open-state rules are :where() (zero specificity) and rely on cascade
   layers, which resources/css/app.css does not use, so .drawer-side { visibility: hidden } kept every drawer
   invisible while open. Restate them with real specificity. */
.drawer-toggle:checked ~ .drawer-side { pointer-events: auto; visibility: visible; opacity: 1; overflow-y: auto; }
.drawer-toggle:checked ~ .drawer-side > :not(.drawer-overlay) { translate: 0%; transform: none; will-change: auto; }

/* `.select2 { width: 250px !important }` above sizes the legacy selects; a select marked w-full (the
   admin.select2 component, Alpine-built pickers) fills its column instead. */
select.w-full + .select2.select2-container { width: 100% !important; }

/* header-tools-date-mobile shown below 1200: the compact header's date pill (its Tailwind md:hidden would hide it from 768px) */
@media (max-width: 1199px) {
    .navigation-header .top-header-right .header-tools-date-mobile:not([x-cloak]) {
        display: inline-flex !important;
    }
}

/* Quick Tools panel below 1200, all layouts: small and flat. A 6-column grid: the two labelled selects on one row, then
   the language switch beside square icon buttons. */
@media (max-width: 1199px) {
    .navigation-header .top-header-right .header-tools-group .header-tools-panel {
        width: min(25rem, calc(100vw - 1.5rem)) !important;
        max-width: calc(100vw - 1.5rem) !important;
        padding: .5rem !important;
    }
    .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) {
        display: grid !important;
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
        gap: .375rem !important;
        align-items: stretch !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > * { grid-column: span 2 !important; grid-row: auto !important; width: 100% !important; min-width: 0 !important; margin: 0 !important; }
    .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > :is(.header-tool-fiscal, .header-tool-branch, .header-tool-admin-org, .header-tool-admin-festive) { grid-column: span 3 !important; order: 1 !important; }
    .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > .header-tool-language { grid-column: span 3 !important; order: 2 !important; }
    .navigation-header .top-header-right .header-tools-panel .admin-quick-tools-panel > .header-tool-language { grid-column: span 2 !important; }
    .navigation-header .top-header-right .header-tools-panel li.customer-quick-tools-row > .header-tool-language { grid-column: span 4 !important; }
    .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > :is(.header-tool-favorites, .header-tool-count-notification, .header-tool-user-notification) { grid-column: span 1 !important; order: 3 !important; }
    .navigation-header .top-header-right .header-tools-panel .admin-quick-tools-panel > div:not([class*="header-tool"]) { order: 2 !important; }

    .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > .header-tool-language > div {
        display: flex !important;
        width: 100% !important;
        height: 2.25rem !important;
        flex-direction: row !important;
        align-items: center !important;
        border: 1px solid #dfe8f3 !important;
        border-radius: var(--leaf-input, .5rem) !important;
        background: #fff !important;
        overflow: hidden !important;
    }
    .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > .header-tool-language > div > span:first-child,
    .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > .header-tool-language > div > a { flex: 1 1 0 !important; min-width: 0 !important; height: 100% !important; padding: 0 .25rem !important; }
    .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > .header-tool-language > div > .w-px { height: 1.1rem !important; flex: 0 0 1px !important; }

    .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > :is(.header-tool-favorites, .header-tool-count-notification, .header-tool-user-notification),
    .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > :is(.header-tool-count-notification, .header-tool-user-notification) > div {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > .header-tool-favorites > *:not(.origin-top-right) { width: 100% !important; }
    .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > .header-tool-favorites > button,
    .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > :is(.header-tool-count-notification, .header-tool-user-notification) > div > .relative {
        width: 100% !important;
        min-width: 0 !important;
        height: 2.25rem !important;
        min-height: 2.25rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 1px solid #dfe8f3 !important;
        border-radius: var(--leaf-input, .5rem) !important;
        background: #fff !important;
        box-shadow: none !important;
    }
    .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > :is(.header-tool-count-notification, .header-tool-user-notification) > div > .relative > span.absolute {
        top: -.35rem !important;
        right: -.2rem !important;
        left: auto !important;
    }
    .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) :is(.header-context-select-btn, .header-tool-admin-org, .header-tool-admin-festive, .header-tool-module-switch) {
        display: flex !important;
        width: 100% !important;
        min-height: 2.25rem !important;
        height: 2.25rem !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 .5rem !important;
        font-size: .78rem !important;
        border-radius: var(--leaf-input, .5rem) !important;
        box-shadow: none !important;
    }

    html.dark .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > .header-tool-language > div,
    html.dark .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > .header-tool-favorites > button,
    html.dark .navigation-header .top-header-right .header-tools-panel :is(li.app-quick-tools-row, li.customer-quick-tools-row, .admin-quick-tools-panel) > :is(.header-tool-count-notification, .header-tool-user-notification) > div > .relative {
        border-color: #374151 !important;
        background: #1f2937 !important;
    }

    /* Profile menu: the generic two-column header list above squeezed these rows into half the width */
    .header-user-group:not(#_) .origin-top-right ul > li {
        display: block !important;
        grid-template-columns: none !important;
        width: 100% !important;
    }
    .header-user-group:not(#_) .origin-top-right ul > li > a,
    .header-user-group:not(#_) .origin-top-right ul > li > .ln-pref { width: 100% !important; }
    .header-user-group:not(#_) .origin-top-right ul > li > .ln-pref { display: flex !important; }
}

/* Phone header: Switch Module becomes an icon beside the tools, so the header does not grow a third row */
@media (max-width: 767px) {
    .navigation-header .top-header-right {
        grid-template-columns: auto auto !important;
        max-width: min(66vw, 17rem) !important;
    }
    .navigation-header .top-header-right > .header-user-group { grid-column: 1 / -1 !important; grid-row: 1 !important; justify-self: end; }
    .navigation-header .top-header-right > .header-tools-group { grid-column: 2 !important; grid-row: 2 !important; }
    .navigation-header .top-header-right > div:first-child:not(.header-tools-group, .header-user-group) { grid-column: 1 !important; grid-row: 2 !important; }
    .header-module-switch-label { display: none; }
    .btn.header-module-switch-btn { width: 2.15rem; height: 2.15rem; min-height: 2.15rem; padding: 0 !important; }
}

/* Phone menu hover. An older customer / admin rule, also in the built app.css, turned the text white over the accordion's pale hover. */
html.nav-accordion body .navigation-bar .top-menu-module-item:not(.is-open) > .mobile-item:hover { color: #065f46 !important; }
html.dark.nav-accordion body .navigation-bar .top-menu-module-item:not(.is-open) > .mobile-item:hover { color: #a7f3d0 !important; }

/* Profile menu, every width. Notifications and their sound are one group, built like the other rows. */
.header-user-group:not(#_):not(#_) .origin-top-right ul > li.profile-row-switches {
    display: block !important;
    width: auto !important;
    margin: .25rem .4rem !important;
    padding: .15rem 0 !important;
    border: 1px solid #edf1f6 !important;
    border-radius: var(--leaf-md, .75rem) !important;
    background: #f8fafc !important;
}
.header-user-group:not(#_):not(#_) .origin-top-right ul > li.profile-row-switches > .ln-pref {
    display: flex !important;
    width: 100% !important;
    min-height: 2.5rem;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin: 0 !important;
    padding: .25rem .5rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #334155 !important;
    font-size: .875rem;
    font-weight: 500;
}
.header-user-group:not(#_):not(#_) .origin-top-right ul > li.profile-row-switches > .ln-pref:disabled { opacity: .55; }
.header-user-group:not(#_):not(#_) .origin-top-right .ln-pref-label { gap: .6rem; min-width: 0; }
.header-user-group:not(#_):not(#_) .origin-top-right .ln-pref-label > span { overflow: hidden; text-overflow: ellipsis; }
.header-user-group:not(#_):not(#_) .origin-top-right .ln-pref-label > :is(i, svg),
.header-user-group:not(#_):not(#_) .origin-top-right .ln-pref-label > .ln-pref-ic > :is(i, svg) {
    display: inline-flex;
    flex: 0 0 2rem;
    box-sizing: border-box;
    width: 2rem;
    height: 2rem;
    padding: .52rem;
    align-items: center;
    justify-content: center;
    border-radius: .6rem;
    font-size: .85rem;
    color: #4f46e5;
    background: #e0e7ff;
}
html.dark .header-user-group:not(#_):not(#_) .origin-top-right ul > li.profile-row-switches {
    border-color: #1e293b !important;
    background: rgb(255 255 255 / .03) !important;
}
html.dark .header-user-group:not(#_):not(#_) .origin-top-right ul > li.profile-row-switches > .ln-pref { color: #e2e8f0 !important; }
html.dark .header-user-group:not(#_):not(#_) .origin-top-right .ln-pref-label > :is(i, svg),
html.dark .header-user-group:not(#_):not(#_) .origin-top-right .ln-pref-label > .ln-pref-ic > :is(i, svg) { color: #a5b4fc; background: rgb(99 102 241 / .18); }

/* Mega / Sidebar: two equal cells, each label centred */
.header-user-group:not(#_):not(#_) .origin-top-right div.inline-flex.items-stretch.w-full {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .25rem;
    padding: .2rem !important;
    align-items: stretch;
}
.header-user-group:not(#_):not(#_) .origin-top-right div.inline-flex.items-stretch.w-full > span.w-px { display: none; }
.header-user-group:not(#_):not(#_) .origin-top-right div.inline-flex.items-stretch.w-full > :is(.header-menu-mode-active, .header-menu-mode-inactive) {
    display: flex !important;
    width: 100% !important;
    min-height: 1.85rem;
    margin: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
}

/* x-show on buttons: resources/css/app.css forces `.btn { display: inline-flex !important }`, which beat the
   display:none Alpine writes inline, so hidden buttons stayed visible. The attribute selector out-ranks it. */
.btn[style*="display: none"],
.btn-sm[style*="display: none"],
.btn-lg[style*="display: none"],
.btn[hidden] {
    display: none !important;
}


/* ===== menu section headers: one look for mega menu, desktop sidebar and mobile / accordion nav ===== */
body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .content .row header,
body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-section > header,
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-section > header button {
    color: #065f46 !important;
    background: linear-gradient(135deg, #d1fae5, #ecfdf5) !important;
    border: 0 !important;
    border-radius: 0.6rem !important;
    box-shadow: inset 0 0 0 1px rgb(16 185 129 / 0.22), 0 2px 6px -3px rgb(4 120 87 / 0.25) !important;
    text-shadow: none;
}
body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-section > header {
    margin: 0.3rem 0.3rem 0.2rem;
    text-transform: none;
    letter-spacing: 0.01em;
}
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-section > header button:hover {
    background: linear-gradient(135deg, #bbf7d0, #d1fae5) !important;
}
body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-section > header button > span:first-child,
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-section > header button > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .content .row header::before,
body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-section > header button > span:first-child::before,
html.nav-accordion body .navigation-bar .top-menu-module-item .mobile-section > header button > span:first-child::before {
    content: "";
    flex: none;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: #059669;
    box-shadow: 0 0 0 3px rgb(5 150 105 / 0.18);
}
.dark body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .content .row header,
.dark body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-section > header,
html.dark.nav-accordion body .navigation-bar .top-menu-module-item .mobile-section > header button {
    color: #a7f3d0 !important;
    background: rgb(16 185 129 / 0.16) !important;
    box-shadow: inset 0 0 0 1px rgb(52 211 153 / 0.25) !important;
}
html.dark.nav-accordion body .navigation-bar .top-menu-module-item .mobile-section > header button:hover {
    background: rgb(16 185 129 / 0.24) !important;
}
.dark body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .content .row header::before,
.dark body.desktop-sidebar-menu .navigation-bar .top-menu-module-item .mobile-section > header button > span:first-child::before,
html.dark.nav-accordion body .navigation-bar .top-menu-module-item .mobile-section > header button > span:first-child::before {
    background: #34d399;
    box-shadow: 0 0 0 3px rgb(52 211 153 / 0.2);
}


/* ===== dark mode: top menu bar + dashboard greeting banner =====
   The bar's green comes from the compiled app.css and the banner from fixed Tailwind gradient
   classes, neither had a dark variant, so both stayed bright emerald on a dark page. */
html.dark .navigation-bar {
    background: linear-gradient(90deg, #0d2a24 0%, #0f1b24 45%, #0f172a 100%) !important;
    color: #e2e8f0;
    box-shadow: inset 0 -1px 0 rgb(52 211 153 / 0.16), 0 6px 16px -10px rgb(0 0 0 / 0.7);
}
html.dark body:not(.desktop-sidebar-menu) .navigation-bar .nav-links > .top-menu-module-item > .desktop-item {
    color: #cbd5e1;
}
html.dark body:not(.desktop-sidebar-menu) .navigation-bar .nav-links > .top-menu-module-item > .desktop-item:hover,
html.dark body:not(.desktop-sidebar-menu) .navigation-bar .nav-links > .top-menu-module-item > .desktop-item:focus-visible {
    background: rgb(16 185 129 / 0.12);
    color: #a7f3d0;
}
html.dark body:not(.desktop-sidebar-menu) .navigation-bar .nav-links > .top-menu-module-item.active > .desktop-item {
    background: rgb(16 185 129 / 0.16);
    color: #6ee7b7;
}
html.dark body:not(.desktop-sidebar-menu) .navigation-bar .nav-links > .top-menu-module-item.keyboard-open > .desktop-item {
    background: rgb(16 185 129 / 0.2);
    color: #a7f3d0;
}
html.dark body:not(.desktop-sidebar-menu) .navigation-bar .nav-glide {
    background: #34d399;
    box-shadow: 0 0 10px rgb(52 211 153 / 0.45);
}

html.dark .dash-greeting {
    background-image: linear-gradient(135deg, #0b3a30 0%, #0d2f2b 50%, #0f2a33 100%) !important;
    box-shadow: inset 0 0 0 1px rgb(52 211 153 / 0.14), 0 10px 24px -14px rgb(0 0 0 / 0.8) !important;
    color: #ecfdf5;
}
html.dark .dash-greeting > .bg-gradient-to-l {
    background-image: linear-gradient(to left, rgb(2 30 26 / 0.75), rgb(2 30 26 / 0.25), transparent) !important;
}
html.dark .dash-greeting > .absolute .filter {
    opacity: 0.06 !important;
}
html.dark .dash-greeting p {
    color: rgb(209 250 229 / 0.75) !important;
}
html.dark .dash-greeting :is(span, a).rounded-md {
    background: rgb(255 255 255 / 0.05) !important;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1) !important;
    color: #d1fae5;
}


/* ===== Branch Unit picker: roomier, two columns, compact rows =====
   Organisations with many branch units got one long column of tall two-line rows under the search box.
   Wider box, two columns from 640px, icon chip + name + muted address, soft fade at the scroll edges,
   slim scrollbar that suits both themes. The current branch is pinned first by the view. */
#headerBranchUnitModal .modal-box {
    width: min(46rem, calc(100vw - 2rem));
}
#headerBranchUnitModal .hb-count {
    margin: 0.45rem 0 0 0.2rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: rgb(100 116 139);
}
#headerBranchUnitModal [x-ref="branchList"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem !important;
    margin-top: 0.5rem !important;
    max-height: min(58vh, 34rem) !important;
    padding: 0.4rem 0.4rem 0.4rem 0.1rem !important;
    scrollbar-width: thin;
    scrollbar-color: rgb(16 185 129 / 0.45) transparent;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 0.55rem, #000 calc(100% - 0.55rem), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 0.55rem, #000 calc(100% - 0.55rem), transparent 100%);
}
@media (min-width: 640px) {
    #headerBranchUnitModal [x-ref="branchList"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
#headerBranchUnitModal [x-ref="branchList"]::-webkit-scrollbar { width: 6px; }
#headerBranchUnitModal [x-ref="branchList"]::-webkit-scrollbar-track { background: transparent; }
#headerBranchUnitModal [x-ref="branchList"]::-webkit-scrollbar-thumb { background: rgb(16 185 129 / 0.45); border-radius: 999px; }
#headerBranchUnitModal [x-ref="branchList"] > div[x-show] { grid-column: 1 / -1; }

#headerBranchUnitModal .header-select-popup-row {
    min-height: 3.1rem !important;
    padding: 0.5rem 2.1rem 0.5rem 0.55rem !important;
}
#headerBranchUnitModal .header-select-popup-row > span {
    align-items: center !important;
    gap: 0.65rem !important;
}
#headerBranchUnitModal .header-select-popup-row > span > :is(i, svg) {
    box-sizing: border-box;
    flex: 0 0 2rem;
    width: 2rem !important;
    height: 2rem !important;
    margin: 0 !important;
    padding: 0.55rem;
    border-radius: 0.6rem;
    background: rgb(16 185 129 / 0.12);
    font-size: 0.8rem !important;
}
#headerBranchUnitModal .header-select-popup-row span.flex-col > span:first-child {
    font-size: 0.86rem;
    line-height: 1.25 !important;
}
#headerBranchUnitModal .header-select-popup-row span.flex-col > span:last-child {
    margin-top: 1px;
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
    opacity: 1 !important;
    color: rgb(100 116 139);
}
#headerBranchUnitModal .header-select-popup-row span.flex-col > span:last-child:empty { display: none; }
#headerBranchUnitModal .header-select-popup-row[class*="!bg-indigo-600"] > span > :is(i, svg) {
    background: rgb(255 255 255 / 0.2);
}
#headerBranchUnitModal .header-select-popup-row[class*="!bg-indigo-600"] span.flex-col > span:last-child {
    color: rgb(255 255 255 / 0.8);
}
.dark #headerBranchUnitModal .hb-count,
.dark #headerBranchUnitModal .header-select-popup-row:not([class*="!bg-indigo-600"]) span.flex-col > span:last-child {
    color: rgb(148 163 184);
}
.dark #headerBranchUnitModal .header-select-popup-row:not([class*="!bg-indigo-600"]) > span > :is(i, svg) {
    background: rgb(16 185 129 / 0.16);
    color: rgb(110 231 183) !important;
}


/* ===== Header pickers: detail line under each row =====
   Fiscal Year rows show Start / End (BS, AD in brackets); Branch Unit rows show address and contact number. */
:is(#headerFiscalYearModal, #headerBranchUnitModal) .header-select-popup-row:has(.hy-meta) {
    min-height: 3.1rem !important;
}
#headerFiscalYearModal .header-select-popup-row {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}
#headerFiscalYearModal .hy-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
}
:is(#headerFiscalYearModal, #headerBranchUnitModal) .hy-meta {
    display: flex;
    flex-wrap: wrap;
    column-gap: 0.85rem;
    row-gap: 1px;
    min-width: 0;
    margin-top: 2px;
    font-size: 0.72rem !important;
    font-weight: 500;
    line-height: 1.35 !important;
    color: rgb(100 116 139);
}
:is(#headerFiscalYearModal, #headerBranchUnitModal) .hy-meta > span {
    max-width: 100%;
    white-space: nowrap;
}
:is(#headerFiscalYearModal, #headerBranchUnitModal) .hy-meta b {
    font-weight: 600;
    color: rgb(71 85 105);
}
:is(#headerFiscalYearModal, #headerBranchUnitModal) .hy-meta :is(i, svg) {
    width: 0.62rem !important;
    height: 0.62rem !important;
    margin-right: 0.15rem;
    font-size: 0.62rem !important;
    color: rgb(16 185 129) !important;
    vertical-align: -0.05em;
}
:is(#headerFiscalYearModal, #headerBranchUnitModal) .hy-ad {
    margin-left: 0.25rem;
    opacity: 0.75;
}
/* current row (emerald) */
:is(#headerFiscalYearModal, #headerBranchUnitModal) .header-select-popup-row[class*="!bg-indigo-600"] .hy-meta,
:is(#headerFiscalYearModal, #headerBranchUnitModal) .header-select-popup-row[class*="!bg-indigo-600"] .hy-meta b,
:is(#headerFiscalYearModal, #headerBranchUnitModal) .header-select-popup-row[class*="!bg-indigo-600"] .hy-meta :is(i, svg) {
    color: rgb(255 255 255 / 0.85) !important;
}
/* dark */
.dark :is(#headerFiscalYearModal, #headerBranchUnitModal) .header-select-popup-row:not([class*="!bg-indigo-600"]) .hy-meta { color: rgb(148 163 184); }
.dark :is(#headerFiscalYearModal, #headerBranchUnitModal) .header-select-popup-row:not([class*="!bg-indigo-600"]) .hy-meta b { color: rgb(203 213 225); }
.dark :is(#headerFiscalYearModal, #headerBranchUnitModal) .header-select-popup-row:not([class*="!bg-indigo-600"]) .hy-meta :is(i, svg) { color: rgb(52 211 153) !important; }


/* ===== Header modals: Switch Module + Notification (.hm-*) =====
   Were a pink box (bg-red-50, unreadable in dark), grey outline buttons and "Label : (0)" lines.
   Now the same card rows as the FY / Branch pickers: icon chip, label, code tag or count pill. */
.hm-modal .modal-box.hm-box {
    width: min(28rem, calc(100vw - 2rem));
    max-width: none;
    padding: 1.4rem 1.5rem 1.25rem;
}
.hm-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0.25rem 0 0.25rem;
}
.hm-row {
    --hm-c: #059669; --hm-bg: #d1fae5;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3rem;
    padding: 0.5rem 0.75rem 0.5rem 0.55rem;
    border: 1px solid rgb(226 232 240);
    border-radius: 0.75rem;
    background: #fff;
    color: rgb(30 41 59);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.hm-row:hover,
.hm-row:focus-visible {
    border-color: color-mix(in srgb, var(--hm-c) 45%, transparent);
    background: color-mix(in srgb, var(--hm-c) 6%, #fff);
    box-shadow: 0 6px 14px -10px color-mix(in srgb, var(--hm-c) 70%, transparent);
    transform: translateX(2px);
    outline: none;
}
.hm-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.1rem;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.65rem;
    background: var(--hm-bg);
    color: var(--hm-c);
    font-size: 0.85rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.hm-chip :is(i, svg) { width: 0.9rem; height: 0.9rem; }
.hm-row:hover .hm-chip { background: var(--hm-c); color: #fff; }
.hm-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-tag {
    flex: none;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgb(241 245 249);
    color: rgb(100 116 139);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.hm-go { flex: none; width: 0.75rem; color: rgb(148 163 184); font-size: 0.75rem; transition: transform 0.15s ease, color 0.15s ease; }
.hm-row:hover .hm-go { color: var(--hm-c); transform: translateX(2px); }
.hm-count {
    flex: none;
    min-width: 1.75rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: rgb(241 245 249);
    color: rgb(100 116 139);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
}
.hm-count.is-pending { background: #ef4444; color: #fff; box-shadow: 0 4px 10px -5px rgb(239 68 68 / 0.8); }

.hm-tone-emerald, .hm-tone-core { --hm-c: #059669; --hm-bg: #d1fae5; }
.hm-tone-sky                    { --hm-c: #0284c7; --hm-bg: #e0f2fe; }
.hm-tone-violet                 { --hm-c: #7c3aed; --hm-bg: #ede9fe; }
.hm-tone-amber                  { --hm-c: #d97706; --hm-bg: #fef3c7; }
.hm-tone-rose                   { --hm-c: #e11d48; --hm-bg: #ffe4e6; }
.hm-tone-hms                    { --hm-c: #4f46e5; --hm-bg: #e0e7ff; }
.hm-tone-rms                    { --hm-c: #ea580c; --hm-bg: #ffedd5; }
.hm-tone-admin                  { --hm-c: #2563eb; --hm-bg: #dbeafe; }
.hm-tone-crm                    { --hm-c: #c026d3; --hm-bg: #fae8ff; }
.hm-tone-tms                    { --hm-c: #0d9488; --hm-bg: #ccfbf1; }

/* dark */
.dark .hm-row {
    background: rgb(31 41 55);
    border-color: rgb(55 65 81);
    color: rgb(226 232 240);
}
.dark .hm-row:hover,
.dark .hm-row:focus-visible {
    background: color-mix(in srgb, var(--hm-c) 14%, rgb(31 41 55));
    border-color: color-mix(in srgb, var(--hm-c) 55%, transparent);
}
.dark .hm-chip { background: color-mix(in srgb, var(--hm-c) 22%, transparent); color: color-mix(in srgb, var(--hm-c) 55%, #fff); }
.dark .hm-row:hover .hm-chip { background: var(--hm-c); color: #fff; }
.dark .hm-tag,
.dark .hm-count:not(.is-pending) { background: rgb(255 255 255 / 0.07); color: rgb(148 163 184); }
.dark .hm-go { color: rgb(100 116 139); }
.dark .hm-row:hover .hm-go { color: color-mix(in srgb, var(--hm-c) 55%, #fff); }

/* hm-chip icon colour: set on the icon itself, a global icon rule otherwise kept it dark on the solid hover chip */
.hm-chip :is(i, svg) { color: var(--hm-c) !important; }
.hm-row:is(:hover, :focus-visible) .hm-chip :is(i, svg) { color: #fff !important; }
.dark .hm-chip :is(i, svg) { color: color-mix(in srgb, var(--hm-c) 55%, #fff) !important; }
.dark .hm-row:is(:hover, :focus-visible) .hm-chip :is(i, svg) { color: #fff !important; }

/* header tool icon colour stays on the trigger: the Notification / bell modals render inside the same header
   wrapper, so ".header-tool-count-notification svg" also greyed the icons in the modal (Close x, row chips). */
.navigation-header .top-header-right :is(.header-tool-count-notification, .header-tool-user-notification) .modal :is(svg, .notification-bell-icon),
.navigation-header .top-header-right :is(.header-tool-count-notification, .header-tool-user-notification):hover .modal :is(svg, .notification-bell-icon) {
    color: inherit;
}
/* Dark: the header's slate-600 icon colour has no dark version, so the bells nearly vanished. Unread keeps its amber. */
html.dark .navigation-header .top-header-right :is(.header-tool-count-notification, .header-tool-user-notification) :is(svg, .notification-bell-icon) { color: rgb(203 213 225); }
html.dark .navigation-header .top-header-right :is(.header-tool-count-notification, .header-tool-user-notification):hover :is(svg, .notification-bell-icon) { color: rgb(110 231 183); }
html.dark .navigation-header .top-header-right :is(.header-tool-count-notification, .header-tool-user-notification) :is(.notification-bell-ringing, .text-amber-500, .text-amber-500 svg, .notification-bell-ringing svg) { color: rgb(251 191 36); }
html.dark .navigation-header .top-header-right :is(.header-tool-count-notification, .header-tool-user-notification) .modal :is(svg, .notification-bell-icon),
html.dark .navigation-header .top-header-right :is(.header-tool-count-notification, .header-tool-user-notification):hover .modal :is(svg, .notification-bell-icon) {
    color: inherit;
}


/* ===== Sidebar / drawer links: one hover + one current-page look (light and dark) =====
   The desktop-sidebar rules (white hover block, dark green text, green left border), the accordion rule (solid row)
   and app.css's .link-active (dark block + white left edge) stacked up, so the current page read dark green on
   emerald with a stray edge. :not(#_) puts these above all of them. The row div carries the colour; the link
   inside stays transparent so the star button shares the same pill. */
.navigation-bar:not(#_) .mobile-links li > div {
    border-radius: 0.55rem;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.navigation-bar:not(#_) .mobile-links li > div > a {
    border-left: 0 !important;
    border-radius: 0.55rem !important;
    box-shadow: none !important;
    background: transparent !important;
}
/* hover (not the current page) */
.navigation-bar:not(#_) .mobile-links li:not(.is-current) > div:hover {
    background: rgb(16 185 129 / 0.1);
}
.navigation-bar:not(#_) .mobile-links li:not(.is-current) > div:hover > a {
    color: #047857 !important;
}
/* current page */
.navigation-bar:not(#_) .mobile-links li.is-current > div,
.navigation-bar:not(#_) .mobile-links li.is-current > div:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    box-shadow: 0 6px 14px -9px rgb(4 120 87 / 0.85);
}
.navigation-bar:not(#_) .mobile-links li.is-current > div > a,
.navigation-bar:not(#_) .mobile-links li > div > a.link-active {
    color: #fff !important;
    font-weight: 600 !important;
    transform: none !important;
}
.navigation-bar:not(#_) .mobile-links li.is-current .menu-fav-toggle {
    color: rgb(255 255 255 / 0.9);
}
.navigation-bar:not(#_) .mobile-links li.is-current .menu-fav-toggle:hover {
    background: rgb(255 255 255 / 0.18);
}
/* dark */
.dark .navigation-bar:not(#_) .mobile-links li:not(.is-current) > div > a {
    color: #cbd5e1 !important;
}
.dark .navigation-bar:not(#_) .mobile-links li:not(.is-current) > div:hover {
    background: rgb(16 185 129 / 0.14);
}
.dark .navigation-bar:not(#_) .mobile-links li:not(.is-current) > div:hover > a {
    color: #a7f3d0 !important;
}
.dark .navigation-bar:not(#_) .mobile-links li.is-current > div,
.dark .navigation-bar:not(#_) .mobile-links li.is-current > div:hover {
    background: linear-gradient(135deg, #059669, #065f46) !important;
    box-shadow: 0 6px 14px -9px rgb(0 0 0 / 0.8);
}


/* ===== Desktop sidebar motion (sidebar-motion.js) =====
   Mega <-> Sidebar: only the sidebar animates; the header, page and handle land in their final place at once.
   Handle: tucked away while the sidebar is open, shown while the pointer / focus is on the sidebar or the handle. */
@media (min-width: 1024px) {
    html.menu-mode-switching .navigation-header > header,
    html.menu-mode-switching .page-content-scroll,
    html.menu-mode-switching .desktop-sidebar-toggle-trigger,
    html.menu-mode-switching .navigation-bar,
    html.menu-mode-switching .navigation-bar * {
        transition: none !important;
    }
    html.sidebar-entering body.desktop-sidebar-menu:not(.desktop-sidebar-hidden) .navigation-bar {
        animation: ui-sidebar-in 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
    html.sidebar-leaving body.desktop-sidebar-menu .navigation-bar {
        animation: ui-sidebar-out 0.24s cubic-bezier(0.4, 0, 1, 1) both;
    }
    html.sidebar-leaving .desktop-sidebar-toggle-trigger {
        opacity: 0 !important;
    }

    body.desktop-sidebar-menu:not(.desktop-sidebar-hidden) .desktop-sidebar-toggle-trigger {
        opacity: 0;
        pointer-events: none;
        transform: translate3d(-100%, -50%, 0) !important;
        transition: opacity 0.18s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), width 0.2s ease, left 0.32s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }
    body.desktop-sidebar-menu.sidebar-peek:not(.desktop-sidebar-hidden) .desktop-sidebar-toggle-trigger,
    body.desktop-sidebar-menu:not(.desktop-sidebar-hidden) .desktop-sidebar-toggle-trigger:focus-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translate3d(0, -50%, 0) !important;
    }
}
@keyframes ui-sidebar-in {
    from { transform: translate3d(-100%, 0, 0); opacity: 0.35; }
    to   { transform: none; opacity: 1; }
}
@keyframes ui-sidebar-out {
    from { transform: none; opacity: 1; }
    to   { transform: translate3d(-100%, 0, 0); opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
    html.sidebar-entering body.desktop-sidebar-menu .navigation-bar,
    html.sidebar-leaving body.desktop-sidebar-menu .navigation-bar { animation: none !important; }
}

/* Empty states: centred icon. "<i class=\"fa-… block text-3xl\">" inside a text-center box: Font Awesome JS swaps the <i>
   for a block-level <svg>, which text-align ignores, so the icon stuck to the left edge far from "Nothing here". */
.text-center > svg.svg-inline--fa.block,
.text-center > i.block {
    margin-left: auto;
    margin-right: auto;
}


/* ===== Trix editor: dark theme, every screen =====
   trix.css draws the toolbar with light borders (#bbb / #ccc / #ddd) and black icon images at 60% opacity, so in
   dark the groups glared and the icons vanished. Icons are background images: inverted, not recoloured. */
.dark trix-toolbar .trix-button-group {
    border-color: #374151 !important;
    background: #1f2937;
}
.dark trix-toolbar .trix-button {
    border-bottom: 0 !important;
    background: transparent;
    color: #cbd5e1;
}
.dark trix-toolbar .trix-button:not(:first-child) {
    border-left-color: #374151 !important;
}
.dark trix-toolbar .trix-button--icon::before {
    filter: invert(1);
    opacity: 0.75;
}
.dark trix-toolbar .trix-button:not(:disabled):hover {
    background: rgb(255 255 255 / 0.06);
}
.dark trix-toolbar .trix-button:not(:disabled):hover::before {
    opacity: 1;
}
.dark trix-toolbar .trix-button.trix-active {
    background: rgb(16 185 129 / 0.22);
}
.dark trix-toolbar .trix-button.trix-active::before {
    opacity: 1;
}
.dark trix-toolbar .trix-button:disabled::before {
    opacity: 0.25;
}
.dark trix-toolbar .trix-dialog {
    background: #1f2937;
    border-top-color: #10b981;
    box-shadow: 0 12px 28px -12px rgb(0 0 0 / 0.8);
    color: #e2e8f0;
}
.dark trix-toolbar .trix-input--dialog {
    background: #111827;
    border-color: #374151;
    color: #e2e8f0;
}
.dark trix-toolbar .trix-button--dialog {
    color: #6ee7b7;
}
.dark trix-editor {
    background: #111827;
    border-color: #374151 !important;
    color: #e2e8f0;
}
.dark trix-editor:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 2px rgb(16 185 129 / 0.2);
    outline: none;
}
.dark trix-editor :is(pre, code) {
    background: #0b1220;
    color: #e2e8f0;
}
.dark trix-editor blockquote {
    border-left-color: #475569;
    color: #cbd5e1;
}
.dark trix-editor a { color: #6ee7b7; }
.dark trix-editor [data-trix-attachment] .attachment__caption { color: #94a3b8; }

/* Trix toolbar: keeps its single row; in narrow forms the row could scroll sideways and showed the app scrollbar
   as a strip under the toolbar, so that scrollbar is hidden (the row still scrolls with a trackpad / shift+wheel). */
trix-toolbar .trix-button-row { scrollbar-width: none; }
trix-toolbar .trix-button-row::-webkit-scrollbar { display: none; }

/* ===== Leaf shape: top-left + bottom-right rounded, the other two corners tight.
   Each block below is independent: comment one out to switch that part off.
   app.css forces .btn { border-radius: .25rem !important }, hence !important. Round buttons (btn-circle, rounded-full,
   the modal close X) follow the leaf too; only joined groups (.join) and link buttons are excluded. */
:root {
    --leaf-lg: 1.5rem 0.45rem 1.5rem 0.45rem;
    --leaf-md: 0.8rem 0.25rem 0.8rem 0.25rem;
    --leaf-sm: 0.75rem 0.15rem 0.75rem 0.15rem;   /* small chips (table edit / delete): stronger contrast so the leaf reads at 1.75rem */
    --leaf-tile: 0.75rem 0.2rem 0.75rem 0.2rem;    /* header tiles */
    --leaf-drop-big: 1rem;
    --leaf-drop-small: 0.3rem;
    --leaf-drop: var(--leaf-drop-big) var(--leaf-drop-small) var(--leaf-drop-big) var(--leaf-drop-small);   /* dropdowns / popovers */
    --leaf-input-big: 0.6rem;
    --leaf-input-small: 0.25rem;
    --leaf-input: var(--leaf-input-big) var(--leaf-input-small) var(--leaf-input-big) var(--leaf-input-small);   /* inputs: a light leaf only */
    --leaf-card-big: 1.25rem;
    --leaf-card-small: 0.4rem;
    --leaf-card: var(--leaf-card-big) var(--leaf-card-small) var(--leaf-card-big) var(--leaf-card-small);   /* cards + table frames */
    --leaf-tab-big: 0.85rem;
    --leaf-tab-small: 0.25rem;   /* pagination tabs attached to a table */
    --leaf-badge: 0.55rem 0.15rem 0.55rem 0.15rem;   /* badges */
    --leaf-icon: 0.9rem 0.3rem 0.9rem 0.3rem;   /* small icon squares (e.g. billing section dots) */
}

/* [leaf: buttons] every .btn of every type (primary, error, ghost, outline, table, header...). :not(#_) adds id weight so it
   beats the per-type radius rules in ui-skin.css / responsive-overrides.css; round, joined and link buttons stay excluded. */
html body .btn:not(#_):not(:where(.btn-link, .join-item, .join > .btn)) {
    border-radius: var(--leaf-md) !important;
}
html body .btn:is(.btn-sm, .btn-xs):not(#_):not(:where(.btn-link, .join-item, .join > .btn)) {
    border-radius: var(--leaf-sm) !important;
}

/* [leaf: modals] every modal window */
html body .modal-box:not(#_) {
    border-radius: var(--leaf-lg) !important;
}

/* [leaf: modals] no sideways scroll in any modal (phones especially). select2 measures its width before the modal is
   laid out and keeps that inline width, grid / flex children refuse to shrink below their content, long words and
   links do not wrap: each pushed the box wider than the screen and left a horizontal scrollbar. Tables keep their
   own overflow-x-auto wrapper. */
html body .modal-box:not(#_) {
    overflow-x: hidden;
    overflow-wrap: anywhere;
}
html body .modal-box:not(#_) .select2-container { max-width: 100% !important; }
html body .modal-box:not(#_) :is(.grid, .flex) > * { min-width: 0; }
html body .modal-box:not(#_) :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]) { max-width: 100%; }
html body .modal-box:not(#_) table { overflow-wrap: normal; }

/* [leaf: opt-in] a single modal even when the global modal block above is commented out: box-class="leaf-box" */
html body .modal-box.leaf-box {
    border-radius: var(--leaf-lg) !important;
}

/* [leaf: profile menu] header profile dropdown: panel, profile card, theme + Mega/Sidebar switch, rows, icon chips.
   Its own rules (responsive-overrides.css "Profile dropdown v2") already carry :not(#_), hence the doubled one here.
   The small "Explore" tag stays a pill. */
.header-user-group:not(#_):not(#_) .origin-top-right {
    border-radius: 1.2rem 0.4rem 1.2rem 0.4rem !important;
}
.header-user-group:not(#_):not(#_) .origin-top-right > .pt-0\.5.pb-2 {
    border-radius: 1rem 0.3rem 1rem 0.3rem !important;
}
.header-user-group:not(#_):not(#_) .origin-top-right > .pt-0\.5.pb-2 .grid > div,
.header-user-group:not(#_):not(#_) .origin-top-right > .pt-0\.5.pb-2 .grid > div > div {
    border-radius: var(--leaf-sm) !important;
}
.header-user-group:not(#_):not(#_) .origin-top-right :is(.header-menu-mode-active, .header-menu-mode-inactive),
.header-user-group:not(#_):not(#_) .origin-top-right > .pt-0\.5.pb-2 .grid > div:last-child > div::before {
    border-radius: 0.6rem 0.15rem 0.6rem 0.15rem !important;
}
.header-user-group:not(#_):not(#_) .origin-top-right ul > li > a,
.header-user-group:not(#_):not(#_) .origin-top-right ul > li > form > button {
    border-radius: var(--leaf-sm) !important;
}
.header-user-group:not(#_):not(#_) .origin-top-right ul > li > a > :is(i, svg),
.header-user-group:not(#_):not(#_) .origin-top-right ul > li > a > span > :is(i, svg),
.header-user-group:not(#_):not(#_) .origin-top-right ul > li > form > button > :is(i, svg) {
    border-radius: var(--leaf-sm) !important;
}

/* [leaf: header tiles] FY / Branch Unit / language / pending items / bell / favourites / date / profile button.
   :not(#_) on .navigation-header out-ranks the per-tile radius rules in custom.css + responsive-overrides.css. */
.navigation-header:not(#_) .top-header-right :is(
    .header-context-select-btn,
    .header-tool-fiscal > .btn,
    .header-tool-language > div,
    .header-tool-language > .btn,
    .header-tool-admin-org,
    .header-tool-admin-festive,
    .header-tool-count-notification,
    .header-tool-user-notification,
    .header-tool-favorites > button,
    .header-tool-nepali-datetime .np-datetime-dock-toggle,
    .header-tools-date-mobile .np-datetime-dock-toggle,
    .header-user-group > button
) {
    border-radius: var(--leaf-tile) !important;
}
/* inner layers of the tiles (hover fills) follow the tile's shape */
.navigation-header:not(#_) .top-header-right :is(
    .header-tool-count-notification > div,
    .header-tool-count-notification > div > .relative,
    .header-tool-user-notification button
) {
    border-radius: var(--leaf-tile) !important;
}

/* [leaf: dropdowns] dropdown panels / popovers / select2 + choices lists */
html body :is(.dropdown-content, .choices__list--dropdown, .np-datetime-dock-panel):not(#_) {
    border-radius: var(--leaf-drop) !important;
}
/* select2 list touches its box: the touching edge stays square, the far corners follow the leaf */
html body .select2-container--open .select2-dropdown--below:not(#_) {
    border-radius: 0 0 var(--leaf-drop-big) var(--leaf-drop-small) !important;
}
html body .select2-container--open .select2-dropdown--above:not(#_) {
    border-radius: var(--leaf-drop-big) var(--leaf-drop-small) 0 0 !important;
}

/* [leaf: inputs] a light leaf only: inputs, selects, textareas, select2 + choices boxes */
html body :is(.input, .textarea, textarea, .select, select, .choices__inner):not(#_):not(.login-field-input, [x-ref="spotSearch"], .toggle, .join-item, .select2-hidden-accessible, #ndp-month-select, #ndp-year-select) {
    border-radius: var(--leaf-input) !important;
}
html body .select2-container:not(#_) :is(.select2-selection--single, .select2-selection--multiple) {
    border-radius: var(--leaf-input) !important;
}
html body .select2-container--open.select2-container--below:not(#_) :is(.select2-selection--single, .select2-selection--multiple) {
    border-radius: var(--leaf-input-big) var(--leaf-input-small) 0 0 !important;
}
html body .select2-container--open.select2-container--above:not(#_) :is(.select2-selection--single, .select2-selection--multiple) {
    border-radius: 0 0 var(--leaf-input-big) var(--leaf-input-small) !important;
}

/* [leaf: cards] every .card (Mary x-card included) */
html body .card:not(#_) {
    border-radius: var(--leaf-card) !important;
}

/* [leaf: tables] table frames (ui-skin.css section 4 .ui-tbl-wrap + section 4b .ui-gray-wrap). The frame scrolls,
   so the header row is clipped to the same shape. Where a Per Page / pagination tab is attached, the touching
   edge stays square and only the far corners follow the leaf. */
html body :is(.ui-tbl-wrap, div.ui-gray-wrap):not(#_) {
    border-radius: var(--leaf-card) !important;
}
html body div.ui-pp--top + div > div[x-classes="overflow-x-auto"].ui-tbl-wrap:not(#_) {
    border-top-right-radius: 0 !important;
}
html body div.ui-pp-host.ui-pp-mary div[x-classes="overflow-x-auto"].ui-before-mary-pag:not(#_) {
    border-radius: var(--leaf-card-big) var(--leaf-card-small) 0 0 !important;
}
html body div.ui-pp-host.ui-pp-mary > .ui-pp--bottom > .paginate:not(#_) {
    border-radius: 0 0 var(--leaf-tab-big) var(--leaf-tab-small) !important;
}
html body div.ui-pp--top.ui-pp-top-tbl > .paginate:not(#_) {
    border-radius: var(--leaf-tab-big) var(--leaf-tab-small) 0 0 !important;
}

/* [leaf: tabs] Mary tabs (a.tab[role=tab]) sit on an underline: top corners leaf, bottom square.
   Plain daisy tabs (tabs-box / tabs-boxed) get the full small leaf, their container the medium one. */
html body a.tab[role="tab"]:not(#_) {
    border-radius: var(--leaf-tab-big) var(--leaf-tab-small) 0 0 !important;
}
html body :is(.tabs-box, .tabs-boxed) .tab:not(#_):not([role="tab"]) {
    border-radius: var(--leaf-sm) !important;
}
html body :is(.tabs-box, .tabs-boxed):not(#_) {
    border-radius: var(--leaf-md) !important;
}

/* [leaf: badges] every .badge; round counters marked rounded-full (header unread dots) stay round */
html body .badge:not(#_):not(.rounded-full, .badge-xs) {
    border-radius: var(--leaf-badge) !important;
}

/* [leaf: pagination] Mary / Laravel paginator links, plain Laravel pagination, and the Alpine pager */
html body .mary-table-pagination:not(#_) nav :is(button, a, span[aria-disabled] > span, span[aria-current] > span, > div:first-child > :is(button, a, span)),
html body nav[aria-label="Pagination Navigation"]:not(#_) :is(a, span[aria-disabled] > span, span[aria-current] > span),
html body .ui-alpine-pager:not(#_) :is(.ui-pg, .paginateButton) {
    border-radius: var(--leaf-sm) !important;
}

/* [leaf: menus] mega menu, sidebar and accordion nav: sections, section headers, rows, top items.
   A light leaf only, the same as inputs. */
.navigation-bar:not(#_) :is(
    .module-mega-box .mega-section,
    .module-mega-box .content .row header,
    .module-mega-box .mega-links li > div,
    .module-mega-box .mega-links li a,
    .nav-links > .top-menu-module-item > .desktop-item,
    .top-menu-module-item > .mobile-item,
    .top-menu-module-item .mobile-section,
    .top-menu-module-item .mobile-section > header button,
    .top-menu-module-item .mobile-links li > div,
    .top-menu-module-item .mobile-links li a
) {
    border-radius: var(--leaf-input) !important;
}

/* [leaf: scope] opt-in for Tailwind-built screens: put class="leaf-scope" on a container and its rounded-md / -lg /
   -xl / -2xl boxes take the leaf (sized by the class they already had). rounded-full dots and plain rounded stay.
   Used on the user dashboard (stat cards, panels, quick actions, icon chips, greeting chips). */
html body .leaf-scope:not(#_) .rounded-md,
html body .leaf-scope:not(#_).rounded-md {
    border-radius: var(--leaf-sm) !important;
}
html body .leaf-scope:not(#_) .rounded-lg,
html body .leaf-scope:not(#_).rounded-lg {
    border-radius: var(--leaf-md) !important;
}
html body .leaf-scope:not(#_) :is(.rounded-xl, .rounded-2xl),
html body .leaf-scope:not(#_):is(.rounded-xl, .rounded-2xl) {
    border-radius: var(--leaf-card) !important;
}

/* [leaf: logo] organisation logo + its initial-letter placeholder (header, sidebar brand): class="org-logo-leaf" */
html body .org-logo-leaf:not(#_) {
    border-radius: var(--leaf-md) !important;
}

/* [leaf: toasts + alerts] daisy / Mary alerts and toasts, SweetAlert popups with their buttons and inputs */
html body :is(.alert, .toast > *, .swal2-popup):not(#_) {
    border-radius: var(--leaf-md) !important;
}
html body .swal2-popup:not(#_) {
    border-radius: var(--leaf-lg) !important;
}
html body .swal2-popup:not(#_) :is(.swal2-styled, .swal2-input, .swal2-textarea, .swal2-select) {
    border-radius: var(--leaf-input) !important;
}

/* [leaf: chat] Team Chat page + dock widget (chat.css). Avatars, presence dots, the round send button, unread
   counters and the message bubbles (they carry their own tail shape) are left alone. */
html body :is(.cx-root, .cx-dock-panel, .cx-sdock-panel, .cx-modal-box):not(#_) {
    border-radius: var(--leaf-lg) !important;
}
html body :is(
    .cx-item, .cx-member, .cx-person, .cx-picked, .cx-conn, .cx-menu, .cx-more-menu, .cx-context,
    .cx-info-toggles, .cx-welcome-art, .cx-drop, .cx-doc, .cx-doc-none, .cx-toast, .cx-emoji, .cx-rx-more
):not(#_) {
    border-radius: var(--leaf-card) !important;
}
html body :is(
    .cx-icon-btn, .cx-btn, .cx-mini-btn, .cx-link, .cx-more, .cx-item-go, .cx-menu-item, .cx-more-menu button,
    .cx-pop, .cx-file, .cx-att-img, .cx-att-file, .cx-quote, .cx-actions, .cx-rx-more button, .cx-emoji button
):not(#_) {
    border-radius: var(--leaf-md) !important;
}
html body :is(.cx-search, .cx-textarea, .cx-input, .cx-rename input):not(#_) {
    border-radius: var(--leaf-input) !important;
}
/* filter tabs (All / Unread / Groups): track, buttons and the sliding thumb */
html body :is(.cx-filters, .cx-filters button, .cx-filter-thumb, .cx-rx-tabs button, .cx-chip, .cx-tag, .cx-role, .cx-assignee):not(#_) {
    border-radius: var(--leaf-sm) !important;
}

/* [leaf: support modal] tenant Support / raise-ticket modal (its notice boxes + footer buttons come via leaf-scope) */
html body .rt-modal:not(#_) {
    border-radius: var(--leaf-lg) !important;
}
html body :is(.rt-chip, .rt-tab, .rt-file, .rt-thumb):not(#_) {
    border-radius: var(--leaf-sm) !important;
}
html body :is(.rt-drop, .rt-body trix-editor):not(#_) {
    border-radius: var(--leaf-input) !important;
}

/* [leaf: editor toolbar] Trix button groups everywhere (the group clips its buttons' hover fill) */
html body trix-toolbar .trix-button-group:not(#_) {
    border-radius: var(--leaf-sm) !important;
    overflow: hidden;
}
html body trix-editor:not(#_) {
    border-radius: var(--leaf-input) !important;
}

/* [leaf: sidebar] desktop sidebar mode extras (its rows / sections / headers come from [leaf: menus]): brand card,
   brand row + logo, submenu panel, and the collapse tab, whose side attached to the sidebar edge stays square */
body.desktop-sidebar-menu:not(#_) .navigation-bar :is(.desktop-sidebar-brand, .desktop-sidebar-brand .brand-row) {
    border-radius: var(--leaf-md) !important;
}
body.desktop-sidebar-menu:not(#_) .navigation-bar .desktop-sidebar-brand img {
    border-radius: var(--leaf-sm) !important;
}
body.desktop-sidebar-menu:not(#_) .navigation-bar .top-menu-module-item .mobile-submenu {
    border-radius: var(--leaf-input) !important;
}
body.desktop-sidebar-menu:not(#_) .desktop-sidebar-toggle-trigger {
    border-radius: 0 0.3rem 0.9rem 0 !important;
}

/* [leaf: file buttons] every file input's "Choose File" button (Tailwind file: utilities, daisy file-input) */
html body input[type="file"]:not(#_)::file-selector-button {
    border-radius: var(--leaf-sm) !important;
}
html body .file-input:not(#_) {
    border-radius: var(--leaf-input) !important;
}

/* [leaf: ghost buttons visible] a btn-ghost has no fill or border at rest, so its leaf only showed on hover (Reset
   beside Apply Filters…). A faint tint + border at rest makes the shape visible. Table action chips, header tiles,
   modal footers (bordered above), round and link buttons keep their own look. */
html body .btn.btn-ghost:not(#_):not(:where(.btn-link, .join-item, td *, .navigation-header *, .modal-action *, .top-header-right *)) {
    border: 1px solid rgb(148 163 184 / 0.35) !important;
    background-color: rgb(148 163 184 / 0.08) !important;
}
html body .btn.btn-ghost:not(#_):not(:where(.btn-link, .join-item, td *, .navigation-header *, .modal-action *, .top-header-right *)):hover {
    border-color: rgb(148 163 184 / 0.55) !important;
    background-color: rgb(148 163 184 / 0.18) !important;
}

/* [leaf: content] the page content area behaves like leaf-scope, so Tailwind-built screens (DMS, TMS, notification
   setup…) follow the leaf without a per-file class. Same sizing as leaf-scope; rounded-full and plain rounded stay. */
html body .page-content-scroll:not(#_) .rounded-md {
    border-radius: var(--leaf-sm) !important;
}
html body .page-content-scroll:not(#_) .rounded-lg {
    border-radius: var(--leaf-md) !important;
}
html body .page-content-scroll:not(#_) :is(.rounded-xl, .rounded-2xl) {
    border-radius: var(--leaf-card) !important;
}

/* [leaf: dms] Document Management screens style their parts in view-local CSS (documents, category setup,
   hierarchy setup): department buttons, tree, document / share / hierarchy rows, context menu, pager, row actions.
   Also the flatpickr Confirm button used by the HRM work-shift screens. */
html body :is(.dms-tree-wrap, .dh-list, .dms-context-menu):not(#_) {
    border-radius: var(--leaf-card) !important;
}
html body :is(.dms-dept-btn, .dh-dept-btn, .dms-doc-row, .dh-row, .dms-share-row):not(#_) {
    border-radius: var(--leaf-md) !important;
}
html body :is(.dms-tree-li, .dms-tree-end-zone, .dms-tree-btn, .dms-page-btn, .dms-context-menu button, .dms-cf-remove, .dh-row-action, .flatpickr-confirm-btn):not(#_) {
    border-radius: var(--leaf-sm) !important;
}

/* [leaf: receipt entry] accounting receipt entry (view-local rc-* parts: cards, fieldsets, table frame, member card,
   line-pay box, payment-mode options, square add buttons) */
html body .rcpt:not(#_) :is(.rc-card, .rc-fs, .rc-table-wrap, .rc-member, .rc-linepay) {
    border-radius: var(--leaf-card) !important;
}
html body .rcpt:not(#_) :is(.rc-mode, .rc-with-btn .btn.rc-square, .rc-member img) {
    border-radius: var(--leaf-sm) !important;
}

/* [icon buttons] custom.css gives every .btn padding .5rem left / 1rem right and a fixed 2.5rem height, which pushed
   lone icons off-centre and stretched small icon buttons into tall boxes.
   Icon-only = btn-circle / btn-square, a Mary icon button without label (one span.block, optionally after its hidden
   spinner) and, inside table cells only, a button holding just an svg / i. Outside tables a "<x-icon/> Add" button
   has a bare text node CSS cannot see, so it is treated as labelled.
   Icon-only: no / equal padding, centred, square per size (2.5rem; table cells, btn-sm and the modal X 2rem; btn-xs
   1.75rem; btn-lg 3rem) with a leaf scaled to that size (fixed rem, so a mis-detected wide button never becomes a blob).
   Labelled: balanced side padding so the icon is not crowded into the big rounded corner. */
html body .btn:not(#_):is(.btn-circle, .btn-square) {
    padding: 0 !important;
    gap: 0 !important;
    width: 2.5rem !important;
    min-width: 2.5rem !important;
}
html body .btn:not(#_):is(.btn-circle, .btn-square, :has(> span.block:only-child), :has(> span.block:first-child + .btn-busy-ring:last-child), :has(> .loading + span.block:last-child)),
html body td .btn:not(#_):is(:has(> span.block:only-child), :has(> span.block:first-child + .btn-busy-ring:last-child), :has(> .loading + span.block:last-child), :has(> svg:only-child), :has(> i:only-child)) {
    justify-content: center !important;
    height: 2.5rem !important;
    min-height: 2.5rem !important;
    border-radius: 1.1rem 0.38rem 1.1rem 0.38rem !important;
}
html body .btn:not(#_):not(.btn-circle, .btn-square):is(:has(> span.block:only-child), :has(> span.block:first-child + .btn-busy-ring:last-child), :has(> .loading + span.block:last-child)) {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    min-width: 2.5rem !important;
}
html body td .btn:not(#_):not(.btn-circle, .btn-square):is(:has(> span.block:only-child), :has(> span.block:first-child + .btn-busy-ring:last-child), :has(> .loading + span.block:last-child), :has(> svg:only-child), :has(> i:only-child)) {
    padding-left: 0.45rem !important;
    padding-right: 0.45rem !important;
}
/* 2rem: table cells, btn-sm, modal corner X */
html body td .btn:not(#_):is(.btn-circle, .btn-square, :has(> span.block:only-child), :has(> span.block:first-child + .btn-busy-ring:last-child), :has(> .loading + span.block:last-child), :has(> svg:only-child), :has(> i:only-child)),
html body .btn.btn-sm:not(#_):is(.btn-circle, .btn-square, :has(> span.block:only-child), :has(> span.block:first-child + .btn-busy-ring:last-child), :has(> .loading + span.block:last-child)),
html body .modal-box > form[method="dialog"] > .btn-circle:not(#_),
html body .modal-box > button.btn-circle.absolute:not(#_) {
    height: 2rem !important;
    min-height: 2rem !important;
    min-width: 2rem !important;
    border-radius: 0.9rem 0.3rem 0.9rem 0.3rem !important;
}
html body td .btn:not(#_):is(.btn-circle, .btn-square),
html body .btn.btn-sm:not(#_):is(.btn-circle, .btn-square),
html body .modal-box > form[method="dialog"] > .btn-circle:not(#_),
html body .modal-box > button.btn-circle.absolute:not(#_) {
    width: 2rem !important;
}
html body .btn.btn-xs:not(#_):is(.btn-circle, .btn-square, :has(> span.block:only-child), :has(> span.block:first-child + .btn-busy-ring:last-child), :has(> .loading + span.block:last-child)) {
    height: 1.75rem !important;
    min-height: 1.75rem !important;
    min-width: 1.75rem !important;
    border-radius: 0.8rem 0.26rem 0.8rem 0.26rem !important;
}
html body .btn.btn-xs:not(#_):is(.btn-circle, .btn-square) {
    width: 1.75rem !important;
}
html body .btn.btn-xs:not(#_):not(.btn-circle, .btn-square):is(:has(> span.block:only-child), :has(> span.block:first-child + .btn-busy-ring:last-child), :has(> .loading + span.block:last-child)) {
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
}
html body .btn.btn-lg:not(#_):is(.btn-circle, .btn-square, :has(> span.block:only-child), :has(> span.block:first-child + .btn-busy-ring:last-child), :has(> .loading + span.block:last-child)) {
    height: 3rem !important;
    min-height: 3rem !important;
    min-width: 3rem !important;
    border-radius: 1.35rem 0.45rem 1.35rem 0.45rem !important;
}
html body .btn.btn-lg:not(#_):is(.btn-circle, .btn-square) {
    width: 3rem !important;
}
/* the icon wrapper itself never adds an offset */
html body .btn:not(#_) > span.block:only-child {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
}
/* labelled buttons: balanced side padding */
html body .btn:not(#_):not(.btn-circle, .btn-square, .btn-link):not(:is(:has(> span.block:only-child), :has(> span.block:first-child + .btn-busy-ring:last-child), :has(> .loading + span.block:last-child))):not(:where(.join-item, .join > .btn, td *, .navigation-header *, .top-header-right *)) {
    padding-left: 0.85rem !important;
    padding-right: 1rem !important;
    gap: 0.4rem !important;
}
html body .btn.btn-sm:not(#_):not(.btn-circle, .btn-square, .btn-link):not(:is(:has(> span.block:only-child), :has(> span.block:first-child + .btn-busy-ring:last-child), :has(> .loading + span.block:last-child))):not(:where(.join-item, .join > .btn, td *, .navigation-header *, .top-header-right *)) {
    padding-left: 0.7rem !important;
    padding-right: 0.8rem !important;
    gap: 0.35rem !important;
}
html body .btn.btn-xs:not(#_):not(.btn-circle, .btn-square, .btn-link):not(:is(:has(> span.block:only-child), :has(> span.block:first-child + .btn-busy-ring:last-child), :has(> .loading + span.block:last-child))):not(:where(.join-item, .join > .btn, td *, .navigation-header *, .top-header-right *)) {
    padding-left: 0.5rem !important;
    padding-right: 0.55rem !important;
}

/* [leaf: billing entry] billing receipt / return / receipt cancel and forest consumer billing share view-local brx-*
   parts: sections, action bar, tiles, header icon, receipt info grid, payment table frame */
html body :is(.brx-section, .brx-actionbar, .receipt-info-grid, .brx .payment-details-table-wrap):not(#_) {
    border-radius: var(--leaf-card) !important;
}
html body :is(.brx-tile, .brx-header-icon, .brx-step):not(#_) {
    border-radius: var(--leaf-md) !important;
}
html body .brx-section-title .brx-dot:not(#_) {
    border-radius: var(--leaf-icon) !important;
}
/* forest ticket entry rate setup: module chips inside its multi-select were slate-600 text on the dark box */
html.dark body .ticket-module-cell .select2-container--default .select2-selection--multiple .select2-selection__choice {
    color: #cbd5e1;
}

/* [button spinners sized] Mary's wire:click spinner (span.loading w-5 h-5 = 1.25rem) and the global busy ring
   (button-busy.js, 1.15rem) are sized by the button: on a 1.75rem btn-xs both overflowed the button. */
html body .btn:not(#_) > .loading {
    flex: none;
    width: 1.15rem !important;
    height: 1.15rem !important;
}
html body :is(td .btn, .btn.btn-sm):not(#_) > .loading { width: 1rem !important; height: 1rem !important; }
html body .btn.btn-xs:not(#_) > .loading { width: 0.8rem !important; height: 0.8rem !important; }
html body .btn.btn-lg:not(#_) > .loading { width: 1.4rem !important; height: 1.4rem !important; }
html body :is(td .btn, .btn.btn-sm).is-busy:not(#_) > .btn-busy-ring {
    width: 0.95rem;
    height: 0.95rem;
    margin: 0;
    border-width: 2px;
}
html body .btn.btn-xs.is-busy:not(#_) > .btn-busy-ring {
    width: 0.8rem;
    height: 0.8rem;
    margin: 0;
    border-width: 2px;
}
html body .btn.btn-lg.is-busy:not(#_) > .btn-busy-ring {
    width: 1.4rem;
    height: 1.4rem;
    margin: 0;
    border-width: 3px;
}

/* [leaf: badge spacing] daisy's fixed badge heights / tight padding were made for pills: with the leaf corners the
   text crowded the shape (task detail "Medium / Open / Not Forwarded", assignee chips). Leaf badges get auto height
   and roomier padding; a badge that starts with an avatar circle keeps a tight left side. Round counters
   (rounded-full) and badge-xs are untouched. */
html body .badge:not(#_):not(.rounded-full, .badge-xs) {
    height: auto !important;
    min-height: 1.35rem;
    padding: 0.2rem 0.6rem !important;
    line-height: 1.2 !important;
    gap: 0.35rem;
}
html body .badge.badge-sm:not(#_):not(.rounded-full, .badge-xs) {
    min-height: 1.15rem;
    padding: 0.15rem 0.5rem !important;
    font-size: 0.72rem;
}
html body .badge.badge-lg:not(#_):not(.rounded-full, .badge-xs) {
    min-height: 1.7rem;
    padding: 0.3rem 0.8rem !important;
}
html body .badge:not(#_):not(.rounded-full, .badge-xs):has(> .rounded-full:first-child) {
    padding-left: 0.2rem !important;
}

/* Range sliders: the project app.css gives every input / select a 2.5rem height, so a daisy range became 35px tall
   and its thumb-shadow filler painted a big blob over the thin track. Daisy's own heights restored per size. */
html body input[type="range"].range:not(#_) { height: 1.5rem !important; min-height: 0 !important; padding: 0 !important; }
html body input[type="range"].range.range-xs:not(#_) { height: 1rem !important; }
html body input[type="range"].range.range-sm:not(#_) { height: 1.25rem !important; }
html body input[type="range"].range.range-lg:not(#_) { height: 2rem !important; }
html body input[type="range"].range.range-primary:not(#_) { --range-shdw: rgb(var(--ui-brand-rgb, 16 185 129)); }

/* [leaf: mega panel] the mega menu drop-down panel hangs from the menu bar: top edge stays nearly square, bottom
   corners follow the leaf (its sections / headers / rows come from [leaf: menus]) */
body:not(.desktop-sidebar-menu) .navigation-bar:not(#_) .top-menu-module-item > .module-mega-box > .content {
    border-radius: 0.25rem 0.25rem 1.25rem 0.4rem !important;
}
/* ===== end leaf shape */

/* Modal footer ghost buttons (Close / Cancel): visible border at rest, not only on hover */
html body .modal-action .btn-ghost {
    border: 1px solid #cbd5e1 !important;
    background-color: #fff;
    color: #334155;
}
html body .modal-action .btn-ghost:hover {
    border-color: #94a3b8 !important;
    background-color: #f1f5f9;
}
html.dark body .modal-action .btn-ghost {
    border-color: #475569 !important;
    background-color: transparent;
    color: #e2e8f0;
}
html.dark body .modal-action .btn-ghost:hover {
    border-color: #64748b !important;
    background-color: rgb(51 65 85 / 0.6);
}

/* ===== Dark safety net: screens built with light Tailwind utilities and no dark: variants (DMS, TMS, notification
   setup, FCM config…) stayed white in dark mode. Under html.dark, the common light utilities are remapped, but only
   on elements without a dark: variant for that property, so screens that already handle dark keep their own
   colours. Print layouts (print_body / print-body / print-page / print-sheet / print-root / print-wrap) are skipped;
   opt out any other block that must stay light (a QR / logo plate): class="ui-keep-light".
   Comment this whole section out to switch it off. */
@media screen {
    html.dark body :is(.bg-white, .bg-white\/70, .bg-white\/75, .bg-white\/80, .bg-white\/85, .bg-white\/90, .bg-white\/95):not([class*="dark:bg-"], .ui-keep-light, :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: #1e293b; }
    html.dark body :is(.bg-gray-50, .bg-slate-50, .bg-gray-50\/50):not([class*="dark:bg-"], .ui-keep-light, :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: #172234; }
    html.dark body :is(.bg-gray-100, .bg-slate-100):not([class*="dark:bg-"], .ui-keep-light, :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: #273449; }
    html.dark body :is(.bg-gray-200, .bg-slate-200):not([class*="dark:bg-"], .ui-keep-light, :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: #334155; }
    html.dark body :is(.hover\:bg-gray-50, .hover\:bg-slate-50, .hover\:bg-gray-100, .hover\:bg-slate-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: #2b3a52; }
    html.dark body :is(.hover\:bg-gray-200, .hover\:bg-slate-200):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: #3b4a61; }

    html.dark body :is(.text-gray-900, .text-gray-800, .text-slate-900, .text-slate-800, .text-black):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #f1f5f9; }
    html.dark body :is(.text-gray-700, .text-slate-700):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #e2e8f0; }
    html.dark body :is(.text-gray-600, .text-slate-600):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #cbd5e1; }
    html.dark body :is(.text-gray-500, .text-slate-500):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #9aa8bc; }

    html.dark body :is(.border-gray-100, .border-gray-200, .border-slate-100, .border-slate-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: #334155; }
    html.dark body :is(.border-gray-300, .border-slate-300):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: #475569; }
    html.dark body :is(.divide-gray-100, .divide-gray-200, .divide-slate-100, .divide-slate-200):not([class*="dark:divide-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) > :not([hidden]) ~ :not([hidden]) { border-color: #2b3a52; }
    /* a bare "border" (no colour class) falls back to Tailwind's light gray-200 default */
    html.dark body .border:not([class*="border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: #334155; }
    /* coloured tints (selected chips / rows, status pills, notices): bg-*-50/100, border-*-100..300, ring-*-100/200,
       text-*-700..900 in 16 colours become soft tints of the same colour with light text */
    html.dark body :is(.bg-indigo-50, [class*="bg-indigo-50/"]):not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(99 102 241 / 0.12); }
    html.dark body .bg-indigo-100:not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(99 102 241 / 0.2); }
    html.dark body :is(.hover\:bg-indigo-50, .hover\:bg-indigo-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(99 102 241 / 0.24); }
    html.dark body :is(.border-indigo-100, .border-indigo-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(99 102 241 / 0.3); }
    html.dark body .border-indigo-300:not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(99 102 241 / 0.45); }
    html.dark body :is(.ring-indigo-100, .ring-indigo-200):not([class*="dark:ring-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { --tw-ring-color: rgb(99 102 241 / 0.35); }
    html.dark body :is(.text-indigo-700, .text-indigo-800, .text-indigo-900):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #a5b4fc; }
    html.dark body .hover\:text-indigo-700:hover:not([class*="dark:hover:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #a5b4fc; }
    html.dark body :is(.bg-blue-50, [class*="bg-blue-50/"]):not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(59 130 246 / 0.12); }
    html.dark body .bg-blue-100:not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(59 130 246 / 0.2); }
    html.dark body :is(.hover\:bg-blue-50, .hover\:bg-blue-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(59 130 246 / 0.24); }
    html.dark body :is(.border-blue-100, .border-blue-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(59 130 246 / 0.3); }
    html.dark body .border-blue-300:not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(59 130 246 / 0.45); }
    html.dark body :is(.ring-blue-100, .ring-blue-200):not([class*="dark:ring-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { --tw-ring-color: rgb(59 130 246 / 0.35); }
    html.dark body :is(.text-blue-700, .text-blue-800, .text-blue-900):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #93c5fd; }
    html.dark body .hover\:text-blue-700:hover:not([class*="dark:hover:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #93c5fd; }
    html.dark body :is(.bg-emerald-50, [class*="bg-emerald-50/"]):not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(16 185 129 / 0.12); }
    html.dark body .bg-emerald-100:not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(16 185 129 / 0.2); }
    html.dark body :is(.hover\:bg-emerald-50, .hover\:bg-emerald-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(16 185 129 / 0.24); }
    html.dark body :is(.border-emerald-100, .border-emerald-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(16 185 129 / 0.3); }
    html.dark body .border-emerald-300:not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(16 185 129 / 0.45); }
    html.dark body :is(.ring-emerald-100, .ring-emerald-200):not([class*="dark:ring-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { --tw-ring-color: rgb(16 185 129 / 0.35); }
    html.dark body :is(.text-emerald-700, .text-emerald-800, .text-emerald-900):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #6ee7b7; }
    html.dark body .hover\:text-emerald-700:hover:not([class*="dark:hover:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #6ee7b7; }
    html.dark body :is(.bg-green-50, [class*="bg-green-50/"]):not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(34 197 94 / 0.12); }
    html.dark body .bg-green-100:not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(34 197 94 / 0.2); }
    html.dark body :is(.hover\:bg-green-50, .hover\:bg-green-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(34 197 94 / 0.24); }
    html.dark body :is(.border-green-100, .border-green-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(34 197 94 / 0.3); }
    html.dark body .border-green-300:not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(34 197 94 / 0.45); }
    html.dark body :is(.ring-green-100, .ring-green-200):not([class*="dark:ring-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { --tw-ring-color: rgb(34 197 94 / 0.35); }
    html.dark body :is(.text-green-700, .text-green-800, .text-green-900):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #86efac; }
    html.dark body .hover\:text-green-700:hover:not([class*="dark:hover:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #86efac; }
    html.dark body :is(.bg-amber-50, [class*="bg-amber-50/"]):not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(245 158 11 / 0.12); }
    html.dark body .bg-amber-100:not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(245 158 11 / 0.2); }
    html.dark body :is(.hover\:bg-amber-50, .hover\:bg-amber-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(245 158 11 / 0.24); }
    html.dark body :is(.border-amber-100, .border-amber-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(245 158 11 / 0.3); }
    html.dark body .border-amber-300:not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(245 158 11 / 0.45); }
    html.dark body :is(.ring-amber-100, .ring-amber-200):not([class*="dark:ring-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { --tw-ring-color: rgb(245 158 11 / 0.35); }
    html.dark body :is(.text-amber-700, .text-amber-800, .text-amber-900):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #fcd34d; }
    html.dark body .hover\:text-amber-700:hover:not([class*="dark:hover:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #fcd34d; }
    html.dark body :is(.bg-yellow-50, [class*="bg-yellow-50/"]):not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(234 179 8 / 0.12); }
    html.dark body .bg-yellow-100:not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(234 179 8 / 0.2); }
    html.dark body :is(.hover\:bg-yellow-50, .hover\:bg-yellow-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(234 179 8 / 0.24); }
    html.dark body :is(.border-yellow-100, .border-yellow-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(234 179 8 / 0.3); }
    html.dark body .border-yellow-300:not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(234 179 8 / 0.45); }
    html.dark body :is(.ring-yellow-100, .ring-yellow-200):not([class*="dark:ring-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { --tw-ring-color: rgb(234 179 8 / 0.35); }
    html.dark body :is(.text-yellow-700, .text-yellow-800, .text-yellow-900):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #fde047; }
    html.dark body .hover\:text-yellow-700:hover:not([class*="dark:hover:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #fde047; }
    html.dark body :is(.bg-red-50, [class*="bg-red-50/"]):not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(239 68 68 / 0.12); }
    html.dark body .bg-red-100:not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(239 68 68 / 0.2); }
    html.dark body :is(.hover\:bg-red-50, .hover\:bg-red-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(239 68 68 / 0.24); }
    html.dark body :is(.border-red-100, .border-red-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(239 68 68 / 0.3); }
    html.dark body .border-red-300:not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(239 68 68 / 0.45); }
    html.dark body :is(.ring-red-100, .ring-red-200):not([class*="dark:ring-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { --tw-ring-color: rgb(239 68 68 / 0.35); }
    html.dark body :is(.text-red-700, .text-red-800, .text-red-900):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #fca5a5; }
    html.dark body .hover\:text-red-700:hover:not([class*="dark:hover:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #fca5a5; }
    html.dark body :is(.bg-rose-50, [class*="bg-rose-50/"]):not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(244 63 94 / 0.12); }
    html.dark body .bg-rose-100:not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(244 63 94 / 0.2); }
    html.dark body :is(.hover\:bg-rose-50, .hover\:bg-rose-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(244 63 94 / 0.24); }
    html.dark body :is(.border-rose-100, .border-rose-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(244 63 94 / 0.3); }
    html.dark body .border-rose-300:not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(244 63 94 / 0.45); }
    html.dark body :is(.ring-rose-100, .ring-rose-200):not([class*="dark:ring-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { --tw-ring-color: rgb(244 63 94 / 0.35); }
    html.dark body :is(.text-rose-700, .text-rose-800, .text-rose-900):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #fda4af; }
    html.dark body .hover\:text-rose-700:hover:not([class*="dark:hover:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #fda4af; }
    html.dark body :is(.bg-sky-50, [class*="bg-sky-50/"]):not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(14 165 233 / 0.12); }
    html.dark body .bg-sky-100:not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(14 165 233 / 0.2); }
    html.dark body :is(.hover\:bg-sky-50, .hover\:bg-sky-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(14 165 233 / 0.24); }
    html.dark body :is(.border-sky-100, .border-sky-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(14 165 233 / 0.3); }
    html.dark body .border-sky-300:not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(14 165 233 / 0.45); }
    html.dark body :is(.ring-sky-100, .ring-sky-200):not([class*="dark:ring-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { --tw-ring-color: rgb(14 165 233 / 0.35); }
    html.dark body :is(.text-sky-700, .text-sky-800, .text-sky-900):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #7dd3fc; }
    html.dark body .hover\:text-sky-700:hover:not([class*="dark:hover:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #7dd3fc; }
    html.dark body :is(.bg-violet-50, [class*="bg-violet-50/"]):not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(139 92 246 / 0.12); }
    html.dark body .bg-violet-100:not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(139 92 246 / 0.2); }
    html.dark body :is(.hover\:bg-violet-50, .hover\:bg-violet-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(139 92 246 / 0.24); }
    html.dark body :is(.border-violet-100, .border-violet-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(139 92 246 / 0.3); }
    html.dark body .border-violet-300:not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(139 92 246 / 0.45); }
    html.dark body :is(.ring-violet-100, .ring-violet-200):not([class*="dark:ring-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { --tw-ring-color: rgb(139 92 246 / 0.35); }
    html.dark body :is(.text-violet-700, .text-violet-800, .text-violet-900):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #c4b5fd; }
    html.dark body .hover\:text-violet-700:hover:not([class*="dark:hover:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #c4b5fd; }
    html.dark body :is(.bg-purple-50, [class*="bg-purple-50/"]):not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(168 85 247 / 0.12); }
    html.dark body .bg-purple-100:not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(168 85 247 / 0.2); }
    html.dark body :is(.hover\:bg-purple-50, .hover\:bg-purple-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(168 85 247 / 0.24); }
    html.dark body :is(.border-purple-100, .border-purple-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(168 85 247 / 0.3); }
    html.dark body .border-purple-300:not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(168 85 247 / 0.45); }
    html.dark body :is(.ring-purple-100, .ring-purple-200):not([class*="dark:ring-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { --tw-ring-color: rgb(168 85 247 / 0.35); }
    html.dark body :is(.text-purple-700, .text-purple-800, .text-purple-900):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #d8b4fe; }
    html.dark body .hover\:text-purple-700:hover:not([class*="dark:hover:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #d8b4fe; }
    html.dark body :is(.bg-teal-50, [class*="bg-teal-50/"]):not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(20 184 166 / 0.12); }
    html.dark body .bg-teal-100:not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(20 184 166 / 0.2); }
    html.dark body :is(.hover\:bg-teal-50, .hover\:bg-teal-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(20 184 166 / 0.24); }
    html.dark body :is(.border-teal-100, .border-teal-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(20 184 166 / 0.3); }
    html.dark body .border-teal-300:not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(20 184 166 / 0.45); }
    html.dark body :is(.ring-teal-100, .ring-teal-200):not([class*="dark:ring-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { --tw-ring-color: rgb(20 184 166 / 0.35); }
    html.dark body :is(.text-teal-700, .text-teal-800, .text-teal-900):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #5eead4; }
    html.dark body .hover\:text-teal-700:hover:not([class*="dark:hover:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #5eead4; }
    html.dark body :is(.bg-orange-50, [class*="bg-orange-50/"]):not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(249 115 22 / 0.12); }
    html.dark body .bg-orange-100:not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(249 115 22 / 0.2); }
    html.dark body :is(.hover\:bg-orange-50, .hover\:bg-orange-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(249 115 22 / 0.24); }
    html.dark body :is(.border-orange-100, .border-orange-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(249 115 22 / 0.3); }
    html.dark body .border-orange-300:not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(249 115 22 / 0.45); }
    html.dark body :is(.ring-orange-100, .ring-orange-200):not([class*="dark:ring-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { --tw-ring-color: rgb(249 115 22 / 0.35); }
    html.dark body :is(.text-orange-700, .text-orange-800, .text-orange-900):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #fdba74; }
    html.dark body .hover\:text-orange-700:hover:not([class*="dark:hover:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #fdba74; }
    html.dark body :is(.bg-pink-50, [class*="bg-pink-50/"]):not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(236 72 153 / 0.12); }
    html.dark body .bg-pink-100:not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(236 72 153 / 0.2); }
    html.dark body :is(.hover\:bg-pink-50, .hover\:bg-pink-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(236 72 153 / 0.24); }
    html.dark body :is(.border-pink-100, .border-pink-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(236 72 153 / 0.3); }
    html.dark body .border-pink-300:not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(236 72 153 / 0.45); }
    html.dark body :is(.ring-pink-100, .ring-pink-200):not([class*="dark:ring-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { --tw-ring-color: rgb(236 72 153 / 0.35); }
    html.dark body :is(.text-pink-700, .text-pink-800, .text-pink-900):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #f9a8d4; }
    html.dark body .hover\:text-pink-700:hover:not([class*="dark:hover:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #f9a8d4; }
    html.dark body :is(.bg-cyan-50, [class*="bg-cyan-50/"]):not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(6 182 212 / 0.12); }
    html.dark body .bg-cyan-100:not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(6 182 212 / 0.2); }
    html.dark body :is(.hover\:bg-cyan-50, .hover\:bg-cyan-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(6 182 212 / 0.24); }
    html.dark body :is(.border-cyan-100, .border-cyan-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(6 182 212 / 0.3); }
    html.dark body .border-cyan-300:not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(6 182 212 / 0.45); }
    html.dark body :is(.ring-cyan-100, .ring-cyan-200):not([class*="dark:ring-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { --tw-ring-color: rgb(6 182 212 / 0.35); }
    html.dark body :is(.text-cyan-700, .text-cyan-800, .text-cyan-900):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #67e8f9; }
    html.dark body .hover\:text-cyan-700:hover:not([class*="dark:hover:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #67e8f9; }
    html.dark body :is(.bg-lime-50, [class*="bg-lime-50/"]):not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(132 204 22 / 0.12); }
    html.dark body .bg-lime-100:not([class*="dark:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(132 204 22 / 0.2); }
    html.dark body :is(.hover\:bg-lime-50, .hover\:bg-lime-100):hover:not([class*="dark:hover:bg-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { background-color: rgb(132 204 22 / 0.24); }
    html.dark body :is(.border-lime-100, .border-lime-200):not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(132 204 22 / 0.3); }
    html.dark body .border-lime-300:not([class*="dark:border-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { border-color: rgb(132 204 22 / 0.45); }
    html.dark body :is(.ring-lime-100, .ring-lime-200):not([class*="dark:ring-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { --tw-ring-color: rgb(132 204 22 / 0.35); }
    html.dark body :is(.text-lime-700, .text-lime-800, .text-lime-900):not([class*="dark:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #bef264; }
    html.dark body .hover\:text-lime-700:hover:not([class*="dark:hover:text-"], :is(.ui-keep-light, .print_body, .print-body, .print-page, .print-sheet, .print-root, .print-wrap) *) { color: #bef264; }
}
/* ===== end dark safety net */

/* ===== Dark: SweetAlert2 confirmation / alert dialogs (white popups in dark mode). Icon colours and the confirm /
   cancel button colours each dialog sets are kept; the leaf shape comes from [leaf: toasts + alerts]. */
html.dark body .swal2-popup {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
    box-shadow: 0 24px 48px -16px rgb(0 0 0 / 0.7);
}
html.dark body .swal2-popup :is(.swal2-title, .swal2-html-container, .swal2-content) {
    color: #e2e8f0;
}
html.dark body .swal2-popup .swal2-html-container {
    color: #cbd5e1;
}
html.dark body .swal2-popup :is(.swal2-input, .swal2-textarea, .swal2-select, .swal2-file) {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #334155;
}
html.dark body .swal2-popup .swal2-validation-message {
    background: #273449;
    color: #fca5a5;
}
html.dark body .swal2-popup .swal2-footer {
    border-top-color: #334155;
    color: #94a3b8;
}
html.dark body .swal2-popup .swal2-close {
    color: #94a3b8;
}
html.dark body .swal2-popup .swal2-close:hover {
    color: #f1f5f9;
}
html.dark body .swal2-toast {
    background: #1e293b;
    color: #e2e8f0;
}
html.dark body .swal2-container.swal2-backdrop-show {
    background: rgb(2 6 23 / 0.6);
}
/* ===== end dark SweetAlert2 */

/* ===== Dark: read-only / disabled field tokens
   resources/css/app.css defines --readonly-bg / -border / -text (light indigo) and the billing entry screens
   (billing / irrigation receipt, forest consumer billing, challan, return, receipt cancel) paint readonly + disabled
   inputs with them !important, so in dark those fields stayed white with near-black text. Same look as ui-skin's
   dark readonly inputs. */
html:is(.dark, [data-theme="dark"]) {
    --readonly-bg: oklch(var(--b2));
    --readonly-border: oklch(var(--bc) / .18);
    --readonly-text: oklch(var(--bc) / .8);
}
/* ===== end dark read-only tokens */

/* ===== Mega menu: full width + preview pane
   The desktop panel spans the window; top-menu.js sets --mega-w (width), --mega-cols / --mega-rows (menu grid)
   and --mega-pv-w (preview pane, 22vw clamped to 15..24rem). The pane (aside.mega-preview in
   top-menu-module.blade.php) shows the module overview, then the description of the link under the pointer. */
.navigation-bar .mega-preview { display: none; }

@media screen and (min-width: 1024px) {
    body:not(.desktop-sidebar-menu) .navigation-bar .nav-links .top-menu-module-item > .module-mega-box {
        width: var(--mega-w, calc(100vw - 24px));
        max-width: none;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .top-menu-module-item > .module-mega-box > .content {
        width: 100%;
        grid-template-columns: repeat(var(--mega-cols, 3), minmax(var(--mega-col-w), 1fr)) var(--mega-pv-w, 18rem);
        row-gap: 0.75rem;
    }
    /* Menu files with 'wide_columns' (data-mega-wide): a column with a long label (e.g. "Customer Document
       Numbering Setup") takes the width it needs when there is room, instead of every column being equal. */
    body:not(.desktop-sidebar-menu) .navigation-bar .top-menu-module-item > .module-mega-box[data-mega-wide] > .content {
        grid-template-columns: repeat(var(--mega-cols, 3), minmax(var(--mega-col-w), auto)) var(--mega-pv-w, 18rem);
        justify-content: stretch;
    }
    /* Menu bar fit (top-menu.js barFit): tab labels never wrap ("Eco Tourism" went to two lines and doubled the bar).
       When the modules do not fit on one row, .navigation-bar[data-nav-fit] steps down: compact (less padding) →
       tight (smaller text) → scroll (the row scrolls sideways: wheel, touch pad, drag on touch screens). Order and positions never change.
       Panels are positioned against .nav-wrapper (outside the row), so the scrolling row does not clip them. */
    html:not(.nav-accordion) body:not(.desktop-sidebar-menu) .navigation-bar .nav-links { max-width: 100%; min-width: 0; }
    body:not(.desktop-sidebar-menu) .navigation-bar .nav-links > .top-menu-module-item { flex-shrink: 0; }
    body:not(.desktop-sidebar-menu) .navigation-bar .nav-links > .top-menu-module-item > .desktop-item { white-space: nowrap; }
    body:not(.desktop-sidebar-menu) .navigation-bar[data-nav-fit] .nav-links > .top-menu-module-item > .desktop-item {
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar:is([data-nav-fit="tight"], [data-nav-fit="scroll"]) .nav-links > .top-menu-module-item > .desktop-item {
        padding-left: 0.42rem;
        padding-right: 0.42rem;
        font-size: 0.86em;
        letter-spacing: 0;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar[data-nav-fit="scroll"] .nav-links {
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        scroll-behavior: smooth;
        overscroll-behavior-x: contain;
        /* no mask-image fade here: a mask also hides the mega panels inside the row */
    }
    body:not(.desktop-sidebar-menu) .navigation-bar[data-nav-fit="scroll"] .nav-links::-webkit-scrollbar { display: none; }


    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-preview {
        display: block;
        grid-column: -2 / -1;
        grid-row: 1 / span var(--mega-rows, 1);
        /* sticky in the panel's scroll box, so the preview stays in view while the columns scroll (the card inside
           could not stick: this box clips its corner decoration) */
        align-self: start;
        position: sticky;
        top: 0;
        isolation: isolate;
        min-height: 15rem;
        max-height: calc(var(--mega-max-h, calc(100dvh - 7.5rem)) - 1.8rem);
        margin: 0.25rem 0;
        padding: 1.15rem 1.2rem 1.1rem;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        border-radius: 1rem 1rem 1.4rem 0.45rem;
        border: 1px solid rgb(5 150 105 / 0.14);
        background: linear-gradient(160deg, #ecfdf5 0%, #f0fdfa 48%, #eef2ff 100%);
        color: var(--color-base-content, #1f2937);
    }
    /* soft glow + ring in the corner */
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-preview::before,
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-preview::after {
        content: "";
        position: absolute;
        z-index: -1;
        border-radius: 999px;
        pointer-events: none;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-preview::before {
        width: 16rem;
        height: 16rem;
        right: -6rem;
        bottom: -7rem;
        background: radial-gradient(circle, rgb(16 185 129 / 0.28), rgb(16 185 129 / 0) 68%);
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-preview::after {
        width: 9rem;
        height: 9rem;
        right: -2.5rem;
        top: -3rem;
        border: 1.5rem solid rgb(13 148 136 / 0.07);
    }

    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-card {
        position: sticky;
        top: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.55rem;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-card[hidden] { display: none; }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-card.mp-swap { animation: mp-swap-in 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
    @keyframes mp-swap-in {
        from { opacity: 0; transform: translate3d(0, 5px, 0); }
        to   { opacity: 1; transform: none; }
    }

    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-head {
        display: flex;
        align-items: center;
        gap: 0.7rem;
        min-width: 0;
        max-width: 100%;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-eyebrow {
        font-size: 0.68rem;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #047857;
        line-height: 1.35;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-title {
        margin: 0;
        font-family: Poppins, ui-sans-serif, system-ui, sans-serif;
        font-size: 1.2rem;
        font-weight: 700;
        line-height: 1.25;
        letter-spacing: -0.01em;
        color: inherit;
        overflow-wrap: anywhere;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-desc {
        margin: 0;
        font-size: 0.86rem;
        line-height: 1.6;
        color: #475569;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-icon {
        flex: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2rem;
        height: 2rem;
        border-radius: 0.7rem 0.7rem 0.7rem 0.25rem;
        color: #fff;
        background: linear-gradient(135deg, #10b981, #0d9488);
        box-shadow: 0 8px 16px -9px rgb(5 150 105 / 0.85);
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-icon svg { width: 1.05rem; height: 1.05rem; display: none; }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-icon[data-mp-kind="dashboard"] .mp-k-dashboard,
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-icon[data-mp-kind="report"] .mp-k-report,
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-icon[data-mp-kind="setup"] .mp-k-setup,
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-icon[data-mp-kind="entry"] .mp-k-entry,
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-icon[data-mp-kind="import"] .mp-k-import,
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-icon[data-mp-kind="page"] .mp-k-page { display: block; }

    /* "You are here": a compact chip. line-height reset (it inherited the nav bar's 42px and became a tall
       green oval), small radius, a dot marking the current page. */
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-badge {
        display: inline-flex;
        align-self: flex-start;
        align-items: center;
        gap: 0.35rem;
        width: max-content;
        padding: 0.2rem 0.5rem;
        border-radius: 6px;
        font-size: 0.68rem;
        font-weight: 600;
        line-height: 1.2;
        letter-spacing: 0.01em;
        color: #047857;
        background: rgba(16, 185, 129, 0.12);
        border: 1px solid rgba(16, 185, 129, 0.35);
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-badge::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #10b981;
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
        flex: 0 0 auto;
    }
    html.dark body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-badge {
        color: #6ee7b7;
        background: rgba(16, 185, 129, 0.16);
        border-color: rgba(52, 211, 153, 0.4);
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-badge[hidden] { display: none; }

    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-stats {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        margin-top: 0.15rem;
    }
    /* compact pills: "6 Groups"; line-height reset, the label inherited the nav bar's 42px */
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-stats > div {
        display: inline-flex;
        align-items: baseline;
        gap: 0.3rem;
        padding: 0.3rem 0.75rem;
        line-height: 1.3;
        border-radius: var(--leaf-tile, 0.75rem 0.2rem 0.75rem 0.2rem);
        background: rgb(255 255 255 / 0.75);
        border: 1px solid rgb(5 150 105 / 0.14);
        box-shadow: 0 6px 14px -12px rgb(2 44 34 / 0.5);
        transition: border-color 0.18s ease, box-shadow 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-stats > div:hover {
        border-color: rgb(5 150 105 / 0.4);
        box-shadow: 0 10px 18px -12px rgb(2 44 34 / 0.55);
        transform: translateY(-1px);
    }
    /* chips and stats fade up one after another when the panel opens or the preview switches page */
    body:not(.desktop-sidebar-menu) .navigation-bar .top-menu-module-item.keyboard-open .mega-preview :is(.mp-chips li, .mp-stats > div),
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-card.mp-swap :is(.mp-chips li, .mp-stats > div) {
        animation: mp-chip-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview :is(.mp-chips li, .mp-stats > div):nth-child(2) { animation-delay: 0.03s; }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview :is(.mp-chips li, .mp-stats > div):nth-child(3) { animation-delay: 0.06s; }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview :is(.mp-chips li, .mp-stats > div):nth-child(4) { animation-delay: 0.09s; }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview :is(.mp-chips li, .mp-stats > div):nth-child(n+5) { animation-delay: 0.12s; }
    @keyframes mp-chip-in {
        from { opacity: 0; transform: translate3d(0, 4px, 0); }
        to   { opacity: 1; transform: none; }
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-stats b {
        font-family: Poppins, ui-sans-serif, system-ui, sans-serif;
        font-size: 0.92rem;
        line-height: 1.3;
        color: #047857;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-stats span {
        font-size: 0.72rem;
        line-height: 1.3;
        color: #64748b;
    }

    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
        margin: 0;
        padding: 0;
        list-style: none;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-chips:empty { display: none; }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-chips li {
        padding: 0.16rem 0.6rem;
        border-radius: var(--leaf-badge, 0.55rem 0.15rem 0.55rem 0.15rem);
        font-size: 0.72rem;
        line-height: 1.4;
        color: #065f46;
        background: rgb(255 255 255 / 0.8);
        border: 1px solid rgb(5 150 105 / 0.2);
        transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-chips li:hover {
        background: #ecfdf5;
        border-color: rgb(5 150 105 / 0.45);
        transform: translateY(-1px);
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-hint {
        align-self: stretch;
        margin: 0.35rem 0 0;
        padding-top: 0.6rem;
        border-top: 1px dashed rgb(5 150 105 / 0.25);
        font-size: 0.72rem;
        line-height: 1.5;
        color: #64748b;
    }

    /* dark */
    html.dark body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-preview {
        border-color: rgb(255 255 255 / 0.08);
        background: linear-gradient(160deg, rgb(16 185 129 / 0.12) 0%, rgb(13 148 136 / 0.06) 50%, rgb(99 102 241 / 0.09) 100%);
        color: #e2e8f0;
    }
    html.dark body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-preview::before {
        background: radial-gradient(circle, rgb(16 185 129 / 0.2), rgb(16 185 129 / 0) 68%);
    }
    html.dark body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-preview::after { border-color: rgb(255 255 255 / 0.04); }
    html.dark body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-eyebrow { color: #6ee7b7; }
    html.dark body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-desc { color: #cbd5e1; }
    html.dark body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-stats > div {
        background: rgb(255 255 255 / 0.05);
        border-color: rgb(255 255 255 / 0.08);
        box-shadow: none;
    }
    html.dark body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-stats b { color: #6ee7b7; }
    html.dark body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-stats span,
    html.dark body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-hint { color: #94a3b8; }
    html.dark body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-chips li:hover {
        color: #d1fae5;
        background: rgb(16 185 129 / 0.16);
        border-color: rgb(110 231 183 / 0.35);
    }
    html.dark body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-stats > div:hover {
        border-color: rgb(110 231 183 / 0.3);
    }
    html.dark body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-chips li {
        color: #a7f3d0;
        background: rgb(255 255 255 / 0.06);
        border-color: rgb(255 255 255 / 0.1);
    }
    html.dark body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-hint { border-top-color: rgb(255 255 255 / 0.12); }
}

/* smaller laptops: tighter pane */
@media screen and (min-width: 1024px) and (max-width: 1279px) {
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-preview { padding: 0.95rem 0.95rem 0.9rem; }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-title { font-size: 1.05rem; }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-desc { font-size: 0.8rem; }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview .mp-icon { width: 1.8rem; height: 1.8rem; }
}
/* short screens: drop the extras, keep title + description */
@media screen and (min-width: 1024px) and (max-height: 700px) {
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-preview { min-height: 0; }
    body:not(.desktop-sidebar-menu) .navigation-bar .mega-preview :is(.mp-hint, [data-mp-module] .mp-chips) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .navigation-bar .mega-preview .mp-card.mp-swap { animation: none !important; }
    .navigation-bar .mega-preview :is(.mp-chips li, .mp-stats > div) { animation: none !important; transition: none !important; }
}
/* ===== end mega menu preview */

/* Modal close (✕) hover: ui-skin.css fills the circle with --ui-close-ink and turns the ✕ --ui-surface, but
   [leaf: ghost buttons visible] (.btn-ghost:hover, :not(#_)) won the background with a faint grey, so in dark
   mode the ✕ became a dark glyph on grey. Give the close button its own fill back, light: slate fill + white ✕; dark: soft light fill, the ✕ stays light. */
html body :is(.modal-box > form[method="dialog"] > .btn-circle, .modal-box > button.btn-circle.absolute):not(#_):hover {
    background-color: var(--ui-close-ink) !important;
    border-color: var(--ui-close-ink) !important;
    color: var(--ui-surface, #fff) !important;
}
html.dark body :is(.modal-box > form[method="dialog"] > .btn-circle, .modal-box > button.btn-circle.absolute):not(#_):hover {
    background-color: rgb(148 163 184 / 0.28) !important;
    border-color: rgb(203 213 225 / 0.7) !important;
    color: rgb(241 245 249) !important;
}

/* Native clear (x) of type="search" inputs (Consumer No. / Card search, filters): Chrome shows the default arrow
   cursor on it; it is a button, so give it the hand. */
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

/* ===== Menu bar under the real header
   The fixed header wraps to two rows on narrower desktops (long organisation name + user box + Quick Tools; e.g.
   1025-1279 px), but the fixed menu bar sat at a static top: 3rem and the content at mt-[6.5rem]: the taller header
   (z-index above the bar) covered the bar -> no menu at all, or a menu that opened on hover while clicks on its
   covered part landed on the header (panel closed, nothing opened). page-scroll-fit.js publishes the real
   --app-header-h / --app-nav-h; max() keeps the old values as the minimum, so one-row headers do not move. */
@media (min-width: 1024px) {
    html body:not(.desktop-sidebar-menu) .navigation-bar {
        top: max(3rem, var(--app-header-h, 3rem)) !important;
    }
    html body:not(.desktop-sidebar-menu) .page-content-scroll {
        /* header counted only while fixed (below 1200px it sits in the page flow); fallbacks add up to the old 6.5rem */
        margin-top: calc(var(--app-header-fixed-h, 3rem) + var(--app-nav-h, 3.1rem) + 0.4rem) !important;
    }
}

/* Mega panel height: fits the room under its tab (--mega-max-h from top-menu.js placeMega), one scrollbar for the
   whole panel; responsive-overrides.css gave every column its own 72vh scroll (nested scrollbars, rows cut off). */
@media screen and (min-width: 1024px) {
    body:not(.desktop-sidebar-menu) .navigation-bar .top-menu-module-item > .module-mega-box > .content {
        max-height: var(--mega-max-h, calc(100dvh - 7.5rem));
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .content > .row {
        max-height: none !important;
        overflow: visible !important;
    }
}

/* Preview pane decoration as background layers: the absolutely placed ::before / ::after reached past the box and,
   now that the pane can scroll (sticky + overflow-y auto), showed up as a scrollbar. */
@media screen and (min-width: 1024px) {
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-preview::before,
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-preview::after {
        display: none;
    }
    body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-preview {
        background:
            radial-gradient(circle at 100% 100%, rgb(16 185 129 / 0.26), rgb(16 185 129 / 0) 9rem),
            radial-gradient(circle at calc(100% + 1rem) -1.5rem, transparent 3rem, rgb(13 148 136 / 0.07) 3rem, rgb(13 148 136 / 0.07) 4.5rem, transparent 4.5rem),
            linear-gradient(160deg, #ecfdf5 0%, #f0fdfa 48%, #eef2ff 100%);
    }
    html.dark body:not(.desktop-sidebar-menu) .navigation-bar .module-mega-box .mega-preview {
        background:
            radial-gradient(circle at 100% 100%, rgb(16 185 129 / 0.18), rgb(16 185 129 / 0) 9rem),
            radial-gradient(circle at calc(100% + 1rem) -1.5rem, transparent 3rem, rgb(255 255 255 / 0.04) 3rem, rgb(255 255 255 / 0.04) 4.5rem, transparent 4.5rem),
            linear-gradient(160deg, rgb(16 185 129 / 0.12) 0%, rgb(13 148 136 / 0.06) 50%, rgb(99 102 241 / 0.09) 100%);
    }
}


/* ===== Password eye (public/assets/js/password-eye.js) ===== */
.fl-pw-host { position: relative; }
input.fl-pw-input { padding-right: 2.25rem !important; }
input.fl-pw-input::-ms-reveal,
input.fl-pw-input::-ms-clear { display: none; }
button.fl-pw-eye {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin: 0 .25rem 0 0;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color .15s ease, background-color .15s ease;
}
button.fl-pw-eye[hidden] { display: none; }
button.fl-pw-eye svg { width: 1rem; height: 1rem; pointer-events: none; }
button.fl-pw-eye:hover { color: #1e293b; background: rgba(100, 116, 139, .14); }
html.dark button.fl-pw-eye { color: #94a3b8; }
html.dark button.fl-pw-eye:hover { color: #f1f5f9; background: rgba(148, 163, 184, .18); }
@media print { button.fl-pw-eye { display: none !important; } }


/* ===== Badge colours without the .badge class =====
   daisyUI 5 colours a badge only together with .badge, so a lone badge-error + text-white was white text on nothing
   (the bell count, reservation and booking statuses). :where keeps these weaker than any class on the element. */
:where(.badge-error, .badge-success, .badge-warning, .badge-info, .badge-primary, .badge-secondary, .badge-accent, .badge-neutral, .badge-ghost):not(.badge) {
    display: inline-flex;
    align-items: center;
    padding-inline: .4rem;
    border-radius: .35rem;
}
:where(.badge-error):not(.badge) { background-color: var(--color-error); color: var(--color-error-content); }
:where(.badge-success):not(.badge) { background-color: var(--color-success); color: var(--color-success-content); }
:where(.badge-warning):not(.badge) { background-color: var(--color-warning); color: var(--color-warning-content); }
:where(.badge-info):not(.badge) { background-color: var(--color-info); color: var(--color-info-content); }
:where(.badge-primary):not(.badge) { background-color: var(--color-primary); color: var(--color-primary-content); }
:where(.badge-secondary):not(.badge) { background-color: var(--color-secondary); color: var(--color-secondary-content); }
:where(.badge-accent):not(.badge) { background-color: var(--color-accent); color: var(--color-accent-content); }
:where(.badge-neutral):not(.badge) { background-color: var(--color-neutral); color: var(--color-neutral-content); }
:where(.badge-ghost):not(.badge) { background-color: var(--color-base-200); color: var(--color-base-content); }

/* bell count: same corner badge as the pending items tile next to it */
.notification-bell-badge {
    z-index: 2;
    background-color: #ef4444;
    color: #fff;
    pointer-events: none;
}
.navigation-header .top-header-right .header-tool-user-notification .notification-bell-badge {
    left: auto !important;
    right: -6px !important;
    top: -7px !important;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 .3rem;
    font-size: .68rem;
    font-weight: 700;
    box-shadow: 0 0 0 2px #fff;
}
.dark .navigation-header .top-header-right .header-tool-user-notification .notification-bell-badge { box-shadow: 0 0 0 2px rgb(31 41 55); }

/* Compact app header v3 (below 1200px, admin-panel / hms / rms app layout).
   The old compact header stacked org | user / date + Quick Tools / Switch Module into three uneven rows and
   squeezed the organisation name to a few letters. top-header-right and header-tools-group are flattened
   (display: contents) so every control is a cell of one grid:
   - 768-1199: one row  -> org | date | switch | tools | user
   - below 768: two rows -> org ........ user / date ... switch tools
   The Quick Tools panel drops under the whole header, right aligned. */
@media (max-width: 1199px) {
    html body.app-layout .navigation-header .top-header-main {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto auto auto auto;
        grid-template-areas: "org date switch tools user";
        align-items: center !important;
        gap: 0.4rem !important;
        height: auto !important;
        min-height: 3.25rem;
        padding: 0.4rem 0.6rem !important;
        margin: 0 !important;
        position: relative;
        overflow: visible !important;
    }
    html body.app-layout .navigation-header .top-header-main > .top-header-right,
    html body.app-layout .navigation-header .top-header-right > .header-tools-group {
        display: contents !important;
    }
    html body.app-layout .navigation-header .top-header-left {
        grid-area: org !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    html body.app-layout .navigation-header .top-header-left > div,
    html body.app-layout .navigation-header .top-header-left > div > span {
        min-width: 0;
        max-width: 100%;
    }
    html body.app-layout .navigation-header .top-header-left .org-title,
    html body.app-layout .navigation-header .top-header-left .org-meta {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    html body.app-layout .navigation-header .top-header-right > div:first-child { grid-area: switch !important; }
    html body.app-layout .navigation-header .header-tools-date-mobile {
        grid-area: date !important;
        display: inline-flex !important;
        justify-self: start;
    }
    html body.app-layout .navigation-header .header-tools-toggle {
        grid-area: tools !important;
        display: inline-flex !important;
        min-width: 0 !important;
        max-width: none !important;
        width: auto !important;
    }
    html body.app-layout .navigation-header .header-user-group {
        grid-area: user !important;
        justify-self: end;
        min-width: 0;
        max-width: min(44vw, 13rem) !important;
        width: auto !important;
    }
    html body.app-layout .navigation-header .header-user-group > button { max-width: 100%; }
    html body.app-layout .navigation-header .top-header-right > :is(.header-tool-nepali-datetime, hr) { display: none !important; }

    /* one control height: date, switch, Quick Tools, user */
    html body.app-layout .navigation-header :is(.header-tools-date-mobile .np-datetime-dock-toggle, .header-tools-toggle, .header-user-group > button) {
        height: 2.25rem !important;
        min-height: 2.25rem !important;
        border-radius: 0.7rem !important;
    }
    html body.app-layout .navigation-header .btn.header-module-switch-btn {
        width: 2.25rem !important;
        height: 2.25rem !important;
        min-height: 2.25rem !important;
        padding: 0 !important;
        border-radius: 0.7rem !important;
    }
    html body.app-layout .navigation-header .header-module-switch-label { display: none !important; }

    html body.app-layout .navigation-header .header-tools-panel {
        position: absolute !important;
        top: calc(100% + 0.3rem) !important;
        right: 0.5rem !important;
        left: auto !important;
        width: min(calc(100vw - 1rem), 24rem) !important;
        max-width: min(calc(100vw - 1rem), 24rem) !important;
        z-index: 135;
    }
}
@media (max-width: 767px) {
    html body.app-layout .navigation-header .top-header-main {
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-areas:
            "org org user"
            "date switch tools";
        row-gap: 0.45rem !important;
    }
    html body.app-layout .navigation-header .header-tools-toggle { padding-inline: 0.65rem !important; }
}

/* Profile dropdown rows (My Modules ...): the icon + label wrapper was forced to display: block on small screens,
   so the icon sat above the label's baseline. */
.header-user-group:not(#_):not(#_) .origin-top-right ul > li > a > span.flex:first-child {
    display: inline-flex !important;
    align-items: center !important;
}

/* Phone list tables (sticky-table-head.js STACK): below 640px a list table wider than its box shows one card per row -
   title + actions on the first line, then "Header: value" lines. Screen only; print keeps the real table. */
@media screen and (max-width: 639px) {
    .ui-stack-wrap {
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
        border: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 !important;
    }
    .ui-stack-wrap::after, .ui-stack-wrap::before { display: none !important; }
    html body table.ui-stack,
    html body table.ui-stack > tbody,
    html body table.ui-stack > tfoot {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        border: 0 !important;
        background: transparent !important;
        white-space: normal !important;
    }
    html body table.ui-stack > thead { display: none !important; }
    html body table.ui-stack > tbody > tr,
    html body table.ui-stack > tfoot > tr {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.1rem 0.5rem;
        margin: 0 0 0.5rem !important;
        padding: 0.6rem 0.75rem !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 14px !important;
        background: #fff !important;
        box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
        height: auto !important;
    }
    html body table.ui-stack > tfoot > tr { background: #f8fafc !important; }
    html body table.ui-stack td,
    html body table.ui-stack th {
        display: flex !important;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.75rem;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        padding: 0.18rem 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        position: static !important;
        transform: none !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
        text-align: right !important;
        font-size: 0.8125rem;
        line-height: 1.35;
    }
    html body table.ui-stack td::before,
    html body table.ui-stack th::before {
        content: attr(data-label);
        flex: 0 0 auto;
        max-width: 45%;
        color: #64748b;
        font-size: 0.72rem;
        font-weight: 600;
        text-align: left;
    }
    html body table.ui-stack :is(td, th)[data-label=""]::before { display: none; }
    html body table.ui-stack td.ui-stack-title {
        order: -2;
        flex: 1 1 0 !important;
        width: auto !important;
        justify-content: flex-start;
        text-align: left !important;
        font-size: 0.9rem;
        font-weight: 700;
        color: #0f172a;
        padding-bottom: 0.3rem !important;
    }
    html body table.ui-stack td.ui-stack-act {
        order: -1;
        flex: 0 0 auto !important;
        width: auto !important;
        justify-content: flex-end;
        align-items: center;
        gap: 0.3rem;
        padding-bottom: 0.3rem !important;
    }
    html body table.ui-stack td.ui-stack-act > * { display: inline-flex; gap: 0.3rem; }
    html body table.ui-stack td.ui-stack-act .btn { min-height: 2rem; height: 2rem; }
    html body table.ui-stack td:is(.ui-stack-title, .ui-stack-act, .ui-stack-full)::before { display: none; }
    html body table.ui-stack td.ui-stack-full { justify-content: center; text-align: center !important; }
    html body table.ui-stack td.ui-stack-empty:not(.ui-stack-title):not(.ui-stack-act) { display: none !important; }
    /* the first real line under the title row gets a hairline */
    html body table.ui-stack td.ui-stack-title ~ td:not(.ui-stack-act) { border-top: 0 !important; }

    html.dark body table.ui-stack > tbody > tr,
    html.dark body table.ui-stack > tfoot > tr { background: #1f2937 !important; border-color: #374151 !important; box-shadow: none; }
    html.dark body table.ui-stack > tfoot > tr { background: #111827 !important; }
    html.dark body table.ui-stack :is(td, th)::before { color: #9ca3af; }
    html.dark body table.ui-stack td.ui-stack-title { color: #f3f4f6; }
    html.dark body table.ui-stack :is(td, th) { color: #e5e7eb; }

    /* Mary table footer: pager and Per Page on one tidy line, full width */
    .mary-table-pagination {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        width: 100% !important;
    }
    .mary-table-pagination :is(a, button, span) { white-space: nowrap; }

    /* sort pills above the cards (sticky-table-head.js syncSortBar) */
    .ui-stack-sort {
        display: flex; align-items: center; gap: 0.35rem; margin: 0 0 0.55rem; padding: 0.1rem 0 0.2rem;
        overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .ui-stack-sort::-webkit-scrollbar { display: none; }
    .ui-stack-sort-ic { flex: none; display: inline-flex; color: #64748b; }
    .ui-stack-sort-ic svg { width: 1rem; height: 1rem; }
    .ui-stack-sort-pill {
        flex: none; display: inline-flex; align-items: center; gap: 0.25rem; height: 1.85rem; padding: 0 0.75rem;
        border: 1px solid #e2e8f0; border-radius: 9999px; background: #fff; color: #475569;
        font-size: 0.75rem; font-weight: 600; white-space: nowrap;
    }
    .ui-stack-sort-pill svg { width: 0.75rem; height: 0.75rem; }
    .ui-stack-sort-pill.is-on { border-color: #6ee7b7; background: #ecfdf5; color: #047857; }
    html.dark .ui-stack-sort-pill { background: #1f2937; border-color: #374151; color: #d1d5db; }
    html.dark .ui-stack-sort-pill.is-on { background: rgb(16 185 129 / 0.16); border-color: rgb(16 185 129 / 0.45); color: #6ee7b7; }
    html.dark .ui-stack-sort-ic { color: #9ca3af; }
}
@media screen and (min-width: 640px) { .ui-stack-sort { display: none !important; } }

/* Focus mode (public/assets/js/focus-mode.js), phones / tablets below 1024px: html.app-focus hides the header and the
   menu bar; the "Menu" tab at the top edge (first child of .navigation-header) brings them back. RMS order entry also
   uses it up to 1199px (its own page style). */
.app-focus-btn, .app-focus-exit { display: none; }
@media screen and (max-width: 1023px) {
    .navigation-bar .app-focus-btn { display: inline-flex; }
    html.app-focus .navigation-header > :not(.app-focus-exit),
    html.app-focus .navigation-bar { display: none !important; }
    html.app-focus body .page-content-scroll { margin-top: 2.35rem !important; }
    /* the way back: a small floating glass pill at the top centre (chevron chip + "Menu"), drops in when focus starts */
    html.app-focus .app-focus-exit {
        display: inline-flex; align-items: center; gap: .4rem;
        position: fixed; top: calc(.35rem + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 530;
        min-height: 1.9rem; padding: .2rem .8rem .2rem .25rem; border-radius: 9999px; cursor: pointer;
        border: 1px solid rgb(255 255 255 / .45);
        background: linear-gradient(135deg, rgb(16 185 129 / .95), rgb(5 150 105 / .95));
        -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
        color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .01em; line-height: 1;
        box-shadow: 0 10px 22px -10px rgb(5 150 105 / .75), 0 2px 6px rgb(15 23 42 / .12);
        animation: app-exit-in .32s cubic-bezier(.2, .9, .3, 1.2) both;
        transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
    }
    html.app-focus .app-focus-exit:hover { filter: brightness(1.06); box-shadow: 0 12px 26px -10px rgb(5 150 105 / .85), 0 2px 6px rgb(15 23 42 / .14); }
    html.app-focus .app-focus-exit:active { transform: translateX(-50%) scale(.96); }
    html.app-focus .app-focus-exit:focus-visible { outline: 2px solid #6ee7b7; outline-offset: 2px; }
    html.app-focus .app-focus-exit svg {
        box-sizing: content-box; width: .8rem; height: .8rem; padding: .3rem; border-radius: 9999px;
        background: rgb(255 255 255 / .22); stroke-width: 3;
    }
    @keyframes app-exit-in { from { opacity: 0; transform: translate(-50%, -120%); } }
    html.dark.app-focus .app-focus-exit {
        border-color: rgb(110 231 183 / .25); background: linear-gradient(135deg, rgb(6 95 70 / .92), rgb(4 47 46 / .92)); color: #d1fae5;
        box-shadow: 0 10px 22px -10px rgb(0 0 0 / .7);
    }
    @media (prefers-reduced-motion: reduce) { html.app-focus .app-focus-exit { animation: none; } }
}
/* the switch animation (only while .app-focus-vt is on, i.e. during the View Transition) */
html.app-focus-vt .navigation-header > header { view-transition-name: app-head; }
html.app-focus-vt .navigation-bar { view-transition-name: app-nav; }
html.app-focus-vt .page-content-scroll { view-transition-name: app-page; }
html.app-focus-vt .app-focus-exit { view-transition-name: app-exit; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(app-page) { animation-duration: .3s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(app-page), ::view-transition-new(app-page) { animation: none; mix-blend-mode: normal; height: 100%; object-fit: none; object-position: top; }
::view-transition-old(app-head), ::view-transition-old(app-nav), ::view-transition-old(app-exit) { animation: app-vt-up .24s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(app-head), ::view-transition-new(app-nav), ::view-transition-new(app-exit) { animation: app-vt-down .3s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes app-vt-up { to { transform: translateY(-100%); opacity: 0; } }
@keyframes app-vt-down { from { transform: translateY(-100%); opacity: 0; } }
@media print { .app-focus-exit { display: none !important; } }

/* Header date popover below 1200px (all layouts): the date button sits on the left of its row, but an older rule
   pinned the panel to the button's right edge, so it opened off the left side of the screen. Open it rightwards. */
@media (max-width: 1199px) {
    html body .navigation-header .header-tools-date-mobile .np-datetime-dock-panel {
        left: 0 !important;
        right: auto !important;
        width: min(17rem, calc(100vw - 1rem)) !important;
        max-width: calc(100vw - 1rem) !important;
    }
}

/* Header date popover: hidden until Alpine starts. The compact header shows the date wrapper with display !important,
   which beat its x-cloak, so on reload the empty panel flashed open until Alpine applied x-show. */
[x-cloak] .np-datetime-dock-panel,
.np-datetime-dock-panel[x-cloak] { display: none !important; }
