Summary of Significant Accounting Policies | Summary of Significant Accounting Policies The Company Clean Energy Fuels Corp., together with its majority and wholly owned subsidiaries (hereinafter collectively referred to as the "Company," unless the context or the use of the term indicates or requires otherwise) is engaged in the business of selling natural gas as an alternative fuel for vehicle fleets and related natural gas fueling solutions to its customers, primarily in the United States and Canada. The Company's principal business is supplying renewable natural gas ("RNG"), compressed natural gas (“CNG”) and liquefied natural gas (“LNG”) (RNG can be delivered in the form of CNG or LNG) for light, medium and heavy-duty vehicles and providing operation and maintenance ("O&M") services for vehicle fleet customer stations. As a comprehensive solution provider, the Company also designs, builds, operates and maintains fueling stations; sells and services natural gas fueling compressors and other equipment used in CNG stations and LNG stations; offers assessment, design and modification solutions to provide operators with code-compliant service and maintenance facilities for natural gas vehicle fleets; transports and sells CNG and LNG via “virtual” natural gas pipelines and interconnects; procures and sells RNG; sells tradable credits it generates by selling RNG and conventional natural gas as a vehicle fuel, including Renewable Identification Numbers ("RIN Credits" or "RINs") under the federal Renewable Fuel Standard Phase 2 and credits under the California and the Oregon Low Carbon Fuel Standards (collectively, "LCFS Credits"); helps its customers acquire and finance natural gas vehicles; and obtains federal, state and local credits, grants and incentives. In addition, for all periods presented before March 31, 2017, the Company produced RNG at its own production facilities, and for all periods presented before December 29, 2017, the Company manufactured, sold and serviced natural gas fueling compressors and other equipment used in CNG stations. See Note 3 for more information. Basis of Presentation The accompanying consolidated financial statements include the accounts of the Company and its subsidiaries, and, in the opinion of management, reflect all adjustments necessary to state fairly the Company's financial position, results of operations, comprehensive loss and cash flows in accordance with accounting principles generally accepted in the United States of America ("US GAAP"). All intercompany accounts and transactions have been eliminated in consolidation. Reclassifications Prior period Gain from change in fair value of derivative warrants of $1,414 and $22 for the years ended December 31, 2015 and 2016, respectively, were reclassified from a separate line item into Selling, general and administrative in the consolidated statements of operations, and the same amounts were reclassified into Accrued expenses and other in the consolidated statements of cash flows to conform to the classifications used to prepare the consolidated financial statements for the year ended December 31, 2017 . In addition, Deferred revenue of $4,134 and $3,479 for the years ended December 31, 2015 and 2016, respectively were reclassified from Accrued expenses and other as a separate line item in the consolidated statements of cash flows to conform to current period presentation. These reclassifications had no material impact on the Company’s financial position, results of operations or cash flows as previously reported. Prior period Interest income of $843 for the year ended December 31, 2015 was reclassified from Interest expense, net to a separate line item, to conform to the classifications used to prepare the consolidated financial statements for the years ended December 31, 2016 and 2017 . This reclassification had no material impact on the Company’s financial position, results of operations or cash flows as previously reported. Use of Estimates The preparation of consolidated financial statements in conformity with US GAAP requires management to make estimates and assumptions that affect the amounts reported in the consolidated financial statements and accompanying notes. Actual results could differ from those estimates and may result in material effects on the Company's operating results and financial position. Significant estimates made in preparing the consolidated financial statements include (but are not limited to) those related to revenue recognition, goodwill and long-lived intangible asset valuations and impairment assessments, income tax valuations, fair value measurements and stock-based compensation expense. Cash and Cash Equivalents The Company considers all highly liquid investments with maturities of three months or less on the date of acquisition to be cash equivalents. Fair Value of Financial Instruments The carrying values of the Company's financial instruments, including cash and cash equivalents, restricted cash, short-term investments, accounts receivables, other receivables, notes receivable, accounts payable, accrued expenses and other current liabilities, capital lease obligations and notes payable, approximate their respective fair values. Inventory Inventory consists of raw materials and spare parts, work in process and finished goods and is stated at the lower of cost (first-in, first-out) or net realizable value. The Company writes down the carrying value of its inventory to net realizable value for estimated obsolescence or unmarketable inventory in an amount equal to the difference between the cost of inventory and its estimated realizable value based upon assumptions about future demand and market conditions, among other factors. Inventories consisted of the following as of December 31, 2016 and 2017 : 2016 2017 Raw materials and spare parts (1) $ 24,843 $ 35,145 Work in process 845 — Finished goods 3,856 93 Total inventory $ 29,544 $ 35,238 (1) During the year ended December 31, 2017, $19,394 in station parts were reclassified from construction in progress within Land, property, and equipment, net, into Inventory in the consolidated balance sheets because they will primarily be used for stations to be sold. See Note 2 for more information. Property and Equipment Property and equipment are recorded at cost. Depreciation and amortization are recognized over the estimated useful lives of the assets using the straight-line method. The estimated useful lives of depreciable assets are three to twenty years for LNG liquefaction plant assets, up to 10 years for station equipment and LNG trailers, and three to seven years for all other depreciable assets. Leasehold improvements are amortized over the shorter of their estimated useful lives or related lease terms. Periodically, the Company receives grant funding to assist in the financing of natural gas fueling station construction. The Company records the grant proceeds as a reduction of the cost of the respective asset. Total grant proceeds received were approximately $4,292 , $3,295 , and $4,360 for the years ended December 31, 2015 , 2016 and 2017 , respectively. Long-Lived Assets The Company reviews the carrying value of its long-lived assets, including property and equipment and intangible assets with finite useful lives, for impairment whenever events or changes in circumstances indicate that the carrying value of an asset or asset group may not be recoverable. Events that could result in an impairment review include, among others, a significant decrease in the operating performance of a long-lived asset or asset group or the decision to close a fueling station. Impairment testing involves a comparison of the sum of the undiscounted future cash flows of the asset or asset group to its carrying amount. If the sum of the undiscounted future cash flows exceeds the carrying amount, then no impairment exists. If the carrying amount exceeds the sum of the undiscounted future cash flows, then a second step is performed to determine the amount of impairment, if any, to be recognized. An impairment loss is recognized to the extent that the carrying amount of the asset or asset group exceeds its fair value. The fair value of the asset or asset group is based on estimated discounted future cash flows of the asset or asset group using a discount rate commensurate with the related risk. The estimate of future cash flows requires management to make assumptions and to apply judgment, including forecasting future sales and expenses and estimating useful lives of the assets. These estimates can be affected by a number of factors, including, among others, future results, demand, and economic conditions, many of which can be difficult to predict. In the third quarter of the year ended December 31, 2017, the Company recorded asset impairment charges of $32,274 related to one of its subsidiaries, IMW Industries Ltd. ("IMW") (formerly known as Clean Energy Compression Corp.) ("CEC") and $20,384 related to certain station closures (see Note 2 for more information). There were no impairments of the Company’s long-lived assets in the years ended December 31, 2015 or 2016 . Intangible assets with finite useful lives are amortized over their respective estimated useful lives using the straight-line method. The estimated useful lives of intangible assets with finite useful lives are from two to 20 years for technology, one to eight years for customer relationships, one to 10 years for acquired contracts, two to 10 years for trademarks and trade names, and three years for non-compete agreements. The Company's intangible assets as of December 31, 2016 and 2017 were as follows: 2016 2017 Technology $ 54,400 $ — Customer relationships 16,576 5,376 Acquired contracts 4,384 4,384 Trademark and trade names 8,200 2,700 Non-compete agreements 2,060 860 Total intangible assets 85,620 13,320 Less accumulated amortization (37,591 ) (9,730 ) Foreign currency rate change (9,329 ) — Net intangible assets $ 38,700 $ 3,590 Amortization expense for intangible assets was $5,539 , $5,794 , and $5,065 for the years ended December 31, 2015 , 2016 and 2017 , respectively. Estimated amortization expense for the five years and thereafter succeeding the year ended December 31, 2017 is approximately $1,393 , $973 , $765 , $459 , $0 and $0 , respectively. Goodwill Goodwill represents the excess of costs incurred over the fair value of the net assets of acquired businesses. The Company assesses its goodwill using either a qualitative or quantitative approach to determine whether it is more likely than not that the fair value of its reporting unit is less than its carrying value. The Company is required to use judgment when applying the goodwill impairment test, including, among other considerations, the identification of reporting unit(s), the assessment of qualitative factors, and the estimation of fair value of a reporting unit in the quantitative approach. The Company determined that it is a single reporting unit for the purpose of goodwill impairment tests. The Company performs the impairment test annually on October 1, or more frequently if facts and circumstances warrant a review. The qualitative goodwill assessment includes the potential impact on a reporting unit's fair value of certain events and circumstances, including its enterprise value, macroeconomic conditions, industry and market considerations, cost factors, and other relevant entity-specific events. If it is determined, based upon the qualitative assessment, that it is more likely than not that the reporting unit's fair value is less than its carrying amount, then a quantitative impairment test is performed. The quantitative assessment estimates the reporting unit's fair value based on its enterprise value plus an assumed control premium as evidence of fair value. The estimates used to determine the fair value of the reporting unit may change based on results of operations, macroeconomic conditions, stock price fluctuations, or other factors. Changes in these estimates could materially affect our assessment of the fair value and goodwill impairment for the reporting unit. During the years ended December 31, 2015 and 2016 , the Company utilized the qualitative approach and concluded there were no indicators of impairment to goodwill. During the third quarter of the year ended December 31, 2017 , as a result of the asset impairment charges recorded for intangible assets and stations (described previously and in Note 2 ), the Company determined that sufficient indicators of potential impairment existed to require an interim goodwill test of its one reporting unit prior to the annual test performed in the fourth quarter of 2017 . The goodwill test was performed by computing the fair value of the reporting unit and comparing it to the carrying value using a quantitative assessment. Based on the results of the goodwill test, the Company concluded that it is more likely than not that the fair value of its reporting unit exceeds its carrying amount and thus no impairment existed. The annual impairment test was subsequently performed on October 1 using the quantitative assessment and the Company concluded no impairment existed. The qualitative assessment was also performed as of December 31, 2017 as a result of volatility in the Company's market capitalization subsequent to October 1, with no changes in the conclusions during the annual impairment test. The following table summarizes the activity related to the carrying amount of goodwill: Balance as of December 31, 2015 $ 91,967 Foreign currency translation adjustment 1,051 Balance as of December 31, 2016 93,018 Goodwill reduced during the year (1) (30,154 ) Foreign currency translation adjustment 1,464 Balance as of December 31, 2017 $ 64,328 (1) The Company reduced its goodwill balance by $26,576 when it sold certain assets of its subsidiary, Clean Energy Renewable Fuels ("Renewables"), on March 31, 2017, and by $3,578 when it contributed CEC to SAFE&CEC S.r.l. on December 29, 2017 (all described in Note 3 ). Revenue Recognition The Company recognizes revenue from various sources. The table below and the following discussion describe the Company’s revenue by group of similar products, services or other revenue sources. Year Ended December 31, (in thousands) 2015 2016 2017 Volume -Related $ 260,629 $ 283,814 $ 264,880 Compressor Sales 54,497 27,262 23,527 Station Construction Sales 37,830 64,942 51,854 AFTC (1) 30,986 26,638 — Other 378 — 1,338 $ 384,320 $ 402,656 $ 341,599 (1) Formerly known as VETC. Volume -Related The Company’s volume related revenue primarily consists of CNG, LNG and RNG fuel sales, RINs and LCFS Credits sales and O&M services. This revenue is recognized when the following four criteria are met: (i) persuasive evidence of an arrangement exists; (ii) delivery has occurred and title and the risks and rewards of ownership have been transferred to the customer or services have been rendered; (iii) the price is fixed or determinable; and (iv) collectability is reasonably assured. Applying these factors, the Company typically recognizes revenue from the sale of natural gas fuel at the time the fuel is dispensed or, in the case of LNG sales agreements, delivered to the customers' storage facilities. The Company recognizes revenue from O&M service agreements as the related services are provided. The Company generates RIN Credits when it sells RNG as a vehicle fuel in the United States, and it generates LCFS Credits when it sells RNG and conventional natural gas for use as a vehicle fuel in California and Oregon. The Company can sell these credits to third parties who need the credits to comply with federal and state requirements. RIN and LCFS Credits are included in volume related revenues. The Company recognizes revenue from the generation of these credits when it has an agreement in place to sell the credits at a fixed or determinable price. Compressor Sales Before completion of the CEC Combination (see Note 3 ), the Company recognized compression revenue through its former subsidiary CEC when it sold non-lubricated natural gas fueling compressors and other equipment. CEC used the percentage-of-completion method of accounting to recognize revenue because its projects were small and it was able to demonstrate that it could reasonably estimate costs to complete. In these circumstances, revenue was recognized based on costs incurred in relation to total estimated costs to be incurred for a project. Station Construction Sales Beginning January 1, 2016, the Company began using the percentage of completion method to recognize revenue for station construction projects using the cost-to-cost method. Under this method, the Company estimates the percentage of completion of a project based on the costs incurred to date for the associated contract in comparison to the estimated total costs for such contract at completion. Historically, the Company recognized revenue on station construction projects using the completed contract method because the Company did not have a reliable means to make estimates of the percentage of the contract completed. Under the completed contract method, the construction projects were considered substantially complete at the earlier of customer acceptance of the fueling station or the time when fuel dispensing activities at the station began. The sale of compressors and related equipment continues to be recognized under the percentage of completion method as in previous periods. Effective January 1, 2016, the Company implemented a cost tracking system that provides for a detailed tracking of costs incurred on its station construction projects on a project by project basis. The Company also changed related accounting activities and processes to timely identify and monitor costs. As a result of this implementation, the Company is able to make reliable estimates as to the percentage of a project that is complete at the end of each reporting period. Station construction contracts are generally short-term, except for certain larger and more complex stations, which can take up to 24 months to complete. Management evaluates the performance of contracts on an individual contract basis. Contract price and cost estimates are reviewed periodically as work progresses and adjustments proportionate to the percentage of completion are reflected in contract revenues in the reporting period when such estimates are revised. The nature of accounting for contracts is such that refinements of estimates to account for changing conditions and new developments are continuous and characteristic of the process. Many factors that can affect contract profitability may change during the performance period of a contract, including differing site conditions, the availability of skilled contract labor, the performance of major suppliers and subcontractors, and unexpected changes in material costs. Changes to these factors may result in revisions to costs and income, which are recognized in the period in which the revisions become known. Provisions for estimated losses on uncompleted contracts are made in the period in which such losses become known. During the year ended December 31, 2017 , there were no significant losses on open contracts. The Company considers unapproved change orders to be contract variations for which the customer has approved the change of scope but an agreement has not been reached as to an associated price change. Change orders that are unapproved as to both price and scope are evaluated as claims. Claims have historically been insignificant. There were no significant unapproved change orders, claims, contract penalties, settlements or changes in contract estimates during the year ended December 31, 2017 . In certain transactions with its customers, the Company agrees to provide multiple products or services, including construction of and sale of a station, providing O&M services to the station, and sale of fuel to the customer. The Company evaluates the separability of revenues based on Financial Accounting Standards Board ("FASB") authoritative guidance, which provides a framework for establishing whether or not a particular arrangement with a customer has one or more revenue elements, and allows the Company to use a combination of internal and external objective and reliable evidence to develop management's best estimate of the fair value of the contract elements. If the arrangement contains a lease, the Company uses the existing evidence of fair value to separate the lease from the other elements in the arrangement. The arrangement's consideration that is fixed or determinable is then allocated to each separate unit of accounting based on the estimated relative selling price of each deliverable, which is determined based on the historical data derived from the Company's stand-alone projects. The revenue allocated to the construction of the station is recognized using the percentage of completion method. The revenue allocated to the O&M services is recognized ratably over the term of the arrangement and sale of fuel is recognized as the fuel is delivered. See the discussion under “Alternative Fuels Excise Tax Credit” below for more information. Other The Company collects and remits taxes assessed by various governmental authorities that are imposed on and concurrent with revenue-producing transactions between the Company and our customers. These taxes may include, but are not limited to, fuel, sales and value-added taxes. The Company reports the collection of these taxes on a net basis. Alternative Fuels Excise Tax Credit Under separate pieces of U.S. federal legislation, the Company has been eligible to receive a federal alternative fuels tax credit (“AFTC,” formerly known as VETC) for its natural gas vehicle fuel sales made between October 1, 2006 and December 31, 2017. The AFTC, which had previously expired on December 31, 2016, was reinstated on February 9, 2018 to apply to vehicle fuel sales made from January 1, 2017 through December 31, 2017. The AFTC credit is equal to $0.50 per gasoline gallon equivalent of CNG that the Company sold as vehicle fuel, $0.50 per liquid gallon of LNG that the Company sold as vehicle fuel through 2015, and $0.50 per diesel gallon of LNG that the Company sold as vehicle fuel in 2016 and 2017. Based on the service relationship with its customers, either the Company or its customers claims the credit. The Company records its AFTC credits, if any, as revenue in its consolidated statements of operations because the credits are fully payable and do not need to offset income tax liabilities to be received. As such, the credits are not deemed income tax credits under the accounting guidance applicable to income taxes. As a result of the legislation being signed into law in 2018, all AFTC revenue for vehicle fuel the Company sold in the 2017 calendar year, will be recognized and collected subsequent to December 31, 2017. AFTC revenue recognized for years ended December 31, 2015 , 2016 and 2017 was $30,986 , $26,638 and $0 , respectively. LNG Transportation Costs The Company records the costs incurred to transport LNG to its customers in the line item Product cost of sales in the accompanying consolidated statements of operations. Advertising Costs Advertising costs are expensed as incurred. Advertising costs were $44 , $15 and $311 for the years ended December 31, 2015 , 2016 and 2017 , respectively. Stock-Based Compensation The Company recognizes compensation expense for all stock‑based payment arrangements over the requisite service period of the award. For stock options, the Company determines the grant date fair value using the Black‑Scholes option pricing model, which requires the input of certain assumptions, including the expected life of the stock‑based payment awards, stock price volatility and risk‑free interest rates. For restricted stock units, the Company determines the grant date fair value based on the closing market price of its common stock on the date of grant. Income Taxes Income taxes are computed using the asset and liability method. Under this method, deferred income taxes are recognized by applying enacted statutory tax rates applicable to future years to differences between the tax bases and financial carrying amounts of existing assets and liabilities. The impact on deferred taxes of changes in tax rates and laws, if any, are applied to the years during which temporary differences are expected to be settled and are reflected in the consolidated financial statements in the period of enactment. Valuation allowances are established when management determines it is more likely than not that deferred tax assets will not be realized. When evaluating the need for a valuation analysis, we use estimates involving a high degree of judgment including projected future US GAAP income and the amounts and estimated timing of the reversal of any deferred tax assets and liabilities. The Company has a recognition threshold and a measurement attribute for the financial statement recognition and measurement of tax positions taken or expected to be taken in a tax return. For those benefits to be recognized, a tax position must be more likely than not to be sustained upon examination by taxing authorities based on the technical merits of the position. The amount recognized is measured as the largest amount of benefit that has a greater than 50 percent likelihood of being realized upon ultimate settlement. The Company recognizes potential accrued interest and penalties related to unrecognized tax benefit in income tax expense. The Company operates within multiple domestic and foreign taxing jurisdictions and is subject to audit in these jurisdictions. These audits can involve complex issues, which may require an extended period of time to resolve. Although the Company believes that adequate consideration has been given to these issues, it is possible that the ultimate resolution of these issues could be significantly different than originally estimated. Net Loss Per Share Basic net loss per share is computed by dividing the net loss attributable to Clean Energy Fuels Corp. by the weighted-average number of common shares outstanding and common shares issuable for little or no cash consideration during the period. Diluted net loss per share is computed by dividing the net loss attributable to Clean Energy Fuels Corp. by the weighted-average number of common shares outstanding and common shares issuable for little or no cash consideration during the period and potentially dilutive securities outstanding during the period, and therefore reflects the dilution from common shares that may be issued upon exercise or conversion of these potentially dilutive securities, such as stock options, warrants, convertible notes and restricted stock units. The dilutive effect of stock awards and warrants is computed under the treasury stock method. The dilutive effect of convertible notes and restricted stock units is computed under the if-converted method. Potentially dilutive securities are excluded from the computations of diluted net loss per share if their effect would be antidilutive. Although these securities were antidilutive for these periods, they could be dilutive in future periods. The following potentially dilutive securities have been excluded from the diluted net loss per share calculations because their effect would have been antidilutive: 2015 2016 2017 Stock options 11,487,938 11,467,796 8,613,854 Warrants 2,130,682 — — Convertibles notes 35,185,979 16,573,799 14,991,521 Restricted stock units 3,419,776 2,072,304 1,832,575 Foreign Currency Translation The Company uses the local currency as the functional currency of its foreign subsidiaries. Accordingly, all assets and liabilities outside the United States are translated into U.S. dollars at the rate of exchange in effect at the balance sheet date. Revenue and expense items are translated at the weighted-average exchange rates prevailing during the period. Foreign currency translation adjustments are recorded as accumulated other comprehensive loss in stockholders' equity. Foreign currency transactions occur when there is a transaction denominated in other than the respective entity's functional currency. The Company records the changes in the exchange rate for these transactions in the consolidated statements of operations. For the years ended December 31, 2015 , 2016 and 2017 , foreign exchange transaction gains and (losses) were included in other income (expense) in the accompanying consolidated statements of operations and were $975 , $132 and $(246) , respectively. Comprehensive Loss Comprehensive loss is defined as the change in equity (net assets) of a business enterprise during the period from transactions and other events and circumstances from non-owner sources. The difference between net loss and comprehensive loss for the years ended December 31, 2015 , 2016 and 2017 was primarily comprised of the Company's foreign currency translation adjustments. Concentration of Credit Risk Credit is extended to all customers based on financial condition, and collateral is generally not required. Concentrations of credit risk with respect to trade receivables are limited because of the large number of customers comprising the Company's customer base and dispersion across many different industries and geographies. Certain international customers, however, have historically been slower to pay on trade receivables. Accordingly, the Company continually monitors collections and payments from its customers and maintains a provision for estimated credit losses based upon its historical experience and any specific customer collection issues that it has identified. Although credit losses have historically been within the Company's expectations and the provisions established, the Company cannot guarantee that it will continue to experience the same credit loss rates that it has in the past. The Company places its cash and cash equivalents with high credit quality financial institutions. At times, such investments may be in excess of the Federal Deposit Insurance Corporation ("FDIC"), and other foreign insurance limits. Financial instruments that potentially subject the Company to concentrations of credit risk consist principally of cash deposits. The amounts in excess of FDIC insurance limits were $34,439 and $34,709 as of December 31, 2016 and 2017 , respectively. Recently Adopted Accounting Changes and Recently Issued Accounting Standards Recently Adopted Accounting Changes In May 2017, the FASB issued ASU 2017-09, Compensation - Stock Compensation (Topic 718): Scope Modification Accounting . This ASU allows entities to make certain changes to awards without accounting for them as modifications. It does not change the accounting for modifications. Specifically, an entity will not apply modification accounting if all of the following are the same immediately before and after the change: (1) the award's fair value (or calculated value or intrinsic value if those measurement methods are used), (2) the award's vesting conditions, and (3) the award's classification as an equity or liability instrument. The new standard is effective for fiscal years beginning after December 15, 2017, which for the Company is the first quarter of 2018. Early adoption is permitted for interim or annual periods in which the financial statements have not been issued. The Company elected to early adopt this ASU during the year ended December 31, 2017, which did not have any impact on its consolidated financial statements and related disclosures. In January 2017, the FASB issued ASU 2017-04, Intangibles - Goodwill and Other (Topic 350): Simplifying the Test for Goodwill Impairment. The new standard eliminates the requirement to determine the fair value of individual assets and liabilities of a reporting unit to measure goodwill impairment. Under the amendments in the new ASU, goodwill impairment testing will be performed by comparing the fair value of the reporting unit with its carrying amount and recognizing an impairment charge for the amount by which the carrying amount exceeds the reporting unit’s fair value. The new standard is effective for annual and interim goodwill impairment tests in fiscal years beginning after December 15, 2019, which for the Company is the first quarter of 2020 and should be applied on a prospective basis. Early adoption is permitted for annual or interim goodwill impairment testing performed after January 1, 2017. The Company elected to early adopt this ASU during the year ended December 31, 2017, which did not have any impact on its consolidated financial |