@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/assets/montserrat-latin.woff2) format('woff2'); }
/* The colour theme. Dark is the default; Light is chosen with the switch (public/theme.js sets data-theme on <html>).
   The printed or designed sheets (the ads report, invoices, the social media report, a script page) keep the dark values below
   whatever the theme, so they look the same on every screen and print the same. */
:root, .paper, .smp, .sdoc {
  --bg: #070506; --side: #000; --panel: #171313; --panel2: #1f1a1a; --line: rgba(255,255,255,.07); --line2: rgba(255,255,255,.14);
  --red: #a82628; --red-d: #581111; --amber: #f9d309; --cream: #f8f5e7; --txt: #fff; --muted: #a59f9f; --ok: #4cd08a; --bad: #ff6266;
  --txt2: #d8cfcf; --txt-doc: #ddd6d6; --txt-doc2: #d9d2d2; --field: #0e0b0b; --ctl-line: var(--line2); --ov: 255,255,255; --bg-rgb: 7,5,6;
  --ok-t: #6fe0a6; --bad-t: #ff7d80; --bad-t2: #ff9a9c; --amber-t: #f9d309; --cream-t: #f8f5e7; --focus: #f8f5e7;
  --btn1-bg: linear-gradient(180deg, #fff 29%, var(--cream)); --btn1-txt: #16100f; --btn1-glow: rgba(248,245,231,.16); --btn2-bg: #000; --btn2-txt: #fff;
  --sh1: rgba(0,0,0,.28); --sh2: rgba(0,0,0,.5); --sh3: rgba(0,0,0,.55); --topbar-bg: rgba(7,5,6,.94); --bar-bg: rgba(0,0,0,.96);
  --sk1: #1b1616; --sk2: #272020; --glow: #290505; --logo-filter: none; --dot-review: #b69bff;
  --stc-draft: #a59f9f; --stc-review: #f9d309; --stc-client: #6aa9ff; --stc-scheduled: #b48cff; --stc-published: #4cd08a;
  --k-post: #c4a6ff; --k-shoot: #8dbaff; --lg2: #8a8484; --ph: rgb(117, 117, 117);
}
:root[data-theme=light] {
  --bg: #f5f2ea; --side: #fff; --panel: #fff; --panel2: #fff; --line: rgba(27,20,21,.1); --line2: rgba(27,20,21,.2);
  --txt: #1b1415; --muted: #625959; --ok: #1a7f4b; --bad: #c0262b;
  --txt2: #3a3031; --txt-doc: #3a3031; --txt-doc2: #4a4040; --field: #fff; --ctl-line: #8a8080; --ov: 27,20,21; --bg-rgb: 245,242,234;
  --ok-t: #17724a; --bad-t: #b3202a; --bad-t2: #a31d27; --amber-t: #7a5b00; --cream-t: #581111; --focus: #581111;
  --btn1-bg: linear-gradient(180deg, var(--red) 29%, var(--red-d)); --btn1-txt: #fff; --btn1-glow: rgba(168,38,40,.28); --btn2-bg: #fff; --btn2-txt: #1b1415;
  --sh1: rgba(27,20,21,.08); --sh2: rgba(27,20,21,.16); --sh3: rgba(27,20,21,.18); --topbar-bg: rgba(245,242,234,.94); --bar-bg: rgba(255,255,255,.96);
  --sk1: #ece7dd; --sk2: #f6f2e9; --glow: #f0dcd8; --logo-filter: invert(1); --dot-review: #7a4fd1;
  --stc-draft: #7a7272; --stc-review: #a07800; --stc-client: #2f6fcf; --stc-scheduled: #7a4fd1; --stc-published: #1a7f4b;
  --k-post: #6d3fc4; --k-shoot: #1f5fb5; --lg2: #7a7272; --ph: #6b6262;
}
* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--txt); font: 14px/1.5 'Montserrat', 'Segoe UI', sans-serif; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 17px; font-weight: 700; }
small, .muted { color: var(--muted); }
[hidden] { display: none !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; border: 0; white-space: nowrap; }
.btn.cream { background: var(--btn1-bg); color: var(--btn1-txt); }
.btn.dark { background: var(--btn2-bg); border: 2px solid var(--red-d); color: var(--btn2-txt); }
.btn.dark:hover { border-color: var(--red); }
.btn[aria-disabled=true], .btn:disabled { opacity: .45; pointer-events: none; }
.btn.sm { padding: 6px 14px; font-size: 12px; }

.chip { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 99px; padding: 3px 11px; background: rgba(var(--ov),.07); color: var(--muted); }
.chip.ok { background: rgba(76,208,138,.14); color: var(--ok-t); }
.chip.warn { background: rgba(249,211,9,.14); color: var(--amber-t); }
.tile { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(180deg, #fff, var(--cream)); color: #2a1112; display: inline-grid; place-items: center; font-size: 9.5px; font-weight: 800; flex: none; }

/* sign-in */
body.login { display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 0, var(--glow), var(--bg) 60%); }
.lg { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 36px 32px; display: grid; gap: 16px; }
.lg-logo { width: 190px; }
.lg .btn { width: 100%; }
.lg .bot { display: flex; justify-content: center; min-height: 65px; }   /* the "are you a person?" check, when it is on */
.lg .bot[hidden] { display: none; }
.lg .btn[aria-disabled=true] { opacity: .5; pointer-events: none; }
.people { display: grid; gap: 8px; }
.people a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line2); border-radius: 14px; }
.people a:hover { border-color: var(--red); background: rgba(168,38,40,.12); }
.warnbox { border: 1px dashed var(--amber); border-radius: 14px; padding: 12px 14px; color: var(--amber-t); font-size: 12.5px; }

/* app */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line); padding: 22px 14px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }   /* more pages than a short screen holds: the menu scrolls, the account block stays in view */
.side > * { flex: none; }
.side img { width: 170px; margin: 0 8px 22px; }
.side a.nav { display: block; padding: 11px 12px; border-radius: 12px; color: var(--muted); font-weight: 600; }
.side a.nav.on, .side a.nav:hover { background: rgba(168,38,40,.18); color: var(--txt); }
.side .me { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 8px 0; display: grid; gap: 6px; position: sticky; bottom: 0; background: var(--side); }
.main { padding: 32px 36px 60px; display: grid; gap: 20px; align-content: start; min-width: 0; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--red); font-weight: 700; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 8px 12px; }
td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.who { display: flex; align-items: center; gap: 10px; }
.msg { min-height: 20px; color: var(--bad); font-weight: 600; }
.msg.good { color: var(--ok); }

.form { display: grid; gap: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; }
label { font-size: 12px; font-weight: 600; color: var(--muted); }
input, select { background: var(--field); border: 1px solid var(--ctl-line); border-radius: 12px; color: var(--txt); padding: 10px 12px; font: inherit; }
input:focus, select:focus { outline: 2px solid var(--red); outline-offset: 1px; }
input::placeholder, textarea::placeholder { color: var(--ph); }   /* the browser's own grey is too pale on a light page */
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; color: var(--txt2); font-size: 12.5px; }
.checks input { width: 16px; height: 16px; padding: 0; accent-color: var(--red); }

.page { display: grid; gap: 20px; align-content: start; min-width: 0; }

/* ---- shell: the sidebar on a computer; the top bar and bottom tabs only on a phone ---- */
.topbar, .tabs, .mepanel { display: none; }
.side a.nav { display: flex; align-items: center; gap: 12px; }
.nav svg { flex: none; }
td { overflow-wrap: break-word; }
.chip { white-space: nowrap; }
td[data-label="City"], td[data-label="Type"], td[data-label="Fee (AED)"] { white-space: nowrap; }

/* bigger touch targets on any touch screen and on narrow windows */
@media (max-width: 800px), (pointer: coarse) {
  .btn { min-height: 46px; padding: 12px 22px; }
  .btn.sm { min-height: 44px; padding: 10px 18px; }
  input, select { min-height: 46px; font-size: 16px; }
  .checks label { min-height: 44px; padding: 4px 0; }
  .checks input { width: 22px; height: 22px; }
  .people a { min-height: 56px; align-items: center; }
  .side a.nav { min-height: 48px; }
}

/* ---- phone layout ---- */
@media (max-width: 800px) {
  .shell { display: block; }
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 30; background: var(--topbar-bg); border-bottom: 1px solid var(--line); padding: calc(8px + env(safe-area-inset-top)) 16px 8px; }
  .topbar img { width: 128px; }
  .me-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: linear-gradient(180deg, var(--red) 29%, var(--red-d)); color: #fff; font: inherit; font-weight: 800; letter-spacing: .02em; cursor: pointer; }
  .mepanel { display: grid; gap: 8px; position: fixed; top: calc(64px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 40; background: var(--panel2); border: 1px solid var(--line2); border-radius: 18px; padding: 16px; }
  .main { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
  .tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--bar-bg); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .tabs a.nav { display: flex; align-items: center; flex: 1; flex-direction: column; justify-content: center; gap: 3px; min-height: 56px; border-radius: 14px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
  .tabs a.nav.on { color: var(--txt); background: rgba(168,38,40,.22); }
  h1 { font-size: 26px; }
  .head .btn { width: 100%; }
  .grid { grid-template-columns: 1fr; }
  .card { padding: 16px; border-radius: 18px; }

  /* tables become a stack of cards: the first cell is the title, the others show their label */
  .tbl-wrap.card { background: none; border: 0; padding: 0; }
  table.stack, .stack tbody, .stack tr, .stack td { display: block; }
  .stack thead { display: none; }
  .stack tr { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 12px 16px; margin-bottom: 12px; }
  .stack td { border: 0; padding: 7px 0; display: flex; justify-content: space-between; align-items: center; gap: 14px; text-align: right; }
  .stack td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; flex: none; }
  .stack td:not([data-label])::before { content: none; }
  .stack td.lead { display: block; text-align: left; padding: 2px 0 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
  .stack td.wide { display: block; text-align: left; }
  .stack td.wide::before { display: block; margin-bottom: 8px; }
  .stack td.act { display: block; padding-top: 10px; }
  .stack td.act .btn { width: 100%; }

  body.login { padding: 14px; align-items: start; }
  .lg { padding: 26px 20px; border-radius: 22px; }
}

/* ---- finish: smooth, calm, professional ---- */
:root { color-scheme: dark; }
:root[data-theme=light] { color-scheme: light; }
.side img, .topbar img, .lg-logo, .doc-logo { filter: var(--logo-filter); }   /* the logo is white: black on a light page */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.page > :empty { display: none; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.card { box-shadow: 0 1px 0 rgba(var(--ov),.04) inset, 0 12px 32px var(--sh1); }
.eyebrow { margin-bottom: 4px; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.page { animation: rise .35s cubic-bezier(.2, .7, .2, 1) both; }

.btn { transition: transform .15s, box-shadow .2s, background .2s, border-color .2s, opacity .2s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.cream:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 22px var(--btn1-glow); }
.btn.busy { position: relative; color: transparent; pointer-events: none; }
.btn.busy::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(128,128,128,.4); border-top-color: var(--red); animation: spin .7s linear infinite; }
.side a.nav, .tabs a.nav { transition: background .2s, color .2s; }
@media (hover: hover) { tbody tr:hover td { background: rgba(var(--ov),.025); } }
tbody td { transition: background .15s; }

/* role choices as tappable pills */
.checks { gap: 8px; }
.checks label { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--ctl-line); border-radius: 999px; background: rgba(var(--ov),.03); color: var(--txt2); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.checks label:has(input:checked) { background: rgba(168,38,40,.28); border-color: var(--red); color: var(--txt); }
.checks label:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.checks label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.checks input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }

/* short messages */
.toasts { position: fixed; z-index: 60; display: grid; gap: 8px; left: 16px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); pointer-events: none; }
@media (min-width: 801px) { .toasts { left: auto; right: 24px; bottom: 24px; width: 340px; } }
.toast { background: var(--panel2); border: 1px solid var(--line2); border-left: 4px solid var(--ok); border-radius: 14px; padding: 12px 16px; font-weight: 600; box-shadow: 0 10px 30px var(--sh2); animation: rise .25s ease both; }
.toast.bad { border-left-color: var(--bad); }

/* shapes shown while a page loads */
.sk-h, .sk-a, .sk-b, .sk-c { display: block; border-radius: 10px; background: linear-gradient(90deg, var(--sk1) 25%, var(--sk2) 50%, var(--sk1) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.sk-h { height: 44px; width: 55%; }
.sk.card { display: grid; gap: 12px; }
.sk-a { height: 18px; width: 40%; } .sk-b { height: 14px; width: 80%; } .sk-c { height: 14px; width: 65%; }

@media (max-width: 800px) { .page { gap: 16px; } .page > .head { margin-bottom: 2px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (min-width: 801px) { td[data-label="Package"] { min-width: 190px; } }

/* ---- tasks ---- */
.chip.bad { background: rgba(255,98,102,.15); color: var(--bad-t); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 8px 16px; border: 1px solid var(--ctl-line); border-radius: 999px; background: rgba(var(--ov),.03); color: var(--txt2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .15s; }
.pill:active { transform: scale(.97); }
.pill.on { background: rgba(168,38,40,.28); border-color: var(--red); color: var(--txt); }
.pill.busy { opacity: .6; pointer-events: none; }
.group { display: grid; gap: 12px; }
.group h2 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.list { display: grid; gap: 12px; }
.task { display: grid; gap: 12px; }
.task.over { border-color: rgba(255,98,102,.4); }
.task-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; }
.task-title { font-size: 16px; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--muted); font-size: 13px; }
.task-top > *, .task-meta > *, .dash-row > * { min-width: 0; overflow-wrap: anywhere; }   /* a long word or link in a name or note wraps instead of pushing the page sideways on a phone */
.task-note { color: var(--txt2); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.stat { display: grid; gap: 4px; }
.stat .big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
textarea { background: var(--field); border: 1px solid var(--ctl-line); border-radius: 12px; color: var(--txt); padding: 10px 12px; font: inherit; resize: vertical; }
textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; }
@media (max-width: 800px), (pointer: coarse) { textarea { font-size: 16px; } }

/* nothing may push a page wider than the screen; forms stop below the sticky top bar */
.main, .page, .form, .list, .task { grid-template-columns: minmax(0, 1fr); }
.field > input, .field > select, .field > textarea { width: 100%; min-width: 0; }
.form, .group, .task { scroll-margin-top: 84px; }

/* ---- issues: comments ---- */
.thread { display: grid; gap: 10px; }
.thread:not(:empty) { border-top: 1px solid var(--line); padding-top: 12px; }
.comment { background: rgba(var(--ov),.03); border-radius: 12px; padding: 10px 12px; }
.comment small { display: block; margin-bottom: 2px; }
.comment p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; }
.thread form input { flex: 1 1 200px; min-width: 0; }

/* ---- content: stock and shoot days ---- */
.monthbar { display: flex; align-items: center; justify-content: center; gap: 12px; }
.monthbar b { min-width: 9.5em; text-align: center; font-size: 15px; }
.monthbar .btn { min-width: 44px; font-size: 18px; line-height: 1; }
.stats.mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .stats.mini { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stats.mini .big { font-size: 26px; }
.stockcard { display: grid; gap: 16px; }
.stockline { display: grid; gap: 8px; }
.stockline-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
progress { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border: 0; border-radius: 99px; overflow: hidden; background: rgba(var(--ov),.08); color: var(--red); }
progress::-webkit-progress-bar { background: rgba(var(--ov),.08); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--red); border-radius: 99px; transition: width .3s; }
progress::-moz-progress-bar { background: var(--red); border-radius: 99px; }
progress.full::-webkit-progress-value { background: var(--ok); }
progress.full::-moz-progress-bar { background: var(--ok); }
.pieces { display: grid; gap: 12px; }
.pieces:not(:empty) { border-top: 1px solid var(--line); padding-top: 12px; }
.piece { display: grid; gap: 10px; background: rgba(var(--ov),.03); border-radius: 14px; padding: 12px; }
.pill:disabled { opacity: .35; cursor: not-allowed; }
.qty { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(var(--ov),.03); border: 1px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 12px; font-size: 13.5px; }
.qty-row input { width: 76px; min-width: 0; text-align: center; }
.sub { border-top: 1px solid var(--line); padding-top: 14px; }
.sub:empty { display: none; }
.sub h3 { font-size: 15px; }
.pkg { display: grid; gap: 10px; }
.pkg-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 8px; align-items: center; }
.pkg-row input[type=date] { grid-column: 1 / -2; }
@media (max-width: 640px) { .pkg-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .pkg-row > :first-child, .pkg-row input[type=date] { grid-column: 1 / -1; } .pkg-row .btn { grid-column: 1 / -1; } }

/* ---- reports: upload form, the report page (it prints as a white page) ---- */
.stats.mini.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats.mini.three .card { padding: 14px; }
.stats.mini.three .big { font-size: 24px; }
.stack-gap { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.rep-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row.center { justify-content: center; margin-top: 14px; }
.dz { position: relative; display: grid; gap: 4px; justify-items: center; text-align: center; padding: 26px 16px; border: 2px dashed var(--line2); border-radius: 18px; background: rgba(var(--ov),.02); cursor: pointer; transition: border-color .2s, background .2s; }
.dz:hover, .dz:focus-within { border-color: var(--red); background: rgba(168,38,40,.08); }
.dz input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; opacity: 0; cursor: pointer; }
.dz small { color: var(--muted); }
.dz-name { font-weight: 700; color: var(--cream-t); overflow-wrap: anywhere; }
.howx summary { cursor: pointer; color: var(--muted); font-size: 13px; min-height: 44px; display: flex; align-items: center; }
.howx p { color: var(--txt2); font-size: 13.5px; margin-top: 6px; }
.imp-box { display: grid; gap: 10px; }
.imp { border-radius: 14px; padding: 12px 14px; font-size: 13.5px; display: grid; gap: 8px; }
.imp.ok { background: rgba(76,208,138,.08); border: 1px solid rgba(76,208,138,.3); }
.imp.bad { background: rgba(255,98,102,.1); border: 1px solid rgba(255,98,102,.4); color: var(--bad-t2); }
.imp.warn { background: rgba(249,211,9,.08); border: 1px solid rgba(249,211,9,.3); color: var(--amber-t); }
.imp-t { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.imp-t small { display: block; color: var(--muted); }
.imp-t b { font-size: 16px; }
.paper { --muted: #6d6666; background: #fff; color: #1a1415; border-radius: 20px; overflow: hidden; box-shadow: 0 12px 32px rgba(0,0,0,.35); }
.pp-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 28px; background: #070506; color: #fff; }
.pp-head img { width: 140px; }
.pp-k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #cfc9c9; text-align: right; }
.pp-m { font-size: 20px; font-weight: 800; text-align: right; }
.pp-body { padding: 26px 28px 20px; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.pp-client { display: flex; align-items: center; gap: 14px; }
.pp-client h2 { font-size: 22px; }
.pp-client p { color: var(--muted); font-size: 13px; }
.pp-tile { width: 46px; height: 46px; border-radius: 12px; background: #070506; color: #fff; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 14px; flex: none; }
.pp-h { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--red); font-weight: 800; }
.pp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pp-t { background: #f6f3ec; border-radius: 14px; padding: 12px 14px; display: grid; gap: 3px; align-content: start; }
.pp-t small { color: var(--muted); font-size: 11.5px; }
.pp-t b { font-size: 21px; letter-spacing: -.01em; }
.dl { font-size: 11.5px; font-weight: 700; }
.dl.good { color: #1f9d5c; }
.dl.bad { color: #d23a3e; }
.dl.neutral { color: var(--muted); }
.pp-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }
.chart { width: 100%; height: auto; display: block; }
.ch-line { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linejoin: round; }
.ch-area { fill: rgba(168,38,40,.12); stroke: none; }
.ch-bar { fill: var(--red); }
.ch-t { fill: var(--muted); font-size: 11px; font-family: inherit; }
.plat { display: grid; gap: 10px; }
.plat-r { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; font-size: 13.5px; }
.paper progress, .paper progress::-webkit-progress-bar { background: rgba(0,0,0,.08); }
.pp-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pp-tbl th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid rgba(0,0,0,.1); }
.pp-tbl td { padding: 9px 10px; border-bottom: 1px solid rgba(0,0,0,.07); }
.pp-sum p { font-size: 14.5px; line-height: 1.55; }
.pp-note { margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pp-foot { display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid rgba(0,0,0,.1); color: var(--muted); font-size: 11.5px; }
@media (max-width: 800px) {
  .pp-head { padding: 18px 16px; }
  .pp-head img { width: 118px; }
  .pp-body { padding: 18px 16px; }
  .pp-cols { grid-template-columns: minmax(0, 1fr); }
  .plat-r { grid-template-columns: minmax(0, 1fr) auto; }
  .plat-r progress { grid-column: 1 / -1; order: 3; }
  .paper .stack tr { background: #f6f3ec; border-color: rgba(0,0,0,.08); }
  .paper .stack td.lead { border-color: rgba(0,0,0,.1); }
}
@media print {
  body { background: #fff !important; }
  .side, .topbar, .tabs, .mepanel, .toasts, .no-print, .form { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .paper { box-shadow: none; border-radius: 0; }
  .pp-head, .pp-tile, .pp-t, progress, .ch-area, .ch-bar, .ch-line { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pp-body, .pp-t, .pp-tbl tr { break-inside: avoid; }
}

/* ---- phone: the More menu, and attendance ---- */
.morepanel { display: none; }
@media (max-width: 800px) {
  .tabs button.nav { display: flex; align-items: center; flex: 1; flex-direction: column; justify-content: center; gap: 3px; min-height: 56px; border: 0; background: none; border-radius: 14px; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
  .tabs button.nav.on { color: var(--txt); background: rgba(168,38,40,.22); }
  .morepanel:not([hidden]) { display: grid; align-content: start; gap: 4px; position: fixed; left: 10px; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); max-height: calc(100vh - 156px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); max-height: calc(100dvh - 156px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; z-index: 35; background: var(--panel2); border: 1px solid var(--line2); border-radius: 18px; padding: 8px; box-shadow: 0 -12px 32px var(--sh2); }   /* the list is longer than a phone screen: it scrolls, under the top bar, instead of running off the top */
  .morepanel a.nav { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: 12px; color: var(--muted); font-weight: 600; }
  .morepanel a.nav.on { background: rgba(168,38,40,.22); color: var(--txt); }
}
.punchcard { display: grid; gap: 12px; justify-items: start; }
.punch-status { font-size: 20px; letter-spacing: -.01em; }
.btn.punch { min-height: 64px; width: 100%; font-size: 18px; }
@media (min-width: 801px) { .btn.punch { width: auto; min-width: 260px; } }
.att-day, .att-person { display: grid; gap: 10px; }
.att-session { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.loc { font-size: 13px; }
.maplink { color: var(--cream-t); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.fixrow { align-items: center; }
@media (max-width: 800px) { .stats.mini.three .big { font-size: 20px; white-space: nowrap; } .stats.mini.three small { font-size: 11.5px; } }

/* ---- content calendar ---- */
.st-draft { --stc: var(--stc-draft); } .st-review { --stc: var(--stc-review); } .st-client { --stc: var(--stc-client); } .st-scheduled { --stc: var(--stc-scheduled); } .st-published { --stc: var(--stc-published); }
.cal-h, .cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-h div { text-align: center; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 6px 0; }
.cal-g { gap: 6px; }
.cd { position: relative; min-height: 118px; background: rgba(var(--ov),.025); border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cd.out { background: none; border-color: transparent; }
.cd.wk { background: rgba(var(--ov),.015); }
.cd.today { border-color: var(--red); }
.dn { font-size: 12px; font-weight: 700; color: var(--muted); }
.cd.today .dn { color: var(--txt); }
.addday { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line2); background: transparent; color: var(--muted); cursor: pointer; opacity: 0; font: inherit; line-height: 1; }
.cd:hover .addday, .addday:focus-visible { opacity: 1; }
@media (hover: none) { .addday { opacity: .8; } }   /* an iPad or phone has no hover: the button has to be there to be tapped */
@media (pointer: coarse) { .addday { width: 44px; height: 44px; top: 2px; right: 2px; } .cd .dn { min-height: 42px; } }   /* a whole fingertip, with the day's row as tall so it never covers a post */
.post { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; padding: 3px 6px; border-radius: 8px; border: 0; border-left: 3px solid var(--stc, var(--muted)); background: rgba(var(--ov),.07); color: var(--txt); font: inherit; font-size: 11px; cursor: pointer; text-align: left; }
.post em { font-style: normal; font-weight: 800; font-size: 9.5px; color: var(--muted); }
.post span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (pointer: coarse) { .post { min-height: 44px; } }   /* a fingertip needs 44px, not the 23px chip a mouse is fine with */
.cal-more { background: none; border: 0; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; text-align: left; padding: 2px 4px; }
.stage-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12px; color: var(--muted); }
.sl i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--stc); margin-right: 6px; }
.cal-tools { align-items: center; justify-content: flex-start; gap: 10px; flex-wrap: wrap; }
.cal-tools select { min-width: 170px; }
.cal-agenda { display: none; }
.cal-agenda.on { display: grid; gap: 18px; }
.cal-grid.off { display: none; }
.post-card { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; display: grid; gap: 8px; border-left: 4px solid var(--stc, var(--line)); }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.steps.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stg { display: grid; justify-items: center; gap: 4px; font-size: 11px; color: var(--muted); text-align: center; }
.stg i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; background: rgba(var(--ov),.07); }
.stg.done i { background: rgba(76,208,138,.25); color: var(--ok-t); }
.stg.cur i { background: var(--red); color: #fff; }
.stg.cur { color: var(--txt); }
.detail { display: grid; gap: 14px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--red); }
.linkish { background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; padding: 0; min-height: 44px; display: flex; align-items: center; }
.person.off { opacity: .6; }
@media (max-width: 800px) { .cal-grid { display: none; } .cal-agenda { display: grid; gap: 18px; } .cal-tools select { width: 100%; } .cal-view { display: none; } .stg span { font-size: 10px; } }

/* ---- the client page ---- */
.clientlink { text-decoration: none; display: flex; align-items: center; min-height: 44px; }
.clientlink:hover b { text-decoration: underline; text-underline-offset: 3px; }
.secret { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: rgba(var(--ov),.05); border: 1px dashed var(--line2); border-radius: 12px; padding: 10px 12px; }
.secret[hidden] { display: none; }
.secret code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; overflow-wrap: anywhere; user-select: all; }
.recovery { margin: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }   /* a company login's recovery notes, shown on purpose */

/* ---- the home page ---- */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.dash { display: grid; gap: 12px; }
.dash h3 { font-size: 15px; }
.dash-row { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); min-height: 44px; }
.dash-row:first-of-type { border-top: 0; }
.wl { display: grid; grid-template-columns: minmax(70px, 1fr) minmax(0, 2fr) auto auto; gap: 10px; align-items: center; font-size: 13.5px; }
.big-num { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.stat.hot .big { color: var(--bad-t); }
@media (max-width: 800px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---- notifications: the bell, its panel and the list ---- */
.topbar-r { display: flex; align-items: center; gap: 10px; }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line2); background: rgba(var(--ov),.04); color: var(--txt); font: inherit; cursor: pointer; flex: none; }
.side-bell { width: auto; height: auto; min-height: 46px; border: 0; border-radius: 12px; background: none; color: var(--muted); font-weight: 600; justify-content: flex-start; gap: 12px; padding: 11px 12px; margin-bottom: 4px; }
.side-bell:hover { background: rgba(168,38,40,.18); color: var(--txt); }
.badge { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--side); }
.side-bell .badge { position: static; margin-left: auto; box-shadow: none; }
.badge[hidden] { display: none; }
.notifpanel { display: none; }
.notifpanel:not([hidden]) { display: grid; gap: 8px; align-content: start; position: fixed; z-index: 60; left: 258px; top: 14px; width: 390px; max-height: calc(100vh - 28px); overflow: auto; background: var(--panel2); border: 1px solid var(--line2); border-radius: 18px; padding: 14px; box-shadow: 0 18px 48px var(--sh3); }
@media (max-width: 800px) { .notifpanel:not([hidden]) { left: 10px; right: 10px; width: auto; top: calc(64px + env(safe-area-inset-top)); max-height: calc(100vh - 150px); } }
.notif { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; background: rgba(var(--ov),.03); border: 1px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; min-height: 56px; transition: background .2s, border-color .2s; }
.notif:hover { background: rgba(var(--ov),.06); }
.notif.unread { background: rgba(168,38,40,.12); border-color: rgba(168,38,40,.4); }
.notif-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(var(--ov),.07); color: var(--cream-t); font-style: normal; }
.notif-ic svg { width: 18px; height: 18px; }
.k-nudge .notif-ic { background: rgba(249,211,9,.16); color: var(--amber-t); }
.k-issue .notif-ic { background: rgba(255,98,102,.16); color: var(--bad-t); }
.k-task .notif-ic, .k-money .notif-ic { background: rgba(76,208,138,.14); color: var(--ok-t); }
.k-post .notif-ic { background: rgba(180,140,255,.16); color: var(--k-post); }
.k-shoot .notif-ic { background: rgba(106,169,255,.16); color: var(--k-shoot); }
.notif-t { display: grid; gap: 3px; min-width: 0; flex: 1; }
.notif-t b { font-size: 14px; }
.notif-t small { overflow-wrap: anywhere; color: var(--txt2); }
.notif-t small.muted { color: var(--muted); }
.notif .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--red); margin-top: 6px; }
.remind { align-items: center; }

/* ---- money: the invoice page and the legend ---- */
.lg1 { background: var(--red); }
.lg2 { background: var(--lg2); }
.ch-bar2 { fill: var(--lg2); }
.inv-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; font-size: 13.5px; }
.inv-meta > div { display: grid; gap: 2px; align-content: start; }
.inv-meta small { color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.inv-tot { display: grid; gap: 6px; justify-content: end; justify-items: end; }
.inv-tot > div { display: flex; gap: 24px; justify-content: space-between; min-width: 260px; }
.inv-tot .g { font-size: 17px; border-top: 2px solid rgba(0,0,0,.12); padding-top: 6px; }
.inv-note { font-size: 12px; color: var(--muted); }
.pp-tbl .r, .pp-tbl th.r { text-align: right; }
.stat.hot .big { color: var(--bad-t); }

/* ---- the team page ---- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pcard { display: grid; gap: 14px; align-content: start; }
.pc-ring { display: flex; align-items: center; gap: 14px; }
.pc-ring > div { display: grid; gap: 2px; }
.ring-bg { stroke: rgba(var(--ov),.1); }
.ring-fg { stroke: var(--red); }
.ring-t { fill: var(--txt); font-size: 16px; font-weight: 800; }
.pc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.pc-stats > div { background: rgba(var(--ov),.04); border-radius: 12px; padding: 8px 4px; display: grid; gap: 2px; }
.pc-stats b { font-size: 20px; }
.pc-stats .bad b { color: var(--bad-t); }

/* ---- tasks: board, timeline, history ---- */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.col { background: rgba(var(--ov),.03); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-width: 0; }
.col.over { border-color: var(--red); background: rgba(168,38,40,.08); }
.col > header { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.col > header em { margin-left: auto; font-style: normal; color: var(--muted); font-weight: 700; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.s-doing { background: var(--amber); }
.dot.s-review { background: var(--dot-review); }
.dot.s-done { background: var(--ok-t); }
.col-body { display: grid; gap: 8px; min-height: 60px; }
.bcard { background: rgba(var(--ov),.05); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; cursor: pointer; text-align: left; min-width: 0; }
.bcard:hover, .bcard.on, .bcard:focus-visible { border-color: var(--red); outline: none; }
.bcard.over { border-left: 3px solid var(--bad-t); }
.bcard[draggable=true] { cursor: grab; }
.empty-col { color: var(--muted); font-size: 12px; text-align: center; padding: 14px 6px; border: 1px dashed var(--line2); border-radius: 10px; }
progress.tl-bar { height: 6px; }
progress.tl-bar.over::-webkit-progress-value { background: var(--bad-t); }
progress.tl-bar.over::-moz-progress-bar { background: var(--bad-t); }
progress.tl-bar.ontime::-webkit-progress-value { background: var(--ok); }
progress.tl-bar.ontime::-moz-progress-bar { background: var(--ok); }
progress.tl-bar.late::-webkit-progress-value { background: var(--amber); }
progress.tl-bar.late::-moz-progress-bar { background: var(--amber); }
.tl { display: grid; gap: 6px; }
.banner { display: grid; gap: 2px; padding: 10px 14px; border-radius: 12px; background: rgba(var(--ov),.05); border-left: 4px solid var(--muted); }
.banner.ok { border-left-color: var(--ok); background: rgba(76,208,138,.1); }
.banner.warn { border-left-color: var(--amber); background: rgba(249,211,9,.08); }
.banner.bad { border-left-color: var(--bad-t); background: rgba(255,98,102,.1); }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.log li { display: flex; justify-content: space-between; gap: 12px; padding-left: 14px; border-left: 2px solid var(--line2); font-size: 14px; }
.board.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stars { display: inline-flex; align-items: center; gap: 2px; }
.star { font-style: normal; color: var(--line2); font-size: 16px; }
.star.on { color: var(--amber-t); }
button.star { background: none; border: 0; cursor: pointer; font-size: 22px; min-width: 44px; min-height: 44px; padding: 0; }
@media (max-width: 1300px) { .board.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .board, .board.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .board, .board.five { grid-template-columns: 1fr; } .log li { flex-direction: column; gap: 2px; } }

.amt-in { color: var(--ok-t); }
.amt-out { color: var(--bad-t); }

/* ---- files kept with an issue or a freelancer's job ---- */
.files { display: grid; gap: 12px; }
.file-list { display: grid; gap: 8px; }
.file-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; background: rgba(var(--ov),.03); border-radius: 12px; padding: 10px 12px; }
.file-name { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.file-preview:not(:empty) { display: grid; gap: 10px; justify-items: start; }
.file-preview figure { margin: 0; display: grid; gap: 6px; max-width: 100%; }
.file-preview img { max-width: 100%; max-height: 70vh; border-radius: 12px; border: 1px solid var(--line); }

/* ---- one freelancer job opened up ---- */
.job-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 12px 0; }
.fact { display: grid; gap: 2px; align-content: start; min-width: 0; overflow-wrap: anywhere; }

/* ---- the content plan ---- */
.plan-row { border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px 12px; margin: 0; min-width: 0; }
.plan-row legend { padding: 0 6px; font-weight: 700; }
.plan-cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.plan-cell { display: grid; gap: 4px; min-width: 0; }
.plan-cell input { width: 100%; min-width: 0; }

/* ---- files kept in Google Drive ---- */
.driveinfo { display: grid; gap: 12px; }
.drive-preview { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 12px; background: #000; }
.drive-preview-slot:not(:empty) { display: grid; gap: 8px; width: 100%; }
.upl-row { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: rgba(var(--ov),.03); }
.upl-row progress { width: 100%; }
.upl-row.done { border-left: 3px solid var(--ok); }
.upl-row.bad { border-left: 3px solid var(--bad); }

/* ---- the public privacy and terms pages ---- */
body.doc { background: radial-gradient(ellipse 900px 440px at 50% -60px, var(--glow), rgba(var(--bg-rgb),0) 70%), var(--bg); background-repeat: no-repeat; }
.doc-wrap { max-width: 840px; margin: 0 auto; padding: 22px 20px 56px; display: grid; gap: 22px; }
.doc-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.doc-logo { width: 150px; display: block; }
.doc-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.doc-nav a:not(.btn) { padding: 9px 14px; border-radius: 99px; color: var(--muted); font-weight: 600; }
.doc-nav a:not(.btn):hover, .doc-nav a[aria-current] { color: var(--txt); background: rgba(168,38,40,.2); }
.doc-nav .btn { margin-left: 6px; }
.doc-hero { padding: 26px 0 2px; display: grid; gap: 8px; }
.doc-hero h1 { font-size: clamp(30px, 6vw, 46px); line-height: 1.08; }
.doc-short { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.doc-short div { background: linear-gradient(180deg, rgba(168,38,40,.18), rgba(88,17,17,.14)); border: 1px solid rgba(168,38,40,.38); border-radius: 18px; padding: 16px 18px; display: grid; gap: 4px; align-content: start; }
.doc-short b { font-size: 15px; line-height: 1.3; }
.doc-short span { color: var(--txt-doc2); font-size: 13.5px; line-height: 1.5; }
.doc-body { display: grid; gap: 14px; counter-reset: sec; }
.doc-card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px 26px; display: grid; gap: 10px; line-height: 1.7; font-size: 14.5px; }
.doc-card h2 { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.doc-card h2::before { counter-increment: sec; content: counter(sec); width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--red); color: #fff; font-size: 13px; font-weight: 800; flex: none; }
.doc-card p, .doc-card li { color: var(--txt-doc); }
.doc-card b { color: var(--txt); }
.doc-card ul { list-style: none; padding: 0; display: grid; gap: 12px; }
.doc-card li { position: relative; padding-left: 20px; }
.doc-card li::before { content: ''; position: absolute; left: 2px; top: calc(.85em - 3.5px); width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.doc-card a { color: var(--cream-t); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.doc-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); font-size: 13px; }
.doc-foot a { color: var(--txt); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
@media (max-width: 600px) { .doc-wrap { padding: 16px 14px 40px; } .doc-card { padding: 18px 16px; border-radius: 18px; } .doc-logo { width: 122px; } .doc-hero { padding-top: 14px; } }
@media print {
  @page { size: A4; margin: 13mm 16mm; }
  :root { color-scheme: light; }
  html { background: #fff; }
  body.doc { background: #fff !important; color: #1b1415; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 12.5px; min-height: 0; }
  .doc-wrap { display: block; max-width: none; padding: 0 4px; }
  .doc-wrap > * + * { margin-top: 12px; }
  .doc-nav { display: none; }
  .doc-logo { width: 130px; filter: invert(1); }
  .doc-hero { padding-top: 6px; }
  .doc-hero h1 { color: #1b1415; font-size: 30px; }
  .doc-hero .muted, .doc-foot { color: #5b5252; }
  .doc-short { grid-template-columns: repeat(3, 1fr); break-inside: avoid; }
  .doc-short div { background: #f7ecec; border-color: #dcb8b9; }
  .doc-short b { color: #581111; }
  .doc-short span { color: #4a4040; font-size: 12px; }
  .doc-body { display: block; }
  .doc-card { display: block; background: none; border: 0; border-top: 1px solid #e3d9d9; border-radius: 0; padding: 9px 0 5px; line-height: 1.5; font-size: 12.25px; }
  .doc-card > * + * { margin-top: 7px; }
  .doc-card ul { display: block; }
  .doc-card li + li { margin-top: 8px; }
  .doc-card h2 { font-size: 15.5px; break-after: avoid; }
  .doc-card p { orphans: 3; widows: 3; }
  .doc-card li { break-inside: avoid; }
  .doc-card li::before { top: calc(.75em - 3.5px); }
  .doc-card h2, .doc-card b { color: #1b1415; }
  .doc-card p, .doc-card li { color: #2c2424; }
  .doc-card a, .doc-foot a { color: #581111; }
  .doc-foot { break-inside: avoid; margin-top: 4px; padding-top: 8px; font-size: 11px; }
  .doc-foot span + span { display: none; }
}

/* ---- the social media report: designed pages in the Zeec Media look (dark, red, one page per sheet when printed) ---- */
.reptabs { justify-content: flex-start; }
.smm-bar { display: grid; gap: 12px; justify-items: center; text-align: center; }
.smm-dates { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: center; }
.smm-dates .field { min-width: 150px; text-align: left; }
.smm-plat { border-top: 1px solid var(--line); }
.smm-plat summary { display: flex; gap: 10px; align-items: center; font-weight: 700; color: var(--txt); }
.smm-plat .grid { padding: 6px 0 12px; }

.smm-screen { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
.smm-print { display: none; }
.smm-measure { position: absolute; left: -99999px; top: 0; visibility: hidden; }
.smp.sheet { width: 210mm; border: 0; border-radius: 0; padding: 12mm 14mm 9mm; }
.smm-measure .smp.sheet { height: 296mm; }
.smm-print .smp.sheet { min-height: 296mm; }
.smp-cover.sheet { padding: 20mm 18mm 16mm; }
.smp { position: relative; overflow: hidden; border-radius: 24px; border: 1px solid var(--line2); padding: 26px; display: grid; grid-template-rows: auto 1fr auto; gap: 20px; color: #fff;
  background: radial-gradient(ellipse 80% 30% at 50% -8%, rgba(168,38,40,.38), rgba(var(--bg-rgb),0) 70%), #0b0809; }
.smp-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line2); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #d9d2d2; }
.smp-strip img { width: 110px; }
.smp-k { color: #e7b1b2; }
.smp-body { display: grid; gap: 16px; align-content: start; min-width: 0; }
.smp-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10.5px; }

.smp-cover { grid-template-rows: auto 1fr auto auto; min-height: 560px; padding: 34px;
  background: radial-gradient(ellipse 90% 60% at 88% -10%, #7a1519, rgba(var(--bg-rgb),0) 72%), radial-gradient(ellipse 60% 45% at -5% 105%, rgba(168,38,40,.45), rgba(var(--bg-rgb),0) 70%), #070506; }
.smc-logo { width: 150px; }
.smc-mid { align-self: center; display: grid; gap: 12px; }
.smc-k { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: #e7b1b2; font-weight: 700; }
.smc-title { font-size: clamp(34px, 7vw, 54px); line-height: 1.04; font-weight: 800; letter-spacing: -.025em; }
.smc-rule { width: 64px; height: 5px; border-radius: 9px; background: var(--red); margin: 6px 0; }
.smc-for { font-size: 17px; color: #e8dede; }
.smc-for b { color: #fff; }
.smc-when { justify-self: start; background: rgba(168,38,40,.28); border: 1px solid var(--red); border-radius: 99px; padding: 7px 16px; font-weight: 700; font-size: 13px; }
.smc-stats { display: grid; gap: 10px; }
.smc-stats small { letter-spacing: .16em; text-transform: uppercase; font-weight: 700; font-size: 10.5px; color: #cdbcbc; }
.smc-nums { display: flex; flex-wrap: wrap; gap: 14px 34px; }
.smc-nums div { display: grid; }
.smc-nums b { font-size: 44px; line-height: 1; font-weight: 800; }
.smc-nums span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #cdbcbc; margin-top: 4px; }
.smc-foot { display: flex; flex-wrap: wrap; gap: 14px 46px; padding-top: 18px; border-top: 1px solid rgba(var(--ov),.18); }
.smc-foot small { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #cdbcbc; }
.smc-foot b { font-size: 13.5px; }

.sm-panel { background: rgba(var(--ov),.035); border: 1px solid var(--line2); border-radius: 18px; padding: 15px 18px; display: grid; gap: 10px; break-inside: avoid; min-width: 0; }
.sm-panel h3 { font-size: 15px; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.sm-panel h3::before { content: ''; width: 5px; height: 18px; border-radius: 4px; background: var(--red); flex: none; }
.sm-panel h4 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.sm-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sm-pill { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--red); color: #fff; border-radius: 99px; padding: 4px 12px; }
.sm-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sm-tiles.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sm-t { background: linear-gradient(180deg, rgba(168,38,40,.22), rgba(88,17,17,.12)); border: 1px solid rgba(168,38,40,.4); border-left: 4px solid var(--red); border-radius: 14px; padding: 10px 12px; display: grid; gap: 2px; align-content: start; min-width: 0; }
.sm-t small { color: #e0cfcf; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.sm-t b { font-size: 26px; line-height: 1.1; letter-spacing: -.02em; }
.sm-dl { font-size: 11px; font-weight: 700; }
.sm-dl.good { color: var(--ok-t); }
.sm-dl.bad { color: #ff8b8e; }
.sm-dl.flat { color: var(--muted); }
.sm-sub { color: var(--muted); font-size: 12px; }
.sm-sum { font-size: 14px; line-height: 1.65; color: #ece6e6; }
.sm-note { border-left: 3px solid var(--red); padding: 4px 0 4px 14px; color: #fff; font-style: italic; white-space: pre-wrap; overflow-wrap: anywhere; }
.sm-empty { border: 2px dashed var(--line2); border-radius: 18px; padding: 18px; color: var(--muted); text-align: center; font-size: 13px; }
.sm-rows { display: grid; gap: 10px; }
.sm-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; font-size: 13px; }
.sm-row small { grid-column: 2 / -1; color: var(--muted); margin-top: -4px; }
.smp progress { appearance: none; width: 100%; height: 10px; border: 0; border-radius: 9px; background: rgba(var(--ov),.09); overflow: hidden; }
.smp progress::-webkit-progress-bar { background: rgba(var(--ov),.09); border-radius: 9px; }
.smp progress::-webkit-progress-value { background: linear-gradient(90deg, var(--red-d), var(--red)); border-radius: 9px; }
.smp progress::-moz-progress-bar { background: var(--red); border-radius: 9px; }
.sm-list { display: grid; }
.sm-list > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 12px; font-size: 13px; padding: 7px 0; border-top: 1px solid var(--line); }
.sm-list > div:first-child { border-top: 0; padding-top: 0; }
.sm-list b { color: #fff; }
.sm-list span { color: #ddd6d6; overflow-wrap: anywhere; }
.sm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sm-chips span { border: 1px solid var(--line2); border-radius: 99px; padding: 5px 14px; font-size: 12.5px; font-weight: 600; background: rgba(var(--ov),.04); }
.sm-chips span.on { background: rgba(168,38,40,.3); border-color: var(--red); }
.sm-checks { list-style: none; padding: 0; display: grid; gap: 9px; }
.sm-checks li { position: relative; padding-left: 28px; font-size: 14px; color: #ece6e6; }
.sm-checks li::before { content: '\2713'; position: absolute; left: 0; top: 1px; width: 19px; height: 19px; border-radius: 6px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.sm-link { color: var(--cream); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; overflow-wrap: anywhere; font-size: 13px; }
.sm-thanks { background: linear-gradient(135deg, #7a1519, #3a0b0d); border: 1px solid rgba(168,38,40,.6); border-radius: 20px; padding: 26px; text-align: center; display: grid; gap: 6px; break-inside: avoid; }
.sm-thanks h3 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.sm-thanks p { color: #f0dede; }
.sm-chart { width: 100%; height: auto; display: block; }
.sm-bar { fill: var(--red); }
.sm-bv { fill: #fff; font-size: 12px; font-weight: 700; font-family: inherit; }
.sm-bt { fill: var(--muted); font-size: 11px; font-family: inherit; }
@media (max-width: 600px) {
  .smp { padding: 18px 16px; border-radius: 20px; }
  .smp-cover { padding: 24px 20px; min-height: 480px; }
  .smc-nums b { font-size: 36px; }
  .sm-row { grid-template-columns: 84px minmax(0, 1fr) auto; }
  .sm-list > div { grid-template-columns: minmax(0, 1fr); }
  .sm-panel { padding: 16px; }
  .sm-tiles, .sm-tiles.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@page smm { size: A4; margin: 0; }
@media print {
  .smm-screen { display: none !important; }
  .smm-print { display: block; }
  .smm-print .sheet { page: smm; break-after: page; }
  .smm-print .sheet:last-child { break-after: auto; }
  .smp, .smp * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- the content workflow: work to give out, scripts ---- */
.give { display: grid; gap: 14px; }
.give-list { display: grid; gap: 10px; }
.give-client { font-size: 14px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.give-client:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.give-row { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 14px; background: rgba(var(--ov),.03); }
.give-what { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.give-do { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.give-do .field { min-width: 130px; flex: 1 1 130px; }
.script-card textarea { min-height: 140px; line-height: 1.55; }
.script-card textarea[readonly] { opacity: .85; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---- the shared practice site ---- */
.practice-bar { position: sticky; top: 0; z-index: 90; background: var(--amber); color: #16100f; text-align: center; font-weight: 800; font-size: 12px; letter-spacing: .03em; padding: 6px 12px; }
.practice-bar a { margin-left: 12px; text-decoration: underline; text-underline-offset: 3px; }
.pform { display: grid; gap: 10px; margin: 10px 0 14px; }

/* ---- the work in a task, the approvals list, and a script as a page ---- */
.work { gap: 12px; }
.work h3 { margin: 0; }
.approve-box { border-top: 1px solid var(--line); padding-top: 12px; }
.approvals { gap: 12px; }
.approve-row { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line2); border-radius: 14px; background: rgba(var(--ov),.03); }
.approve-row .file-list { margin: 0; }
.sdoc h1 { font-size: 30px; line-height: 1.15; margin: 6px 0 12px; }
.sdoc-kicker { color: #e7b1b2; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sdoc-part { display: grid; gap: 8px; }
.sdoc-part h2 { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #e7b1b2; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.sdoc-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; font-size: 15.5px; color: #f3eeee; }
.sdoc-holder { display: grid; gap: 12px; }
.sdoc-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }   /* the reference photos of a script, two across (one alone is wider) */
.sdoc-photos:has(figure:only-child) { grid-template-columns: minmax(0, 1fr); }
.sdoc-photos figure { margin: 0; display: grid; gap: 5px; break-inside: avoid; }
.sdoc-photos img { width: 100%; height: 240px; object-fit: contain; background: #000; border: 1px solid var(--line); border-radius: 10px; }
.sdoc-photos figcaption { color: var(--muted); font-size: 12px; }
@media (max-width: 560px) { .sdoc-photos { grid-template-columns: minmax(0, 1fr); } }
@page sdoc { size: A4; margin: 0; }   /* no white page margin: the dark sheet is the whole page, like the monthly reports */
@media print {
  .page:has(.sdoc-holder) > :not(:has(.sdoc-holder)) { display: none !important; }
  html:has(.sdoc-holder), body:has(.sdoc-holder) { background: #0b0809 !important; }   /* whatever is left of the last page stays dark too (beats the white page of the other documents above) */
  .sdoc { page: sdoc; width: 210mm; min-height: 297mm; border: 0; border-radius: 0; padding: 12mm 14mm 10mm; box-decoration-break: clone; overflow: visible; display: flex; flex-direction: column; }   /* clone: the padding repeats at the top and bottom of each page; flex, not a grid with a stretching row, so a page break can fall anywhere */
  .sdoc .smp-body { display: block; flex: 1 0 auto; }
  .sdoc .smp-body > * + * { margin-top: 16px; }
  .sdoc-part { display: block; }
  .sdoc-part h2 { margin-bottom: 8px; }
  .sdoc-part:has(.sdoc-photos) { break-inside: avoid; }   /* the photos stay under their heading, and move to the next page together */
  .sdoc, .sdoc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sdoc-part h2 { break-after: avoid; }   /* a long script runs on from the first page; only a heading is never left alone at the bottom */
  .sdoc-text { orphans: 3; widows: 3; }
  .sdoc-photos img { height: 74mm; }
  .sdoc-photos:has(figure:only-child) img { height: 118mm; }
}

/* ---- tracking: what a client was promised against what was done ---- */
progress.over::-webkit-progress-value { background: var(--bad-t); }
progress.over::-moz-progress-bar { background: var(--bad-t); }
.tracker { gap: 16px; }
.tracker h3 { margin: 0; }
.trk-session { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 14px; background: rgba(var(--ov),.03); }
.clients-part { margin-top: 8px; }
.archived { margin-top: 8px; }
.archived summary { color: var(--txt); font-weight: 700; font-size: 14px; }
.archived-list { display: grid; gap: 8px; margin-top: 8px; }
.archived-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 14px; background: rgba(var(--ov),.03); }
td.act .row { gap: 8px; }
.clients-part .crumbs { flex-wrap: wrap; }
.sess-left { display: grid; gap: 10px; }
.sess-now { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line2); background: rgba(var(--ov),.04); }
.sess-now.over { border-color: rgba(255,125,128,.55); background: rgba(255,125,128,.08); }

/* ---- the colour theme switch (public/theme.js) and the few Light-only touches ---- */
.theme-box { display: grid; gap: 6px; }
.theme-switch { display: flex; flex-wrap: wrap; gap: 6px; }   /* its own class, so it is never counted as a screen's tabs */
:root[data-theme=light] .tile { box-shadow: inset 0 0 0 1px var(--line2); }
:root[data-theme=light] .star:not(.on) { color: transparent; -webkit-text-stroke: 1.2px var(--ctl-line); }   /* an empty star is an outline next to a filled one */
:root[data-theme=light] .addday { color: var(--txt); }
@media (min-width: 801px) and (pointer: fine) { .side .theme-switch .pill { min-height: 32px; padding: 4px 12px; font-size: 12px; } }   /* a mouse needs less than a fingertip does; the sidebar keeps its room */

/* ---- the check before punching out: the pop-up, and the day reports ---- */
dialog.daycheck { padding: 0; margin: auto; border: 1px solid var(--line2); border-radius: 22px; background: var(--panel2); color: var(--txt); width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 24px 64px var(--sh3); overflow: hidden; }
dialog.daycheck::backdrop { background: rgba(0,0,0,.6); }
.dc-body { display: grid; gap: 14px; padding: 22px; max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; }
.dc-body h2 { font-size: 20px; }
.dc-group { display: grid; gap: 10px; }
.dc-group h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.dc-task { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 14px; background: rgba(var(--ov),.03); }
.dc-task.over { border-color: rgba(255,98,102,.4); }
.dc-task input[type=text] { width: 100%; min-width: 0; }
.dc-early { border-top: 1px solid var(--line); padding-top: 6px; }
.dc-early summary { cursor: pointer; font-weight: 700; font-size: 14px; min-height: 44px; display: flex; align-items: center; }
.dc-said { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
@media (max-width: 800px) { dialog.daycheck { width: calc(100vw - 16px); max-height: calc(100vh - 16px); } .dc-body { padding: 16px; max-height: calc(100vh - 16px); } }

/* ---- the company WhatsApp (Chat): laid out and coloured like WhatsApp, in its dark and its light look ---- */
.wa-page { gap: 12px; }
.wa-note { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.wa { --wa-bg: #0b141a; --wa-panel: #111b21; --wa-head: #202c33; --wa-in: #202c33; --wa-out: #005c4b; --wa-text: #e9edef; --wa-sub: #8696a0; --wa-line: #222d34; --wa-accent: #00a884; --wa-field: #2a3942; --wa-tick: #53bdeb; --wa-tickgrey: #8696a0; --wa-tag: #7be0c9; --wa-hover: #182229; --wa-sel: #2a3942; --wa-outsub: #a9c4be; --wa-err: #ff8b8e; --wa-sheet: #233138; --wa-name-l: 64%;
  display: grid; grid-template-columns: 380px minmax(0, 1fr); height: calc(100vh - 170px); min-height: 520px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--wa-panel); color: var(--wa-text); }
:root[data-theme=light] .wa { --wa-bg: #efeae2; --wa-panel: #fff; --wa-head: #f0f2f5; --wa-in: #fff; --wa-out: #d9fdd3; --wa-text: #111b21; --wa-sub: #54656f; --wa-line: #e9edef; --wa-accent: #00a884; --wa-field: #fff; --wa-tickgrey: #667781; --wa-tag: #1f6f55; --wa-hover: #f5f6f6; --wa-sel: #f0f2f5; --wa-outsub: #4a5a63; --wa-err: #b3202a; --wa-sheet: #fff; --wa-name-l: 30%; }
.wa button, .wa input, .wa textarea { font: inherit; color: inherit; }
.wa-sub { color: var(--wa-sub); }
.wa-list { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--wa-line); background: var(--wa-panel); }
.wa-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: var(--wa-head); min-height: 60px; }
.wa-top h2 { font-size: 20px; }
.wa-ico { width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; display: inline-grid; place-items: center; cursor: pointer; color: var(--wa-sub); font-size: 22px; }
.wa-ico:hover { background: var(--wa-sel); }
.wa-search { padding: 8px 12px 4px; }
.wa-search input { width: 100%; border: 0; border-radius: 10px; background: var(--wa-head); padding: 10px 14px; min-height: 44px; }
.wa-search input::placeholder { color: var(--wa-sub); }
.wa-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 12px 10px; }
.wa .pill { border-color: var(--wa-line); background: none; color: var(--wa-sub); }
.wa .pill.on { background: rgba(0,168,132,.18); border-color: transparent; color: var(--wa-text); }
.wa-chats { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.wa-empty-list { padding: 24px 16px; color: var(--wa-sub); text-align: center; }
.wa-item { display: grid; grid-template-columns: 49px minmax(0, 1fr); gap: 14px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--wa-line); padding: 10px 14px; cursor: pointer; min-height: 72px; }
.wa-item:hover { background: var(--wa-hover); }
.wa-item.on { background: var(--wa-sel); }
.wa-av { width: 49px; height: 49px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 15px; color: #fff; background: hsl(var(--h, 200) 32% 36%); flex: none; }
.wa-itxt { min-width: 0; display: grid; gap: 3px; }
.wa-ititle { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.wa-ititle b { font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-itime { font-size: 12px; color: var(--wa-sub); flex: none; }
.wa-itime.new { color: var(--wa-accent); }
.wa-iprev { display: flex; align-items: center; gap: 4px; color: var(--wa-sub); font-size: 14px; min-width: 0; }
.wa-iprev > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.wa-badge { flex: none; margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--wa-accent); color: #111b21; font-style: normal; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.wa-tick { flex: none; color: var(--wa-tickgrey); }
.wa-tick.read { color: var(--wa-tick); }
.wa-fail { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--wa-err); color: #fff; font-size: 10px; font-weight: 800; flex: none; }
.wa-chat { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--wa-bg); }
.wa-blank { margin: auto; max-width: 420px; padding: 24px; text-align: center; display: grid; gap: 10px; color: var(--wa-sub); }
.wa-blank b { font-size: 26px; font-weight: 300; color: var(--wa-text); }
.wa-head { display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: var(--wa-head); min-height: 60px; }
.wa-back { display: none; }
.wa-htxt { display: grid; min-width: 0; flex: 1; }
.wa-htxt b { font-weight: 500; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-htxt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-hact { gap: 4px; flex: none; }
.wa-text-btn { min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--wa-accent); font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
:root[data-theme=light] .wa-text-btn { color: #008069; }
.wa-invite { padding: 10px 16px; background: var(--wa-head); color: var(--wa-sub); font-size: 13px; border-top: 1px solid var(--wa-line); }
.wa-msgs { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 6% 10px; display: flex; flex-direction: column; }
.wa-day { align-self: center; margin: 10px 0 8px; }
.wa-day span { display: inline-block; background: var(--wa-head); color: var(--wa-sub); font-size: 12.5px; padding: 5px 12px; border-radius: 8px; box-shadow: 0 1px 1px rgba(11,20,26,.13); }
.wm { position: relative; display: flex; max-width: 100%; margin-top: 2px; }
.wm.tail { margin-top: 8px; }
.wm.in { justify-content: flex-start; } .wm.out { justify-content: flex-end; }
.wm-b { position: relative; max-width: min(75%, 560px); padding: 6px 8px 6px 9px; border-radius: 8px; box-shadow: 0 1px .5px rgba(11,20,26,.13); font-size: 14.2px; line-height: 1.38; min-width: 0; }
.wm.in .wm-b { background: var(--wa-in); }
.wm.out .wm-b { background: var(--wa-out); }
.wm.tail.in .wm-b { border-top-left-radius: 0; }
.wm.tail.out .wm-b { border-top-right-radius: 0; }
.wm.tail.in .wm-b::before, .wm.tail.out .wm-b::before { content: ''; position: absolute; top: 0; width: 8px; height: 13px; }
.wm.tail.in .wm-b::before { left: -8px; background: var(--wa-in); clip-path: polygon(100% 0, 100% 100%, 0 0); }
.wm.tail.out .wm-b::before { right: -8px; background: var(--wa-out); clip-path: polygon(0 0, 100% 0, 0 100%); }
.wm-from { display: block; font-size: 12.8px; font-weight: 600; color: hsl(var(--h, 200) 62% var(--wa-name-l)); margin-bottom: 1px; }
.wm-tag { font-size: 12.5px; color: var(--wa-tag); margin-bottom: 2px; }
.wm-tag b { font-weight: 700; }
.wm-tpl { display: block; color: var(--wa-sub); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; }
.wm.out .wm-tpl { color: var(--wa-outsub); }
.wm-quote { display: grid; gap: 1px; margin: 2px 0 4px; padding: 5px 8px; border-left: 4px solid var(--wa-accent); border-radius: 6px; background: rgba(var(--ov), .08); font-size: 13px; min-width: 0; }
.wm-quote b { color: var(--wa-tag); font-size: 12.5px; }
.wm-quote span { color: var(--wa-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm.out .wm-quote span { color: var(--wa-outsub); }
.wm-t { white-space: pre-wrap; overflow-wrap: anywhere; }
.wm-meta { float: right; display: inline-flex; align-items: center; gap: 3px; margin: 7px 0 -3px 12px; font-size: 11px; color: var(--wa-sub); }
.wm.out .wm-meta { color: var(--wa-outsub); }
.wm-err { color: var(--wa-err); font-size: 12.5px; margin-top: 4px; }
.wm-reply { align-self: center; width: 44px; height: 44px; border: 0; background: none; color: var(--wa-sub); font-size: 18px; cursor: pointer; opacity: 0; }
.wm.out .wm-reply { order: -1; }
.wm:hover .wm-reply, .wm-reply:focus-visible { opacity: 1; }
@media (hover: none) { .wm-reply { opacity: .7; } }
.wa-replybar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--wa-head); border-top: 1px solid var(--wa-line); }
.wa-replybar .wm-quote { flex: 1; margin: 0; }
.wa-compose { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px; background: var(--wa-head); }
.wa-compose textarea { flex: 1; min-width: 0; resize: none; border: 0; border-radius: 10px; background: var(--wa-field); color: var(--wa-text); padding: 12px 14px; min-height: 46px; max-height: 120px; line-height: 1.35; }
.wa-compose textarea::placeholder { color: var(--wa-sub); }
.wa-compose textarea:focus { outline: 0; }
.wa-send { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--wa-accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.wa-send.busy { color: transparent; }
.wa-send svg { width: 22px; height: 22px; }
.wa-closed { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--wa-head); color: var(--wa-sub); font-size: 13.5px; }
.wa-pretend { display: flex; align-items: center; gap: 6px; padding: 4px 10px 8px; background: var(--wa-head); border-top: 1px dashed var(--wa-line); }
.wa-pretend input { flex: 1; min-width: 0; border: 0; border-radius: 10px; background: var(--wa-field); padding: 10px 12px; min-height: 44px; }
.wa-pretend input::placeholder { color: var(--wa-sub); }
.wa-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; max-height: 80%; display: flex; flex-direction: column; background: var(--wa-sheet); border-top: 1px solid var(--wa-line); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(11,20,26,.25); }
.wa-shead { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 18px; }
.wa-sbody { display: grid; gap: 10px; padding: 4px 18px 18px; overflow-y: auto; }
.wa-sbody input { border: 1px solid var(--wa-line); border-radius: 10px; background: var(--wa-field); padding: 10px 12px; min-height: 44px; }
.wa-tpl-item { display: grid; gap: 3px; text-align: left; padding: 12px 14px; border: 1px solid var(--wa-line); border-radius: 12px; background: none; cursor: pointer; min-height: 44px; }
.wa-tpl-item:hover { background: var(--wa-hover); }
.wa-page2 { display: grid; gap: 12px; align-content: start; padding: 18px; overflow-y: auto; min-height: 0; }
.wa-page2 .form { display: grid; gap: 10px; }
.wa-page2 label { display: grid; gap: 4px; font-size: 12.5px; color: var(--wa-sub); }
.wa-page2 input, .wa-page2 textarea, .wa-page2 select { border: 1px solid var(--wa-line); border-radius: 10px; background: var(--wa-field); color: var(--wa-text); padding: 10px 12px; min-height: 44px; font: inherit; }
.wa-page2 h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--wa-sub); margin-top: 6px; }
.wa-tpl-row, .wa-ov { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--wa-line); }
.wa-tpl-row > div, .wa-ovtxt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.wa-ovtxt small { overflow-wrap: anywhere; }
@media (max-width: 800px) {
  .wa-page { display: flex; flex-direction: column; height: calc(100vh - 178px); min-height: 500px; }   /* between the top bar and the bottom tabs */
  .wa { flex: 1; height: auto; min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .wa .wa-chat { display: none; }
  .wa.open .wa-list { display: none; }
  .wa.open .wa-chat { display: flex; }
  .wa-back { display: inline-grid; }
  .wa-msgs { padding: 12px 10px 8px; }
  .wm-b { max-width: 86%; }
  .wa-hact .wa-text-btn { padding: 0 8px; }
  .wa-head { flex-wrap: wrap; row-gap: 0; }
  .wa-hact { order: 3; width: 100%; justify-content: flex-end; }
}

/* ---- pop-up notifications on this device ---- */
.push-card { display: grid; gap: 10px; }

/* ---- files in the chat: the paperclip menu, what is about to be sent, the voice recorder, and the bubbles ---- */
.wa-attach { position: relative; display: flex; }
.wa-menu { position: absolute; left: 0; bottom: 54px; z-index: 6; display: grid; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--wa-sheet); border: 1px solid var(--wa-line); box-shadow: 0 10px 30px rgba(11,20,26,.25); }
.wa-menu-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; font-size: 14.5px; }
.wa-menu-item:hover { background: var(--wa-hover); }
.wa-menu-item svg { color: var(--wa-accent); flex: none; }
.wa-rec { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; background: var(--wa-head); min-height: 62px; }
.wa-recdot { width: 12px; height: 12px; border-radius: 50%; background: #f15c6d; animation: pulse 1.2s ease-in-out infinite; flex: none; }
@keyframes pulse { 50% { opacity: .35; } }
.wa-files .wa-sbody { gap: 12px; }
.wf-item { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--wa-line); border-radius: 12px; min-width: 0; }
.wf-item.bad { border-color: var(--wa-err); }
.wf-item.bad small { color: var(--wa-err); }
.wf-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; background: var(--wa-head); }
.wf-name { display: grid; min-width: 0; }
.wf-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.wf-name small { color: var(--wa-sub); }
.wf-item audio { max-width: 240px; }
.wa-files textarea { border: 1px solid var(--wa-line); border-radius: 10px; background: var(--wa-field); color: var(--wa-text); padding: 10px 12px; min-height: 64px; font: inherit; resize: none; }
.wa-files progress { width: 100%; }
.wm-b.media { padding: 4px; }
.wm-b.media .wm-tag, .wm-b.media .wm-from, .wm-b.media .wm-quote { margin-left: 5px; margin-right: 5px; }
.wm-b.media .wm-t { padding: 2px 6px; }
.wm-media { display: block; }
.wm-img { display: block; width: min(330px, 100%); max-height: 380px; object-fit: cover; border-radius: 6px; background: var(--wa-head); }
.wm-video { display: block; width: min(330px, 100%); max-height: 380px; border-radius: 6px; background: #000; }
.wm-voice { display: grid; gap: 2px; padding: 4px 4px 0; }
.wm-voice audio { width: min(300px, 100%); height: 40px; }
.wm-voice small { color: var(--wa-sub); padding-left: 4px; overflow-wrap: anywhere; }
.wm.out .wm-voice small { color: var(--wa-outsub); }
.wm-doc { display: flex; align-items: center; gap: 12px; margin: 2px 2px 0; padding: 10px 12px; border-radius: 8px; background: rgba(var(--ov), .08); text-decoration: none; color: inherit; min-width: 220px; }
.wm-docic { flex: none; width: 40px; height: 44px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: #3b6e8f; }
.wm-docname { display: grid; min-width: 0; }
.wm-docname b { overflow-wrap: anywhere; font-weight: 500; font-size: 13.5px; }
.wm-docname small { color: var(--wa-sub); }
.wm.out .wm-docname small { color: var(--wa-outsub); }
@media (max-width: 800px) { .wa-pretend { flex-wrap: wrap; } .wa-pretend input { flex: 1 1 100%; } }
