Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
:root {
--primary: #25d366;
/* The brand green as FOREGROUND is 1.98:1 on white, far under the 4.5:1 AA needs for text.
It stays the fill colour; anything rendering it as text or an icon uses --primary-text, the same
hue darkened until it clears 4.5:1 on the light backgrounds it lands on: 5.28:1 on white, 5.04:1 on
--bg-light, and 4.82:1 on --primary-soft (4.63:1 over --bg-light), the tint the active sidebar item
uses. On the heaviest green tint a badge paints (18 percent over white) it measures 4.61:1. */
--primary-text: #167c3b;
/* The keyboard focus ring. WCAG 2.2 SC 1.4.11 asks 3:1 of a focus indicator; the brand fill measures 1.98:1 on white
and 1.74:1 on --primary-soft over --bg-light. --primary-text clears it on every surface a ring is drawn on: 5.28:1
on white, 5.04:1 on --bg-light and 4.63:1 on --primary-soft over --bg-light. In the dark theme it is the brand
green itself, 7.38:1 on --bg-white and 5.15:1 on --primary-soft over it. */
--focus-ring: var(--primary-text);
--primary-hover: #1da851;
--primary-soft: rgba(37, 211, 102, 0.12);
--bg-light: #f8fafc;
--bg-white: #ffffff;
--bg-card: #ffffff;
--text-primary: #0f172a; /* Slate 900 */
--text-secondary: #475569; /* Slate 600 */
--text-muted: #64748b; /* Slate 500; 4.76:1 on white, 4.55:1 on --bg-light, 4.35:1 on --primary-soft */
--border: #e2e8f0; /* Slate 200 */
--error: #ef4444;
--success: #22c55e;
--warning: #f59e0b;
/* Status colours as FOREGROUND fail AA on light: error 3.76:1, success 2.28:1, warning 2.15:1.
They stay the fill/border colours; text and icons use these darkened twins. Each clears 4.5:1 on
white and on the heaviest tint of its own hue that a badge paints over white: error-text 4.84:1 on the
15 percent red of the Failed pill (4.62:1 where a badge sits on the 4 percent red of its result card), success-text 4.58:1 on an 18 percent green and warning-text 4.57:1 on
the 22 percent amber of Action required. A heavier tint needs a darker twin. */
--error-text: #b93232;
--success-text: #157b3b;
--warning-text: #935f06;
--info: #2563eb; /* Blue 600 — info/permission/log badges + qr-ready pill */
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
--radius: 10px;
}
/* Dark Mode */
[data-theme='dark'] {
/* Make native controls (select option popups, scrollbars, date pickers) follow the EXPLICIT
app theme, not just the OS preference — otherwise toggling dark while the OS is light left
native dropdowns rendered in the light scheme (#249). */
color-scheme: dark;
--bg-light: #0f172a; /* Slate 900 */
--bg-white: #1e293b; /* Slate 800 */
--bg-card: #1e293b;
--text-primary: #f1f5f9; /* Slate 100 */
--text-secondary: #cbd5e1; /* Slate 300 */
--text-muted: #94a3b8; /* Slate 400; 5.71:1 on Slate 800 (AA) */
--border: #334155; /* Slate 700 */
--info: #60a5fa; /* Blue 400 — lighter so it reads over the dark translucent-blue tints */
/* The read tick on the dark outgoing bubble (#005c4b), where --info is 3.14:1: Sky 300 is 4.78:1, the 4.5:1 the glyph
is held to. The delivered tick keeps the bubble's text colour (#e9edef), so the two stay apart by hue. */
--read-tick: #7dd3fc;
/* On the dark surfaces success and warning already clear AA (6.42:1 and 6.81:1), so they
keep their base value; error is 3.89:1 on Slate 800 and is lightened instead, to a value that still
clears 4.65:1 on the darkest error tint behind it (20 percent over Slate 800). */
--error-text: #f77b7b;
--success-text: var(--success);
--warning-text: var(--warning);
--primary-soft: color-mix(in srgb, var(--primary) 18%, transparent);
/* On Slate 800 the brand green already measures 7.38:1, so dark keeps it for text too. */
--primary-text: var(--primary);
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
}
/* Explicit light toggle: keep native controls light even if the OS prefers dark. */
[data-theme='light'] {
color-scheme: light;
}
/* System preference dark mode */
@media (prefers-color-scheme: dark) {
:root:not([data-theme='light']) {
/* Match native controls (e.g. the Login page <select> option popup) to the dark theme.
Unless a light or dark theme is stored (main.tsx applies it before first paint), the Login screen
has no data-theme and relies solely on this block: without an explicit color-scheme the popup
rendered light, leaving the light option text illegible (#249). */
color-scheme: dark;
--bg-light: #0f172a;
--bg-white: #1e293b;
--bg-card: #1e293b;
--text-primary: #f1f5f9;
--text-secondary: #cbd5e1;
--text-muted: #94a3b8;
--border: #334155;
--info: #60a5fa;
--read-tick: #7dd3fc;
/* On the dark surfaces success and warning already clear AA (6.42:1 and 6.81:1), so they
keep their base value; error is 3.89:1 on Slate 800 and is lightened instead, to a value that still
clears 4.65:1 on the darkest error tint behind it (20 percent over Slate 800). */
--error-text: #f77b7b;
--success-text: var(--success);
--warning-text: var(--warning);
--primary-soft: color-mix(in srgb, var(--primary) 18%, transparent);
/* Must be restated here, not inherited: the light value (#167c3b) measures 2.77:1 on Slate 800
and would fail worse than the brand green it replaced. On dark the brand green is 7.38:1. */
--primary-text: var(--primary);
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
}
}
* {
box-sizing: border-box;
}
body {
margin: 0;
/* No font-family here: body inherits it from <html>, where index.css sets the Latin stack and the
Hebrew and Arabic ones per lang. Declaring one on body would shadow those. */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background: var(--bg-light);
color: var(--text-primary);
line-height: 1.6;
}
button {
font-family: inherit;
}
input,
select,
textarea {
font-family: inherit;
/* background-color, not the shorthand: the shorthand would reset the chevron index.css draws on select. */
background-color: var(--bg-white);
color: var(--text-primary);
border-color: var(--border);
}
/* The browser's placeholder grey (#757575) is 4.4:1 on --bg-light and 3.17:1 on the dark card; --text-muted
clears 4.5:1 on all four input surfaces in both themes. Firefox dims a placeholder unless opacity is set. */
input::placeholder,
textarea::placeholder {
color: var(--text-muted);
opacity: 1;
}
a {
color: var(--primary-text);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* Error banner — shared across pages (moved out of Plugins.css so any page can use it). */
.error-banner {
background: rgba(239, 68, 68, 0.1);
border: 1px solid rgba(239, 68, 68, 0.3);
border-radius: 8px;
padding: 1rem;
margin-bottom: 1.5rem;
display: flex;
align-items: center;
gap: 0.75rem;
}
.error-banner svg {
color: var(--error-text);
}
.error-banner-text {
color: var(--error-text);
}
/* yarl theme — match dashboard dark palette. */
.yarl__container {
--yarl__color_backdrop: rgba(0, 0, 0, 0.92);
}
.yarl__button {
--yarl__color_button: rgba(255, 255, 255, 0.9);
}