@font-face { font-family: "Montserrat"; src: url(montserrat-var.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url(plex-arabic-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url(plex-arabic-bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

/* Endorse Hub: a calm app look. Endorse green as the accent, white cards on light grey. */
:root {
  --bg: #F4F5F7; --panel: #fff; --ink: #1E2329; --ink-2: #3B424C; --muted: #6B7280; --line: #E6E8EC; --line-2: #F0F1F4;
  --green: #006943; --green-d: #00563a; --green-50: #E9F4EF; --green-100: #D3EADF; --yellow: #F2C230; --yellow-50: #FFF6DB;
  --bad: #C2362F; --bad-50: #FDECEA; --warn: #8A6100; --warn-50: #FFF4D6; --blue-50: #EEF3FF;
  --r: 14px; --r-sm: 10px; --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --font: "Montserrat", "Plex Arabic", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
[lang=ar], button.link[lang=ar] { font-family: "Plex Arabic", system-ui, Tahoma, sans-serif; }
[dir=rtl] { --font: "Plex Arabic", "Montserrat", system-ui, Tahoma, sans-serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14.5px/1.55 var(--font); }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: clamp(20px, 3vw, 26px); font-weight: 700; margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h2 { font-size: 15.5px; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 13.5px; font-weight: 700; margin: 0 0 8px; }
small, .muted { color: var(--muted); }
.small { font-size: 13px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.ic { flex: none; }

/* ---------- app frame ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--panel); border-inline-end: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--ink); font-size: 16px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand b { font-weight: 800; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 800; }
.brand.big { font-size: 24px; color: var(--green); padding: 0 0 22px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.nav a:hover { background: var(--line-2); text-decoration: none; }
.nav a.on { background: var(--green-50); color: var(--green); }
.nav a .ic { color: var(--muted); }
.nav a.on .ic { color: var(--green); }
.mainwrap { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 16px; padding: 12px 28px; background: rgba(255, 255, 255, .9); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-title { font-weight: 600; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me { display: flex; gap: 14px; align-items: center; margin-inline-start: auto; white-space: nowrap; }
.me form { margin: 0; }
.me-user { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
button.link { background: none; border: 0; color: var(--green); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 28px 64px; }
main.wide { max-width: 1480px; }
main.narrow { max-width: 440px; padding-top: 64px; }
main.report { max-width: 1120px; }

/* ---------- page head ---------- */
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.head .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sub { margin: 4px 0 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.crumb { margin: 0 0 6px; font-size: 13px; }
.crumb a { color: var(--muted); }
.camp-head { display: flex; gap: 16px; align-items: center; margin-bottom: 4px; }
.camp-head > div { min-width: 0; }

/* ---------- cards ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; margin: 16px 0; box-shadow: var(--shadow); }
.card.hl { border-color: var(--green-100); background: var(--green-50); }
.card.danger { border-color: #F3D2CF; display: flex; gap: 12px; flex-wrap: wrap; align-items: end; box-shadow: none; }
.card.danger h2 { width: 100%; }
details.card summary { cursor: pointer; font-weight: 700; }
details.card .pre { margin-top: 12px; }
details > summary { cursor: pointer; font-weight: 600; color: var(--green); padding: 6px 0; }

/* ---------- forms ---------- */
.stack { display: grid; gap: 14px; }
.grid2, .grid3, .grid4 { display: grid; gap: 14px; align-items: start; }
.grid2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.add { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.f { display: grid; gap: 5px; margin: 0; border: 0; padding: 0; min-width: 0; }
.f > span, .f legend { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.f i { color: var(--bad); font-style: normal; }
.f small { font-size: 12px; }
.f em { color: var(--bad); font-size: 12.5px; font-style: normal; }
.f.bad input, .f.bad select, .f.bad textarea { border-color: var(--bad); }
input, select, textarea { font: inherit; color: inherit; width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); min-height: 40px; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: #CDD1D8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-50); }
textarea { resize: vertical; }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 1px; }
input[readonly] { background: var(--line-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); cursor: pointer; font-size: 13px; }
.chip:has(input:checked) { background: var(--green-50); border-color: var(--green-100); color: var(--green); font-weight: 600; }
.chip input, .check input { width: auto; min-height: 0; accent-color: var(--green); }
.check { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; align-items: center; }
.filters input[type=search] { flex: 1 1 240px; width: auto; }
.filters select { width: auto; }
.filters input[type=number], .filters input[type=date] { width: 150px; }
form.inline { display: inline; margin: 0; }
form.inline.auto { display: inline-flex; gap: 6px; align-items: center; }
form.inline.auto input, form.inline.auto select { width: auto; min-height: 32px; padding: 4px 8px; }
.copy { font-family: ui-monospace, monospace; font-size: 13px; direction: ltr; }
.bulk { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.bulk select { width: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 8px 16px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { border-color: #CDD1D8; background: #FAFAFB; text-decoration: none; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-d); }
.btn.bad { color: var(--bad); border-color: #F1C7C3; }
.btn.sm { min-height: 30px; padding: 4px 11px; font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.flash { padding: 11px 14px; border-radius: var(--r-sm); margin: 0 0 14px; font-weight: 500; }
.flash.ok { background: var(--green-50); color: #0b4a31; }
.flash.err { background: var(--bad-50); color: var(--bad); }
.empty { text-align: center; padding: 44px 16px; background: var(--panel); border: 1px dashed #D5D9E0; border-radius: var(--r); margin: 16px 0; }
.empty p { color: var(--muted); margin: 0 0 12px; }

/* ---------- tables ---------- */
.tbl { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card .tbl { border: 0; box-shadow: none; border-radius: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: start; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #FAFAFB; white-space: nowrap; font-weight: 700; }
[dir=rtl] th { text-transform: none; letter-spacing: 0; }
tbody tr:hover { background: #FAFBFC; }
tr:last-child td { border-bottom: 0; }
td a { color: var(--ink); font-weight: 600; }
td a:hover { color: var(--green); }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; }
tr.dim { opacity: .55; }
.row-actions { white-space: nowrap; }
.pager { display: flex; gap: 16px; justify-content: center; align-items: center; margin: 16px 0; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.good, .badge.cs-active, .badge.st-live, .badge.ds-live, .badge.ds-client_ok, .badge.rv-ok { background: var(--green-50); color: #0b4a31; }
.badge.warn, .badge.st-content, .badge.ds-draft, .badge.ds-internal_ok, .badge.rv-pending { background: var(--warn-50); color: var(--warn); }
.badge.bad, .badge.st-declined, .badge.ds-changes, .badge.rv-changes { background: var(--bad-50); color: var(--bad); }
.badge.cs-active::before, .badge.st-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #1AA36A; }

/* ---------- people, platforms, logos ---------- */
.av { --h: 152; position: relative; width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; overflow: hidden;
  background: hsl(var(--h) 45% 92%); color: hsl(var(--h) 45% 30%); font-size: 12px; font-weight: 700; vertical-align: middle; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av.lg { width: 56px; height: 56px; font-size: 18px; }
.av.xl { width: 72px; height: 72px; font-size: 22px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who > div { min-width: 0; }
.acc { display: inline-flex; gap: 5px; align-items: center; margin-inline-end: 10px; white-space: nowrap; direction: ltr; color: var(--ink-2); font-size: 13px; }
.acc small { color: var(--muted); }
.acc.only { margin-inline-end: 4px; }
.pm { flex: none; }
.pm-instagram { color: #D6249F; } .pm-tiktok { color: #111; } .pm-youtube { color: #FF0000; } .pm-snapchat { color: #F7D21E; } .pm-x { color: #111; }
.accs { line-height: 2; }
.logo-sq { width: 60px; height: 60px; object-fit: contain; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); flex: none; padding: 4px; }
.camp-cell { display: flex; gap: 12px; align-items: center; }
.logo-sm { width: 38px; height: 38px; object-fit: contain; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); flex: none; display: inline-block; padding: 3px; }
.tags { font-family: ui-monospace, monospace; font-size: 12.5px; color: var(--green); }

/* ---------- stat cards ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.stats > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.stats b { display: block; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stats span { font-size: 12.5px; color: var(--muted); }
.stats .neg b { color: var(--bad); }
.stats.big b { font-size: 26px; color: var(--green); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 18px 0; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center; }
.kpi .ic-wrap { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--green-50); color: var(--green); flex: none; }
.kpi.y .ic-wrap { background: var(--yellow-50); color: var(--warn); }
.kpi.b .ic-wrap { background: var(--blue-50); color: #3156C8; }
.kpi b { display: block; font-size: 22px; font-weight: 700; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.progress { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; min-width: 80px; flex: 1; }
.progress i { display: block; height: 100%; width: var(--w, 0%); background: var(--green); border-radius: 99px; }

/* ---------- tabs ---------- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 10px 0 18px; background: #EBEDF0; border-radius: 12px; overflow-x: auto; max-width: 100%; }
.tabs a { padding: 7px 16px; text-decoration: none; color: var(--ink-2); font-weight: 600; white-space: nowrap; border-radius: 9px; font-size: 13.5px; }
.tabs a:hover { background: rgba(255, 255, 255, .6); text-decoration: none; }
.tabs a.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- campaign board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(236px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #ECEEF1; border-radius: var(--r); padding: 10px; min-height: 140px; }
.col h3 { display: flex; justify-content: space-between; padding: 4px 6px 8px; font-size: 13px; }
.col h3 small { background: var(--panel); border-radius: 99px; padding: 0 8px; font-weight: 700; }
.eng { background: var(--panel); border-radius: 12px; padding: 12px; margin-bottom: 8px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.eng .who a { color: var(--ink); font-weight: 700; }
.eng .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); margin: 6px 0; }
.eng form { margin-top: 6px; }
.stages { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 0 0 12px; }
.stages li { padding: 4px 11px; border-radius: 99px; background: var(--line-2); font-size: 12px; color: var(--muted); font-weight: 600; }
.stages li.past { background: var(--green-50); color: #0b4a31; }
.stages li.on { background: var(--green); color: #fff; }

/* ---------- lists ---------- */
.pick { list-style: none; padding: 0; margin: 8px 0 0; }
.pick li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list .end { margin-inline-start: auto; display: flex; gap: 10px; align-items: center; }
.list a { color: var(--ink); font-weight: 600; }
.log { list-style: none; padding: 0; margin: 12px 0 0; }
.log li { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 16px; align-items: start; }
.login h1 { margin-bottom: 16px; }

/* ---------- content approval ---------- */
.deliv { border-top: 1px solid var(--line-2); padding: 16px 0; }
.deliv:first-of-type { border-top: 0; }
.deliv > header { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 8px; }
.draft { display: grid; grid-template-columns: minmax(0, 280px) 1fr; gap: 18px; }
.draft p { margin: 4px 0; }
.media { display: block; max-width: 100%; max-height: 420px; border-radius: 12px; background: #000; }
img.media { background: none; }
.caption { background: var(--line-2); border-radius: 10px; padding: 9px 12px; font-size: 14px; }
.review { margin-top: 8px; }
.thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; display: block; }
.err-text { color: var(--bad); }

/* ---------- post and creator cards ---------- */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pcard { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--panel); box-shadow: var(--shadow); transition: box-shadow .15s; }
.pcard:hover { box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }
.pcard > img, .pcard .noimg { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; background: var(--line-2); }
.pcard .noimg { display: grid; place-items: center; color: var(--muted); }
.pcard > div { padding: 12px; }
.pcard > div > a b { color: var(--ink); }
.nums { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; margin: 8px 0; }
.nums b { font-weight: 700; }
.pcard.disc { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.pcard.disc > * { margin: 0; padding: 0; }
.disc-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.disc-top > div { min-width: 0; }
.disc-top b { font-size: 15px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disc .stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--line-2); border-radius: 10px; padding: 8px; text-align: center; }
.disc .stat3 b { display: block; font-size: 15px; }
.disc .stat3 span { font-size: 11.5px; color: var(--muted); }
.disc .acts { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.disc .acts form.inline.auto { flex-wrap: wrap; }
.disc .acts select { max-width: 130px; }
.bio { color: var(--muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pitch .pcard > div { display: grid; gap: 6px; }
.pitch h3 { margin: 0; font-size: 16px; }
.choices { border: 0; padding: 0; margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- report and client pages ---------- */
.lang { float: inline-end; }
.rep-head { display: flex; gap: 18px; align-items: center; margin: 8px 0 20px; }
.rep-head .logo { width: 120px; height: auto; }
.bar { display: grid; grid-template-columns: 96px 1fr 48px; gap: 10px; align-items: center; margin: 7px 0; font-size: 13px; }
.bar i { height: 8px; border-radius: 99px; background: linear-gradient(to var(--end, right), var(--green) var(--w), var(--line-2) var(--w)); }
[dir=rtl] .bar i { --end: left; }
.bar b { text-align: end; }
section.preview { border-top: 2px dashed var(--line); margin-top: 24px; padding-top: 8px; }
blockquote { margin: 6px 0; padding: 8px 12px; background: var(--line-2); border-inline-start: 3px solid var(--green); border-radius: 6px; font-size: 14px; }
.comp summary { display: flex; gap: 8px; align-items: center; }
.comp.ok { border-color: var(--green-100); }
.comp .list li { align-items: center; }
.comp form.end { margin-inline-start: auto; }
.capture { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
details.score summary { font-weight: 600; }

@media print {
  .side, .top, .tabs, .noprint, .filters, .lang, .flash, script { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
  .card, .stats > div, .pcard { break-inside: avoid; border-color: #ccc; box-shadow: none; }
  main { max-width: none; padding: 0; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 10px 12px 0; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 4px 6px 10px; }
  .nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
  .nav a { padding: 7px 10px; white-space: nowrap; }
  .app { position: relative; }
  .top { position: absolute; top: 0; inset-inline-end: 0; padding: 14px 16px; background: none; border: 0; }
  .top-title { display: none; }
  main { padding: 18px 16px 56px; }
}
@media (max-width: 640px) {
  .me-user > span:not(.av) { display: none; }
  .kpi { flex-direction: column; align-items: flex-start; gap: 10px; }
  th, td { padding: 10px; }
  .draft { grid-template-columns: 1fr; }
  .rep-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .nav { gap: 0; }
  .nav a { flex-direction: column; gap: 3px; padding: 6px 8px; font-size: 11px; min-width: 58px; }
}
.camp-row { flex-wrap: nowrap !important; align-items: flex-start !important; gap: 12px !important; }
.camp-row .grow { flex: 1; min-width: 0; }
.camp-row .row { margin-top: 6px; flex-wrap: nowrap; }
.camp-row .progress { max-width: 220px; }
.filters input:not([type=checkbox]):not([type=radio]):not([type=number]):not([type=date]) { flex: 1 1 220px; width: auto; }
.msgs { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; }
.msgs li { max-width: 80%; padding: 10px 14px; border-radius: 14px; background: var(--line-2); align-self: flex-start; }
.msgs li.mine { align-self: flex-end; background: var(--green-50); }
.msgs li p { margin: 4px 0 0; }
.dot-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--warn); color: #fff; font-size: 11px; font-weight: 700; }
.card.hot { border-color: var(--warn); }
.bell { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--ink-2); }
.bell:hover { background: var(--line-2); }
.bell .dot-n { position: absolute; top: -2px; inset-inline-end: -4px; }
.list li.unread { font-weight: 600; }
.nowrap { flex-wrap: nowrap; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-h { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-d { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; min-height: 110px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-d.off { background: none; border: 0; }
.cal-d.today { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-50); }
.cal-d .n { font-size: 12px; font-weight: 700; color: var(--muted); }
.ev { display: block; font-size: 11.5px; line-height: 1.3; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); background: var(--line-2); }
.ev:hover { text-decoration: none; filter: brightness(.96); }
.ev-live { background: var(--green-50); color: #0b4a31; }
.ev-late { background: var(--bad-50); color: var(--bad); }
.ev-k { background: var(--warn-50); color: var(--warn); font-weight: 600; }
.ev .pm { vertical-align: -2px; }
@media (max-width: 640px) { .cal { grid-template-columns: 1fr; } .cal-h, .cal-d.off { display: none; } .cal-d { min-height: 0; } }
.case { background: var(--panel); border-radius: var(--r); padding: 28px; box-shadow: var(--shadow); }
.case h2 { margin-top: 22px; }
.cs-bench { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cs-story section { background: var(--green-50); border-radius: 12px; padding: 14px 16px; }
.cs-story h2 { margin-top: 0; font-size: 15px; color: var(--green); }
.cs-posts { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media print { .case { box-shadow: none; padding: 0; } .cs-posts .pcard { break-inside: avoid; } }
.portal { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.portal-k { display: flex; gap: 14px; align-items: flex-start; color: var(--ink); }
.portal-k:hover { text-decoration: none; border-color: var(--green-100); }
.badge.fit { margin-inline-start: 6px; cursor: help; }
.pre.contract { max-height: 420px; overflow-y: auto; background: var(--line-2); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.btn.big { padding: 13px 22px; font-size: 16px; }
.ap-one .btn, .ap-all .btn { width: 100%; justify-content: center; }
.ap-all { margin: 0 0 16px; }
.ap-one { margin: 12px 0 8px; }
.ap-changes summary { color: var(--bad); font-weight: 600; cursor: pointer; padding: 6px 0; }
@media (max-width: 640px) { .deliv .draft img, .deliv .draft video { width: 100%; height: auto; } }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.badge.blue { background: var(--blue-50); color: #3156C8; }
.tk-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--line-2); margin: 6px 0 10px; max-width: 520px; }
.tk-bar .seg { display: block; }
.seg.st-todo, select.st-todo { background: #DDE1E6; }
.seg.st-working, select.st-working { background: #FDBA4D; }
.seg.st-stuck, select.st-stuck { background: #E2445C; color: #fff; }
.seg.st-review, select.st-review { background: #8FA8F5; }
.seg.st-done, select.st-done { background: #00C875; color: #fff; }
select.st { border: 0; font-weight: 600; border-radius: 8px; padding: 6px 10px; width: auto; min-width: 130px; }
.tk-table td { vertical-align: middle; }
.tk-title { min-width: 240px; }
.tk-link { display: inline-block; font-size: 12px; background: var(--line-2); padding: 1px 8px; border-radius: 99px; color: var(--ink-2); margin-top: 3px; }
.tk-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0; }
.tk-add input[name=title] { flex: 2 1 260px; width: auto; }
.tk-add select, .tk-add input[type=date] { width: auto; }
.tk-group h2 .progress { display: inline-block; width: 140px; vertical-align: middle; margin-inline-start: 10px; }
.g-wide { grid-column: 1 / -1; }
/* Tasks on a phone: each task is a card (title on top, status / owner / priority / due below), no sideways scrolling. */
@media (max-width: 640px) {
  .tbl:has(.tk-table) { overflow: visible; border: 0; }
  .tk-table thead { display: none; }
  .tk-table, .tk-table tbody { display: block; }
  .tk-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
  .tk-table td { padding: 0; border: 0; }
  .tk-table td.tk-title { grid-column: 1 / -1; min-width: 0; }
  .tk-table select { width: 100%; min-width: 0; }
  .tk-group h2 .progress { width: 80px; }
}
