/* دليل شات — Chatwoot dashboard theme (v5 «الهوية»: the inbox of the landing page's «شكل 1»). daleel: identity v5
   Source of the look: brand/chatwoot-ui-refs/{inbox.html,cw.css} (the mock-up the landing page's picture is made from) and the landing
   tokens (brand/tokens.json). Built from five parts:
     1. the generated identity block at the end of this file (brand/tokens.json -> scripts/build-tokens.js): the colour ROLES (--daleel-*)
        and Chatwoot's own ramps re-pointed (--slate-N neutral, --blue-N = the accent: ink in light, the signal-ink green in dark) and its
        surface / border variables. Everything Chatwoot draws with an n-* utility follows them, light and dark, with no per-component colour;
     2. fonts: Beiruti for page titles, names and section headings, IBM Plex Sans Arabic for everything else;
     3. the speaking corner (one corner at 0 on the primary button, the incoming bubble, the outgoing bubble, the note, the composer);
     4. the shapes a colour ramp cannot express (conversation card, chips, badges, bubbles, note, composer, popovers, customer pane);
     5. what stays hidden (vendor links).
   Used two ways: (A) injected by the reverse proxy after Chatwoot's own CSS (no rebuild; the visual harness does this for fast iteration),
   (B) compiled into the dashboard by prepare-source.js (the real thing).
   Path B rule: never define a Tailwind utility CLASS here (e.g. `.font-inter`, `.bg-n-brand`): Chatwoot `@apply`s them and the Vite build aborts.
   Utilities are read with attribute selectors, `[class~='bg-n-teal-9']`; classes that are not utilities (`.conversation`, `.left-bubble`,
   `.reply-box`, `.label`) are fine. */

/* IBM Plex Sans Arabic (SIL OFL), four static weights; Chatwoot asks for 420 / 440 / 460 / 520 / 620, each range maps to the nearest real face. */
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url('/brand-assets/fonts/IBMPlexSansArabic-Regular.ttf') format('truetype'); font-weight: 100 449; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url('/brand-assets/fonts/IBMPlexSansArabic-Medium.ttf') format('truetype'); font-weight: 450 549; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url('/brand-assets/fonts/IBMPlexSansArabic-SemiBold.ttf') format('truetype'); font-weight: 550 649; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url('/brand-assets/fonts/IBMPlexSansArabic-Bold.ttf') format('truetype'); font-weight: 650 900; font-display: swap; }
/* Beiruti (SIL OFL), one variable file, weights 200-900; the headings use 800. */
@font-face { font-family: 'Beiruti'; src: url('/brand-assets/fonts/Beiruti-VF.ttf') format('truetype'); font-weight: 200 900; font-display: swap; }

:root {
  --daleel-font: 'IBM Plex Sans Arabic', 'Inter', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --daleel-display: 'Beiruti', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --daleel-pop-shadow: 0 12px 32px -8px rgb(var(--daleel-ink) / 0.18);
  --daleel-report-series: var(--daleel-chart-1); /* upstream's one report series (prepare-identity.js asks for it first) */
}
.dark { --daleel-pop-shadow: 0 12px 32px -8px rgb(0 0 0 / 0.6); }

html, body, button, input, select, textarea { font-family: var(--daleel-font) !important; }
[dir='rtl'] { letter-spacing: 0; }
::selection { background: rgb(var(--daleel-signal-tint)); color: rgb(var(--daleel-ink)); }
/* Focus: one 2px ink ring, offset 2 (the identity; it used to be green) */
:focus-visible { outline: 2px solid rgb(var(--daleel-ink)); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 0; }
input:focus, textarea:focus, select:focus { border-color: rgb(var(--daleel-ink)); }
input[type='checkbox'], input[type='radio'], input[type='range'], progress { accent-color: rgb(var(--daleel-primary)); }

/* One typeface everywhere. Chatwoot pins its own family on font utilities and the typography classes (`@apply font-inter`), which beat the
   inherited body font. Attribute selectors, so the compiled path never redefines a Tailwind utility. Monospace is left alone. */
[class~='font-inter'], [class~='font-interDisplay'], [class~='font-sans'],
[class*='text-heading-'], [class*='text-body-'], [class~='text-label'], [class~='text-label-small'], [class~='text-button'], [class~='text-button-small'],
h1, h2, h3, h4, h5, h6, label, legend, th, td, li, p, [class~='multiselect'], [class~='tooltip'], [role='dialog'], [role='menu'], [role='listbox'], [role='tooltip'] {
  font-family: var(--daleel-font) !important;
}
/* Display type (Beiruti 800): the page titles and section headings Chatwoot draws with its two heading styles, which the Daleel pages and
   the kit use too. The conversation title, the names and the pane headings are set where they are drawn, below. */
[class~='text-heading-1'], [class~='text-heading-2'] { font-family: var(--daleel-display) !important; font-weight: 800; }
/* Arabic script must never be letter-spaced: tracking breaks letter joining. */
[dir='rtl'] [class*='tracking-'], [dir='rtl'][class*='tracking-'],
[dir='rtl'] [class*='text-heading-'], [dir='rtl'] [class*='text-body-'], [dir='rtl'] [class~='text-label'], [dir='rtl'] [class~='text-button'] { letter-spacing: 0 !important; }

/* Vendor documentation / changelog / short links are hidden: merchants only ever see Daleel. The widget footer «مدعوم بواسطة دليل شات» is kept. */
a[href*='chwt.app'], a[href*='chatwoot.com'], a[href*='chatwoot.help'] { display: none !important; }
/* Auth pages: the wordmark is wider than Chatwoot's */
main[class*='min-h-screen'] > section > img[alt][class*='mx-auto'] { height: 2.5rem; }
/* sign-in / reset / sign-up: a paper page (upstream washes it with 5% of the accent, which is grey now), the title in Beiruti 800 */
[class~='bg-n-brand/5'] { background-color: rgb(var(--daleel-paper)); }
/* links stay the green text colour (5.8:1 on white, 7+ on the dark card): the accent is ink now, so a link must not follow it */
[class~='text-link'], [class~='text-n-brand'] { color: rgb(var(--daleel-signal-ink)); }
main[class*='min-h-screen'] > section > h2 { font-family: var(--daleel-display) !important; font-weight: 800; color: rgb(var(--daleel-ink)); }

/* ---- primary button: the accent (ink in light, green in dark), white text, the speaking corner (bottom-right in RTL = end-start) ---- */
button[class~='bg-n-brand'], a[class~='bg-n-brand'], .button[class~='bg-n-brand'] { border-end-start-radius: 0; }

/* ================= the app shell: 4 columns, paper surfaces, hairlines ================= */
body, main, aside[class*='border-n-weak'], [class~='bg-n-background'] { background-color: rgb(var(--daleel-paper)); }
aside[class*='border-n-weak'] { border-color: rgb(var(--daleel-rule)); }

/* ---- sidebar (224px, mock .side) ---- */
aside[class*='border-n-weak'] > section:first-child { margin-top: 0; margin-bottom: 6px; padding-top: 14px; gap: 12px; }
/* account card: the symbol tile (30), the store name in Beiruti 800/17 */
aside[class*='border-n-weak'] > section:first-child > div:first-child { gap: 10px; padding-inline: 14px 12px; }
aside[class*='border-n-weak'] > section:first-child > div:first-child > div:first-child { width: 30px; height: 30px; }
aside[class*='border-n-weak'] > section:first-child > div:first-child img { width: 30px; height: 30px; border-radius: 24%; }
aside[class*='border-n-weak'] > section:first-child > div:first-child > div[class~='w-px'] { display: none; }
#sidebar-account-switcher { padding: 0; }
#sidebar-account-switcher > span:first-child { font-family: var(--daleel-display) !important; font-weight: 800; font-size: 17px; line-height: 1.1; color: rgb(var(--daleel-ink)); }
/* search 34 + the new-conversation button */
aside[class*='border-n-weak'] > section:first-child > div:nth-child(2) { padding-inline: 12px; gap: 8px; }
aside[class*='border-n-weak'] > section:first-child > div:nth-child(2) > a { height: 34px; border-radius: 8px; outline: 1px solid rgb(var(--daleel-rule)); background: rgb(var(--daleel-paper)); font-size: 13px; padding-inline: 10px; }
aside[class*='border-n-weak'] > section:first-child > div:nth-child(2) > a > span[class~='tracking-wide'] { display: inline-flex; margin-inline-start: auto; font: 11px var(--daleel-font); border: 1px solid rgb(var(--daleel-rule)); border-radius: 4px; padding: 0 5px; direction: ltr; white-space: nowrap; color: rgb(var(--daleel-muted)); }
aside[class*='border-n-weak'] > section:first-child > div:nth-child(2) button { width: 34px; height: 34px !important; border-radius: 8px; }
/* nav items: 31px, radius 8, graphite 500; the open one mist + ink bold */
aside[class*='border-n-weak'] nav { padding-inline: 12px; }
aside[class*='border-n-weak'] nav a, aside[class*='border-n-weak'] nav button { border-radius: 8px; }
aside[class*='border-n-weak'] nav li > a[role='button'], aside[class*='border-n-weak'] nav li a[data-daleel-nav-leaf] { height: 31px; font-size: 13.5px; font-weight: 500; color: rgb(var(--daleel-graphite)); }
aside[class*='border-n-weak'] nav a:hover { background: rgb(var(--daleel-mist)); }
aside[class*='border-n-weak'] nav a.active, aside[class*='border-n-weak'] nav a[class~='active'] { background: rgb(var(--daleel-mist)); color: rgb(var(--daleel-ink)); font-weight: 700; }
aside[class*='border-n-weak'] nav a.active *, aside[class*='border-n-weak'] nav a[class~='active'] * { font-weight: 700; }
aside[class*='border-n-weak'] nav a[class~='text-n-slate-12'] { color: rgb(var(--daleel-ink)); }
aside[class*='border-n-weak'] nav a[class~='text-n-slate-12'][class~='font-medium'] { font-weight: 700; }
/* group labels («الفرق», «القنوات», «الوسوم»): 11.5 / 600 muted */
aside[class*='border-n-weak'] nav button[class~='cursor-pointer'] span[class~='leading-5'] { font-size: 11.5px; font-weight: 600; color: rgb(var(--daleel-muted)); }
aside[class*='border-n-weak'] nav button[class~='cursor-pointer'] { height: 28px; color: rgb(var(--daleel-muted)); }
/* the child rail that Chatwoot draws is a hairline */
aside[class*='border-n-weak'] nav li[class~='child-item']::before, aside[class*='border-n-weak'] nav li[class~='child-item']::after { border-color: rgb(var(--daleel-rule)); background-color: rgb(var(--daleel-rule)); }
aside[class*='border-n-weak'] nav li[class~='child-item']::after { background-color: transparent; }
/* agent card at the bottom */
aside[class*='border-n-weak'] > section:last-of-type > div:not([class*='pointer-events-none']) { border-top: 1px solid rgb(var(--daleel-rule)); box-shadow: none; padding: 12px 12px 12px; }
aside[class*='border-n-weak'] > section:last-of-type button > div > div:first-child { font-size: 13px; font-weight: 700; color: rgb(var(--daleel-ink)); }
aside[class*='border-n-weak'] > section:last-of-type button > div > div:last-child { font-size: 12px; color: rgb(var(--daleel-graphite)); }

/* ================= conversation list (344px) ================= */
.conversations-list-wrap { border-inline-end: 1px solid rgb(var(--daleel-rule)); }
@media (min-width: 1536px) { .conversations-list-wrap { width: 344px; } }
@media (min-width: 768px) { .conversations-list-wrap { width: 344px; } }
/* header: the title in Beiruti 800/24, two 32px bordered icon buttons */
.conversations-list-wrap > div:first-child { height: auto; padding: 16px 18px 12px; gap: 8px; }
.conversations-list-wrap > div:first-child h1 { font-family: var(--daleel-display) !important; font-weight: 800; font-size: 24px; line-height: 1; color: rgb(var(--daleel-ink)); }
.conversations-list-wrap > div:first-child h1 + span { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 1px solid rgb(var(--daleel-rule)); border-radius: 4px; background: transparent; color: rgb(var(--daleel-graphite)); font-size: 12px; font-weight: 500; }
.conversations-list-wrap > div:first-child button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgb(var(--daleel-rule)); background: rgb(var(--daleel-paper)); color: rgb(var(--daleel-graphite)); outline: 0; }
.conversations-list-wrap > div:first-child button:hover:enabled { background: rgb(var(--daleel-mist)); }
/* tabs: 13.5/600 graphite, the open one ink with a 2px ink underline, the count a mist pill */
.conversations-list-wrap > div:nth-child(2) { height: auto; padding-inline: 18px; margin-top: 0; border-color: rgb(var(--daleel-rule)); }
.conversations-list-wrap > div:nth-child(2) li { margin-inline: 0 18px; }
.conversations-list-wrap > div:nth-child(2) li a { font-size: 13.5px; font-weight: 600; padding-block: 8px 10px; color: rgb(var(--daleel-graphite)); }
.conversations-list-wrap > div:nth-child(2) li a[class~='text-n-blue-11'] { color: rgb(var(--daleel-ink)); }
.conversations-list-wrap > div:nth-child(2) li a > div { height: auto; min-width: 0; padding: 0 6px; border-radius: 9px; font-size: 11.5px; font-weight: 500; background: rgb(var(--daleel-mist)); color: rgb(var(--daleel-ink)); }
.conversations-list-wrap > div:nth-child(2) li a::after { background-color: rgb(var(--daleel-ink)); }
/* the card: 14 x 18, a hairline under it, the open one mist with a 3px ink bar on the inline-start edge */
.conversations-list { background: rgb(var(--daleel-paper)); }
.conversation { padding-inline: 18px; border-bottom: 1px solid rgb(var(--daleel-rule)) !important; background: transparent; gap: 12px; }
.conversation::before { display: none; }
.conversation:hover { background: rgb(var(--daleel-mist)); }
.conversation[class~='active'], .conversation[class~='selected'] { background: rgb(var(--daleel-mist)); }
.conversation[class~='active']::after, .conversation[class~='selected']::after { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 3px; background: rgb(var(--daleel-ink)); }
.conversation > div:first-child { align-self: flex-start; flex: none; }
.conversation > div:first-child > span, .conversation > div:first-child > span > span[role='img'] { flex: none; }
/* avatar 36, a circle, the initial on mist */
.conversation > div:first-child > span { margin-top: 14px; }
.conversation > div:first-child > span > span[role='img'] { width: 36px !important; height: 36px !important; border-radius: 50%; background: rgb(var(--daleel-mist)) !important; color: rgb(var(--daleel-ink)) !important; font-size: 14px; font-weight: 700; outline: 0; }
.conversation > div:nth-child(2) { display: flex; flex-direction: column; padding-block: 14px; }
.conversation > div:nth-child(2) > * { margin-inline: 0 !important; }
/* order: name, channel line, preview, chips */
.conversation .conversation--user { order: 1; padding: 0 !important; font-size: 14.5px; font-weight: 700; color: rgb(var(--daleel-ink)); }
.conversation > div:nth-child(2) > div:first-child { order: 2; margin-top: 1px; justify-content: flex-start; gap: 0 !important; }
/* «inbox · assignee» on one line, like the mock: the inbox keeps its own width, the assignee follows after a middle dot */
.conversation > div:nth-child(2) > div:first-child > div:first-child { flex: 0 1 auto !important; }
.conversation > div:nth-child(2) > div:first-child > div:last-child:not(:empty)::before { content: '\00B7'; margin-inline: 5px; color: rgb(var(--daleel-graphite)); }
.conversation > div:nth-child(2) > div:first-child span { font-size: 12px; font-weight: 400; color: rgb(var(--daleel-graphite)); }
.conversation > div:nth-child(2) > div:first-child span[class~='text-label-small'] { font-size: 12px; }
.conversation > div:nth-child(2) > div:nth-child(3) { order: 3; margin-block: 5px 7px !important; height: auto; line-height: 1.5; font-size: 13.5px; color: rgb(var(--daleel-graphite)); font-weight: 400; padding: 0 !important; }
.conversation > div:nth-child(2) > div:nth-child(3)[class~='font-medium'] { color: rgb(var(--daleel-ink)); font-weight: 600; }
.conversation > div:nth-child(2) > div:last-child:not([class~='absolute']) { order: 4; margin: 0 !important; }
/* time at the inline-end of the name row, the unread badge at the end of the chips row */
.conversation > div:nth-child(2) > div[class~='absolute'] { order: 5; top: 14px; bottom: 14px; inset-inline: auto 18px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; }
.conversation > div:nth-child(2) > div[class~='absolute'] > span:first-child, .conversation > div:nth-child(2) > div[class~='absolute'] > span:first-child > div { font-size: 12px; line-height: 1.5; color: rgb(var(--daleel-graphite)); }
.conversation > div:nth-child(2) > div[class~='absolute'] > span[class~='bg-n-teal-9'] { min-width: 20px; height: 20px; border-radius: 10px; background: rgb(var(--daleel-signal)); color: rgb(var(--daleel-on-signal)); font-size: 11.5px; font-weight: 700; padding: 0 6px; margin: 0; }


/* ================= the conversation (thread) ================= */
.conversation-details-wrap { background: rgb(var(--daleel-paper)); border-color: rgb(var(--daleel-rule)); }
/* header: 14 x 22, the name in Beiruti 800/19, the channel line 12 graphite */
.conversation-details-wrap > div:first-child { height: auto; min-height: 64px; padding: 14px 22px; border-color: rgb(var(--daleel-rule)); }
@media (max-width: 1279px) { .conversation-details-wrap > div:first-child { flex: 0 0 auto; height: 108px; padding: 12px 16px; } }
.conversation-details-wrap > div:first-child > div:first-child { gap: 12px; }
.conversation-details-wrap > div:first-child > div:first-child > span > span[role='img'] { width: 36px !important; height: 36px !important; border-radius: 50%; background: rgb(var(--daleel-mist)) !important; color: rgb(var(--daleel-ink)) !important; font-weight: 700; outline: 0; }
.conversation-details-wrap > div:first-child > div:first-child > div { margin-inline-start: 0; }
.conversation-details-wrap > div:first-child > div:first-child > div > div:first-child > span { font-family: var(--daleel-display) !important; font-weight: 800; font-size: 19px; line-height: 1.1; color: rgb(var(--daleel-ink)); }
.conversation-details-wrap .conversation--header--actions, .conversation-details-wrap .conversation--header--actions * { font-size: 12px; color: rgb(var(--daleel-graphite)); }
/* actions: «حل المحادثة» is the one ink primary of the screen (check icon, the speaking corner), the rest are 34px bordered */
.header-actions-wrap button { border-radius: 8px; }
.resolve-actions > div { box-shadow: none; outline: 0; }
.resolve-actions button { height: 34px; background: rgb(var(--daleel-primary)); color: rgb(var(--daleel-on-primary)); outline: 0 !important; font-weight: 600; font-size: 13.5px; }
.resolve-actions button:hover:enabled { background: rgb(var(--daleel-primary-hover)); }
.resolve-actions button:first-child { border-end-start-radius: 0; padding-inline: 14px; }
.resolve-actions button:first-child::before { content: ''; width: 15px; height: 15px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
.resolve-actions button:last-child { border-inline-start: 1px solid rgb(var(--daleel-on-primary) / 0.25) !important; }
.actions--container > [class~='relative'] > button { width: 34px; height: 34px; border: 1px solid rgb(var(--daleel-rule)); }

/* messages */
.conversation-panel { background: rgb(var(--daleel-paper)); padding-inline: 26px; }
.conversation-panel .message-bubble-container { margin-bottom: 12px; }
/* incoming: mist, radius 14, the speaking corner at end-start (bottom-right in RTL) */
.conversation-panel .left-bubble { background: rgb(var(--daleel-mist)); color: rgb(var(--daleel-ink)); border-radius: 14px; border-end-start-radius: 0; max-width: 32rem; padding: 10px 14px 8px; font-size: 14px; line-height: 1.65; }
/* outgoing: ink, paper text, the corner at end-end */
.conversation-panel .right-bubble { background: rgb(var(--daleel-ink)); color: rgb(var(--daleel-on-ink)); border-radius: 14px; border-end-end-radius: 0; max-width: 32rem; padding: 10px 14px 8px; font-size: 14px; line-height: 1.65; }
.conversation-panel .right-bubble :where(p, span, li, div, a, strong, em, code) { color: inherit; }
.conversation-panel .right-bubble [class*='text-n-slate-1'], .conversation-panel .right-bubble [class*='text-n-slate-1'] * { color: rgb(var(--daleel-label-grey)); }
/* private note: paper, 1.5px dashed ink, the corner at end-end */
.conversation-panel .right-bubble[class~='bg-n-solid-amber'] { background: rgb(var(--daleel-paper)); color: rgb(var(--daleel-ink)); border: 1.5px dashed rgb(var(--daleel-ink)); }
.conversation-panel .right-bubble[class~='bg-n-solid-amber'] [class*='text-n-amber'] { color: rgb(var(--daleel-muted)); }
.conversation-panel .prosemirror-mention-node, .conversation-panel [class~='mention'] { background: rgb(var(--daleel-signal-tint)); color: rgb(var(--daleel-signal-ink)); border-radius: 4px; padding: 0 3px; font-weight: 700; }
/* message time / status line */
.conversation-panel .left-bubble > div:last-child, .conversation-panel .left-bubble [class~='text-xs'] { color: rgb(var(--daleel-graphite)); font-size: 11.5px; }
.conversation-panel .right-bubble > div:last-child [class~='text-xs'] { font-size: 11.5px; }
/* activity: a centred hairline pill, 12px */
.conversation-panel [data-bubble-name='activity'] { background: rgb(var(--daleel-paper)); border: 1px solid rgb(var(--daleel-rule)); border-radius: 999px !important; padding: 3px 12px; font-size: 12px; color: rgb(var(--daleel-graphite)); }

/* ================= the composer ================= */
/* ReplyBox.vue styles .reply-box with a scoped rule (specificity 0,2,0); three class names beat it in either load order */
.reply-box.reply-box.reply-box { border: 1px solid rgb(var(--daleel-ink)); border-radius: 14px; border-end-end-radius: 0; margin: 10px 22px 18px; background: rgb(var(--daleel-paper)); box-shadow: none; overflow: visible; }
.reply-box.reply-box.reply-box.is-private { border-style: dashed; border-width: 1.5px; background: rgb(var(--daleel-paper)); }
.reply-box > div:first-child { height: auto; padding: 8px 10px 0; }
.reply-box > div:first-child > button[class~='rounded-full'] { background: transparent; border: 0; padding: 0; gap: 4px; height: auto; }
.reply-box > div:first-child > button[class~='rounded-full'] > div:not([class~='absolute']) { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 6px; color: rgb(var(--daleel-graphite)); }
.reply-box > div:first-child > button[class~='rounded-full'] > div[class~='absolute'] { display: none; }
.reply-box > div:first-child > button[data-daleel-mode='reply'] > div:nth-child(1), .reply-box > div:first-child > button[data-daleel-mode='note'] > div:nth-child(2) { background: rgb(var(--daleel-ink)); color: rgb(var(--daleel-on-ink)); }
.reply-box .ProseMirror { font-size: 14px; }
.reply-box .ProseMirror:focus, .reply-box .ProseMirror:focus-visible { outline: 0; box-shadow: none; }
.reply-box [class~='bg-n-brand'] { min-height: 34px; }

/* ================= the customer pane (336px) ================= */
section > div[class~='bg-n-surface-2'][class*='max-w-sm'] { background: rgb(var(--daleel-paper)); border-color: rgb(var(--daleel-rule)); }
@media (min-width: 1280px) { section > div[class~='bg-n-surface-2'][class*='max-w-sm'] { min-width: 336px !important; max-width: 336px !important; width: 336px !important; flex: 0 0 336px; } }
/* 768-1279: the pane is a toggle over the thread, not a fourth column (plan §2.3) */
@media (min-width: 768px) and (max-width: 1279px) { section > div[class~='bg-n-surface-2'][class*='max-w-sm'] { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: 336px; max-width: 336px; z-index: 45; box-shadow: var(--daleel-pop-shadow); } }
section > div[class~='bg-n-surface-2'][class*='max-w-sm'] > div > div > div:first-child { height: 40px; border-color: rgb(var(--daleel-rule)); }
section > div[class~='bg-n-surface-2'][class*='max-w-sm'] > div > div > div:first-child span { font-size: 12px; font-weight: 600; color: rgb(var(--daleel-muted)); }
/* the contact block: avatar 56, the name in Beiruti 800/20, rows in 13px graphite */
div[channel-type] { padding: 18px 20px 16px; border-bottom: 1px solid rgb(var(--daleel-rule)); }
div[channel-type] span[role='img'] { width: 56px !important; height: 56px !important; font-size: 20px; }
div[channel-type] h3 { font-family: var(--daleel-display) !important; font-weight: 800; font-size: 20px; line-height: 1.15; color: rgb(var(--daleel-ink)); }
div[channel-type] [class~='h-5'] span, div[channel-type] [class~='h-5'] a { font-size: 13px; color: rgb(var(--daleel-graphite)); }
div[channel-type] [class~='h-5'] svg { color: rgb(var(--daleel-muted)); }
div[channel-type] button { border-radius: 8px; }
/* the sections: Beiruti 800/15 headings between hairlines, no cards */
.list-group { padding-inline: 0 !important; padding-bottom: 24px; }
.list-group > div { gap: 0; }
.list-group [data-draggable] > div > button { background: transparent; outline: 0; border-radius: 0; border-bottom: 1px solid rgb(var(--daleel-rule)); padding: 14px 20px; }
.list-group [data-draggable] h5 { font-family: var(--daleel-display) !important; font-weight: 800; font-size: 15px; line-height: 1.2; color: rgb(var(--daleel-ink)); padding: 0; }
.list-group [data-draggable] > div > button svg { color: rgb(var(--daleel-muted)); }
.list-group [data-draggable] > div > div[class~='outline'] { outline: 0; border-radius: 0; padding: 0; border-bottom: 1px solid rgb(var(--daleel-rule)); }
/* «عميل سلة»: three stat tiles on mist, the orders as 12px-radius cards */
[data-daleel-orders] { padding: 14px 20px 16px; }
[data-daleel-orders-totals] { grid-template-columns: repeat(3, 1fr) !important; gap: 8px; }
[data-daleel-orders-totals] > div { background: rgb(var(--daleel-mist)); border-radius: 10px; padding: 8px 10px; }
[data-daleel-orders-totals] small { font-size: 11px; font-weight: 600; color: rgb(var(--daleel-graphite)); }
[data-daleel-orders-totals] b { font-family: var(--daleel-display) !important; font-weight: 800; font-size: 18px; line-height: 1.2; color: rgb(var(--daleel-ink)); }
[data-daleel-orders] article { border: 1px solid rgb(var(--daleel-rule)) !important; border-radius: 12px; padding: 12px 12px 10px !important; margin-bottom: 8px; }
[data-daleel-orders] article:last-child { margin-bottom: 0; }
[data-daleel-orders] article > div:first-child b { font-size: 13px; font-weight: 700; }
[data-daleel-orders] article ul { font-size: 12.5px; color: rgb(var(--daleel-graphite)); margin-block: 6px; }
[data-daleel-orders] article > div:last-child { border-top: 1px solid rgb(var(--daleel-rule)); padding-top: 8px; font-size: 12.5px; }
[data-daleel-orders] article > div:last-child b { font-size: 14px; font-weight: 700; color: rgb(var(--daleel-ink)); }
[data-daleel-orders] a { color: rgb(var(--daleel-signal-ink)) !important; font-weight: 700; }
[data-daleel-orders] dl { font-size: 13px; }

/* avatars everywhere: a circle, the initial on mist (the browser-picked pastel colours are gone) */
main span[role='img'][class~='overflow-hidden'], aside span[role='img'][class~='overflow-hidden'] { border-radius: 50%; background: rgb(var(--daleel-mist)) !important; color: rgb(var(--daleel-ink)) !important; font-weight: 700; }
/* labels (conversation chips): 22px, hairline, radius 4, 12/500 graphite, a 7px square dot with the label colour */
.label.smooth.smooth { height: 22px !important; min-height: 22px; align-items: center; gap: 5px; padding: 0 8px; border: 1px solid rgb(var(--daleel-rule)); border-radius: 4px; background: transparent !important; color: rgb(var(--daleel-graphite)) !important; font-size: 12px; font-weight: 500; }
.label.smooth.smooth .label-color-dot { width: 7px; height: 7px; border-radius: 2px; }

/* ================= popovers: the canned-reply picker (and the mention / macro / variable pickers that share it) ================= */
[data-popover-content] { background: rgb(var(--daleel-paper)) !important; -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid rgb(var(--daleel-rule)); border-radius: 12px; box-shadow: var(--daleel-pop-shadow); }
[data-popover-content] input, [data-popover-content] input:focus, [data-popover-content] input:focus-visible { outline: 0 !important; border-color: transparent; box-shadow: none; }
[data-popover-content] [role='option'] { border-radius: 8px; padding-block: 7px; }
[data-popover-content] [role='option'][aria-selected='true'] { background: rgb(var(--daleel-mist)); }
[data-popover-content] [role='option'] > span > span:first-child { font-size: 13px; font-weight: 700; color: rgb(var(--daleel-ink)); }
[data-popover-content] [role='option'] > span > span + span { font-size: 12.5px; color: rgb(var(--daleel-graphite)); }
[data-popover-content] [class~='border-n-strong'] { border-color: rgb(var(--daleel-rule)); }
.dark .label-color-dot { box-shadow: 0 0 0 1px rgb(var(--daleel-ink) / 0.35); }

/* keyboard focus: the rules above that remove a button's own outline must not remove the ring (WCAG 2.4.7): ink, 2px, offset 2 */
.resolve-actions button:focus-visible, .reply-box button:focus-visible, .list-group [data-draggable] button:focus-visible,
.conversations-list-wrap > div:first-child button:focus-visible, .actions--container button:focus-visible { outline: 2px solid rgb(var(--daleel-ink)) !important; outline-offset: 2px; }

/* ================= V2: the inbox pieces of «شكل 1» (daleel v2) ================= */
/* overdue chip «متأخرة 7 د»: 20px, the alert fill, white 11.5/700, radius 4, a clock; it sits after the label chips of the card (DOM order puts it first) */
[data-daleel-overdue] { order: 2; height: 20px; margin-inline-start: 6px; padding: 0 7px; border-radius: 4px; background: rgb(var(--daleel-alert)); color: rgb(var(--daleel-on-primary)); font-size: 11.5px; font-weight: 700; line-height: 1; white-space: nowrap; }
/* the 24-hour window bar above the composer: signal tint, signal-ink 12.5/600, the time left in ink 700 at the inline-end */
[data-daleel-window] { margin: 8px 22px 0; padding: 7px 12px; border-radius: 8px; background: rgb(var(--daleel-signal-tint)); color: rgb(var(--daleel-signal-ink)); font-size: 12.5px; font-weight: 600; }
[data-daleel-window] b { color: rgb(var(--daleel-ink)); font-weight: 700; }
/* thread tabs «المحادثة» / «طلبات سلة»: 13.5/600 graphite, the open one ink with a 2px ink underline, an icon each */
.conversation-details-wrap > div:has(> ul > li[data-daleel-tab]) { padding-inline: 22px; border-color: rgb(var(--daleel-rule)); }
.conversation-details-wrap > div > ul:has(> li[data-daleel-tab]) { padding-inline: 0; }
.conversation-details-wrap li[data-daleel-tab] { margin-inline: 0 22px; }
.conversation-details-wrap li[data-daleel-tab] a { gap: 6px; padding-block: 9px; font-size: 13.5px; font-weight: 600; color: rgb(var(--daleel-graphite)); }
.conversation-details-wrap li[data-daleel-tab] a[class~='text-n-blue-11'] { color: rgb(var(--daleel-ink)); }
.conversation-details-wrap li[data-daleel-tab] a::after { background-color: rgb(var(--daleel-ink)); }
.conversation-details-wrap li[data-daleel-tab='messages'] a::before, .conversation-details-wrap li[data-daleel-tab='daleel-salla'] a::before { content: ''; width: 15px; height: 15px; flex: none; background: currentColor; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
.conversation-details-wrap li[data-daleel-tab='messages'] a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
.conversation-details-wrap li[data-daleel-tab='daleel-salla'] a::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E"); }
/* the «طلبات سلة» tab: the same list as the side column, centred and roomy */
[data-daleel-orders-tab] { background: rgb(var(--daleel-paper)); }
[data-daleel-orders-tab] [data-daleel-orders] { padding: 22px 22px 28px; }
/* the contact summary under the name */
div[channel-type]:has(+ [data-daleel-contact-summary]) { border-bottom: 0; padding-bottom: 8px; }
[data-daleel-contact-summary] { padding: 0 20px 16px !important; border-bottom: 1px solid rgb(var(--daleel-rule)); font-size: 13px; color: rgb(var(--daleel-graphite)); }
[data-daleel-contact-summary] > li > span:first-child { color: rgb(var(--daleel-muted)); }
/* sidebar counts: a plain number at the inline-end, 12/600 graphite (not a pill; graphite keeps 4.5:1 on the mist hover too) */
[data-daleel-nav-count] { min-width: 0 !important; height: auto !important; padding: 0 !important; border-radius: 0 !important; background: transparent !important; color: rgb(var(--daleel-graphite)); font-size: 12px !important; font-weight: 600 !important; line-height: 1.4 !important; font-variant-numeric: tabular-nums; }
aside[class*='border-n-weak'] nav a.active [data-daleel-nav-count], aside[class*='border-n-weak'] nav a[class~='active'] [data-daleel-nav-count] { color: rgb(var(--daleel-ink)); }

/* daleel:identity:start — generated by infra/chatwoot-theme/scripts/build-tokens.js from brand/tokens.json (app.light, app.dark). Do not edit by hand. */
:root {
  --daleel-ink: 10 10 10;
  --daleel-on-ink: 255 255 255;
  --daleel-paper: 255 255 255;
  --daleel-mist: 244 244 245;
  --daleel-rule: 228 228 231;
  --daleel-graphite: 82 82 91;
  --daleel-muted: 113 113 122;
  --daleel-signal: 0 194 107;
  --daleel-signal-ink: 0 117 63;
  --daleel-signal-tint: 227 249 238;
  --daleel-alert: 217 45 32;
  --daleel-alert-tint: 253 236 234;
  --daleel-label-grey: 161 161 170;
  --daleel-primary: 10 10 10;
  --daleel-on-primary: 255 255 255;
  --daleel-primary-hover: 38 38 38;
  --daleel-on-signal: 10 10 10;
  --slate-1: 253 253 253;
  --slate-2: 250 250 250;
  --slate-3: 244 244 245;
  --slate-4: 238 238 240;
  --slate-5: 228 228 231;
  --slate-6: 218 218 223;
  --slate-7: 207 207 213;
  --slate-8: 180 180 188;
  --slate-9: 142 142 151;
  --slate-10: 113 113 122;
  --slate-11: 82 82 91;
  --slate-12: 10 10 10;
  --blue-1: 250 250 250;
  --blue-2: 244 244 245;
  --blue-3: 244 244 245;
  --blue-4: 235 235 237;
  --blue-5: 228 228 231;
  --blue-6: 212 212 216;
  --blue-7: 161 161 170;
  --blue-8: 113 113 122;
  --blue-9: 10 10 10;
  --blue-10: 38 38 38;
  --blue-11: 10 10 10;
  --blue-12: 10 10 10;
  --background-color: 255 255 255;
  --surface-1: 255 255 255;
  --surface-2: 255 255 255;
  --surface-active: 244 244 245;
  --solid-1: 255 255 255;
  --solid-2: 255 255 255;
  --solid-3: 255 255 255;
  --solid-active: 244 244 245;
  --solid-blue: 244 244 245;
  --solid-blue-2: 250 250 250;
  --card-color: 255 255 255;
  --button-color: 255 255 255;
  --label-background: 255 255 255;
  --border-weak: 228 228 231;
  --border-strong: 212 212 216;
  --border-blue-strong: 10 10 10;
  --text-blue: 10 10 10;
  --border-container: 228, 228, 231, 1;
  --alpha-1: 244, 244, 245, 1;
  --alpha-2: 244, 244, 245, 1;
  --background-input-box: 0, 0, 0, 0.03;
  --label-border: 228, 228, 231, 1;
  --border-blue: 10, 10, 10, 0.5;
  --daleel-card-shadow: none;
  --daleel-chart-1: 18 160 110;
  --daleel-chart-2: 235 104 52;
  --daleel-chart-3: 42 120 214;
  --daleel-chart-ordinal-1: 79 189 146;
  --daleel-chart-ordinal-2: 21 156 108;
  --daleel-chart-ordinal-3: 0 122 76;
  --daleel-chart-ordinal-4: 0 85 47;
  --daleel-chart-neutral: 156 151 139;
  --daleel-chart-good: 12 163 12;
  --daleel-chart-warning: 250 178 25;
  --daleel-chart-serious: 236 131 90;
  --daleel-chart-critical: 208 59 59;
}
.dark {
  --daleel-ink: 237 238 240;
  --daleel-on-ink: 10 10 10;
  --daleel-paper: 20 21 23;
  --daleel-mist: 33 33 37;
  --daleel-rule: 46 49 53;
  --daleel-graphite: 176 180 186;
  --daleel-muted: 139 143 151;
  --daleel-signal: 0 194 107;
  --daleel-signal-ink: 61 214 140;
  --daleel-signal-tint: 13 46 31;
  --daleel-alert: 217 45 32;
  --daleel-alert-tint: 58 26 26;
  --daleel-label-grey: 119 123 132;
  --daleel-primary: 0 117 63;
  --daleel-on-primary: 255 255 255;
  --daleel-primary-hover: 0 104 55;
  --daleel-on-signal: 10 10 10;
  --slate-1: 17 17 19;
  --slate-2: 24 25 27;
  --slate-3: 33 33 37;
  --slate-4: 39 42 45;
  --slate-5: 46 49 53;
  --slate-6: 54 58 63;
  --slate-7: 67 72 78;
  --slate-8: 90 97 105;
  --slate-9: 105 110 119;
  --slate-10: 119 123 132;
  --slate-11: 176 180 186;
  --slate-12: 237 238 240;
  --blue-1: 16 16 18;
  --blue-2: 23 24 27;
  --blue-3: 33 33 37;
  --blue-4: 42 43 48;
  --blue-5: 52 53 59;
  --blue-6: 67 68 75;
  --blue-7: 90 91 99;
  --blue-8: 119 122 131;
  --blue-9: 0 117 63;
  --blue-10: 0 133 72;
  --blue-11: 237 238 240;
  --blue-12: 255 255 255;
  --background-color: 20 21 23;
  --surface-1: 20 21 23;
  --surface-2: 22 23 26;
  --surface-active: 53 57 63;
  --solid-1: 23 23 26;
  --solid-2: 29 30 36;
  --solid-3: 44 45 54;
  --solid-active: 53 57 66;
  --solid-blue: 44 45 54;
  --solid-blue-2: 26 29 35;
  --card-color: 28 30 34;
  --button-color: 42 43 51;
  --label-background: 36 38 45;
  --border-weak: 46 49 53;
  --border-strong: 63 67 74;
  --border-blue-strong: 237 238 240;
  --text-blue: 237 238 240;
  --border-container: 255, 255, 255, 0;
  --alpha-1: 35, 36, 42, 0.8;
  --alpha-2: 147, 153, 176, 0.12;
  --background-input-box: 255, 255, 255, 0.02;
  --label-border: 255, 255, 255, 0.03;
  --border-blue: 237, 238, 240, 0.5;
  --daleel-card-shadow: none;
  --daleel-chart-1: 25 158 112;
  --daleel-chart-2: 217 89 38;
  --daleel-chart-3: 57 135 229;
  --daleel-chart-ordinal-1: 11 92 58;
  --daleel-chart-ordinal-2: 15 125 80;
  --daleel-chart-ordinal-3: 25 160 112;
  --daleel-chart-ordinal-4: 76 196 150;
  --daleel-chart-neutral: 107 103 95;
  --daleel-chart-good: 12 163 12;
  --daleel-chart-warning: 250 178 25;
  --daleel-chart-serious: 236 131 90;
  --daleel-chart-critical: 208 59 59;
}
/* daleel:identity:end */
