/* UniqueTasks — the design's shared pieces (decision 137: the redesign from the owner's reference images).
 *
 * index.html is inline-styled (a Design Component); these classes carry what inline styles cannot: the dot
 * before a status pill, hovers that must not repaint a selected row, the floating bulk bar. A site opts in
 * with a class; where its inline style sets the same property, the class marks it !important on purpose.
 *
 * Palette (scripts/inner_colors.py): text #101828 / #344054 / #475467 / muted #667085; lines #EAECF0 /
 * rows #F2F4F7; inputs #D0D5DD; hover #F9FAFB; selected #F2F4F7; primary black; links #175CD3.
 */

/* ── The font everywhere (owner, 2026-11-17: «خط المراعي في النظام بالكامل») — fonts/fonts.css ──────────── */
html,body{font-family:'Almarai','Segoe UI',Tahoma,sans-serif;}
button,input,select,textarea{font-family:inherit;}

/* ── Status pill: rounded, a dot in the text's own colour ─────────────────────────────────── */
.ut-pill{display:inline-flex !important;align-items:center;gap:6px;border-radius:999px !important;padding:2px 10px !important;
  font-size:12px !important;font-weight:600 !important;line-height:18px !important;white-space:nowrap;}
.ut-pill::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--dot,currentColor);opacity:.8;flex-shrink:0;}
.ut-pill.nodot::before{display:none;}
/* a quiet chip (tags, channel names): no dot, 6px corners */
.ut-chip{display:inline-flex !important;align-items:center;gap:5px;border-radius:6px !important;padding:1px 8px !important;
  font-size:11.5px !important;font-weight:600 !important;line-height:18px !important;white-space:nowrap;}

/* ── List page ──────────────────────────────────────────────────────────────────────────────── */
.ut-list{background:#FFFFFF;}
.ut-h1{margin:0;font-size:22px !important;font-weight:700 !important;color:#101828 !important;line-height:1.3;}
.ut-sub{font-size:13px !important;color:#667085 !important;font-weight:500 !important;}
.ut-btn{height:36px;display:inline-flex !important;align-items:center;justify-content:center;gap:8px;border-radius:9px !important;
  border:1px solid #D0D5DD !important;background:#FFFFFF !important;color:#344054 !important;font:inherit;font-size:13px !important;
  font-weight:600 !important;padding:0 14px !important;cursor:pointer;white-space:nowrap;}
.ut-btn:hover{background:#F9FAFB !important;}
.ut-btn[data-on="true"]{background:#F2F4F7 !important;color:#101828 !important;border-color:#98A2B3 !important;}
.ut-btn.primary{background:#000000 !important;border-color:#000000 !important;color:#FFFFFF !important;}
.ut-btn.primary:hover{background:#1D2939 !important;border-color:#1D2939 !important;}
.ut-btn.icon{width:36px;padding:0 !important;}

/* ── Table: a hairline card, a gray header, quiet row lines, hover without repainting the selected ── */
.ut-tbl{background:#FFFFFF !important;border:1px solid #EAECF0 !important;border-radius:12px !important;overflow:hidden;}
.ut-thead{background:#F9FAFB !important;border-bottom:1px solid #EAECF0 !important;}
.ut-thead, .ut-thead *{font-size:12.5px !important;font-weight:600 !important;color:#475467 !important;}
.ut-tr{border-bottom:1px solid #F2F4F7 !important;}
.ut-tr:hover{background:#F9FAFB !important;}
.ut-tr[data-on="true"]{background:#F9FAFB !important;}
.ut-name{font-weight:600 !important;color:#101828 !important;}
.ut-tfoot{border-top:1px solid #EAECF0 !important;background:#FFFFFF !important;color:#475467 !important;font-size:13px !important;}
.ut-check{width:16px !important;height:16px !important;accent-color:#101828 !important;cursor:pointer;}

/* ── Avatar: the person's colour as a 12% tint, the initial in the colour ─────────────────────── */
.ut-av{border-radius:50% !important;display:inline-flex !important;align-items:center;justify-content:center;font-weight:700 !important;flex-shrink:0;}

/* ── «+ إسناد»: an owner not set yet ─────────────────────────────────────────────────────────── */
.ut-assign{display:inline-flex;align-items:center;gap:4px;color:#101828;font-weight:600;font-size:13px;text-decoration:underline;
  text-underline-offset:3px;cursor:pointer;background:none;border:none;padding:0;font-family:inherit;}

/* ── Bulk bar: floats at the bottom of the list, navy ─────────────────────────────────────────── */
.ut-bulk{position:absolute !important;bottom:20px;left:50%;transform:translateX(-50%);z-index:30;display:flex !important;
  align-items:center;gap:4px;background:#101828 !important;color:#FFFFFF !important;border-radius:12px !important;
  padding:6px 8px 6px 14px !important;box-shadow:0 16px 40px rgba(16,24,40,.28);font-size:13px;white-space:nowrap;max-width:calc(100% - 32px);}
.ut-bulk button{height:32px;border:none;border-radius:8px;background:transparent;color:#FFFFFF;font:inherit;font-size:13px;font-weight:600;
  padding:0 10px;cursor:pointer;}
.ut-bulk button:hover{background:rgba(255,255,255,.1);}
.ut-bulk .n{font-weight:700;padding-inline-end:10px;margin-inline-end:4px;border-inline-end:1px solid #344054;}
.ut-bulk button[data-danger="true"]{color:#FDA29B;}

/* ── Tabs under a title (quick views) ───────────────────────────────────────────────────────── */
.ut-tabs{display:flex;align-items:center;gap:20px;border-bottom:1px solid #EAECF0;font-size:13.5px;}
.ut-tab{height:38px;display:inline-flex;align-items:center;gap:6px;border:none;border-bottom:2px solid transparent;background:transparent;
  color:#475467;font:inherit;font-size:13.5px;padding:0 2px;cursor:pointer;white-space:nowrap;margin-bottom:-1px;}
.ut-tab[aria-selected="true"]{border-bottom-color:#101828;color:#101828;font-weight:700;}
.ut-tab .n{font-size:12px;color:#667085;background:#F2F4F7;border-radius:6px;padding:0 6px;line-height:18px;font-weight:500;}

/* ── Search field of a list ─────────────────────────────────────────────────────────────────── */
.ut-search{display:flex;align-items:center;gap:8px;height:36px;border:1px solid #D0D5DD;border-radius:9px;padding:0 10px;color:#667085;background:#FFFFFF;}
.ut-search input{flex:1;min-width:0;border:none;background:transparent;font:inherit;font-size:13px;color:#101828;outline:none;}

/* Phones and touch screens: fields at 16px (Safari zooms into smaller ones — decision 98). */
@media (max-width: 899px), (pointer: coarse){ .ut-search input{font-size:16px;} }

/* ── «البريد»: the message list's rows, the customer panel only where it fits ─────────────────── */
.ut-mrow:hover{background:#F9FAFB;}
.ut-mrow[data-on="true"]{background:#F2F4F7;}
/* ── «البريد» the Gmail way (owner, 2026-11-17, with Gmail's picture): on a computer the list spans the screen, one line
   per e-mail; an e-mail opens in the list's place, the customer panel beside it where the room allows — by the panes'
   own width (a size container: an open CRM menu counts), not the window's ─────────────────────────────────────── */
[data-ut-mail-panes]{container-type:inline-size;}
.r-app:not([data-ut-mob="1"]) [data-ut-mail-panes][data-mode="list"] [data-ut-mail-list]{flex:1 1 auto !important;width:auto !important;max-width:none !important;border-inline-end:none !important;}
.r-app:not([data-ut-mob="1"]) [data-ut-mail-panes][data-mode="list"] [data-ut-mail-read],
.r-app:not([data-ut-mob="1"]) [data-ut-mail-panes][data-mode="list"] [data-ut-mail-cust]{display:none !important;}
.r-app:not([data-ut-mob="1"]) [data-ut-mail-panes][data-mode="read"] [data-ut-mail-list]{display:none !important;}
.r-app:not([data-ut-mob="1"]) [data-ut-mail-panes][data-mode="list"] [data-ut-mail-top]{flex-direction:row !important;flex-wrap:wrap;align-items:center;padding:12px 20px !important;}
.r-app:not([data-ut-mob="1"]) [data-ut-mail-panes][data-mode="list"] [data-ut-mail-sbox]{flex:1 1 280px;max-width:460px;}
.r-app:not([data-ut-mob="1"]) [data-ut-mail-panes][data-mode="list"] [data-ut-mail-tabsrow]{flex:0 1 560px;min-width:0;}
@container (max-width: 899px){ [data-ut-mail-cust]{display:none !important;} }
/* one e-mail, one line: who, subject — the text, its chips, a clip, the time; unread in bold on white (Gmail's read rows
   are the shaded ones) */
.ut-mline{display:grid;grid-template-columns:28px minmax(120px,200px) minmax(0,1fr) auto auto auto;align-items:center;column-gap:12px;
  min-height:44px;padding:0 20px;border-bottom:1px solid #EAECF0;background:#F9FAFB;color:#475467;font-size:13.5px;cursor:pointer;position:relative;}
.ut-mline[data-unread="true"]{background:#FFFFFF;}
.ut-mline:hover{z-index:1;box-shadow:0 1px 2px rgba(16,24,40,.14),0 2px 6px rgba(16,24,40,.06);}
.ut-mline .ml-who,.ut-mline .ml-time{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ut-mline .ml-who{text-align:right;color:#344054;}
/* the subject and the text each in its own direction (an English text shows its beginning, not its end), the text
   taking what the subject leaves */
.ut-mline .ml-body{display:flex;align-items:baseline;gap:6px;min-width:0;overflow:hidden;}
.ut-mline .ml-subj{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#344054;}
.ut-mline .ml-sep{flex:0 0 auto;color:#98A2B3;}
.ut-mline .ml-snip{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;color:#667085;}
.ut-mline .ml-time{font-size:12.5px;color:#475467;text-align:left;}
.ut-mline[data-unread="true"] .ml-who,.ut-mline[data-unread="true"] .ml-subj,.ut-mline[data-unread="true"] .ml-time{font-weight:700;color:#101828;}
.ut-mline .ml-tags{display:flex;gap:4px;}
.ut-mline .ml-att{display:flex;align-items:center;}
/* a narrow list (a small window with the CRM menu open): the line folds in two, Gmail's phone way */
@container (max-width: 639px){
  .ut-mline{grid-template-columns:28px minmax(0,1fr) auto;grid-template-areas:"av who time" "av body body";row-gap:2px;padding:8px 14px;}
  .ut-mline .ut-av{grid-area:av;align-self:start;}
  .ut-mline .ml-who{grid-area:who;} .ut-mline .ml-time{grid-area:time;} .ut-mline .ml-body{grid-area:body;}
  .ut-mline .ml-tags,.ut-mline .ml-att{display:none;}
  /* the folders by their words — «غير المقروء 6» never loses a letter */
  .r-app:not([data-ut-mob="1"]) [data-ut-mail-list] [role="tablist"] button[role="tab"]{flex:1 1 auto !important;font-size:12px !important;padding:0 4px !important;}
}

/* ── «المحادثات»: the list's rounded rows keep their selection on hover ──────────────────────────── */
.ut-crow:hover{background:#F9FAFB !important;}
.ut-crow[data-on="true"]{background:#F2F4F7 !important;}
/* the compose row is the design's card on desktop (the phone app keeps its own pill) */
.r-app:not([data-ut-mob="1"]) .r-uni-crow{margin:8px 12px 12px;padding:6px 6px 6px 8px !important;border:1px solid #D0D5DD;border-radius:14px;background:#FFFFFF;box-shadow:0 4px 12px rgba(16,24,40,.06);}
.r-app:not([data-ut-mob="1"]) .r-uni-crow textarea{border:none !important;box-shadow:none !important;background:transparent !important;}
.r-app:not([data-ut-mob="1"]) [data-ut-send="1"]{border-radius:10px !important;background:#000000 !important;}

/* ── Phones (the phone app, decision 102): a list is cards; its title is the phone header's; «+» floats ─── */
[data-ut-mob="1"] [data-ut-gmob="true"]{padding:12px 16px 0 !important;gap:12px !important;}
[data-ut-mob="1"] [data-ut-gmob="true"] > div:first-child h1,[data-ut-mob="1"] [data-ut-gmob="true"] > div:first-child .ut-btn.primary{display:none !important;}
[data-ut-mob="1"] [data-ut-gmob="true"] > div:first-child{min-height:0;}
[data-ut-mob="1"] [data-ut-gmob="true"] [data-ut-gcols]{display:none !important;}
[data-ut-mob="1"] [data-ut-gmob="true"] .ut-search{width:100% !important;height:44px;}
.ut-mcard:active{background:#F2F4F7;}
.ut-fab{position:fixed;left:16px;bottom:calc(84px + env(safe-area-inset-bottom, 0px));z-index:30;height:52px;border:none;border-radius:16px;
  background:#000000;color:#FFFFFF;display:flex;align-items:center;gap:8px;padding:0 18px;font:inherit;font-size:15px;font-weight:700;
  box-shadow:0 10px 24px rgba(16,24,40,.25);cursor:pointer;}
[data-ut-mob="1"] [data-ut-lmob="true"]{padding:12px 16px 0 !important;gap:12px !important;}
[data-ut-mob="1"] [data-ut-lmob="true"] [role="group"][aria-label="طريقة العرض"],
[data-ut-mob="1"] [data-ut-lmob="true"] [data-ut-limport],
[data-ut-mob="1"] [data-ut-lmob="true"] [data-ut-lcreate]{display:none !important;}
[data-ut-mob="1"] [data-ut-mail-read],[data-ut-mob="1"] [data-ut-mail-cust]{display:none !important;}
[data-ut-mob="1"] [data-ut-mail-list]{flex:1 1 auto !important;border:none !important;}
[data-ut-mob="1"] [data-ut-mail] > div:first-child .ut-btn[title],[data-ut-mob="1"] [data-ut-mail] > div:first-child .ut-btn.primary{display:none !important;}
[data-ut-mob="1"] [data-ut-mail] > div:first-child{padding:12px 16px !important;}
[data-ut-mob="1"] [data-ut-mail] > div:first-child h1{display:none !important;}
[data-ut-mob="1"] [data-ut-mail-list] [role="tablist"] button{font-size:13px !important;}
[data-ut-mob="1"] [data-ut-mail-row]{padding:13px 16px !important;}
[data-ut-mob="1"] [data-ut-mail-list] > div:last-child{padding-bottom:90px;}
.ut-mcard .ut-check{width:22px !important;height:22px !important;}
/* «المحادثات»: the sections and their states as bars of their own above the list — no dropdown (owner, 2026-11-17) */
.ut-seg{flex:1;min-width:0;height:30px;border:none;border-radius:8px;font:inherit;font-size:12.5px;cursor:pointer;display:inline-flex;
  align-items:center;justify-content:center;gap:6px;white-space:nowrap;padding:0 6px;}
.ut-seg .ut-hot{min-width:18px;height:18px;border-radius:999px;background:#F04438;color:#FFFFFF;font-size:11px;font-weight:700;
  display:inline-flex;align-items:center;justify-content:center;padding:0 5px;}
.ut-pillbar{display:flex;align-items:center;gap:6px;overflow-x:auto;scrollbar-width:thin;padding-bottom:2px;}
.ut-pillbar.ut-wrap{flex-wrap:wrap;overflow-x:visible;padding-bottom:0;}
[data-ut-secrow][hidden]{display:none !important;}
.ut-pill2{flex-shrink:0;height:28px;display:inline-flex;align-items:center;gap:5px;border-radius:999px;border:1px solid #EAECF0;
  background:#FFFFFF;color:#344054;font:inherit;font-size:12px;font-weight:600;padding:0 10px;cursor:pointer;white-space:nowrap;}
.ut-pill2 [data-ut-n]{min-width:18px;height:18px;border-radius:999px;font-size:11px;font-weight:700;display:inline-flex;
  align-items:center;justify-content:center;padding:0 5px;}
.ut-pill2.ut-sm{height:26px;font-size:11.5px;padding:0 9px;}
.ut-pillsel{flex-shrink:0;height:28px;border:1px solid #EAECF0;border-radius:999px;padding:0 8px;font:inherit;font-size:12px;
  font-weight:600;background:#FFFFFF;color:#344054;cursor:pointer;}
.ut-pillsel.ut-sm{height:26px;font-size:11.5px;}

/* the compose card's tools (desktop): text on top, the design's tools under it, the send at the end */
.r-app:not([data-ut-mob="1"]) .r-uni-crow{flex-wrap:wrap !important;align-items:center !important;}
.r-app:not([data-ut-mob="1"]) .r-uni-crow textarea{order:-1;flex:1 1 100% !important;min-height:44px;padding:6px 4px !important;}
.r-app:not([data-ut-mob="1"]) [data-ut-send="1"]{margin-inline-start:auto;}
.u-tool{height:34px;border:none;border-radius:8px;background:transparent;color:#475467;font:inherit;font-size:12.5px;font-weight:600;padding:0 8px;cursor:pointer;white-space:nowrap;}
.u-tool:hover{background:#F2F4F7;}
.u-tool.u-note{color:#B54708;}
.u-tool.u-note[aria-selected="true"]{background:#FFFAEB;box-shadow:inset 0 0 0 1px #FEDF89;}
[data-ut-mob="1"] [data-ut-cinfo],[data-ut-mob="1"] [data-ut-dtool]{display:none !important;}
[data-ut-mob="1"] .ut-bav,[data-ut-mob="1"] .ut-via{display:none !important;}

/* «البريد» on a phone (MailPhone): the folders are the header's chips — no title block, no folder bar; the search
   behind the header's icon; a row is name, time, subject and one line of text */
[data-ut-mob="1"] [data-ut-mail] > div:first-child{display:none !important;}
[data-ut-mob="1"] [data-ut-mail-list] [role="tablist"]{display:none !important;}
[data-ut-mob="1"] [data-ut-mail-more]{display:none !important;}
[data-ut-mob="1"] [data-ut-mail-sbox][data-on="false"]{display:none !important;}
[data-ut-mob="1"] [data-ut-mail-row] [data-ut-mail-tags]{display:none !important;}
[data-ut-mob="1"] [data-ut-mail-row] [data-ut-mail-snip]{white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;-webkit-line-clamp:unset !important;display:block !important;}
[data-ut-mob="1"] [data-ut-mail-list] > div:first-child{padding:0 16px !important;gap:0 !important;}
[data-ut-mob="1"] [data-ut-mail-list] > div:first-child > *{margin-block:8px;}

/* a thread's system line (the design): on a computer at the start with a small icon and its time; on a phone the pill */
.ut-sys .ut-sys-ic{display:none;}
.r-app:not([data-ut-mob="1"]) .ut-sys{align-self:flex-start !important;display:flex;align-items:center;gap:8px;background:transparent !important;
  border:none !important;border-radius:0 !important;padding:0 !important;padding-inline-start:36px !important;text-align:start !important;font-size:12.5px !important;}
.r-app:not([data-ut-mob="1"]) .ut-sys .ut-sys-ic{display:inline-flex;width:22px;height:22px;border-radius:50%;background:#EFF8FF;color:#175CD3;align-items:center;justify-content:center;flex-shrink:0;}
.r-app:not([data-ut-mob="1"]) .ut-sys .ut-sys-t{color:#667085;}
[data-ut-mob="1"] .ut-bnm{display:none !important;}

/* ── Windows that close go softly (index.html `_exitsInit`): a copy fades and goes; it never takes a click or focus ── */
.ut-ghost{pointer-events:none !important;}
.ut-ghost-dlg{animation:utDlgOut .18s ease forwards !important;transform-origin:50% 50%;}
.ut-ghost-sheet{animation:utSheetDown .2s ease forwards !important;}
.ut-ghost-bd{animation:utFadeOut .18s ease forwards !important;}
@keyframes utDlgOut{from{opacity:1;transform:scale(1);}to{opacity:0;transform:translateY(8px) scale(.97);}}
@keyframes utFadeOut{from{opacity:1;}to{opacity:0;}}
/* a phone's sheet slides up from the bottom, and back down when it closes (its transform is fixed: «translate» moves it) */
[data-ut-mob="1"] .r-sheet{animation:utSheetUp .26s cubic-bezier(.2,.8,.2,1) !important;}
[data-ut-mob="1"] .ut-ghost-dlg{animation:utSheetDown .2s ease forwards !important;}
@keyframes utSheetUp{from{translate:0 48px;opacity:.3;}to{translate:0 0;opacity:1;}}
@keyframes utSheetDown{from{translate:0 0;opacity:1;}to{translate:0 48px;opacity:0;}}
@media (prefers-reduced-motion: reduce){ .ut-ghost{display:none !important;} }

/* ── Phones (owner, 2026-11-17: «تأكد انه مافيه صفحات اخرى غير منسقه ومناسبه لنسخة الجوال»): nothing wider than the
   screen — a record, the targets, the dashboards in one column; a wide table scrolls inside its own card; tab rows
   scroll sideways instead of running off the screen ─────────────────────────────────────────────────────────── */
[data-ut-mob="1"] [data-ut-recgrid]{grid-template-columns:minmax(0,1fr) !important;min-width:0 !important;}
[data-ut-mob="1"] [data-ut-recgrid] > div:first-child{display:none !important;}   /* the side list: the tabs below hold the same */
[data-ut-mob="1"] [data-ut-tgrid],[data-ut-mob="1"] [data-ut-dashrow],[data-ut-mob="1"] [data-ut-anagrid],[data-ut-mob="1"] [data-ut-rtgrid]{grid-template-columns:minmax(0,1fr) !important;min-width:0 !important;}
[data-ut-mob="1"] [data-ut-rtcard]{overflow-x:auto !important;}
[data-ut-mob="1"] [data-ut-rtcard] > div[style*="grid-template-columns"],[data-ut-mob="1"] [data-ut-rtcard] > div > div[style*="grid-template-columns"]{min-width:560px;}
[data-ut-mob="1"] .ut-tabs,[data-ut-mob="1"] [data-ut-pdtabs]{overflow-x:auto;flex-wrap:nowrap !important;scrollbar-width:none;}
[data-ut-mob="1"] .ut-tabs::-webkit-scrollbar,[data-ut-mob="1"] [data-ut-pdtabs]::-webkit-scrollbar{display:none;}
[data-ut-mob="1"] .ut-tabs > *,[data-ut-mob="1"] [data-ut-pdtabs] > *{flex-shrink:0;}
