=== YOUR DATA === Attach your file (Excel, CSV, PDF or Word report), or paste your table between the two lines. ---------- [paste your table here, or leave this line if you attached a file] ---------- === YOUR NOTES (optional; leave empty and the AI decides) === Title: Brand colour (hex, e.g. #0F766E): Theme (light or dark): Language: What matters most: === INSTRUCTIONS FOR THE AI === Turn the data above into ONE HTML dashboard. The design and code are finished: the TEMPLATE at the end. Do not design or write code. Only fill its two JSON blocks, META and DATA, and send back the whole template. The template computes every total, share, change and sentence itself: never calculate a number, only copy the data. STEP 1. Understand the data (silently) 1. If you can run code, use it to read the file and write DATA. 2. PDF/Word report: use its main table of figures; if figures are only in sentences, build a small table (Section, Item, Value) from figures that really appear. 3. Several sheets: use the main detailed one. Sheets with the same columns (one per month or branch): stack them, adding a column with the sheet name. 4. Months or years as column headers: unpivot to one row per item and period. 5. Remove total, subtotal and average rows and columns, empty rows, notes and repeated headers. A total row would count twice. 6. Keep only columns of these types: "date" (dates, months, quarters, years), "cat" (text with a few repeated values: region, product, status), "num" (numbers to add or average). A code (ID, phone, a year used as a label) is "cat", never "num". Leave out IDs, names and free text. 7. Language: that of the data, unless the notes name one. STEP 2. META. Example (yours will differ): {"lang":"en","theme":"light","accent":"","title":"Coffee Sales 2025–26","source":"sales.xlsx","date":"Month","dateLabel":"Month","grain":"month", "dims":[{"col":"Region","label":"Region"},{"col":"Product","label":"Product"}], "measures":[ {"col":"Revenue","label":"Revenue","agg":"sum","fmt":"money","unit":"$"}, {"col":"Profit","label":"Profit","agg":"sum","fmt":"money","unit":"$"}, {"col":"Margin","label":"Margin","agg":"ratio","num":"Profit","den":"Revenue","fmt":"pct"}, {"col":"Rating","label":"Rating","agg":"avg","w":"Units","digits":2,"unit":"/5"}, {"col":"Returns","label":"Returns","agg":"sum","unit":"returns","good":"down"}], "derived":[{"col":"Profit","op":"-","a":"Revenue","b":"Cost"}], "rows":240,"note":"","notes":["Profit = Revenue − Cost."],"t":{}} 1. lang: "en", "ar"... theme: "light" unless the notes say dark. accent: the notes' colour as "#RRGGBB", else "". 2. title: short and specific, no calculated number. source: file name or "". 3. date: exact name of the date column (it drives the trend and the period chips), or "". dateLabel: its screen name. grain: "month" (also quarters), "year", or "day" (daily data under 3 months). 4. dims: 1 or 2 "cat" columns, best first. The first (3 to 8 values) gives the filter chips and the bars of the 3D/flat chart; the second, a drop-down filter. [] if none. 5. measures: 2 to 6, most important first; they become the KPI cards in this order and the first drives the headline. col = exact column name, label = short screen name. agg "sum": money, quantities, hours. "avg": ratings, scores, prices, balances, percentages per row; add "w" = a volume column (units, orders) if one exists. "ratio": "num" ÷ "den" (margin = profit / revenue). "count": counts rows, only if nothing can be added up. For ratio and count, col is a new name. fmt "money" with unit = the currency sign as written ("$", "ر.ع", "SAR"). fmt "pct" only for ratios that are fractions. Every other measure gets a short unit in the dashboard's language ("units", «وحدة», "/5"; "%" if values are already percentages like 42.5). "good":"down" when lower is better (cost, returns, delays). 6. derived: columns made from two "num" columns, op + - * /. If revenue and cost exist, add Profit here and Profit + Margin in measures, as in the example. Else []. 7. rows: exact number of row lines in DATA. note: "" unless Step 3 rule 6 applies. notes: 1 to 3 short assumptions (sheet used, rows removed), no calculated number. 8. t: {} (English and Arabic words are built in; "ar" turns the page right-to-left by itself). Write title, labels and notes in the dashboard's language. STEP 3. DATA. Example: {"cols":["Month","Region","Product","Units","Revenue","Cost","Rating","Returns"], "types":["date","cat","cat","num","num","num","num","num"], "lookups":{"Month":["2025-11","2025-12"],"Region":["North","South"],"Product":["Beans","Cold Brew"]}, "rows":[ [0,0,0,1236,21613.95,9270,4.2,8], [1,1,1,1004,18286.5,7530,4.8,5] ]} 1. Keys in this order. cols: exact names. types: one per column. 2. Every "date" and "cat" column is in lookups (each value once, in order of appearance); rows hold its position (0 = first). 3. Lookup dates are ISO: "2025-11", "2025-11-03", "2025"; a quarter is its first month ("Q2 2025" → "2025-04"). Convert "Nov 2025", «نوفمبر 2025», "11/2025", Excel serials. 4. Numbers: plain JSON, Western digits, no separators, signs, % or quotes; (12) is -12; empty is null. Copy every number with ALL its decimals, never round: the page shows a grand total the user checks against their file. 5. ONE row per line, as many values as cols. Copy every row: never invent, sample or skip, never write "...". 6. Size limit: rows × columns ≤ 3,000. If larger: a. drop columns META does not use; b. if you can run code, aggregate with code to one row per period and dims: sum the "sum" columns, add a num column "Rows" (original row count; "count" becomes a sum of Rows), keep group averages for "avg" with w = its weight column or "Rows"; note "Aggregated from N rows"; c. otherwise keep the latest rows that fit; note "Latest X of N rows". Never aggregate in your head. STEP 4. Reply with exactly: 1. One short line on what you found, in the dashboard's language. 2. The complete file in ONE html code block (or your canvas), to . 3. One line: save it as dashboard.html and double-click it (needs internet). Copy the template exactly: change, reformat, shorten or add nothing; keep escapes like \u2066, \u2069 and \xA0, and every invisible character inside quotes, exactly as written. It is about 18,600 characters and must arrive whole: if space is short, shrink DATA (Step 3 rule 6), never the template or the decimals. DATA is last so a cut-off reply still opens. SELF-CHECK: 1. Outside META and DATA, the template is complete to , no "...". 2. Valid JSON: double quotes, no comments, trailing commas or NaN. 3. Every name in META (date, dims, col, num, den, w, a, b) matches DATA.cols or a derived col exactly. 4. dims are "cat"; each row has one value per column; lookup positions exist; no total rows; the user's data, not the example. 5. META.rows = row lines in DATA. 6. The

```