/* =====================================================================
   Lit Cut — team & client system
   One idea carries the identity: the red cut (a thin red line that slices).
   Everything else stays quiet: black / white, one red, one grid.
   ===================================================================== */

@font-face { font-family: "LC Sans"; src: url(../fonts/Montserrat-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; unicode-range: U+0000-024F, U+2000-206F, U+20AC; }
@font-face { font-family: "LC Sans"; src: url(../fonts/Montserrat-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; unicode-range: U+0000-024F, U+2000-206F; }
@font-face { font-family: "LC Sans"; src: url(../fonts/Montserrat-ExtraBold.ttf) format("truetype"); font-weight: 800; font-display: swap; unicode-range: U+0000-024F, U+2000-206F; }
@font-face { font-family: "LC Sans"; src: url(../fonts/NotoSansArabicUI-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "LC Sans"; src: url(../fonts/NotoSansArabicUI-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "LC Sans"; src: url(../fonts/NotoSansArabicUI-ExtraBold.ttf) format("truetype"); font-weight: 800; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "LC Num"; src: url(../fonts/Montserrat-BlackItalic.ttf) format("truetype"); font-weight: 900; font-display: swap; }

/* ---------- Tokens ---------- */
:root, :root[data-theme="dark"] {
  --bg: #000000;
  --side-bg: #050505;
  --surface: rgba(255, 255, 255, .035);
  --surface-solid: #0c0c0c;
  --surface-2: rgba(255, 255, 255, .06);
  --surface-3: rgba(255, 255, 255, .1);
  --field: rgba(255, 255, 255, .04);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .17);
  --fg: #f5f5f5;
  --fg-2: #a8a8a8;
  --fg-3: #6f6f6f;
  --inv-bg: #ffffff;
  --inv-fg: #000000;
  --dot: rgba(255, 255, 255, .075);
  --glow: rgba(225, 6, 0, .22);
  --shadow: 0 24px 60px rgba(0, 0, 0, .6);
  --bar-bg: rgba(0, 0, 0, .7);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f4f4;
  --side-bg: #ffffff;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-2: #f2f2f2;
  --surface-3: #e9e9e9;
  --field: #ffffff;
  --line: #e4e4e4;
  --line-2: #cfcfcf;
  --fg: #0a0a0a;
  --fg-2: #5c5c5c;
  --fg-3: #8d8d8d;
  --inv-bg: #0a0a0a;
  --inv-fg: #ffffff;
  --dot: rgba(0, 0, 0, .07);
  --glow: rgba(225, 6, 0, .09);
  --shadow: 0 24px 60px rgba(0, 0, 0, .14);
  --bar-bg: rgba(244, 244, 244, .8);
  color-scheme: light;
}
:root {
  --red: #e10600;
  --red-hi: #ff2a1f;
  --red-soft: rgba(225, 6, 0, .12);
  --red-line: rgba(225, 6, 0, .5);
  --r-lg: 18px;   /* cards */
  --r-md: 12px;   /* buttons, inputs, rows */
  --r-sm: 8px;    /* chips */
  --gap: 24px;    /* the one gutter */
  --pad: 24px;    /* card padding */
  --side: 264px;
  --top: 64px;
  --tap: 44px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="light"] .red:not(.btn):not(.pill):not(.avatar), :root[data-theme="light"] .pill.red-o { color: var(--red); }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: var(--bg); color: var(--fg);
  font: 400 15px/1.6 "LC Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
/* technical dot grid + slow ambient red light */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 85%);
          mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 85%);
}
body::after {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  width: 70vmax; height: 70vmax; left: -20vmax; top: -35vmax; border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  animation: drift 38s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(55vw, 40vh) scale(1.2); } }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--red); color: #fff; }

.num { font-family: "LC Num", "LC Sans", sans-serif; font-weight: 900; font-style: italic; letter-spacing: -.01em; direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--fg-2); }
.dim { color: var(--fg-3); }
.red { color: var(--red-hi); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.hide, [hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -4px; }
.pill svg.i, .tiny svg.i, .small svg.i { width: 14px; height: 14px; vertical-align: -2px; }
.avatar svg.i { width: 15px; height: 15px; }
svg.flip { transform: scaleX(-1); }

/* ---------- Shell ---------- */
.side {
  position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--side); z-index: 30;
  background: var(--side-bg); border-inline-end: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 0 14px 16px;
}
.brand { display: flex; align-items: center; gap: 12px; height: var(--top); padding: 0 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.brand svg { width: 28px; height: 28px; color: var(--fg); flex: none; }
.brand b { font-family: "LC Num"; font-size: 21px; letter-spacing: -.02em; direction: ltr; line-height: 1; }
.brand small { display: block; font-size: 11px; color: var(--fg-3); margin-top: 3px; }
.nav { flex: 1; overflow-y: auto; scrollbar-width: none; position: relative; }
.nav h6 { margin: 20px 12px 6px; font-size: 11px; font-weight: 600; color: var(--fg-3); }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: var(--r-md);
  color: var(--fg-2); font-weight: 600; font-size: 14px; position: relative; transition: color .2s, background .2s;
}
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { color: var(--fg); background: var(--surface-2); }
.nav a.on { color: var(--fg); background: var(--surface-2); }
.nav a.on::before { content: ""; position: absolute; inset-inline-start: -14px; top: 10px; bottom: 10px; width: 3px; background: var(--red); border-radius: 0 3px 3px 0; box-shadow: 0 0 14px var(--red); }
.nav .count { margin-inline-start: auto; background: var(--red); color: #fff; font-size: 11px; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.side-foot { border-top: 1px solid var(--line); padding-top: 14px; display: flex; align-items: center; gap: 10px; }
.side-foot .who { flex: 1; min-width: 0; line-height: 1.3; }
.side-foot .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: 12px; color: var(--fg-3); }

.main { margin-inline-start: var(--side); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.top {
  position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 12px;
  padding: 0 clamp(16px, 2.4vw, 40px); background: var(--bar-bg); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.top .crumb { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-3); white-space: nowrap; overflow: hidden; }
.top .crumb b { color: var(--fg); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.top .crumb svg { width: 14px; height: 14px; }
.top .mark-m { display: none; }
/* the red cut: sweeps on load, then tracks scroll progress */
.cutline { position: absolute; inset-inline: 0; bottom: -1px; height: 2px; pointer-events: none; overflow: hidden; }
.cutline i { display: block; height: 100%; width: 100%; background: linear-gradient(to left, var(--red-hi), var(--red) 60%, transparent); transform-origin: right center; transform: scaleX(var(--sp, 0)); box-shadow: 0 0 12px var(--red); transition: transform .12s linear; }
.cutline.sweep i { animation: sweep 1.1s var(--ease) both; }
@keyframes sweep { 0% { transform: scaleX(0); } 55% { transform: scaleX(1); } 100% { transform: scaleX(var(--sp, 0)); } }

.page { padding: clamp(18px, 2.4vw, 40px); width: 100%; flex: 1; }

/* ---------- Page header (same on every page) ---------- */
.phead { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px 24px; padding-bottom: 22px; margin-bottom: var(--gap); border-bottom: 1px solid var(--line); min-height: 88px; }
.phead h1 { margin: 0; font-size: clamp(26px, 2.6vw, 36px); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.phead p { margin: 6px 0 0; color: var(--fg-2); font-size: 14px; }
.phead .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: flex-end; }
.phead .acts .input { width: auto; min-width: 150px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: var(--r-md); display: inline-grid; place-items: center; position: relative; flex: none;
  background: transparent; border: 1px solid var(--line); cursor: pointer; color: var(--fg-2); transition: color .2s, border-color .2s, background .2s;
}
.icon-btn:hover { color: var(--fg); border-color: var(--line-2); background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: 8px; inset-inline-end: 8px; width: 8px; height: 8px; background: var(--red); border-radius: 50%; box-shadow: 0 0 0 3px var(--bg); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 3px var(--bg), 0 0 0 3px var(--red-line); } 70%, 100% { box-shadow: 0 0 0 3px var(--bg), 0 0 0 10px transparent; } }
.theme-btn .sun { display: none; }
[data-theme="light"] .theme-btn .sun { display: block; }
[data-theme="light"] .theme-btn .moon { display: none; }

.tabbar { display: none; }

/* ---------- Grid (12 columns, one gutter) ---------- */
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
.grid > * { grid-column: span 12; min-width: 0; }
.grid.eq { align-items: stretch; }
.c3 { grid-column: span 3 !important; } .c4 { grid-column: span 4 !important; } .c5 { grid-column: span 5 !important; }
.c6 { grid-column: span 6 !important; } .c7 { grid-column: span 7 !important; } .c8 { grid-column: span 8 !important; } .c9 { grid-column: span 9 !important; }
.g2 > * { grid-column: span 6; } .g3 > * { grid-column: span 4; } .g4 > * { grid-column: span 3; }
.split > :nth-child(odd) { grid-column: span 8; } .split > :nth-child(even) { grid-column: span 4; }
.auto { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.gap-s > * + * { margin-top: 10px; }
.mt { margin-top: 16px; }
.mt-l { margin-top: var(--gap); }
.grow { flex: 1; min-width: 0; }

/* ---------- Surfaces ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--pad); min-width: 0;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: border-color .25s;
}
[data-theme="light"] .card { box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.card.flush { padding: 0; overflow: hidden; }
a.card:hover, .tile:hover { border-color: var(--line-2); }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; min-height: 34px; flex-wrap: wrap; }
.card-h form.row { flex-wrap: wrap; }
.card-h h2 { flex: 1; }
.card-h .link { font-size: 13px; color: var(--fg-2); font-weight: 600; }
.card-h .link:hover { color: var(--fg); }
.card.cut { overflow: hidden; }
/* (the small diagonal red stroke that sat in the corner of these cards is gone: it read as a stray line, his note 2 Dec) */

h2 { font-size: 17px; font-weight: 800; margin: 0; line-height: 1.35; }
h3 { font-size: 15px; font-weight: 800; margin: 0; }

.stat { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px var(--pad); min-height: 136px; display: flex; flex-direction: column; overflow: hidden; }
[data-theme="light"] .stat { box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.stat .k { font-size: 13px; color: var(--fg-2); font-weight: 600; }
.stat .v { font-size: 40px; line-height: 1; margin-top: auto; padding-top: 14px; }
.stat .s { font-size: 12px; color: var(--fg-3); margin-top: 8px; }
.stat.hot { border-color: var(--red-line); }
.stat.hot::after { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; background: var(--red); box-shadow: 0 0 18px var(--red); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--tap); padding: 0 18px;
  border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--fg); font-weight: 600; font-size: 14px;
  cursor: pointer; white-space: nowrap; transition: background .2s, border-color .2s, transform .12s, box-shadow .2s; position: relative; overflow: hidden;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 17px; height: 17px; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.red:hover { background: var(--red-hi); border-color: var(--red-hi); box-shadow: 0 8px 28px -8px var(--red); }
.btn.red::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.35) 50%, transparent 60%); transform: translateX(120%); transition: transform .6s var(--ease); }
.btn.red:hover::after { transform: translateX(-120%); }
.btn.white { background: var(--inv-bg); color: var(--inv-fg); border-color: var(--inv-bg); }
.btn.ghost { background: transparent; }
.btn.sm { height: 36px; padding: 0 13px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--fg-2); cursor: pointer; font-weight: 600; font-size: 13px; }
.linkbtn:hover { color: var(--fg); }
.linkbtn.danger:hover { color: var(--red-hi); }

/* ---------- Pills / avatars ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; border: 1px solid var(--line-2); color: var(--fg-2); white-space: nowrap; }
.pill.solid { background: var(--inv-bg); color: var(--inv-fg); border-color: var(--inv-bg); }
.pill.red { background: var(--red); border-color: var(--red); color: #fff; }
.pill.red-o { border-color: var(--red-line); color: var(--red-hi); background: var(--red-soft); }
.pill.dark { background: var(--surface-2); border-color: var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--fg); }
.avatar.l { width: 48px; height: 48px; font-size: 16px; }
.avatar.xl { width: 64px; height: 64px; font-size: 22px; border-radius: 18px; }
.avatar.s { width: 26px; height: 26px; font-size: 11px; }
.avatar.inv { background: var(--inv-bg); color: var(--inv-fg); border-color: var(--inv-bg); }
.avatar.hot { background: var(--red); border-color: var(--red); color: #fff; }
.avatars { display: flex; }
.avatars .avatar + .avatar { margin-inline-start: -8px; box-shadow: 0 0 0 2px var(--surface-solid); }

/* ---------- Forms ---------- */
.field { display: block; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--fg-2); margin-bottom: 7px; }
.field small { display: block; color: var(--fg-3); font-size: 12px; margin-top: 6px; }
.input, select.input, textarea.input {
  width: 100%; height: var(--tap); padding: 0 14px; border-radius: var(--r-md); background: var(--field); border: 1px solid var(--line-2);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
textarea.input { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.input:focus { border-color: var(--fg); box-shadow: 0 0 0 4px var(--surface-2); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--fg-2) 50%), linear-gradient(135deg, var(--fg-2) 50%, transparent 50%); background-position: 14px 50%, 19px 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-left: 32px; padding-right: 14px; }
select.input option { background: var(--surface-solid); color: var(--fg); }
input[type="date"].input, input[type="datetime-local"].input, input[type="time"].input, input[type="month"].input { direction: ltr; text-align: right; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 600; font-size: 14px; min-height: 34px; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.err { color: var(--red-hi); font-size: 13px; margin-top: 6px; }
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.days label { cursor: pointer; }
.days input { display: none; }
.days span { display: inline-grid; place-items: center; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--fg-2); transition: all .15s; }
.days input:checked + span { background: var(--inv-bg); color: var(--inv-fg); border-color: var(--inv-bg); }

/* ---------- Tables / lists ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: start; font-size: 12px; color: var(--fg-3); font-weight: 600; padding: 14px var(--pad); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px var(--pad); border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
.list > * { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > *:last-child { border-bottom: 0; padding-bottom: 0; }
.list > *:first-child { padding-top: 0; }
.list > a { transition: padding .2s var(--ease); }
.list > a:hover { padding-inline-start: 6px; }
.list .t { flex: 1; min-width: 0; }
.list .t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .t span { font-size: 12px; color: var(--fg-3); }
.empty { padding: 28px 10px; text-align: center; color: var(--fg-3); font-size: 14px; }

/* ---------- Flash / notices ---------- */
.flash { position: fixed; z-index: 90; inset-inline: 0; top: 18px; display: flex; justify-content: center; pointer-events: none; }
.flash div { background: var(--inv-bg); color: var(--inv-fg); padding: 12px 18px; border-radius: 14px; font-weight: 600; box-shadow: var(--shadow); pointer-events: auto; display: flex; gap: 10px; align-items: center; max-width: calc(100% - 32px); animation: drop .45s var(--ease); }
.flash div::before { content: ""; width: 4px; align-self: stretch; background: var(--red); border-radius: 2px; }
.flash.err div { background: var(--red); color: #fff; }
.flash.err div::before { background: #fff; }
@keyframes drop { from { transform: translateY(-18px) scale(.97); opacity: 0; } }
.notice { border: 1px dashed var(--line-2); border-radius: var(--r-md); padding: 14px 16px; color: var(--fg-2); font-size: 14px; }
.notice.red { border-color: var(--red-line); background: var(--red-soft); color: var(--fg); }

/* ---------- Punch (check in / out) ---------- */
.punch { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; padding: 28px 32px; overflow: hidden; }
.punch .clock { font-size: clamp(44px, 5vw, 64px); line-height: 1; }
.punch .clock .colon { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.punch .date { color: var(--fg-2); font-weight: 600; margin-top: 8px; }
.punch-btn {
  --s: 164px; width: var(--s); height: var(--s); border-radius: 50%; border: 0; cursor: pointer; position: relative;
  background: var(--surface-solid); color: var(--fg); display: grid; place-items: center; text-align: center;
  box-shadow: inset 0 0 0 1px var(--line-2), 0 0 0 12px var(--surface-2); transition: transform .2s var(--ease);
}
/* day progress ring */
.punch-btn::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; background: conic-gradient(from 0deg, var(--red) var(--p, 0deg), transparent 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); }
/* orbiting scan light */
.punch-btn::after { content: ""; position: absolute; inset: -18px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 80%, var(--red-soft) 92%, transparent); animation: spin 6s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.punch-btn:hover { transform: scale(1.03); }
.punch-btn svg { width: 48px; height: 48px; margin: 0 auto 8px; color: var(--red-hi); }
.punch-btn b { display: block; font-size: 15px; }
.punch-btn small { display: block; font-size: 11px; color: var(--fg-3); }
.punch-btn.busy svg { animation: pulse 1s infinite; }
.punch-btn.out svg { color: var(--fg); }
.punch-btn.done { cursor: default; }
.punch-btn.done::after { display: none; }
.punch-btn.done svg { color: var(--fg-3); }
@keyframes pulse { 50% { opacity: .35; transform: scale(.92); } }
.punch-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.punch-meta .pill { height: 28px; }

/* ---------- Progress ---------- */
.bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--red); border-radius: 6px; transform-origin: right center; transform: scaleX(0); transition: transform 1.1s var(--ease); }
.bar.white i { background: var(--fg); }
.bar.in i { transform: scaleX(1); }
.strip { display: flex; gap: 4px; }
.strip i { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-3); position: relative; overflow: hidden; }
.strip i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; transform: scaleX(0); transform-origin: right center; transition: transform .5s var(--ease) calc(var(--i, 0) * 70ms); }
.strip i.done::after { background: var(--fg); }
.strip i.doing::after { background: var(--red); box-shadow: 0 0 10px var(--red); }
.strip.in i::after { transform: scaleX(1); }

.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps li { position: relative; padding-inline-start: 40px; padding-bottom: 24px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ""; position: absolute; inset-inline-start: 11px; top: 28px; bottom: 2px; width: 2px; background: var(--line-2); }
.steps li:last-child::before { display: none; }
.steps .dot { position: absolute; inset-inline-start: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--bg); display: grid; place-items: center; }
.steps .dot svg { width: 13px; height: 13px; }
.steps li.done .dot { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.steps li.done::before { background: var(--fg); }
.steps li.doing .dot { border-color: var(--red); box-shadow: 0 0 0 6px var(--red-soft); }
.steps li.doing .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; }
.steps b { display: block; font-weight: 600; }
.steps li.pending b { color: var(--fg-2); }
.steps .meta { font-size: 12px; color: var(--fg-3); }
.steps .note { font-size: 13px; color: var(--fg-2); margin-top: 3px; }

/* ---------- Kanban ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(260px, 1fr)); gap: var(--gap); overflow-x: auto; padding-bottom: 6px; align-items: start; }
.col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; min-height: 60vh; transition: border-color .2s, background .2s; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 2px 4px 14px; font-weight: 800; font-size: 14px; }
.col-h .n { color: var(--fg-3); font-weight: 600; margin-inline-start: auto; }
.col.drop { border-color: var(--red-line); background: var(--red-soft); }
.tcard { display: block; background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; margin-bottom: 10px; cursor: grab; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.tcard:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 10px 30px -14px rgba(0,0,0,.5); }
.tcard.dragging { opacity: .45; }
.tcard b { display: block; font-weight: 600; font-size: 14px; line-height: 1.45; }
.tcard .meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--fg-3); flex-wrap: wrap; }
.tcard .meta svg { width: 13px; height: 13px; }
.tcard.late { border-color: var(--red-line); }
.prio-high { box-shadow: inset -3px 0 0 var(--red); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: var(--gap); overflow-x: auto; scrollbar-width: none; position: relative; }
.tabs a { padding: 12px 16px; font-weight: 600; font-size: 14px; color: var(--fg-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .2s; display: inline-flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--fg); }
.tabs a.on { color: var(--fg); border-color: var(--red); }
.tabs a .n { font-size: 11px; color: var(--fg-3); }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.seg a { padding: 0 14px; height: 34px; display: inline-grid; place-items: center; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--fg-2); }
.seg a.on { background: var(--inv-bg); color: var(--inv-fg); }

/* ---------- Leaderboard / attendance board ---------- */
.lb > * { display: grid; grid-template-columns: 28px 34px 1fr auto; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.lb > *:last-child { border-bottom: 0; }
.lb .rank { color: var(--fg-3); font-size: 18px; }
.lb .first .rank { color: var(--red-hi); }
.lb .pts { font-size: 20px; }
.lb .pts.neg { color: var(--red-hi); }
.att { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.att > div { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-solid); position: relative; }
.att .t { flex: 1; min-width: 0; line-height: 1.35; }
.att .t b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att .t span { font-size: 12px; color: var(--fg-3); }
.att .in .avatar, .att .late .avatar { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px var(--fg); }
.att .late, .att .missing { border-color: var(--red-line); }
.att .missing { background: var(--red-soft); }
.att .late .avatar { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px var(--red); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fg-2); font-weight: 600; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 var(--red-line); animation: livep 1.8s infinite; }
@keyframes livep { 70% { box-shadow: 0 0 0 7px transparent; } }

.chart-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 140px; }
.chart-week .c { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-week .b { width: 100%; max-width: 30px; display: flex; flex-direction: column-reverse; border-radius: 7px; overflow: hidden; background: var(--surface-3); transform-origin: bottom; transform: scaleY(0); transition: transform .9s var(--ease) calc(var(--i, 0) * 60ms); }
.chart-week.in .b { transform: scaleY(1); }
.chart-week .b .p { background: var(--fg); }
.chart-week .b .l { background: var(--red); }
.chart-week span { font-size: 11px; color: var(--fg-3); }

/* ---------- Client sections (tiles) & links ---------- */
.tiles { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 210px; padding: var(--pad); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: border-color .25s, transform .35s var(--ease);
}
[data-theme="light"] .tile { box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.tile:hover { transform: translateY(-3px); }
.tile .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--fg); transition: background .3s, color .3s, border-color .3s; }
.tile .ico svg { width: 22px; height: 22px; }
.tile:hover .ico { background: var(--red); border-color: var(--red); color: #fff; }
.tile .count { position: absolute; top: var(--pad); left: var(--pad); font-size: 34px; line-height: 1; color: var(--fg-3); transition: color .3s; }
.tile:hover .count { color: var(--fg); }
.tile h3 { font-size: 17px; }
.tile p { margin: 4px 0 0; font-size: 13px; color: var(--fg-3); }
.tile .chips { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.tile .chips span { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 8px; background: var(--surface-2); font-size: 12px; color: var(--fg-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .chips svg { width: 13px; height: 13px; }
.tile.add { border-style: dashed; align-items: center; justify-content: center; text-align: center; color: var(--fg-2); cursor: pointer; background: transparent; }
.tile.add .ico { margin: 0 auto; }

.links { display: flex; flex-direction: column; gap: 10px; }
.lrow {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-solid); transition: border-color .2s, transform .3s var(--ease);
}
.lrow:hover { border-color: var(--line-2); transform: translateX(-3px); }
.lrow .pf { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--fg); }
.lrow .pf svg { width: 22px; height: 22px; }
.lrow b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .host { font-size: 12px; color: var(--fg-3); direction: ltr; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .nt { font-size: 13px; color: var(--fg-2); margin-top: 4px; white-space: pre-wrap; }
.lrow .acts { display: flex; gap: 6px; }
.secnav a { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border-radius: var(--r-md); color: var(--fg-2); font-weight: 600; font-size: 14px; }
.secnav a:hover { background: var(--surface-2); color: var(--fg); }
.secnav a.on { background: var(--inv-bg); color: var(--inv-fg); }
.secnav a .n { margin-inline-start: auto; font-size: 12px; opacity: .7; }
.addlink { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) auto; gap: 10px; }

/* ---------- Tasks by category ---------- */
.cats { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); align-items: start; }
.cat-h { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.cat-h .ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--inv-bg); color: var(--inv-fg); flex: none; }
.cat-h .ico svg { width: 22px; height: 22px; }
.num.big { font-size: 40px; line-height: 1; }
.cgroup { border-bottom: 1px solid var(--line); }
.cgroup:last-child { border-bottom: 0; }
.cgroup summary { display: flex; align-items: center; gap: 8px; padding: 12px 0; cursor: pointer; list-style: none; font-size: 14px; }
.cgroup summary::-webkit-details-marker { display: none; }
.cgroup summary::after { content: ""; margin-inline-start: auto; width: 8px; height: 8px; border-inline-start: 2px solid var(--fg-3); border-bottom: 2px solid var(--fg-3); transform: rotate(-45deg); transition: transform .25s; }
.cgroup[open] summary::after { transform: rotate(-135deg); }
.trow { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin: 0 -10px; border-radius: 10px; transition: background .15s; }
.trow:hover { background: var(--surface-2); }
.trow .t { flex: 1; min-width: 0; line-height: 1.35; }
.trow .t b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .t span { font-size: 12px; color: var(--fg-3); }
.trow:last-child { margin-bottom: 8px; }
.st { width: 10px; height: 10px; border-radius: 50%; flex: none; border: 2px solid var(--fg-3); }
.st-doing { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.st-review { border-color: var(--fg); background: transparent; box-shadow: inset 0 0 0 2px var(--surface-solid), inset 0 0 0 5px var(--fg); }
.st-done { border-color: var(--fg); background: var(--fg); }
.timer { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 8px; background: var(--surface-2); color: var(--fg-2); font-size: 12px; white-space: nowrap; flex: none; }
.timer svg { width: 13px; height: 13px; }
.timer b { font-weight: 600; font-variant-numeric: tabular-nums; }
.timer.run { color: var(--fg); background: var(--surface-3); }
.timer.run svg { color: var(--red-hi); animation: pulse 1.6s infinite; }
.timer.over { color: #fff; background: var(--red); }
.timer.over svg { color: #fff; }
.timer.done { color: var(--fg-3); }
.countdown .cd-num { font-size: clamp(40px, 4vw, 56px); line-height: 1; text-align: center; padding: 6px 0; }
.countdown.run .cd-num { color: var(--fg); }
.countdown.over { border-color: var(--red-line); }
.countdown.over .cd-num { color: var(--red-hi); }

/* ---------- Deliverables («كام من كام») ---------- */
.deliv { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.ring { --v: 0; width: 84px; height: 84px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--red) calc(var(--v) * 1%), var(--surface-3) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface-solid); }
.ring b { position: relative; font-size: 20px; }
.dl { display: grid; gap: 12px; margin-top: 18px; }
.dl-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.dl-row svg { width: 18px; height: 18px; color: var(--fg-2); }
.dl-row .bar { grid-column: 2 / -1; margin-top: -4px; }
.dl-row .num { font-size: 15px; }
.dl-row.full .num { color: var(--fg-3); }

/* plan editor */
.plan-row { display: grid; grid-template-columns: 170px minmax(0, 1.4fr) 90px 90px minmax(0, 1fr) 40px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plan-head { font-size: 12px; color: var(--fg-3); font-weight: 600; border-bottom: 1px solid var(--line); padding-bottom: 8px; }

/* perspective */
.pv { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.pv .card { display: flex; flex-direction: column; gap: 14px; }
.pv .scr { display: flex; flex-wrap: wrap; gap: 5px; }
.pv .scr span { font-size: 11px; height: 22px; padding: 0 8px; border-radius: 7px; background: var(--surface-2); display: inline-flex; align-items: center; color: var(--fg-2); }
.viewas { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; padding: 10px 12px 10px 18px; border-radius: 16px; background: var(--red); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 18px 50px -10px var(--red); width: max-content; max-width: calc(100% - 24px); }
@media (max-width: 980px) { .viewas { bottom: 84px; font-size: 13px; } }
.viewas button { background: #fff; color: #000; border: 0; height: 32px; padding: 0 14px; border-radius: 9px; font-weight: 800; cursor: pointer; }

/* ---------- Brand hub ---------- */
.trait { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.trait b { font-size: 15px; }
.swatches { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.swatch { position: relative; height: 150px; border-radius: var(--r-md); border: 1px solid var(--line-2); padding: 14px; display: flex; flex-direction: column; text-align: start; cursor: pointer; transition: transform .3s var(--ease); font: inherit; }
.swatch:hover { transform: translateY(-4px); }
.swatch .role { font-size: 11px; opacity: .75; }
.swatch b { margin-top: auto; font-size: 15px; }
.swatch .hex { font-size: 13px; opacity: .85; font-variant-numeric: tabular-nums; }
.swatch .cr { position: absolute; top: 12px; left: 12px; font-size: 11px; opacity: .75; }
.logo-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: repeating-conic-gradient(var(--surface-2) 0% 25%, transparent 0% 50%) 50% / 18px 18px; }
.logo-tile + .logo-tile { margin-top: 10px; }
.logo-tile img { max-height: 120px; object-fit: contain; }
.fontrow { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fontrow:last-child { border-bottom: 0; }
.fontrow .spec { font-size: 30px; line-height: 1.3; min-width: min(100%, 320px); }
.dim-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--fg-2); padding: 7px 0; }
.dim-row > span { width: 52px; flex: none; }
.dim-row > span:last-child { text-align: left; }
.dim-track { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-3); position: relative; }
.dim-track i { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px -7px 0; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rules li { position: relative; padding-inline-start: 22px; }
.rules li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .65em; width: 8px; height: 2px; background: var(--red); }
.rules.ok li::before { background: var(--fg); height: 8px; top: .5em; border-radius: 50%; }
.rules.no li::before { width: 10px; transform: rotate(45deg); box-shadow: 0 0 0 0 transparent; }
.rules.no li::after { content: ""; position: absolute; inset-inline-start: 2px; top: .65em; width: 10px; height: 2px; background: var(--red); transform: rotate(-45deg); }
.ban { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 13px; }
.ban s { color: var(--fg-3); text-decoration-color: var(--red); }
.ban svg { width: 12px; height: 12px; color: var(--fg-3); }
.pairs { display: grid; gap: 12px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pair > div { padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); line-height: 1.7; }
.pair span { display: block; font-size: 11px; font-weight: 800; margin-bottom: 4px; color: var(--fg-3); }
.pair .do { border-color: var(--line-2); background: var(--surface-2); }
.pair .dont { color: var(--fg-3); text-decoration: line-through; text-decoration-color: var(--red-line); }
.pair .dont span { color: var(--red-hi); text-decoration: none; display: block; }
.sample { margin: 0; padding: 16px; border-radius: var(--r-md); border: 1px solid var(--line); border-inline-start: 3px solid var(--red); white-space: pre-wrap; font-size: 14px; line-height: 1.8; }
.checks { display: grid; gap: 4px; }
.checks label { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.checks label:hover { background: var(--surface-2); }
.checks input { width: 20px; height: 20px; accent-color: var(--red); flex: none; margin-top: 2px; }
.checks input:checked + span { color: var(--fg-3); text-decoration: line-through; }
.rep-row { display: grid; gap: 8px; align-items: center; padding: 6px 0; }
.rep-row.r2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; }
.rep-row.r3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 40px; }
.rep-row.rc { grid-template-columns: 44px 110px minmax(0, 1fr) 110px auto 40px; }
.rep-row.rc .full { grid-column: 1 / -2; }
.cpick { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-md); background: none; cursor: pointer; }
@media (max-width: 980px) {
  .pair, .rep-row.r2, .rep-row.r3 { grid-template-columns: minmax(0, 1fr); }
  .rep-row.rc { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); }
  .rep-row.rc .full { grid-column: 1 / -1; }
}

/* activity */
.heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; min-width: 190px; direction: ltr; }
.heat i { height: 18px; border-radius: 3px; background: var(--surface-3); position: relative; overflow: hidden; }
.heat i::after { content: ""; position: absolute; inset: 0; background: var(--red); opacity: var(--a, 0); }
.online { position: absolute; bottom: -1px; inset-inline-end: -1px; width: 9px; height: 9px; border-radius: 50%; background: #2bd46a; box-shadow: 0 0 0 2px var(--surface-solid); }
.act-table tr.sel { background: var(--surface-2); }
.tline > div { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; position: relative; }
.tline > div:last-child { border-bottom: 0; }
.tline > div.action span:last-child { font-weight: 600; }
.tline > div.action::before { content: ""; position: absolute; inset-inline-start: -12px; top: 14px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.tline { max-height: 70vh; overflow-y: auto; padding-inline-start: 12px; }

/* ---------- Document (Notion-like) ---------- */
.doc { max-width: 860px; }
.doc-title { width: 100%; background: transparent; border: 0; outline: none; font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; line-height: 1.2; padding: 0; margin: 6px 0 10px; }
.doc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.blocks { font-size: 16px; line-height: 1.85; }
.blocks h1, .blocks h2, .blocks h3, .blocks h4 { font-weight: 800; margin: 1.4em 0 .4em; line-height: 1.3; }
.blocks h1 { font-size: 30px; } .blocks h2 { font-size: 23px; } .blocks h3 { font-size: 19px; }
.blocks p { margin: .45em 0; }
.blocks ul, .blocks ol { padding-inline-start: 1.4em; margin: .5em 0; }
.blocks li { margin: .2em 0; }
.blocks blockquote { margin: 1em 0; padding: 6px 18px; border-inline-start: 3px solid var(--red); color: var(--fg); background: var(--surface-2); border-radius: 0 10px 10px 0; }
.blocks blockquote cite { display: block; font-size: 13px; color: var(--fg-3); font-style: normal; }
.blocks hr { border: 0; text-align: center; margin: 1.6em 0; }
.blocks hr::after { content: "✦  ✦  ✦"; color: var(--fg-3); letter-spacing: .3em; }
.blocks .todo { list-style: none; padding: 0; }
.blocks .todo li { display: flex; gap: 10px; align-items: flex-start; }
.blocks .todo i { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--line-2); flex: none; margin-top: 6px; }
.blocks .todo .ok i { background: var(--red); border-color: var(--red); }
.blocks .todo .ok span { color: var(--fg-3); text-decoration: line-through; }
.blocks .tbl { overflow-x: auto; margin: 1em 0; border: 1px solid var(--line-2); border-radius: 12px; }
.blocks table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.6; }
.blocks td, .blocks th { border: 1px solid var(--line); padding: 10px 12px; vertical-align: top; text-align: start; min-width: 110px; }
.blocks th { background: var(--surface-2); font-weight: 800; }
.blocks mark { background: var(--red-soft); color: var(--fg); padding: 0 3px; border-radius: 3px; }
.blocks a { text-decoration: underline; text-decoration-color: var(--red); }

/* Editor.js, themed */
.editor { min-height: 300px; }
.codex-editor { color: var(--fg); }
.ce-block__content, .ce-toolbar__content { max-width: none; }
.ce-paragraph { line-height: 1.85; font-size: 16px; }
.ce-header { font-weight: 800; padding: .6em 0 .2em; }
h2.ce-header { font-size: 23px; } h3.ce-header { font-size: 19px; } h1.ce-header { font-size: 30px; }
.ce-toolbar__plus, .ce-toolbar__settings-btn { color: var(--fg-2); background: var(--surface-2); border-radius: 7px; }
.ce-toolbar__plus:hover, .ce-toolbar__settings-btn:hover { background: var(--surface-3); color: var(--fg); }
.ce-popover, .ce-popover__container, .ce-inline-toolbar, .ce-conversion-toolbar, .ce-settings { background: var(--surface-solid) !important; border-color: var(--line-2) !important; color: var(--fg); box-shadow: var(--shadow); }
.ce-popover-item:hover, .ce-inline-tool:hover, .ce-popover-item--focused { background: var(--surface-2) !important; }
.ce-popover-item__icon { background: var(--surface-2); box-shadow: none; color: var(--fg); }
.cdx-search-field { background: var(--field) !important; border-color: var(--line-2) !important; }
.ce-block--selected .ce-block__content { background: var(--red-soft); }
.tc-wrap { --color-border: var(--line-2); --color-background: var(--surface-solid); --color-text-secondary: var(--fg-3); }
.tc-table { color: var(--fg); }
.tc-row, .tc-cell { border-color: var(--line-2) !important; }
.tc-add-row, .tc-add-column { color: var(--fg-2); }
.tc-popover { background: var(--surface-solid); border-color: var(--line-2); }
.tc-table--heading .tc-row:first-child { background: var(--surface-2) !important; font-weight: 800; }
[dir="rtl"] .tc-table { direction: rtl; }
.cdx-quote { border-inline-start: 3px solid var(--red); padding-inline-start: 14px; }
.cdx-quote__text { min-height: 0 !important; }
.cdx-input { border-color: var(--line-2); box-shadow: none; background: var(--field); }
.cdx-checklist__item-checkbox { background: transparent !important; }
.cdx-checklist__item-checkbox-check { border: 2px solid var(--line-2) !important; background: transparent !important; border-radius: 6px !important; }
.cdx-checklist__item--checked .cdx-checklist__item-checkbox-check { background: var(--red) !important; border-color: var(--red) !important; color: #fff !important; }
.cdx-checklist__item-text { padding-inline-start: 4px; }
.ce-delimiter { color: var(--fg-3); }
[dir="rtl"] .ce-toolbar__actions { left: auto; right: 100%; padding-right: 0; padding-left: 5px; }
[dir="rtl"] .codex-editor--narrow .ce-toolbar__actions { left: auto; right: -5px; }

/* comments */
.thread > div { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.thread > div:last-child { border-bottom: 0; }
.thread .b { flex: 1; min-width: 0; }
.thread .b b { font-weight: 600; font-size: 14px; }
.thread .b p { margin: 4px 0 0; white-space: pre-wrap; color: var(--fg-2); font-size: 14px; }

/* permissions grid */
.perm th, .perm td { text-align: center; }
.perm td:first-child, .perm th:first-child { text-align: start; }
.perm .grp td { background: var(--surface-2); font-weight: 800; color: var(--fg); text-align: start; font-size: 13px; }
.perm input { width: 19px; height: 19px; accent-color: var(--red); cursor: pointer; }

/* reports */
.rep { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-solid); transition: border-color .2s; }
.rep:hover { border-color: var(--line-2); }
.rep + .rep { margin-top: 10px; }
.rep .ic { width: 44px; height: 54px; border-radius: 8px; background: var(--inv-bg); color: var(--inv-fg); display: grid; place-items: center; font-weight: 800; font-size: 11px; position: relative; flex: none; }
.rep .ic::after { content: ""; position: absolute; top: 0; inset-inline-end: 0; border: 7px solid; border-color: var(--surface-solid) var(--surface-solid) var(--fg-3) var(--fg-3); }
.rep .ic.txt { background: var(--surface-2); color: var(--fg); }
.rep .t { flex: 1; min-width: 0; }
.rep .t b { display: block; font-weight: 600; }
.rep .t span { font-size: 12px; color: var(--fg-3); }

/* dialog */
dialog { background: var(--surface-solid); color: var(--fg); border: 1px solid var(--line-2); border-radius: 20px; padding: 0; width: min(580px, calc(100% - 24px)); box-shadow: var(--shadow); }
dialog[open] { animation: pop .3s var(--ease); }
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } }
dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(6px); }
dialog .dh { display: flex; align-items: center; padding: 18px var(--pad); border-bottom: 1px solid var(--line); }
dialog .dh h2 { flex: 1; }
dialog .db { padding: var(--pad); max-height: 72vh; overflow-y: auto; }
dialog .df { padding: 14px var(--pad) 18px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login-art { position: relative; overflow: hidden; background: #000; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 48px; }
.login-art::before { content: ""; position: absolute; inset: -20%; background: linear-gradient(115deg, transparent 47.6%, var(--red) 47.7%, var(--red) 48.1%, transparent 48.2%); animation: cut 1.2s cubic-bezier(.7,0,.2,1) both; filter: drop-shadow(0 0 10px var(--red)); }
.login-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 70% 30%, rgba(225,6,0,.22), transparent 70%); }
@keyframes cut { from { transform: translateX(60%) translateY(-30%); opacity: 0; } }
.login-art > * { position: relative; z-index: 1; }
.login-art img { width: 120px; }
.login-art h2 { font-size: clamp(34px, 4.4vw, 62px); line-height: 1.08; font-weight: 800; max-width: 12ch; }
.login-art p { color: #9a9a9a; }
.login-form { display: grid; place-items: center; padding: 40px 24px; }
.login-form form { width: min(380px, 100%); }
/* login step 1: team or client */
.who { width: min(420px, 100%); }
.who-list { display: grid; gap: 12px; margin-top: 22px; }
.who-card { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); color: var(--fg); text-decoration: none; transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease); }
.who-card:hover, .who-card:focus-visible { border-color: var(--red-line); background: var(--red-soft); transform: translateY(-2px); outline: none; }
.who-ic { flex: none; width: 46px; height: 46px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--surface-2); }
.who-ic svg { width: 22px; height: 22px; }
.who-t { flex: 1; min-width: 0; display: grid; gap: 4px; }
.who-t b { font-size: 18px; font-weight: 800; }
.who-t span { font-size: 13px; color: var(--fg-2); line-height: 1.5; }
.who-card .who-go { flex: none; width: 18px; height: 18px; color: var(--fg-3); transition: transform .2s var(--ease), color .2s; }
.who-card:hover .who-go { color: var(--red); transform: translateX(-3px); }
.who-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--fg-2); padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 99px; }
.who-tag svg { width: 14px; height: 14px; }
.who-back { color: var(--fg-2); text-decoration: underline; text-underline-offset: 3px; justify-self: start; }
.who-back:hover { color: var(--fg); }

/* ---------- Client portal ---------- */
.ptop { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 70px; padding: 0 clamp(16px, 2.4vw, 40px); background: var(--bar-bg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.ptop .brand { border: 0; margin: 0; height: auto; padding: 0; }
.ptop nav { display: flex; gap: 4px; margin-inline-start: 18px; flex: 1; }
.ptop nav a { padding: 8px 14px; border-radius: 10px; color: var(--fg-2); font-weight: 600; font-size: 14px; }
.ptop nav a.on, .ptop nav a:hover { color: var(--fg); background: var(--surface-2); }
.pmain { padding: clamp(18px, 2.4vw, 40px); }
.hero-client { position: relative; overflow: hidden; border-radius: 22px; padding: clamp(22px, 3vw, 40px); background: var(--surface); border: 1px solid var(--line); }
.hero-client::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 120% at 100% 0%, var(--glow), transparent 60%); pointer-events: none; }
.hero-client > * { position: relative; }
.hero-client .big { font-size: clamp(48px, 6vw, 80px); line-height: 1; }

/* ---------- Reveal & motion helpers ---------- */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--d, 0) * 1ms); }
.rv.in { opacity: 1; transform: none; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .g4 > * { grid-column: span 6; }
  .split > :nth-child(odd), .split > :nth-child(even) { grid-column: span 12; }
  .c3, .c4 { grid-column: span 6 !important; } .c5, .c7, .c8, .c9 { grid-column: span 12 !important; }
}
@media (max-width: 980px) {
  :root { --side: 0px; --gap: 16px; --pad: 18px; }
  .side { display: none; }
  .main { margin: 0; }
  .top { height: 58px; }
  .top .mark-m { display: block; width: 24px; height: 24px; color: var(--fg); }
  .page { padding: 16px 16px 110px; }
  .phead { grid-template-columns: minmax(0, 1fr); align-items: start; min-height: 0; padding-bottom: 16px; }
  .phead .acts { justify-content: flex-start; }
  .g2 > *, .g3 > *, .c6 { grid-column: span 12 !important; }
  .form-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .punch { grid-template-columns: minmax(0, 1fr); text-align: center; gap: 20px; padding: 24px 18px; }
  .punch .punch-btn { margin: 0 auto; }
  .punch-meta { justify-content: center; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; inset-inline: 0; bottom: 0;
    background: var(--bar-bg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--fg-3); padding: 6px 0; background: none; border: 0; cursor: pointer; position: relative; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .on { color: var(--fg); }
  .tabbar .on::after { content: ""; position: absolute; top: -7px; width: 22px; height: 2px; background: var(--red); border-radius: 2px; box-shadow: 0 0 10px var(--red); }
  .sheet { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.5); display: none; }
  .sheet.open { display: block; }
  .sheet .in { position: absolute; inset-inline: 0; bottom: 0; background: var(--surface-solid); border-radius: 22px 22px 0 0; padding: 10px 14px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); max-height: 82vh; overflow-y: auto; animation: up .3s var(--ease); }
  .sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 4px auto 14px; }
  .sheet .nav a { height: 48px; font-size: 15px; }
  .table.stack-m thead { display: none; }
  .table.stack-m tr { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table.stack-m td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
  .table.stack-m td[data-l]::before { content: attr(data-l); color: var(--fg-3); font-size: 12px; }
  .board { grid-template-columns: repeat(4, 84%); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; min-height: 0; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-art { min-height: 300px; padding: 28px; }
  .ptop { height: 62px; }
  .ptop nav { display: none; }
  .pmain { padding: 16px 16px 110px; }
  dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .addlink { grid-template-columns: minmax(0, 1fr); }
  .plan-row { grid-template-columns: 1fr 1fr; }
  .plan-row > :nth-child(2), .plan-row > :nth-child(5) { grid-column: 1 / -1; }
  .plan-head { display: none; }
  .lrow { grid-template-columns: 44px minmax(0, 1fr); }
  .lrow .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .secnav { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .secnav a { flex: none; }
}
@media (max-width: 560px) {
  .g4 > * { grid-column: span 6 !important; }
  .stat { min-height: 118px; padding: 16px; }
  .stat .v { font-size: 30px; }
}
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
  .bar i, .strip i::after, .chart-week .b { transform: none !important; }
}

/* long labels on narrow screens */
.pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.card-h .pill, .card > .row > .pill { white-space: normal; height: auto; min-height: 24px; padding-block: 3px; line-height: 1.5; }
.btn.block { white-space: normal; height: auto; min-height: var(--tap); padding-block: 8px; line-height: 1.4; }

/* ---------- Onboarding circle ---------- */
.circle { position: relative; flex: none; }
.circle svg { width: 100%; height: 100%; overflow: visible; }
.circle .arc { stroke: var(--surface-3); transition: stroke .6s var(--ease) calc(var(--i) * 90ms), filter .6s; }
.circle .arc.on { stroke: var(--fg); }
.circle .arc.cur { stroke: var(--red); filter: drop-shadow(0 0 5px var(--red)); }
.circle.full .arc.on { stroke: var(--red); }
.circle .mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.circle .mid b { font-size: 2.6em; }
.circle .mid b span { font-size: .5em; color: var(--fg-3); }
.circle .mid small { font-size: 12px; color: var(--fg-3); margin-top: 4px; }
.circle[style*="width:44px"] .mid b, .circle.sm .mid b { font-size: 13px; }
.ob-side { position: sticky; top: calc(var(--top) + 16px); }
.ob-steps { display: grid; gap: 4px; width: 100%; }
.ob-steps button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: none; border: 1px solid transparent; cursor: pointer; text-align: start; color: var(--fg-2); font: inherit; transition: background .2s, border-color .2s; }
.ob-steps button:hover { background: var(--surface-2); }
.ob-steps button.on { border-color: var(--red-line); background: var(--red-soft); color: var(--fg); }
.ob-steps .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 12px; flex: none; }
.ob-steps button.done .n { background: var(--fg); color: var(--bg); }
.ob-steps .t { flex: 1; min-width: 0; line-height: 1.35; }
.ob-steps .t b { display: block; font-size: 14px; }
.ob-steps .t small { font-size: 11px; color: var(--fg-3); }
.ob-steps svg { width: 16px; height: 16px; flex: none; }
.brief { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.brief .card h3 { color: var(--fg-3); font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.brief .card p { margin: 0; white-space: pre-wrap; line-height: 1.8; }
.brief .card.big p { font-size: clamp(17px, 1.5vw, 22px); font-weight: 600; }
@media (max-width: 1280px) { .ob-side { position: static; } }

/* ---------- Claude on the company PC ---------- */
.pc-light { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); font-size: 12px; font-weight: 600; color: var(--fg-3); white-space: nowrap; }
.pc-light i { width: 8px; height: 8px; border-radius: 50%; background: var(--fg-3); flex: none; }
.pc-light.on { color: var(--fg); }
.pc-light.on i { background: #19c37d; box-shadow: 0 0 0 0 rgba(25, 195, 125, .6); animation: pcbeat 2.4s infinite; }
.pc-light b { min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; display: inline-grid; place-items: center; padding: 0 5px; }
@keyframes pcbeat { 0% { box-shadow: 0 0 0 0 rgba(25, 195, 125, .55); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
@media (max-width: 560px) { .pc-light span { display: none; } .pc-light { padding: 0 10px; } }

.pc-card .pc-state { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.pc-card .pc-state i { width: 14px; height: 14px; border-radius: 50%; background: var(--fg-3); flex: none; }
.pc-card.on .pc-state i { background: #19c37d; animation: pcbeat 2.4s infinite; }
.pc-card .pc-state b { display: block; font-size: 20px; }
.pc-card .pc-state small { color: var(--fg-3); font-size: 13px; }
.pc-dl, .ai-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0 0 14px; font-size: 14px; }
.pc-dl dt, .ai-dl dt { color: var(--fg-3); }
.pc-dl dd, .ai-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ai-dl dd em { color: var(--fg-3); font-style: normal; font-size: 12px; }
.ai-dl .sw { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.ai-dl .sw span { display: inline-flex; align-items: center; gap: 6px; }
.ai-dl .sw i { width: 16px; height: 16px; border-radius: 5px; border: 1px solid var(--line-2); }
.ai-q .ai-dot, .ai-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fg-3); flex: none; }
.ai-dot.s-queued { background: transparent; border: 2px solid var(--fg-3); }
.ai-dot.s-running { background: var(--red); animation: pcbeat 1.6s infinite; }
.ai-dot.s-done { background: var(--red); }
.ai-dot.s-applied { background: var(--fg); }
.ai-dot.s-failed { background: transparent; border: 2px solid var(--red); }

.ai-card { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 18px 20px; overflow: hidden; }
.ai-card::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--red), transparent); opacity: .9; }
.ai-card.s-done { border-color: var(--red-line); }
.ai-card.ai-new { animation: drop .5s var(--ease); }
.ai-h { display: flex; gap: 12px; align-items: flex-start; }
.ai-h b { display: block; font-size: 15px; line-height: 1.4; }
.ai-h small { display: block; color: var(--fg-3); font-size: 12.5px; margin-top: 2px; line-height: 1.5; }
.ai-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--inv-bg); color: var(--inv-fg); flex: none; }
.ai-ico svg { width: 18px; height: 18px; }
.ai-pulse { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--fg-3); margin-top: 6px; flex: none; }
.ai-pulse.live { border: 0; background: var(--red); animation: pcbeat 1.6s infinite; }
.ai-ask { display: grid; gap: 10px; margin-top: 14px; justify-items: start; }
.ai-ask .input { width: 100%; }
.ai-ask textarea.input { min-height: 74px; }
.ai-wait { margin-top: 14px; }
.ai-wait p { margin: 10px 0 4px; }
.ai-bar { height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.ai-bar i { display: block; height: 100%; width: 38%; background: linear-gradient(90deg, transparent, var(--red), transparent); animation: aiflow 1.6s var(--ease) infinite; }
.s-queued .ai-bar i { animation-duration: 3.2s; opacity: .5; }
@keyframes aiflow { from { transform: translateX(170%); } to { transform: translateX(-270%); } }
.ai-result { margin-top: 14px; display: grid; gap: 12px; }
.ai-sum { margin: 0; line-height: 1.7; }
.ai-sum .pill { margin-inline-end: 6px; }
.ai-err { color: var(--red-hi); margin: 12px 0; }
.ai-foot { margin: 8px 0 0; }
.ai-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ai-list li { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; background: var(--surface-2); }
.ai-list .check { align-items: flex-start; font-weight: 400; min-height: 0; width: 100%; }
.ai-list .check input { margin-top: 5px; }
.ai-list span { line-height: 1.7; }
.ai-list s { color: var(--fg-3); text-decoration-color: var(--red); }
.ai-list b { font-weight: 700; }
.ai-list small { display: block; color: var(--fg-3); font-size: 12px; }
.ai-quote { margin: 0; padding: 10px 16px; border-inline-start: 3px solid var(--red); background: var(--surface-2); border-radius: 0 10px 10px 0; white-space: pre-wrap; line-height: 1.8; }
.ai-bul { margin: 0; padding-inline-start: 1.2em; line-height: 1.8; }
.ai-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ai-kpis div { border-top: 3px solid var(--fg); padding-top: 8px; }
.ai-kpis div:first-child { border-color: var(--red); }
.ai-kpis b { font-size: 22px; display: block; }
.ai-kpis small { color: var(--fg-3); font-size: 12px; }
.mb { margin-bottom: var(--gap); }

/* ---------- Script review: the client marks text ---------- */
.rev { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: calc(var(--gap) * 1.5); align-items: start; max-width: 1280px; margin: 0 auto; }
.rev-doc { max-width: none; }
.rev-side { position: sticky; top: calc(var(--top, 72px) + 16px); display: grid; gap: 16px; max-height: calc(100vh - 110px); overflow: auto; padding-bottom: 8px; scrollbar-width: thin; }
.rev-panel { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 18px; }
.rev-panel-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rev-panel-h h2 { font-size: 16px; }
.mk-count { min-width: 28px; height: 28px; border-radius: 14px; display: inline-grid; place-items: center; background: var(--surface-3); font-size: 13px; padding: 0 8px; transition: background .3s, color .3s; }
.has .mk-count { background: var(--red); color: #fff; }
.rev-hint { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center; border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 14px 16px; margin: 6px 0 18px; }
.rev-hint p { margin: 0; font-size: 14px; color: var(--fg-2); line-height: 1.7; }
.rev-hint p b { color: var(--fg); }
.rev-hint-ico { width: 38px; height: 38px; border-radius: 12px; background: var(--red); color: #fff; display: grid; place-items: center; grid-row: span 2; }
.rev-hint-ico svg { width: 19px; height: 19px; }
.rev-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--fg-3); flex-wrap: wrap; }
.rev-legend span { position: relative; }
.lg-del { text-decoration: line-through 2px var(--red); }
.lg-rep::after { content: "← جديد"; margin-inline-start: 4px; background: var(--inv-bg); color: var(--inv-fg); border-radius: 5px; padding: 0 5px; font-size: 11px; }
.lg-com { background: linear-gradient(transparent 60%, rgba(225, 6, 0, .3) 60%); }
.rev-ok { width: 40px; height: 40px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; flex: none; }
.rev.can #doc { cursor: text; }
.rev.can #doc ::selection { background: rgba(225, 6, 0, .28); }

#doc mark.mk { background: none; color: inherit; padding: 0; border-radius: 3px; cursor: pointer; transition: background .25s, box-shadow .25s; }
#doc mark.mk-delete { background: var(--red-soft); text-decoration: line-through 2px var(--red); }
#doc mark.mk-replace { text-decoration: line-through 2px var(--red); color: var(--fg-3); }
#doc mark.mk-replace.mk-end::after { content: "← " attr(data-rep); margin-inline-start: 6px; padding: 0 8px; border-radius: 7px; background: var(--inv-bg); color: var(--inv-fg); font-size: .86em; font-weight: 600; line-height: 1.7; text-decoration: none; display: inline-block; max-width: 100%; white-space: normal; vertical-align: baseline; }
#doc mark.mk-comment { background: linear-gradient(transparent 58%, rgba(225, 6, 0, .3) 58%); }
#doc mark.mk-delete.mk-end::after, #doc mark.mk-comment.mk-end::after { content: attr(data-n); display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-inline-start: 3px; border-radius: 9px; background: var(--red); color: #fff; font: 700 10px/1 Montserrat, sans-serif; vertical-align: super; text-decoration: none; }
#doc mark.mk.hot { box-shadow: 0 0 0 2px var(--red); background-color: var(--red-soft); }
#doc mark.mk-closed { text-decoration: none; background: none; color: inherit; }
#doc mark.mk-closed.mk-end::after { opacity: .45; }

.mk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mk-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; padding: 11px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; transition: border-color .2s, transform .25s var(--ease), background .2s; animation: drop .4s var(--ease); }
.mk-item:hover, .mk-item.hot { border-color: var(--red-line); }
.mk-item.hot { transform: translateX(-3px); }
.mk-item .n { width: 22px; height: 22px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; font: 700 11px Montserrat, sans-serif; margin-top: 2px; }
.mk-item.a-delete .n, .mk-item.a-comment .n { background: var(--red); color: #fff; }
.mk-item .b { min-width: 0; position: relative; }
.mk-item .lab { font-size: 11.5px; font-weight: 700; color: var(--fg-3); margin-inline-end: 6px; }
.mk-item .pill { height: 18px; font-size: 10.5px; }
.mk-item .q { margin-top: 3px; line-height: 1.65; font-size: 14px; overflow-wrap: anywhere; }
.mk-item s { text-decoration-color: var(--red); color: var(--fg-3); }
.mk-item q { quotes: "«" "»"; color: var(--fg-2); }
.mk-item .arrow { margin: 0 6px; color: var(--red-hi); }
.mk-item p { margin: 4px 0 0; font-size: 13px; color: var(--fg-2); white-space: pre-wrap; }
.mk-item .who { display: block; font-size: 11.5px; color: var(--fg-3); margin-top: 4px; }
.mk-item .acts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mk-item .acts .btn.sm { height: 30px; font-size: 12px; padding: 0 10px; }
.mk-item.closed { opacity: .6; }
.mk-item.lost { border-style: dashed; }
.mk-x { position: absolute; inset-inline-end: -4px; top: -4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: none; color: var(--fg-3); font-size: 18px; line-height: 1; cursor: pointer; }
.mk-x:hover { color: var(--red-hi); background: var(--surface-3); }
.mk-item .mk-x { inset-inline-end: 4px; top: 6px; position: absolute; }
.mk-item { position: relative; padding-inline-end: 34px; }
.mk-empty { text-align: center; padding: 10px 4px 2px; }
.mk-empty p { margin: 10px 0 0; }
.mk-demo { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-3); }
.mk-demo span:first-child { background: rgba(225, 6, 0, .22); padding: 1px 6px; border-radius: 4px; color: var(--fg); }
.mk-demo i { width: 18px; height: 1px; background: var(--line-2); }

.mk-bar { position: absolute; z-index: 85; display: inline-flex; gap: 2px; padding: 5px; border-radius: 14px; background: var(--inv-bg); color: var(--inv-fg); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .55); opacity: 0; transform: translateY(6px) scale(.96); transition: opacity .18s, transform .22s var(--ease); }
.mk-bar.in { opacity: 1; transform: none; }
.mk-bar::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: var(--inv-bg); transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.mk-bar button { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border: 0; border-radius: 10px; background: none; color: inherit; font: 600 13.5px inherit; font-family: inherit; cursor: pointer; transition: background .15s; }
.mk-bar button:hover { background: rgba(127, 127, 127, .18); }
.mk-bar i { width: 9px; height: 9px; border-radius: 50%; }
.mk-bar i.d { background: var(--red); }
.mk-bar i.r { background: none; border: 2px solid currentColor; }
.mk-bar i.c { background: linear-gradient(transparent 50%, var(--red) 50%); border-radius: 2px; }
.mk-pop { position: absolute; z-index: 86; width: 360px; max-width: calc(100vw - 24px); border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--surface-solid, var(--bg)); box-shadow: var(--shadow); padding: 14px; opacity: 0; transform: translateY(-6px); transition: opacity .18s, transform .22s var(--ease); }
.mk-pop.in { opacity: 1; transform: none; }
.mk-pop form { display: grid; gap: 10px; }
.mk-pop-h { display: flex; align-items: center; justify-content: space-between; position: relative; }
.mk-pop-h b { font-size: 14px; }
.mk-pop-h .mk-x { position: static; }
.mk-pop-q { font-size: 14px; line-height: 1.7; max-height: 96px; overflow: auto; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.mk-pop-q s { text-decoration: line-through 2px var(--red); color: var(--fg-3); }
.mk-pop-q q { quotes: "«" "»"; }
.mk-pop textarea.input { min-height: 84px; }
.mk-bar.dock { position: fixed; left: 50% !important; top: auto !important; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(8px); }
.mk-bar.dock.in { transform: translateX(-50%); }
.mk-bar.dock::after { display: none; }
.mk-pop.dock { position: fixed; left: 12px !important; right: 12px; top: auto !important; bottom: calc(80px + env(safe-area-inset-bottom)); width: auto; max-width: none; }
.btn-n { min-width: 22px; height: 22px; border-radius: 11px; background: rgba(255, 255, 255, .22); display: inline-grid; place-items: center; font-size: 12px; padding: 0 6px; }
.mk-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; line-height: 1.6; }
.mk-mini li { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.mk-mini .lab { font-size: 11px; font-weight: 700; color: var(--fg-3); margin-inline-end: 6px; }
.mk-mini s { text-decoration-color: var(--red); color: var(--fg-3); }
.mk-mini small { display: block; color: var(--fg-3); }
@media (max-width: 1100px) {
  .rev { grid-template-columns: minmax(0, 1fr); }
  .rev-side { position: static; max-height: none; overflow: visible; }
}

/* ---------- Attendance window: timers and locked states ---------- */
.punch-btn.locked { cursor: default; opacity: .9; }
.punch-btn.locked:hover { transform: none; }
.punch-btn:disabled { cursor: default; }
.cd-line { margin-top: 14px; font-size: 14px; color: var(--fg-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.cd-line b { font-size: 20px; color: var(--fg); letter-spacing: .02em; }
.cd-line.warn { color: #f5b301; }
.cd-line.warn b { color: #f5b301; }
.cd-bar { height: 4px; border-radius: 4px; background: var(--surface-3); margin-top: 10px; overflow: hidden; max-width: 420px; }
.cd-bar i { display: block; height: 100%; width: var(--p, 0%); background: linear-gradient(90deg, #19c37d, #f5b301 40%, var(--red)); transition: width 1s linear; }
.punch.st-closed .punch-btn svg { color: var(--fg-3); }
.punch.st-before .punch-btn svg, .punch.st-working .punch-btn svg { color: var(--fg-2); }
@media (max-width: 980px) { .cd-line { justify-content: center; } .cd-bar { margin-inline: auto; } }

/* ---------- Coloured dots (the team's points) ---------- */
.d { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; vertical-align: middle; }
.d.green { background: #19c37d; }
.d.yellow { background: #f5b301; }
.d.black { background: #000; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); }
[data-theme="light"] .d.black { box-shadow: none; background: #0a0a0a; }
.d.none { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.d.today { outline: 2px solid var(--fg-3); outline-offset: 2px; }
.dots-card { display: flex; flex-direction: column; }
.dot-count { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dot-count div { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; display: grid; gap: 4px; justify-items: start; }
.dot-count b { font-size: 30px; line-height: 1; }
.dot-count small { font-size: 12px; color: var(--fg-3); }
.dot-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.dot-row .d { width: 14px; height: 14px; }
.dot-mini { display: inline-flex; align-items: center; gap: 5px; font: 700 13px Montserrat, sans-serif; direction: ltr; }
.dot-mini .d { width: 10px; height: 10px; margin-inline-start: 6px; }
.att > div.absent .avatar { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px #000; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 60%; }
.day-reports .list > div { align-items: flex-start; }

/* closing the day */
.day-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.day-chips label { cursor: pointer; }
.day-chips input { position: absolute; opacity: 0; pointer-events: none; }
.day-chips span { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); font-weight: 600; font-size: 14px; transition: background .15s, border-color .15s, color .15s, transform .15s var(--ease); }
.day-chips span::before { content: ""; width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--line-2); transition: all .15s; }
.day-chips input:checked + span { background: var(--inv-bg); color: var(--inv-fg); border-color: var(--inv-bg); }
.day-chips input:checked + span::before { background: var(--red); border-color: var(--red); }
.day-chips label:active span { transform: scale(.97); }

/* ---------- Client notes ---------- */
.note-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--fg); font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; transition: background .15s, border-color .15s; }
.note-btn:hover { border-color: var(--red-line); background: var(--red-soft); }
.note-btn svg { width: 17px; height: 17px; }
.note-btn b { min-width: 20px; height: 20px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 5px; }
@media (max-width: 560px) { .note-btn span { display: none; } .note-btn { padding: 0 11px; } }
.notes-sheet .db { display: grid; gap: 18px; }
.note-form { display: grid; gap: 10px; }
.note-form textarea.input { min-height: 96px; }
.note-to { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.note-to label { cursor: pointer; }
.note-to input { position: absolute; opacity: 0; pointer-events: none; }
.note-to span { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--fg-2); transition: all .15s; }
.note-to .tiny { border: 0; padding: 0 4px 0 0; height: auto; }
.note-to input:checked + span { background: var(--inv-bg); color: var(--inv-fg); border-color: var(--inv-bg); }
.note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.note-list li { padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); border-inline-start: 3px solid var(--red); }
.note-list li.done { border-color: #19c37d; opacity: .75; }
.note-list li.new { animation: drop .4s var(--ease); }
.note-list p { margin: 0 0 4px; white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.notes-in .list > div { align-items: flex-start; }
.notes-in .list .t b { font-weight: 600; line-height: 1.6; }

/* ---------- Client stages: big dots and small dots between ---------- */
.flow { --dot: 30px; }
.flow .fs { position: relative; }
.flow .big { width: var(--dot); height: var(--dot); border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-2); background: var(--bg); color: var(--inv-fg); flex: none; transition: all .3s; }
.flow .big svg { width: 15px; height: 15px; }
.flow .fs.done .big { background: var(--fg); border-color: var(--fg); }
.flow .fs.doing .big { border-color: var(--red); box-shadow: 0 0 0 6px var(--red-soft); }
.flow .fs.doing .big::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pcbeat 1.6s infinite; }
.flow .fgap { display: flex; align-items: center; justify-content: center; gap: 6px; }
.flow .fgap i { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); flex: none; }
.flow .fgap.done i { background: var(--fg); }
.flow .fgap.live i { background: var(--red); animation: hop 1.4s var(--ease) infinite; }
.flow .fgap.live i:nth-child(2) { animation-delay: .18s; }
.flow .fgap.live i:nth-child(3) { animation-delay: .36s; }
@keyframes hop { 0%, 100% { opacity: .25; transform: scale(.8); } 45% { opacity: 1; transform: scale(1.25); } }
.flow.h { display: flex; align-items: flex-start; }
.flow.h .fs { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 92px; flex: none; text-align: center; }
.flow.h .fs span { font-size: 12.5px; font-weight: 600; color: var(--fg-3); line-height: 1.4; }
.flow.h .fs.done span, .flow.h .fs.doing span { color: var(--fg); }
.flow.h .fgap { flex: 1; min-width: 24px; height: var(--dot); margin: 0 -26px; }
.flow.v .fs { display: flex; gap: 14px; align-items: flex-start; }
.flow.v .fx { padding-top: 3px; min-width: 0; }
.flow.v .fx b { display: block; font-size: 15px; }
.flow.v .fx .meta { font-size: 12.5px; color: var(--fg-3); margin-top: 2px; }
.flow.v .fx .note { font-size: 13px; color: var(--fg-2); margin-top: 6px; padding: 8px 10px; background: var(--surface-2); border-radius: 10px; }
.flow.v .fs.pending .fx b { color: var(--fg-3); font-weight: 600; }
.flow.v .fgap { flex-direction: column; width: var(--dot); padding: 8px 0; gap: 5px; }
@media (max-width: 860px) { .flow.h { display: none; } }
/* ---------- the team's chat room (3 Dec) ---------- */
.chat { display: flex; flex-direction: column; }
.chat .card-h h2 { display: inline-flex; align-items: center; gap: 8px; }
.chat .card-h h2 svg { width: 18px; height: 18px; color: var(--red); }
.chat-list { height: 360px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; display: flex; flex-direction: column; gap: 2px; padding: 4px 2px 10px; }
.chat.full .chat-list { height: calc(100vh - 330px); min-height: 380px; }
.chat-empty { margin: auto; }
.chat-day { display: flex; justify-content: center; margin: 12px 0 6px; }
.chat-day span { font-size: 11.5px; color: var(--fg-3); padding: 3px 12px; border: 1px solid var(--line); border-radius: 99px; }
.chat-msg { display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; border-radius: var(--r-md); transition: background .6s; }
.chat-msg.cont { padding-top: 0; }
.chat-msg:hover { background: var(--surface-2); }
.chat-msg.tome { background: var(--red-soft); box-shadow: inset 3px 0 0 var(--red); }
[dir="rtl"] .chat-msg.tome { box-shadow: inset -3px 0 0 var(--red); }
.chat-msg.hl { animation: chatFlash 2.4s ease; }
@keyframes chatFlash { 0%, 35% { background: rgba(225, 6, 0, .28); } 100% { background: transparent; } }
.chat-av { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--c, #4a4a4a); }
.chat-av.sp { visibility: hidden; height: 0; }
.chat-b { min-width: 0; flex: 1; }
.chat-who { display: flex; align-items: baseline; gap: 8px; }
.chat-who b { font-size: 13.5px; }
.chat-who span { font-size: 11px; color: var(--fg-3); }
.chat-msg.mine .chat-who b { color: var(--red); }
.chat-t { font-size: 14px; line-height: 1.65; white-space: normal; overflow-wrap: anywhere; }
.chat-t a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
.chat-t .at { color: var(--red); font-weight: 700; }
.chat-t .at.me { background: var(--red); color: #fff; padding: 0 5px; border-radius: 6px; }
.chat-form { position: relative; display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1; resize: none; min-height: 44px; max-height: 140px; line-height: 1.5; padding-top: 11px; overflow-y: auto; scrollbar-width: none; }
.chat-form textarea::-webkit-scrollbar { display: none; }
.chat-form .btn { height: 44px; width: 48px; padding: 0; justify-content: center; flex: none; }
.chat-at { position: absolute; bottom: calc(100% + 4px); inset-inline-start: 0; width: min(280px, 100%); background: var(--surface-solid); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 6px; z-index: 30; display: grid; gap: 2px; }
.chat-at button { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: var(--fg); font: inherit; font-size: 14px; cursor: pointer; text-align: start; }
.chat-at button.on, .chat-at button:hover { background: var(--red-soft); }
.chat-at .chat-av { width: 26px; height: 26px; font-size: 11px; }
/* mention bubbles: pinned on top of the chat until he opens them */
.chat-pins { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-pins:not(:empty) { margin-bottom: 10px; }
.pin { display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 8px 14px 8px 8px; border: 1px solid var(--red-line); border-radius: 99px; background: var(--red-soft); color: var(--fg); font: inherit; cursor: pointer; text-align: start; animation: pinIn .35s var(--ease) both; box-shadow: 0 0 0 0 rgba(225, 6, 0, .4); }
[dir="rtl"] .pin { padding: 8px 8px 8px 14px; }
.pin:hover { border-color: var(--red); }
.pin .chat-av { width: 30px; height: 30px; background: var(--red); animation: pinPulse 2s ease-in-out infinite; }
.pin-t { display: grid; min-width: 0; line-height: 1.3; }
.pin-t b { font-size: 13px; }
.pin-t span { font-size: 12px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46ch; }
.pin-ago { font-size: 11px; color: var(--fg-3); white-space: nowrap; }
.pin.gone { opacity: .4; pointer-events: none; }
@keyframes pinIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pinPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(225, 6, 0, .55); } 50% { box-shadow: 0 0 0 6px rgba(225, 6, 0, 0); } }
.mention-float { position: fixed; z-index: 80; top: calc(var(--top) + 12px); left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); display: grid; gap: 8px; }
.mention-float .pin { background: var(--surface-solid); box-shadow: var(--shadow); }
.mention-float[hidden] { display: none; }
.nav-badge { margin-inline-start: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; display: inline-grid; place-items: center; font-style: normal; }
.nav-badge[hidden] { display: none; }
@media (max-width: 760px) { .chat-list { height: 52vh; } .pin-t span { max-width: 24ch; } }

/* English client pages (left to right): arrows point forward, the language button */
[dir="ltr"] svg[data-i="arrow"], [dir="ltr"] svg[data-i="send"] { transform: scaleX(-1); }
[dir="ltr"] .who-card:hover .who-go { transform: scaleX(-1) translateX(-3px); }
[dir="ltr"] .chev, [dir="ltr"] .back-arrow { transform: scaleX(-1); }
.lang-form { display: contents; }
@media (max-width: 760px) { .ptop > .avatar { display: none; } } /* phones: «حسابي» is in the bottom bar, the top bar keeps room for EN/ع */
.lang-btn { font: 700 12px/1 "LC Sans", sans-serif; letter-spacing: .08em; }
.lang-btn[lang="ar"] { font-size: 16px; letter-spacing: 0; padding-bottom: 4px; }
.login-form { position: relative; }
.login-lang { position: absolute; top: 18px; inset-inline-end: 18px; }
.login-lang .lang-btn { height: 36px; min-width: 42px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: none; color: var(--fg); cursor: pointer; }
.login-lang .lang-btn:hover { border-color: var(--red-line); color: var(--red); }
body.en .muted, body.en p { line-height: 1.6; }
/* a person's open tasks on his account page: status, move to someone, new deadline */
.task-fix { display: grid; gap: 8px; }
.tf-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.tf-row.late { border-color: var(--red-line); background: var(--red-soft); }
.tf-row .t { display: grid; gap: 2px; min-width: 0; color: var(--fg); text-decoration: none; }
.tf-row .t b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-row .t span { font-size: 12px; color: var(--fg-3); }
.tf-row.late .t span { color: var(--red); }
.tf-row select.input, .tf-row input.input { height: 34px; font-size: 13px; width: auto; }
.tf-move { display: flex; gap: 6px; align-items: center; }
@media (max-width: 860px) { .tf-row { grid-template-columns: minmax(0, 1fr); } .tf-move { flex-wrap: wrap; } }
/* dashboard lists sized to their content, scrolling past ~6 rows */
.scroll-box { max-height: 352px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-inline-end: 4px; }
.att.att-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.att.att-list > div { padding: 9px 12px; }
.clock .ampm { font-size: .3em; margin-left: .3em; letter-spacing: .04em; color: var(--fg-3); font-weight: 700; }
/* the shoot day set with the client lights its circle: the day's number inside, the date under it */
.flow .fs.shoot .big { border-color: var(--red); background: var(--red); color: #fff; box-shadow: 0 0 0 6px var(--red-soft), 0 0 22px rgba(225, 6, 0, .45); }
.flow .fs.shoot .big b { font-size: 13px; font-weight: 800; line-height: 1; }
.flow.h .fs.shoot span { color: var(--fg); }
.flow.h .fs.shoot small { display: block; margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--red); }
.flow.v .fx .shoot-meta { color: var(--red); font-weight: 700; }
.shoot-line { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 8px 14px; border: 1px solid var(--red-line); border-radius: 99px; background: var(--red-soft); font-size: 14px; }
.shoot-line svg { width: 16px; height: 16px; color: var(--red); flex: none; }
.shoot-day { margin-bottom: 14px; }
.archive-cta { align-items: center; gap: 14px; text-decoration: none; color: var(--fg); }
.archive-cta > svg { width: 18px; height: 18px; color: var(--fg-3); }
/* client archive: one card per finished month */
.arch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.arch-cell { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); min-width: 0; }
.arch-cell .lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--fg-3); margin-bottom: 4px; }
.arch-cell .lbl svg { width: 14px; height: 14px; }
.arch-rep { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--fg); text-decoration: none; padding: 4px 0; }
.arch-rep svg { width: 16px; height: 16px; color: var(--fg-3); flex: none; }
.arch-rep:hover svg { color: var(--red); }
.arch-h { margin: 18px 0 8px; font-size: 14px; }
@media (max-width: 640px) { .arch-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Script editor: a page like Docs, tools like Notion ---------- */
.docs { min-width: 0; }
.docs-bar { position: sticky; top: calc(var(--top, 64px) + 8px); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface-solid) 88%, transparent); backdrop-filter: blur(14px); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .6); }
.docs-bar .grp { display: inline-flex; gap: 2px; padding-inline-end: 6px; border-inline-end: 1px solid var(--line); }
.docs-bar .grp:last-of-type { border: 0; }
.docs-bar button { min-width: 36px; height: 34px; padding: 0 9px; border: 0; border-radius: 9px; background: none; color: var(--fg-2); font: 600 13px inherit; font-family: inherit; cursor: pointer; display: inline-grid; place-items: center; transition: background .12s, color .12s; }
.docs-bar button:hover { background: var(--surface-2); color: var(--fg); }
.docs-bar button:active { transform: translateY(1px); }
.docs-bar button svg { width: 16px; height: 16px; }
.docs-bar .hl { background: rgba(225, 6, 0, .35); padding: 0 5px; border-radius: 3px; color: var(--fg); }
.docs-bar .stats { padding-inline: 8px; white-space: nowrap; }
.paper { background: var(--surface-solid); border: 1px solid var(--line); border-radius: 8px; padding: 56px 64px 80px; min-height: 78vh; box-shadow: 0 1px 0 var(--line), 0 30px 60px -40px rgba(0, 0, 0, .7); }
.paper .doc-title { font-size: clamp(26px, 3vw, 36px); margin-top: 14px; }
.paper .editor { font-size: 16px; }
.paper .ce-paragraph { font-size: 16px; line-height: 1.9; }
.paper h1.ce-header { font-size: 28px; } .paper h2.ce-header { font-size: 22px; } .paper h3.ce-header { font-size: 18px; }
.paper mark, .blocks mark { background: rgba(225, 6, 0, .28); color: inherit; padding: 0 2px; border-radius: 3px; }
.paper u, .blocks u { text-decoration-color: var(--red); text-underline-offset: 4px; }
@media (max-width: 760px) { .paper { padding: 22px 18px 48px; border-radius: 12px; } .docs-bar { top: 60px; } .docs-bar .stats { width: 100%; padding: 4px 8px 2px; } }
.script-cta { border-color: var(--red-line); }

/* ---------- Script جديد: brand → task → the next number ---------- */
.sp-step { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sp-step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font: 800 13px Montserrat, sans-serif; }
.sp-step h2 { font-size: 18px; }
.sp-brands { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.sp-brand { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, transform .2s var(--ease), background .2s; }
.sp-brand:hover { border-color: var(--line-2); transform: translateY(-2px); }
.sp-brand.on { border-color: var(--red); background: var(--red-soft); }
.sp-brand.empty-b { opacity: .55; }
.sp-brand .t { flex: 1; min-width: 0; }
.sp-brand .t b { display: block; font-size: 15px; }
.sp-brand .t span { font-size: 12.5px; color: var(--fg-3); }
.sp-ring { width: 34px; height: 34px; border-radius: 50%; flex: none; background: conic-gradient(var(--red) calc(var(--p) * 1%), var(--surface-3) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); }
.sp-group { margin-bottom: 14px; }
.sp-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sp-head h3 { font-size: 20px; }
.sp-go { height: 48px; padding: 0 20px; font-size: 15px; }
.sp-go b { font-size: 20px; margin: 0 2px; }
.sp-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; margin-top: 16px; }
.sp-units form { display: contents; }
.sp-unit { display: grid; place-items: center; gap: 2px; height: 70px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); font: inherit; cursor: pointer; transition: transform .15s var(--ease), border-color .15s, background .15s; }
.sp-unit:hover { transform: translateY(-2px); border-color: var(--line-2); }
.sp-unit b { font-size: 22px; line-height: 1; }
.sp-unit small { font-size: 11px; color: var(--fg-3); }
.sp-unit.s-none { background: transparent; border-style: dashed; }
.sp-unit.next { border: 2px solid var(--red); background: var(--red-soft); }
.sp-unit.next small { color: var(--red-hi); font-weight: 700; }
.sp-unit.s-draft { border-color: var(--fg-3); }
.sp-unit.s-review { border-color: var(--red-line); }
.sp-unit.s-changes { border-color: var(--red); }
.sp-unit.s-approved { background: var(--inv-bg); color: var(--inv-fg); border-color: var(--inv-bg); }
.sp-unit.s-approved small { color: inherit; opacity: .7; }
.sp-where { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-3); }
.sp-where a:hover { color: var(--fg); }
.sp-where .b { color: var(--fg); font-weight: 700; }
.sp-where .sep { opacity: .5; }
.sp-where .nn { color: var(--fg); background: var(--red); color: #fff; border-radius: 99px; padding: 2px 10px; font-size: 12.5px; }
.sp-mini { display: inline-flex; gap: 4px; margin-inline-start: 4px; }
.sp-mini i { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.sp-mini i.s-draft, .sp-mini i.s-review, .sp-mini i.s-changes { background: var(--fg-3); box-shadow: none; }
.sp-mini i.s-approved { background: var(--fg); box-shadow: none; }
.sp-mini i.me { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

.sp-line { display: flex; align-items: center; gap: 14px; margin: 22px 0 14px; color: var(--fg-3); font-size: 12.5px; font-weight: 700; }
.sp-line::before, .sp-line::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, var(--line-2)); }
.sp-line::after { background: linear-gradient(270deg, transparent, var(--line-2)); }
.sp-line span { padding: 4px 12px; border: 1px solid var(--line-2); border-radius: 99px; }

/* ---------- Daily duties ---------- */
.duty-grid { display: grid; gap: 6px; }
.duty-grid .dg-h, .duty-grid .dg-r { display: grid; grid-template-columns: minmax(0, 1fr) 130px 130px; align-items: center; gap: 8px; }
.duty-grid .dg-h span { font-size: 12px; color: var(--fg-3); text-align: center; font-weight: 700; }
.duty-grid .dg-r { padding: 8px 10px; border-radius: var(--r-md); border: 1px solid var(--line); }
.duty-grid .dg-r b small { font-weight: 400; }
.dg-c { display: grid; place-items: center; cursor: pointer; }
.dg-c input { position: absolute; opacity: 0; pointer-events: none; }
.dg-c span { width: 34px; height: 34px; border-radius: 10px; border: 1.5px dashed var(--line-2); display: grid; place-items: center; color: transparent; transition: all .15s; }
.dg-c span svg { width: 17px; height: 17px; }
.dg-c input:checked + span { background: var(--red); border: 1.5px solid var(--red); color: #fff; }
@media (max-width: 560px) { .duty-grid .dg-h, .duty-grid .dg-r { grid-template-columns: minmax(0, 1fr) 70px 70px; } }
.duty-dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); flex: none; }
.duty-dot.done { background: #19c37d; box-shadow: none; }
.duty-dot.skip { background: var(--fg-3); box-shadow: none; }
.duties-card .dc-g { margin-top: 14px; }
.duties-card .dc-g h4 { font-size: 12px; color: var(--fg-3); font-weight: 700; margin: 0 0 6px; }
.dc-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); margin-bottom: 6px; transition: opacity .2s, border-color .2s; }
.dc-row.busy { opacity: .5; }
.dc-row.done { border-color: rgba(25, 195, 125, .45); }
.dc-row.done .grow { text-decoration: line-through; color: var(--fg-3); }
.dc-row.skip .grow { color: var(--fg-3); }
.dc-box { width: 30px; height: 30px; border-radius: 9px; border: 1.5px solid var(--line-2); background: none; color: transparent; display: grid; place-items: center; cursor: pointer; flex: none; transition: all .15s; }
.dc-box svg { width: 16px; height: 16px; }
.dc-box:hover { border-color: #19c37d; color: rgba(25, 195, 125, .6); }
.dc-row.done .dc-box { background: #19c37d; border-color: #19c37d; color: #fff; }
.dc-row.skip .dc-box { background: var(--surface-3); color: var(--fg-3); }
.dc-skip { border: 0; background: none; color: var(--fg-3); font: inherit; font-size: 12px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.dc-skip:hover { color: var(--fg); background: var(--surface-3); }
.db-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.db-chips .dim-pill { opacity: .6; }
.mywork .mw-lines { display: grid; gap: 10px; margin-top: 16px; }
.mywork .mw { display: block; padding: 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); transition: border-color .2s; }
.mywork .mw:hover { border-color: var(--red-line); }

/* ---------- Google Sheets inside the system ---------- */
.sheet-frame { height: calc(100vh - 230px); min-height: 520px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-2); background: #fff; box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .7); }
.sheet-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.sheet-hint { margin: 10px 4px 0; }
@media (max-width: 760px) { .sheet-frame { height: calc(100vh - 260px); min-height: 420px; } }

/* ---------- Login emails dashboard ---------- */
.logins .lg-h { font-size: 12px; color: var(--fg-3); font-weight: 700; margin: 18px 0 8px; }
.lg-row { display: grid; grid-template-columns: auto minmax(130px, 200px) minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lg-row:last-of-type { border-bottom: 0; }
.lg-row .pill:not(.red-o) { display: none; }
.lg-row > .pill.red-o { justify-self: start; }
.lg-who { display: grid; min-width: 0; }
.lg-who b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-who small { font-size: 12px; color: var(--fg-3); }
.lg-mail { height: 40px; }
.lg-new { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, .8fr) minmax(0, .8fr) auto; gap: 8px; }
.lg-new select[hidden] { display: none; }
.pw-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
@media (max-width: 860px) {
  .lg-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .lg-row .lg-mail { grid-column: 1 / -1; order: 5; }
  .lg-row > .pill.red-o { order: 6; }
  .lg-new { grid-template-columns: minmax(0, 1fr); }
}
