import type { MantineColorsTuple } from '@mantine/core';

/**
 * Every colour ramp the platform uses, in one place.
 *
 * Themes compose these; they do not define colours inline. Keeping the ramps
 * separate from the themes is what lets the backoffice and the portal share a
 * structure while keeping distinct brands — and it gives the hardcoded hexes
 * scattered through feature code somewhere legitimate to be migrated to.
 */

/**
 * Backoffice brand. Shade 8 (#1e40af) is the accessible-government blue; the
 * ramp is deliberately more saturated than the portal's because staff tools
 * are read all day under worse conditions than a citizen portal.
 */
export const emaBlue: MantineColorsTuple = [
  '#eff6ff', '#dbeafe', '#bfdbfe', '#93c5fd', '#60a5fa',
  '#3b82f6', '#2563eb', '#1d4ed8', '#1e40af', '#1e3a8a',
];

/** Backoffice secondary — a warm brown, used sparingly for accents. */
export const emaSecondary: MantineColorsTuple = [
  '#fdf8f6', '#f2e8e5', '#eaddd7', '#e0cec7', '#d2bab0',
  '#bfa094', '#a18072', '#977669', '#65524d', '#2c1f1a',
];

/** Portal brand — the "Coastal Modern" blue. Softer than the backoffice ramp. */
export const emaCoastalBlue: MantineColorsTuple = [
  '#eef4ff', '#dce7fb', '#b6cdf4', '#8db0ee', '#6c97e9',
  '#5887e6', '#4b7fe5', '#3b6ccc', '#3160b7', '#2453a2',
];

/** Portal accent — the "coastal" half of the palette. */
export const emaTeal: MantineColorsTuple = [
  '#e1fbf6', '#cdf3eb', '#9ee6d7', '#6bd9c1', '#46cdaf',
  '#30c7a5', '#1fc29d', '#0aab89', '#009879', '#008368',
];

/**
 * Cool, slightly blue-tinted neutrals for surfaces and text.
 *
 * Overriding Mantine's stock `gray` with this shifts every `c="dimmed"`, every
 * neutral badge and every table border in whichever app adopts it — so it is
 * applied per-theme rather than in the base, and promoted one app at a time.
 */
export const emaGray: MantineColorsTuple = [
  '#f6f8fb', '#eceff4', '#dde2eb', '#c8d0dd', '#aab5c7',
  '#8d9bb3', '#73839e', '#5c6b85', '#46546b', '#333f52',
];

/**
 * Ethiopian flag colours.
 *
 * These are intentional brand, not drift — they appear in the boot splashes,
 * the maritime loader and the landing page. They live here so those usages can
 * reference a name instead of repeating a hex, but they are deliberately NOT
 * semantic tokens: `emaFlag.green` means "the flag's green", never "success".
 */
export const emaFlag = {
  blue: '#0284C7',
  yellow: '#FCD116',
  green: '#078930',
  gold: '#D4AF37',
  sky: '#38BDF8',
} as const;
