/* WorkProof · P7 polit visual (27-10-2026)
   Última capa d'estils de l'oficina. Unifica el que cada mòdul havia resolt pel seu compte:
   escala tipogràfica, capçaleres de pàgina, filtres, enllaços, desplegables, estats buits,
   taules, tauler, agenda setmanal i taller. No canvia cap flux ni cap dada.
   Les mides surten de l'escala: el mode «Text gran i ajuda» només canvia --wp-type-k. */

/* Les mides es declaren també a body perquè el factor del mode «Text gran» (a body) les escali. */
:root, body {
  --wp-type-k: 1;
  --wp-fs-xs: calc(12px * var(--wp-type-k));
  --wp-fs-sm: calc(13px * var(--wp-type-k));
  --wp-fs-md: calc(14px * var(--wp-type-k));
  --wp-fs-lg: calc(16px * var(--wp-type-k));
  --wp-fs-xl: calc(20px * var(--wp-type-k));
  --wp-fs-2xl: calc(24px * var(--wp-type-k));
  --wp-fs-3xl: calc(28px * var(--wp-type-k));
  --wp-control-h: 36px;
  --wp-row-hover: color-mix(in srgb, var(--wp-text) 4%, transparent);
}
body.assist-mode { --wp-type-k: 1.3 !important; --wp-control-h: 44px !important; }

/* 1. Capçalera de pàgina: títol, comptador o subtítol, i acció principal a la dreta. */
body .wp02-office .wp02-content :is(.wp02-page-head, .emp-agenda-head, .emp-workshop-head) {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}
body .wp02-office .wp02-content :is(.wp02-page-head, .emp-agenda-head, .emp-workshop-head) > div:first-child { min-width: 0; flex: 1 1 320px; }
body .wp02-office .wp02-content :is(.wp02-page-head, .emp-agenda-head, .emp-workshop-head, .emp-clients-directory > header, .emp-client-detail-head) h1 {
  margin: 0;
  font-size: var(--wp-fs-2xl);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.02em;
}
body .wp02-office .wp02-content :is(.wp02-page-head, .emp-agenda-head, .emp-workshop-head) h1 + p {
  margin: 4px 0 0;
  max-width: 62ch;
  color: var(--wp-text-secondary);
  font-size: var(--wp-fs-md);
  line-height: 1.5;
}
body .wp02-office .wp02-content .wp02-title-line { display: flex; align-items: baseline; gap: 10px; }
body .wp02-office .wp02-content .wp02-title-line > span { color: var(--wp-text-secondary); font-size: var(--wp-fs-md); font-variant-numeric: tabular-nums; }
body .wp02-office .wp02-content :is(.wp02-page-head, .emp-agenda-head) .emp-agenda-create-actions { display: flex; gap: 8px; flex-wrap: wrap; }
body .wp02-office .wp02-content .emp-agenda-create-actions .button { width: auto; }

/* 2. Botons i camps d'escriptori: 36 px, text de 14 px, una sola proporció a tot arreu. */
@media (min-width: 900px) {
  body .wp02-office .wp02-content :is(.button, a.button) {
    min-height: var(--wp-control-h);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: var(--wp-fs-md);
    font-weight: 550;
    line-height: 1.3;
    gap: 6px;
  }
  body .wp02-office .wp02-content .button .wp02-icon { width: 16px; height: 16px; }
  /* A l'ordinador cap botó ocupa tota l'amplada del contingut: és un patró de mòbil. */
  body .wp02-office .wp02-content .button { width: auto; }
  /* Text de base de 14 px: els estils antics de prototip partien de 18 px per al mòbil. */
  body .wp02-office .wp02-content :is(p, li, dd, td) { font-size: var(--wp-fs-md); }
  body .wp02-office .wp02-content :is(.small, small, dt, th, label) { font-size: var(--wp-fs-sm); }
  body .wp02-office .wp02-content .emp-client-records > header p { font-size: var(--wp-fs-md); }
  body .wp02-office .wp02-content :is(.wp02-search, .wp09-search-field) { min-height: var(--wp-control-h); }
  body .wp02-office .wp02-content :is(.wp02-search input, .wp09-search-field input, .wp02-sort select, .emp-agenda-date input, .wp-inbox-toolbar select, input[type="search"]) {
    min-height: var(--wp-control-h);
    font-size: var(--wp-fs-md);
  }
}
body .wp02-office .wp02-content .wp02-search { border-radius: 8px; }
body .wp02-office .wp02-content .wp02-search input::placeholder { color: var(--wp-text-secondary); opacity: .9; }
body .wp02-office .wp02-content :is(.wp02-sort select, .wp-inbox-toolbar select) {
  appearance: none;
  -webkit-appearance: none;
  padding: 0 44px 0 12px;
  border: 1px solid var(--wp-border-input);
  border-radius: 8px;
  background-color: var(--wp-surface);
  color: var(--wp-text);
  font-weight: 500;
  cursor: pointer;
}

/* 3. Filtres: un sol estil (pestanyes amb comptador). Al mòbil es desplacen en horitzontal. */
body .wp02-office .wp02-content :is(.wp02-filters, .emp-workshop-filters, .wp-inbox-status) {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  margin: 0 0 16px;
  padding: 0 0 8px;
  border: 0;
  border-bottom: 1px solid var(--wp-border);
  border-radius: 0;
  background: transparent;
  overflow-x: auto;
  scrollbar-width: none;
}
body .wp02-office .wp02-content :is(.wp02-filters, .emp-workshop-filters, .wp-inbox-status)::-webkit-scrollbar { display: none; }
body .wp02-office .wp02-content :is(.wp02-filters .wp02-chip, .emp-workshop-filters > button, .wp-inbox-status > button) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  width: auto;
  min-height: 32px;
  margin: 0;
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--wp-text-secondary);
  font-size: var(--wp-fs-md);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
body .wp02-office .wp02-content :is(.wp02-filters .wp02-chip, .emp-workshop-filters > button, .wp-inbox-status > button):hover { background: var(--wp-row-hover); color: var(--wp-text); }
body .wp02-office .wp02-content :is(.wp02-filters .wp02-chip, .emp-workshop-filters > button, .wp-inbox-status > button)[aria-pressed="true"] {
  background: var(--wp-surface-muted);
  color: var(--wp-text);
  font-weight: 600;
}
body .wp02-office .wp02-content :is(.wp02-filters .wp02-chip, .emp-workshop-filters > button, .wp-inbox-status > button) > span {
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: transparent;
  color: var(--wp-text-secondary);
  font-size: var(--wp-fs-xs);
  font-weight: 500;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
body .wp02-office .wp02-content .wp-inbox-toolbar { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 8px; }
body .wp02-office .wp02-content .wp-inbox-toolbar .wp-inbox-status { margin: 0; padding: 0; border: 0; flex: 1 1 auto; }
body .wp02-office .wp02-content .wp-inbox-toolbar label { display: flex; align-items: center; gap: 8px; color: var(--wp-text-secondary); font-size: var(--wp-fs-sm); }

/* Selector de vista (Llista / Tauler) i barra d'eines de Feines en una sola fila. */
body .wp02-office .wp02-content .wp02-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
body .wp02-office .wp02-content .wp02-toolbar .wp02-search { flex: 1 1 280px; max-width: 420px; }
body .wp02-office .wp02-content .wp02-toolbar .wp02-sort { margin-left: auto; }
body .wp02-office .wp02-content .wp02-view-toggle button { height: 30px; font-size: var(--wp-fs-sm); }
body .wp02-office .wp02-content .wp02-view-toggle { flex: 0 0 auto; }

/* 4. Enllaços: color d'accent, sense subratllat fins que hi passes el ratolí. */
body .wp02-office .wp02-content :is(.wp02-inline-link, .text-button, .wp02-next-action, .emp-job-head p a, .wp-inbox-row h2 a) {
  color: var(--wp-accent-text);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
body .wp02-office .wp02-content :is(.wp02-inline-link, .text-button, .wp02-next-action, .emp-job-head p a, .wp-inbox-row h2 a):hover { text-decoration: underline; }
body .wp02-office .wp02-content .emp-job-head p .wp02-inline-link { color: var(--wp-text); font-weight: 500; }
body .wp02-office .wp02-content .emp-breadcrumb { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; color: var(--wp-text-secondary); font-size: var(--wp-fs-sm); }
body .wp02-office .wp02-content .emp-breadcrumb a { color: var(--wp-text-secondary); text-decoration: none; }
body .wp02-office .wp02-content .emp-breadcrumb a:hover { color: var(--wp-text); text-decoration: underline; text-underline-offset: 3px; }
body .wp02-office .wp02-content .emp-breadcrumb [aria-current] { color: var(--wp-text); font-family: 'Geist Mono', ui-monospace, monospace; font-size: var(--wp-fs-xs); }

/* 5. Desplegables i plegables: un sol marcador, cap triangle del navegador. */
body .wp02-office .wp02-content details > summary { list-style: none; cursor: pointer; }
body .wp02-office .wp02-content details > summary::-webkit-details-marker { display: none; }
body .wp02-office .wp02-content details:not(.emp-secondary-actions):not(.emp-client-more-actions):not(.emp-workshop-conditions) > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font-size: var(--wp-fs-md);
  font-weight: 550;
}
body .wp02-office .wp02-content details:not(.emp-secondary-actions):not(.emp-client-more-actions):not(.emp-workshop-conditions) > summary::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background: var(--wp-text-secondary);
  -webkit-mask: url(redisseny/assets/tabler/chevron-right.svg) center / contain no-repeat;
  mask: url(redisseny/assets/tabler/chevron-right.svg) center / contain no-repeat;
  transition: transform .15s ease;
}
body .wp02-office .wp02-content details[open]:not(.emp-secondary-actions):not(.emp-client-more-actions):not(.emp-workshop-conditions) > summary::before { transform: rotate(90deg); }
/* Menús «Més accions»: mateix aspecte a la fitxa de feina i a la de client. */
body .wp02-office .wp02-content .emp-client-more-actions > summary,
body .wp02-office .wp02-content .emp-secondary-actions > summary {
  min-height: 34px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--wp-border-input);
  border-radius: 8px;
  background: var(--wp-surface);
  font-size: var(--wp-fs-sm);
  font-weight: 550;
}
body .wp02-office .wp02-content .emp-secondary-actions .emp-job-head-actions .button { min-height: 36px; font-size: var(--wp-fs-md); gap: 10px; }
body .wp02-office .wp02-content .emp-secondary-actions .emp-job-head-actions .button .wp02-icon { color: var(--wp-text-secondary); }

/* 6. Estats buits: icona sola, una frase i com a màxim una acció. */
body .wp02-office .wp02-content :is(.wp02-empty, .emp-client-empty, .emp-workshop-empty, .wp-inbox-empty) {
  display: grid;
  justify-items: center;
  gap: 6px;
  max-width: 460px;
  margin: 24px auto;
  padding: 40px 16px;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}
body .wp02-office .wp02-content :is(.wp02-empty, .emp-client-empty, .emp-workshop-empty, .wp-inbox-empty) > :is(div, span):first-child { margin-bottom: 6px; padding: 0; background: transparent; color: var(--wp-text-secondary); }
body .wp02-office .wp02-content :is(.wp02-empty, .emp-client-empty, .emp-workshop-empty, .wp-inbox-empty) .wp02-icon { width: 24px; height: 24px; }
body .wp02-office .wp02-content :is(.wp02-empty, .emp-client-empty, .emp-workshop-empty, .wp-inbox-empty) :is(h1, h2) { margin: 0; font-size: var(--wp-fs-lg); font-weight: 600; letter-spacing: -.01em; }
body .wp02-office .wp02-content :is(.wp02-empty, .emp-client-empty, .emp-workshop-empty, .wp-inbox-empty) p { margin: 0; color: var(--wp-text-secondary); font-size: var(--wp-fs-md); line-height: 1.5; }
body .wp02-office .wp02-content :is(.wp02-empty, .emp-workshop-empty) .button { width: auto; margin-top: 10px; }

/* 7. Llista de feines: densitat d'aplicació de gestió (Linear, Stripe). */
body .wp02-office .wp02-content .wp02-list-head span { font-size: var(--wp-fs-xs); font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--wp-text-secondary); }
body .wp02-office .wp02-content .wp02-job-row { transition: background-color .12s ease; }
body .wp02-office .wp02-content .wp02-job-row:hover { background: var(--wp-row-hover); }
body .wp02-office .wp02-content .wp02-job-main > strong { font-size: var(--wp-fs-md); font-weight: 600; line-height: 1.35; }
body .wp02-office .wp02-content .wp02-job-context { gap: 8px; }
body .wp02-office .wp02-content :is(.wp02-ref, .wp-card-ref) { font-family: 'Geist Mono', ui-monospace, monospace; font-size: var(--wp-fs-xs); letter-spacing: 0; color: var(--wp-text-secondary); }
body .wp02-office .wp02-content :is(.wp02-job-client, .wp02-job-date, .wp-people-name, .wp02-phase-detail) { font-size: var(--wp-fs-sm); line-height: 1.4; }
body .wp02-office .wp02-content .wp02-job-pending { font-size: var(--wp-fs-sm); }
body .wp02-office .wp02-content .wp02-phase-detail.is-attention { display: flex; align-items: flex-start; gap: 6px; color: var(--wp-warning); font-weight: 550; }
body .wp02-office .wp02-content .wp02-phase-detail.is-attention .wp02-icon { width: 15px; height: 15px; margin-top: 1px; }
body .wp02-office .wp02-content .wp02-job-phase-group > .wp02-job-phase,
body .wp02-office .wp02-content .wp-status-pill,
body .wp02-office .wp02-content .emp-job-kicker > .emp-priority[data-stage] { font-size: var(--wp-fs-xs); min-height: 22px; padding: 1px 9px 1px 7px; }
/* «Pròxim pas» sempre com a enllaç, mai una fila amb botó i les altres amb text. */
body .wp02-office .wp02-content .wp02-next-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: auto;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: var(--wp-fs-sm);
  font-weight: 550;
}
body .wp02-office .wp02-content .wp02-next-action .wp02-icon { width: 14px; height: 14px; }
body .wp02-office .wp02-content .wp02-result { color: var(--wp-text-secondary); font-size: var(--wp-fs-sm); }

/* 8. Tauler tipus Trello: res es talla, les columnes buides ocupen poc. */
body .wp02-office .wp02-content .wp-board-col { flex: 1 0 220px; min-width: 220px; }
body .wp02-office .wp02-content .wp-board-col:has(> .wp-board-empty) { flex: 0 0 180px; min-width: 180px; }
body .wp02-office .wp02-content .wp-board-col > header h2 { font-size: var(--wp-fs-sm); font-weight: 600; }
body .wp02-office .wp02-content .wp-board-empty { padding: 10px 6px 8px; font-size: var(--wp-fs-xs); }
body .wp02-office .wp02-content .wp-card { gap: 6px; padding: 10px 12px; }
body .wp02-office .wp02-content .wp-card-title { font-size: var(--wp-fs-md); }
body .wp02-office .wp02-content .wp-card-client { font-size: var(--wp-fs-sm); }
body .wp02-office .wp02-content .wp-card-foot { flex-wrap: wrap; row-gap: 6px; }
body .wp02-office .wp02-content .wp-card-date { max-width: 100%; overflow: visible; text-overflow: clip; white-space: normal; height: auto; min-height: 22px; padding: 2px 7px; line-height: 1.3; font-size: var(--wp-fs-xs); }
body .wp02-office .wp02-content .wp-card-attention { font-size: var(--wp-fs-xs); }
/* Portada de la targeta: la foto de la prova, com les portades de Trello. */
body .wp02-office .wp02-content .wp-card-cover { display: block; margin: -10px -12px 4px; height: 96px; overflow: hidden; border-radius: 10px 10px 0 0; background: var(--wp-surface-muted); }
body .wp02-office .wp02-content .wp-card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
body .wp02-office .wp02-content .wp-card.has-cover { overflow: hidden; }
body .wp02-office .wp02-content .wp-card-cover { position: relative; }
body .wp02-office .wp02-content .wp-card-cover .wp07-sample-label { position: absolute; left: 6px; bottom: 6px; top: auto; z-index: 1; padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 10.5px; font-weight: 600; line-height: 1.3; }

/* 9. Fitxa de feina i columna de detalls. */
body .wp02-office .wp02-content .emp-job-head h1 { font-size: var(--wp-fs-2xl); font-weight: 650; letter-spacing: -.02em; }
body .wp02-office .wp02-content .emp-job-head > div > p { color: var(--wp-text-secondary); font-size: var(--wp-fs-md); }
body .wp02-office .wp02-content .emp-job-tabs a,
body .wp02-office .wp02-content .wp03-tabs a { font-size: var(--wp-fs-md); }
body .wp02-office .wp02-content .emp-aside-row { font-size: var(--wp-fs-md); }
body .wp02-office .wp02-content .emp-aside-row dt { font-size: var(--wp-fs-sm); }
body .wp02-office .wp02-content .emp-aside-note { flex-basis: 100%; color: var(--wp-text-secondary); font-size: var(--wp-fs-xs); }
body .wp02-office .wp02-content .emp-aside-note[data-tone="high"] { color: var(--wp-warning); font-weight: 550; }
body .wp02-office .wp02-content .emp-job-main > .emp-next-decision h2 { font-size: var(--wp-fs-lg); }
body .wp02-office .wp02-content .emp-job-main > .emp-next-decision p:not(.wp02-eyebrow) { font-size: var(--wp-fs-md); }
body .wp02-office .wp02-content .emp-job-instruction-block .emp-job-instruction { font-size: var(--wp-fs-md); }
body .wp02-office .wp02-content :is(.emp-job-instruction-block h2, .emp-job-aside > h2, .wp02-eyebrow) { font-size: var(--wp-fs-xs); letter-spacing: .04em; }

/* 10. Menú lateral i barra superior. */
body .wp02-office .wp02-sidebar .wp02-nav-item { min-height: 34px; gap: 10px; padding: 0 10px; border-radius: 7px; font-size: var(--wp-fs-md); font-weight: 500; }
body .wp02-office .wp02-sidebar .wp02-nav-item .wp02-icon { width: 18px; height: 18px; }
body .wp02-office .wp02-sidebar .wp02-nav-item[aria-current="page"] { font-weight: 600; }
body .wp02-office .wp02-sidebar :is(.wp03-nav-label, .wp02-nav-label) { margin: 14px 10px 4px; color: var(--wp-text-secondary); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
body .wp02-office .wp02-sidebar .wp-nav-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--wp-surface-muted); color: var(--wp-text-secondary); font-size: var(--wp-fs-xs); font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
body .wp02-office .wp02-workspace-top { min-height: 52px; font-size: var(--wp-fs-sm); color: var(--wp-text-secondary); }
body .wp02-office .wp02-workspace-top > span:last-child { display: inline-flex; align-items: center; gap: 8px; }
.wp-cmdk-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 260px;
  height: 32px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--wp-border-input);
  border-radius: 8px;
  background: var(--wp-surface);
  color: var(--wp-text-secondary);
  font: inherit;
  font-size: var(--wp-fs-sm);
  cursor: pointer;
}
.wp-cmdk-trigger:hover { border-color: var(--wp-text-secondary); color: var(--wp-text); }
.wp-cmdk-trigger .wp02-icon { width: 15px; height: 15px; }
.wp-cmdk-trigger > span:nth-child(2) { flex: 1; text-align: left; }
.wp-top-date { margin-right: 4px; color: var(--wp-text-secondary); font-size: var(--wp-fs-xs); white-space: nowrap; }
.wp-top-date::first-letter { text-transform: uppercase; }
@media (max-width: 1199px) { .wp-top-date { display: none; } }
.wp-kbd { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border: 1px solid var(--wp-border); border-radius: 5px; background: var(--wp-surface-muted); color: var(--wp-text-secondary); font-family: 'Geist Mono', ui-monospace, monospace; font-size: 11px; line-height: 1; }

/* 11. Paleta d'ordres (⌘K). */
.wp-cmdk-backdrop { position: fixed; inset: 0; z-index: 300; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: color-mix(in srgb, #000 38%, transparent); }
.wp-cmdk { width: min(620px, 100%); max-height: 70vh; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--wp-border); border-radius: 14px; background: var(--wp-surface); color: var(--wp-text); box-shadow: 0 24px 64px rgba(0, 0, 0, .28); }
.wp-cmdk-field { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--wp-border); }
.wp-cmdk-field .wp02-icon { width: 18px; height: 18px; color: var(--wp-text-secondary); }
.wp-cmdk-field input { flex: 1; min-width: 0; height: 52px; border: 0; outline: 0; background: transparent; color: var(--wp-text); font: inherit; font-size: 16px; }
.wp-cmdk-list { overflow-y: auto; padding: 6px; }
.wp-cmdk-group { margin: 8px 10px 4px; color: var(--wp-text-secondary); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.wp-cmdk-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--wp-text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.wp-cmdk-item .wp02-icon { width: 17px; height: 17px; color: var(--wp-text-secondary); flex: 0 0 auto; }
.wp-cmdk-item > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.wp-cmdk-item strong { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-cmdk-item small { color: var(--wp-text-secondary); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-cmdk-item[aria-selected="true"] { background: var(--wp-surface-muted); }
.wp-cmdk-item[aria-selected="true"] .wp-kbd { visibility: visible; }
.wp-cmdk-item .wp-kbd { visibility: hidden; }
.wp-cmdk-empty { margin: 0; padding: 28px 16px; color: var(--wp-text-secondary); font-size: 14px; text-align: center; }
.wp-cmdk-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--wp-border); color: var(--wp-text-secondary); font-size: 12px; }
.wp-cmdk-foot span { display: inline-flex; align-items: center; gap: 5px; }
@media (prefers-reduced-motion: no-preference) { .wp-cmdk { animation: wp-cmdk-in .14s ease-out; } @keyframes wp-cmdk-in { from { opacity: 0; transform: translateY(-6px) scale(.99); } } }

/* 12. Agenda: barra d'eines en una fila i setmana en graella de 7 dies (Google Calendar). */
body .wp02-office .wp02-content .emp-agenda-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 16px; padding: 0; border: 0; }
body .wp02-office .wp02-content .emp-agenda-period { display: flex; align-items: center; gap: 6px; }
body .wp02-office .wp02-content .emp-agenda-period > strong { min-width: 0; margin: 0 6px; font-size: var(--wp-fs-lg); font-weight: 600; white-space: nowrap; }
body .wp02-office .wp02-content .emp-agenda-icon { width: 32px; height: 32px; min-height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid var(--wp-border-input); border-radius: 8px; background: var(--wp-surface); }
body .wp02-office .wp02-content .emp-agenda-icon .wp02-icon { width: 16px; height: 16px; }
body .wp02-office .wp02-content .emp-agenda-today { min-height: 32px; padding: 0 12px; border: 1px solid var(--wp-border-input); border-radius: 8px; background: var(--wp-surface); color: var(--wp-text); font-size: var(--wp-fs-sm); font-weight: 550; }
body .wp02-office .wp02-content .emp-agenda-toolbar-end { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
body .wp02-office .wp02-content .emp-agenda-date input { height: 32px; min-height: 32px; padding: 0 8px; border: 1px solid var(--wp-border-input); border-radius: 8px; background: var(--wp-surface); color: var(--wp-text); font-size: var(--wp-fs-sm); }
body .wp02-office .wp02-content .emp-agenda-switch { display: inline-flex; gap: 2px; padding: 3px; border: 0; border-radius: 8px; background: var(--wp-bg-2); }
body .wp02-office .wp02-content .emp-agenda-switch a { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 6px; color: var(--wp-text-secondary); font-size: var(--wp-fs-sm); font-weight: 550; text-decoration: none; white-space: nowrap; }
body .wp02-office .wp02-content .emp-agenda-switch a[aria-current="page"] { background: var(--wp-surface); color: var(--wp-text); box-shadow: var(--wp-elevation-1); }
body .wp02-office .wp02-content .emp-agenda-sync { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--wp-text-secondary); font-size: var(--wp-fs-sm); font-weight: 550; }
body .wp02-office .wp02-content .emp-agenda-sync:hover { background: var(--wp-row-hover); color: var(--wp-text); }
body .wp02-office .wp02-content .emp-agenda-sync .wp02-icon { width: 16px; height: 16px; }

@media (min-width: 1100px) {
  body .wp02-office .wp02-content .emp-agenda-layout.is-week { display: block; }
  body .wp02-office .wp02-content .emp-agenda-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    border: 1px solid var(--wp-border);
    border-radius: 12px;
    background: var(--wp-surface);
    overflow: hidden;
  }
  body .wp02-office .wp02-content .emp-agenda-week > :not(.emp-agenda-day) { grid-column: 1 / -1; }
  body .wp02-office .wp02-content .emp-agenda-week > header { display: none; }
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    min-height: 300px;
    margin: 0;
    padding: 8px 8px 12px;
    border: 0;
    border-left: 1px solid var(--wp-border);
    border-radius: 0;
    background: transparent;
  }
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day:nth-of-type(1) { border-left: 0; }
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day,
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day.is-empty { align-items: stretch; }
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day > h2 :is(span, strong) { display: inline; margin: 0; line-height: 1.2; white-space: nowrap; }
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day > h2 { align-self: stretch; width: auto; max-width: none; flex: 0 0 auto; margin-inline: -8px; padding-inline: 12px 34px; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit-actions { justify-content: flex-start; align-items: center; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit-actions .button { justify-content: flex-start; }
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day > h2 span { font-size: var(--wp-fs-sm); font-weight: 500; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-time :is(strong, small) { white-space: nowrap; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit-copy > small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day > h2 {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 0 0 6px;
    padding: 4px 30px 8px 4px;
    border-bottom: 1px solid var(--wp-border);
    font-size: var(--wp-fs-sm);
    font-weight: 500;
    letter-spacing: 0;
  }
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day > h2 > span { color: var(--wp-text-secondary); text-transform: capitalize; }
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day > h2 > strong { order: 2; font-size: var(--wp-fs-xl); font-weight: 600; font-variant-numeric: tabular-nums; }
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day > h2 > small { display: none; }
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day.is-today > h2 > strong { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 15px; background: var(--wp-accent); color: var(--wp-accent-ink); font-size: var(--wp-fs-lg); }
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day > h2 .emp-agenda-day-create { position: absolute; top: 4px; right: 0; width: 26px; height: 26px; min-height: 26px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--wp-text-secondary); opacity: 0; }
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day:hover > h2 .emp-agenda-day-create,
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day > h2 .emp-agenda-day-create:focus-visible { opacity: 1; }
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day > h2 .emp-agenda-day-create:hover { background: var(--wp-row-hover); color: var(--wp-text); }
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day > p { display: none; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-day-visits { display: grid; gap: 6px; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin: 0;
    padding: 8px 9px 8px 10px;
    border: 1px solid var(--wp-border);
    box-shadow: inset 3px 0 0 var(--wp-visit-strip, var(--wp-pill-planned-ink));
    border-radius: 8px;
    background: var(--wp-surface);
  }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit[data-status="finished"] { --wp-visit-strip: var(--wp-pill-done-ink); }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit[data-status="started"] { --wp-visit-strip: var(--wp-pill-late-ink); }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit[data-kind="return"] { --wp-visit-strip: var(--wp-pill-late-ink); }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit.is-cancelled { opacity: .6; --wp-visit-strip: var(--wp-border-input); }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-time { display: flex; align-items: baseline; gap: 4px; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-time strong { font-size: var(--wp-fs-sm); font-weight: 600; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-time small { color: var(--wp-text-secondary); font-size: var(--wp-fs-xs); }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit-copy { display: grid; gap: 2px; min-width: 0; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-status { order: 2; width: fit-content; padding: 0; background: none; color: var(--wp-text-secondary); font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit-copy > strong { order: 1; font-size: var(--wp-fs-sm); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit-copy > small { order: 3; color: var(--wp-text-secondary); font-size: var(--wp-fs-xs); line-height: 1.35; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit-copy > small b { color: var(--wp-text); font-weight: 550; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit-actions { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 4px 0 0; padding: 0; border: 0; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit-actions .button,
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-secondary-actions .button {
    width: auto;
    min-height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--wp-accent-text);
    font-size: var(--wp-fs-xs);
    font-weight: 550;
  }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit-actions .button:hover { text-decoration: underline; text-underline-offset: 3px; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit-actions .button .wp02-icon { display: none; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-secondary-actions { display: contents; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-secondary-actions .button { color: var(--wp-text-secondary); }
  /* «Sense programar» passa a sota, en targetes horitzontals. */
  body .wp02-office .wp02-content .emp-agenda-layout.is-week > .emp-agenda-queue { position: static; width: auto; margin-top: 24px; padding: 0; border: 0; background: transparent; box-shadow: none; }
  body .wp02-office .wp02-content .emp-agenda-layout.is-week > .emp-agenda-queue .emp-agenda-queue-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
  body .wp02-office .wp02-content .emp-agenda-layout.is-week > .emp-agenda-queue .emp-agenda-queue-row { margin: 0; border: 1px solid var(--wp-border); border-radius: 10px; background: var(--wp-surface); }
}
body .wp02-office .wp02-content .emp-agenda-queue > header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
body .wp02-office .wp02-content .emp-agenda-queue > header h2 { margin: 0; font-size: var(--wp-fs-lg); font-weight: 600; }
body .wp02-office .wp02-content .emp-agenda-queue > header p { margin: 2px 0 0; color: var(--wp-text-secondary); font-size: var(--wp-fs-sm); }
body .wp02-office .wp02-content .emp-agenda-queue > header .emp-agenda-count { margin-left: auto; }
@media (min-width: 900px) { body .wp02-office .wp02-content .emp-agenda-queue-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; } }
body .wp02-office .wp02-content .emp-agenda-queue-row > div { min-width: 0; flex: 1; display: grid; gap: 1px; }
body .wp02-office .wp02-content .emp-agenda-queue-row strong { font-size: var(--wp-fs-md); font-weight: 600; }
body .wp02-office .wp02-content .emp-agenda-queue-row small,
body .wp02-office .wp02-content .emp-agenda-queue-row p { margin: 0; color: var(--wp-text-secondary); font-size: var(--wp-fs-xs); line-height: 1.4; }
body .wp02-office .wp02-content .emp-agenda-queue-row .button { min-height: 44px; font-size: var(--wp-fs-sm); }
@media (min-width: 900px) { body .wp02-office .wp02-content .emp-agenda-queue-row .button { flex: 0 0 auto; width: auto; min-height: 32px; padding: 0 10px; } }
body .wp02-office .wp02-content .emp-agenda-queue-row .button span:not(.wp02-icon) { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; clip-path: none; white-space: nowrap; }
body .wp02-office .wp02-content .emp-agenda-queue-row .button { display: inline-flex; flex-direction: row; align-items: center; gap: 4px; }
body .wp02-office .wp02-content .emp-agenda-queue-row .button .wp02-icon { width: 14px; height: 14px; }
body .wp02-office .wp02-content .emp-agenda-queue > header .emp-agenda-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--wp-surface-muted); color: var(--wp-text-secondary); font-size: var(--wp-fs-xs); font-weight: 600; display: inline-grid; place-items: center; }

/* 13. Taller: llista sense frases repetides en negreta, i tauler per fases. */
body .wp02-office .wp02-content .emp-workshop-head .wp02-view-toggle { align-self: flex-end; }
body .wp02-office .wp02-content .emp-workshop-filters { width: 100%; max-width: none; }
/* Regla 1 del model: cap icona dins d'un cercle pàl·lid; la icona del grup ja diu l'estat. */
body .wp02-office .wp02-content .emp-workshop-marker { display: none; }
body .wp02-office .wp02-content .emp-workshop-row { padding-left: 16px; border-left: 0; }
@media (min-width: 900px) { body .wp02-office .wp02-content .emp-workshop-row { grid-template-columns: minmax(180px, 1fr) minmax(0, 1.6fr) auto auto; } }
@media (min-width: 700px) and (max-width: 899px) {
  body .wp02-office .wp02-content .emp-workshop-row { grid-template-columns: minmax(0, 1fr) auto; }
  body .wp02-office .wp02-content .emp-workshop-row > :not(.emp-workshop-next) { grid-column: 1; }
  body .wp02-office .wp02-content .emp-workshop-row > .emp-workshop-next { grid-column: 2; grid-row: 1 / span 3; }
}
@media (max-width: 699px) {
  body .wp02-office .wp02-content .emp-workshop-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 14px 16px; }
  body .wp02-office .wp02-content .emp-workshop-row > * { grid-column: 1; }
  body .wp02-office .wp02-content .emp-workshop-row .emp-workshop-owner.is-empty { display: none; }
  body .wp02-office .wp02-content .emp-workshop-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  body .wp02-office .wp02-content .emp-workshop-cause > span { white-space: normal; overflow: visible; }
}
body .wp02-office .wp02-content .emp-workshop-group-icon { width: auto; height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--wp-text-secondary); }
body .wp02-office .wp02-content .emp-workshop-group > header { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 10px 16px; border-top: 0; background: var(--wp-surface-muted); }
body .wp02-office .wp02-content .emp-workshop-group-note { flex-basis: 100%; margin: 0; color: var(--wp-text-secondary); font-size: var(--wp-fs-sm); }
body .wp02-office .wp02-content .emp-workshop-cause:not(:has(strong)) > span { font-size: var(--wp-fs-sm); }
body .wp02-office .wp02-content .emp-workshop-group > header h2 { font-size: var(--wp-fs-md); font-weight: 600; }
body .wp02-office .wp02-content .emp-workshop-cause > strong { font-size: var(--wp-fs-md); font-weight: 500; }
body .wp02-office .wp02-content .emp-workshop-cause > span { color: var(--wp-text-secondary); font-size: var(--wp-fs-xs); }
body .wp02-office .wp02-content .emp-workshop-identity strong { font-size: var(--wp-fs-md); font-weight: 600; }
body .wp02-office .wp02-content .emp-workshop-identity small { font-size: var(--wp-fs-sm); }
body .wp02-office .wp02-content .emp-workshop-action { min-height: 32px; font-size: var(--wp-fs-sm); }
body .wp02-office .wp02-content .emp-workshop-board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding: 2px 2px 12px; }
body .wp02-office .wp02-content .emp-workshop-board .wp-board-col[data-phase="prepare"] { --wp-pill-ink: var(--wp-pill-quiet-ink); }
body .wp02-office .wp02-content .emp-workshop-board .wp-board-col[data-phase="ready"] { --wp-pill-ink: var(--wp-pill-planned-ink); }
body .wp02-office .wp02-content .emp-workshop-board .wp-board-col[data-phase="production"] { --wp-pill-ink: var(--wp-pill-progress-ink); }
body .wp02-office .wp02-content .emp-workshop-board .wp-board-col[data-phase="mount"] { --wp-pill-ink: var(--wp-pill-done-ink); }
.emp-workshop-card { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--wp-border); border-radius: 10px; background: var(--wp-surface); box-shadow: var(--wp-elevation-1); }
.emp-workshop-card-identity { display: grid; gap: 1px; color: var(--wp-text); text-decoration: none; }
.emp-workshop-card-identity:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.emp-workshop-card-identity strong { font-size: var(--wp-fs-md); font-weight: 600; line-height: 1.35; }
.emp-workshop-card-identity small { color: var(--wp-text-secondary); font-size: var(--wp-fs-sm); }
.emp-workshop-card-flag { display: flex; align-items: center; gap: 6px; margin: 0; padding: 4px 8px; border-radius: 6px; background: var(--wp-pill-late-bg); color: var(--wp-pill-late-ink); font-size: var(--wp-fs-xs); font-weight: 600; }
.emp-workshop-card-flag .wp02-icon { width: 14px; height: 14px; }
.emp-workshop-card-meta { margin: 0; color: var(--wp-text-secondary); font-size: var(--wp-fs-xs); }
.emp-workshop-card .emp-workshop-action { justify-content: space-between; width: 100%; }

/* 14. Clients, avisos, plantilles i cerca: mateixa escala. */
body .wp02-office .wp02-content .emp-client-row strong { font-size: var(--wp-fs-md); font-weight: 600; }
body .wp02-office .wp02-content .emp-client-row :is(small, span:not(.emp-client-avatar)) { font-size: var(--wp-fs-sm); }
body .wp02-office .wp02-content .emp-client-empty h2 { font-size: var(--wp-fs-lg); }
body .wp02-office .wp02-content .wp-inbox-row h2 { font-size: var(--wp-fs-lg); }
body .wp02-office .wp02-content .wp-inbox-row p,
body .wp02-office .wp02-content .wp-inbox-meta { font-size: var(--wp-fs-sm); }
body .wp02-office .wp02-content .wp03-template-card h2 { font-size: var(--wp-fs-xl); }
body .wp02-office .wp02-content .wp03-template-card header p { font-size: var(--wp-fs-sm); color: var(--wp-text-secondary); }
body .wp02-office .wp02-content .wp03-template-grid section { border-top-width: 1px; }
body .wp02-office .wp02-content .wp03-template-grid h3 { font-size: var(--wp-fs-md); }
body .wp02-office .wp02-content .wp03-template-grid p { font-size: var(--wp-fs-sm); }
body .wp02-office .wp02-content .wp09-search-limit { margin-top: 16px; color: var(--wp-text-secondary); font-size: var(--wp-fs-xs); }
body .wp02-office .wp02-content .wp09-search-form { margin-bottom: 8px; }

/* 15. Mòbil: capçalera compacta, filtres desplaçables i agenda que mostra visites a la primera pantalla. */
@media (max-width: 699px) {
  body .wp02-office .wp02-content :is(.wp02-page-head, .emp-agenda-head, .emp-workshop-head) h1 { font-size: var(--wp-fs-3xl); }
  body .wp02-office .wp02-content :is(.wp02-page-head, .emp-agenda-head, .emp-workshop-head) { margin-bottom: 16px; align-items: center; }
  body .wp02-office .wp02-content :is(.wp02-page-head, .emp-agenda-head, .emp-workshop-head) > div:first-child { flex: 1 1 auto; }
  body .wp02-office .wp02-content .emp-agenda-create-actions { width: 100%; display: grid !important; grid-template-columns: 1fr 1fr; }
  body .wp02-office .wp02-content .emp-agenda-create-actions .button { min-height: 44px; font-size: 15px; }
  body .wp02-office .wp02-content .emp-agenda-head h1 + p { display: none; }
  body .wp02-office .wp02-content .emp-agenda-toolbar { display: grid; grid-template-columns: 1fr; gap: 10px; }
  body .wp02-office .wp02-content .emp-agenda-period { justify-content: space-between; }
  body .wp02-office .wp02-content .emp-agenda-period > strong { flex: 1; text-align: center; font-size: 15px; }
  body .wp02-office .wp02-content .emp-agenda-toolbar-end { display: grid; grid-template-columns: 1fr auto; }
  body .wp02-office .wp02-content .emp-agenda-toolbar-end .emp-agenda-date { display: none; }
  body .wp02-office .wp02-content .emp-agenda-switch { width: 100%; }
  body .wp02-office .wp02-content .emp-agenda-switch a { flex: 1; justify-content: center; height: 32px; }
  body .wp02-office .wp02-content .emp-agenda-sync span { display: none; }
  /* Reflow: al mòbil els filtres del taller i dels avisos passen a una segona fila en lloc de sortir de la pantalla. */
  body .wp02-office .wp02-content :is(.emp-workshop-filters, .wp-inbox-status) { flex-wrap: wrap; overflow: visible; }
  body .wp02-office .wp02-content .emp-agenda-day.is-empty { min-height: 0; padding-block: 6px; }
  body .wp02-office .wp02-content .emp-workshop-head .wp02-view-toggle { width: 100%; }
  body .wp02-office .wp02-content .emp-workshop-head .wp02-view-toggle button { flex: 1; justify-content: center; }
  body .wp02-office .wp02-content .wp02-toolbar .wp02-search { flex-basis: 100%; max-width: 100%; min-width: 0; }
  body .wp02-office .wp02-content .wp02-toolbar .wp02-search input { min-width: 0; width: 100%; }
  /* A Feines, al mòbil els filtres viuen dins de «Més filtres» (decisió P2b). */
  body .wp02-office .wp02-content:has(.wp02-job-tools) .wp02-filters { display: none; }
  body .wp02-office .wp02-content .wp02-toolbar .wp02-sort { margin-left: 0; flex: 1; }
  .wp-cmdk-backdrop { padding-top: 8px; }
}
@media (max-width: 899px) { .wp-cmdk-trigger { display: none; } }

/* Resum del taller: tres comptadors discrets, número a sobre i etiqueta a sota, columnes iguals. */
body .wp02-office .wp02-content .emp-workshop-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; max-width: 480px; margin: 0 0 16px; padding: 0; border: 1px solid var(--wp-border); border-radius: 10px; background: var(--wp-surface); }
body .wp02-office .wp02-content .emp-workshop-counts > span { display: grid; gap: 2px; justify-items: start; min-width: 0; padding: 10px 14px; border: 0; border-left: 1px solid var(--wp-border); }
body .wp02-office .wp02-content .emp-workshop-counts > span:first-child { border-left: 0; }
body .wp02-office .wp02-content .emp-workshop-counts strong { font-size: var(--wp-fs-xl); font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--wp-text); }
body .wp02-office .wp02-content .emp-workshop-counts small { color: var(--wp-text-secondary); font-size: var(--wp-fs-xs); }
body .wp02-office .wp02-content .emp-workshop-counts [data-count="decision"] strong:not(:empty) { color: var(--wp-text); }
@media (max-width: 699px) { body .wp02-office .wp02-content .emp-workshop-counts { max-width: none; } }

/* Avís d'atenció al costat de l'estat (fitxa de feina): «Cal actuar», «Retorn pendent»… */
body .wp02-office .wp02-content .wp-attention-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 1px 9px 1px 7px; border-radius: 999px; background: var(--wp-pill-late-bg); color: var(--wp-pill-late-ink); font-size: var(--wp-fs-xs); font-weight: 600; }
body .wp02-office .wp02-content .wp-attention-chip .wp02-icon { width: 13px; height: 13px; }
body .wp02-office .wp02-content .emp-job-kicker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Retocs finals: comptadors sense alçada sobrant i línia del dia d'amplada sencera. */
body .wp02-office .wp02-content .emp-workshop-counts > span { min-height: 0; height: auto; align-content: start; }
@media (min-width: 1100px) {
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day { padding-inline: 0; }
  body .wp02-office .wp02-content .emp-agenda-week > .emp-agenda-day > h2 { margin-inline: 0; padding-inline: 12px 34px; }
  body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-day-visits { padding-inline: 8px; }
}

/* P7: estats de l'agenda amb el mateix codi que les etiquetes de Feines, i amb forma a més de color
   (es distingeixen també en blanc i negre i amb daltonisme):
   Programada = punt ple blau · En curs / retorn = punt ple ambre · Acabada = anella verda · Cancel·lada = anella vermella ratllada. */
body .emp-agenda-status-legend i,
body .emp-agenda-mobile-markers i { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--wp-pill-planned-ink); box-sizing: border-box; }
body .emp-agenda-mobile-markers { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
body .emp-agenda-mobile-markers i { flex-basis: 7px; width: 7px; height: 7px; }
body :is(.emp-agenda-status-legend, .emp-agenda-mobile-markers) i:is([data-status="started"], [data-kind="return"]) { background: var(--wp-pill-late-ink); }
body :is(.emp-agenda-status-legend, .emp-agenda-mobile-markers) i[data-status="finished"] { background: transparent; border: 2px solid var(--wp-pill-done-ink); }
body :is(.emp-agenda-status-legend, .emp-agenda-mobile-markers) i[data-status="cancelled"] { background: linear-gradient(135deg, transparent 42%, var(--wp-error) 42% 58%, transparent 58%); border: 2px solid var(--wp-error); }
body .emp-agenda-month-event { --event: var(--wp-pill-planned-ink); --event-bg: var(--wp-pill-planned-bg); }
body .emp-agenda-month-event:is([data-status="started"], [data-kind="return"]) { --event: var(--wp-pill-late-ink); --event-bg: var(--wp-pill-late-bg); }
body .emp-agenda-month-event[data-status="finished"] { --event: var(--wp-pill-done-ink); --event-bg: transparent; box-shadow: inset 0 0 0 1px var(--wp-pill-done-ink); }
body .emp-agenda-month-event[data-status="cancelled"] { --event: var(--wp-error); --event-bg: transparent; box-shadow: inset 0 0 0 1px var(--wp-border-input); }
body .wp02-office .wp02-content .emp-agenda-week .emp-agenda-visit[data-status="finished"] { --wp-visit-strip: var(--wp-pill-done-ink); }

/* P7: «Pròxim pas» alineat com els enllaços de la columna. */
@media (min-width: 801px) { body .wp02-office .wp02-content .wp02-list-head > span:last-child { text-align: right; } }

/* ── P7 · passada final ─────────────────────────────────────────────── */

/* Fitxa: un sol fil d'Ariadna. A l'escriptori el fa la barra superior; al mòbil queda «‹ Feines». */
body .wp02-office .wp-top-crumb { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
body .wp02-office .wp-top-crumb > [aria-hidden] { color: var(--wp-border-strong, var(--wp-text-secondary)); }
body .wp02-office .wp-top-crumb a { color: var(--wp-text-secondary); text-decoration: none; }
body .wp02-office .wp-top-crumb a:hover { color: var(--wp-text); text-decoration: underline; text-underline-offset: 3px; }
body .wp02-office .wp-top-crumb [aria-current] { color: var(--wp-text); font-weight: 550; }
/* La barra superior només es veu amb la barra lateral (≥ 1200 px); per sota, el fil de dins la pàgina es queda. */
@media (min-width: 1200px) {
  body .wp02-office:has(.wp-top-crumb) .wp02-content .emp-breadcrumb { display: none; }
}
@media (min-width: 701px) {

  /* Capçalera igual que al mòbil: títol, estat i referència a sota, «Més accions» a l'altura del títol. */
  body .wp02-office .wp02-content .emp-job-head { position: relative; }
  body .wp02-office .wp02-content .emp-job-head > div { display: flex; flex-direction: column; }
  body .wp02-office .wp02-content .emp-job-head h1 { order: 0; margin: 0 0 10px; padding-right: 160px; }
  body .wp02-office .wp02-content .emp-job-head .emp-job-kicker { order: 1; margin: 0 0 8px; }
  body .wp02-office .wp02-content .emp-job-head > div > p { order: 2; margin: 0; }
  body .wp02-office .wp02-content .emp-job-head .emp-job-kicker > .emp-secondary-actions { position: absolute; top: 0; right: 0; margin: 0; }
}

/* Detalls: el valor enllaçat porta a l'Agenda, sense una fila sencera per a l'enllaç. */
body .wp02-office .wp02-content .emp-aside-value-link { color: var(--wp-accent-text); font-weight: 500; text-decoration: none; }
body .wp02-office .wp02-content .emp-aside-edit { flex: 0 0 auto; display: inline-grid; place-items: center; width: 32px; height: 32px; margin: -6px -6px -6px auto; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--wp-text-secondary); cursor: pointer; }
body .wp02-office .wp02-content .emp-aside-edit:hover { background: var(--wp-surface-muted); color: var(--wp-text); }
body .wp02-office .wp02-content .emp-aside-edit .wp02-icon { width: 16px; height: 16px; }
body .wp02-office .wp02-content .emp-aside-value-link:hover { color: var(--wp-accent-text); text-decoration: underline; text-underline-offset: 3px; }
body .wp02-office .wp02-content .emp-aside-row dd > .wp-status-pill { flex: 0 0 auto; white-space: nowrap; }

/* Fitxa entre 701 i 1099 px: en columna, el resum i els detalls ocupen tota l'amplada (abans quedaven a mitja pantalla). */
@media (max-width: 1099px) {
  body .wp02-office .wp02-content .emp-job-layout { align-items: stretch; }
}

/* Pressupost: les dades de la dreta en files etiqueta–valor, com els Detalls de la fitxa. */
body .wp02-office .wp02-content .wp03-commercial-layout > aside dl { grid-template-columns: 112px minmax(0, 1fr); gap: 0; margin-top: 8px; }
body .wp02-office .wp02-content .wp03-commercial-layout > aside :is(dt, dd) { margin: 0; padding: 10px 0; border-top: 1px solid var(--wp-border); }
body .wp02-office .wp02-content .wp03-commercial-layout > aside dt { font-size: var(--wp-fs-sm); letter-spacing: 0; text-transform: none; }
body .wp02-office .wp02-content .wp03-commercial-layout > aside :is(dt, dd):nth-of-type(1) { border-top: 0; }

/* Menú mòbil: les mateixes seccions que la barra lateral. */
body .wp02-menu-list .wp03-nav-label { margin: 4px 12px 2px; color: var(--wp-text-secondary); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
body .wp02-menu-list .wp03-nav-separator { margin: 10px 12px; }

/* Feines al mòbil: l'ordenació no es talla a mitja paraula. */
@media (max-width: 700px) {
  body .wp02-office .wp02-content .wp02-sort select { text-overflow: ellipsis; }
}
@media (max-width: 480px) {
  /* Llista/Tauler només amb icona: el nom continua accessible i l'ordenació hi cap sencera. */
  body .wp02-office .wp02-content .wp02-view-toggle button > span:not(.wp02-icon) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body .wp02-office .wp02-content .wp02-view-toggle button { min-width: 44px; justify-content: center; }
}

/* ── P7 · Nova feina amb la mateixa estructura que «Programar visita» ─────────────── */
body .emp-intake-drawer .emp-intake-context { margin: 0 0 2px; color: var(--wp-text-secondary); font-size: var(--wp-fs-sm); }
body .emp-intake-drawer .emp-intake-context::first-letter { text-transform: uppercase; }
body .emp-intake-drawer .emp-intake-form { gap: 22px; }
body .emp-intake-drawer .emp-intake-section:first-child { padding-top: 0; border-top: 0; }
body .emp-intake-drawer .emp-intake-section > label { display: grid; gap: 7px; color: var(--wp-text-body); font-size: var(--wp-fs-sm); font-weight: 600; }
body .emp-intake-drawer .emp-intake-section > label small { color: var(--wp-text-secondary); font-weight: 400; line-height: 1.45; }
/* «Crear client» es llegeix com una acció, no com un text solt. */
body .emp-intake-drawer .emp-intake-section > div:has(> [data-action="emp-intake-new-client"]) { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: -4px; }
body .emp-intake-drawer .emp-intake-section > div > .text-button { min-height: 40px; padding: 0; color: var(--wp-accent-text); font-weight: 600; }
body .emp-intake-drawer .emp-intake-section > div > .text-button { display: inline-flex; align-items: center; gap: 6px; }
body .emp-intake-drawer .emp-intake-section > div > .text-button::before { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: url(redisseny/assets/tabler/plus.svg) center / contain no-repeat; mask: url(redisseny/assets/tabler/plus.svg) center / contain no-repeat; }
/* Els opcionals, agrupats en una llista amb files i fletxa, en lloc de triangles solts. */
body .emp-intake-drawer .emp-intake-more { border: 1px solid var(--wp-border); border-radius: 10px; background: var(--wp-surface); overflow: hidden; }
body .emp-intake-drawer .emp-intake-more > .emp-intake-detail { margin: 0; border: 0; border-top: 1px solid var(--wp-border); border-radius: 0; }
body .emp-intake-drawer .emp-intake-more > .emp-intake-detail:first-child { border-top: 0; }
body .emp-intake-drawer .emp-intake-more > .emp-intake-detail > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 16px; list-style: none; cursor: pointer; color: var(--wp-text); font-size: var(--wp-fs-md); font-weight: 500; }
body .emp-intake-drawer .emp-intake-more > .emp-intake-detail > summary::-webkit-details-marker { display: none; }
body .emp-intake-drawer .emp-intake-more > .emp-intake-detail > summary::after { content: ""; width: 8px; height: 8px; margin-left: auto; flex: 0 0 auto; border-right: 1.75px solid var(--wp-text-secondary); border-bottom: 1.75px solid var(--wp-text-secondary); transform: rotate(-45deg); transition: transform .15s ease; }
body .emp-intake-drawer .emp-intake-more > .emp-intake-detail[open] > summary::after { transform: rotate(45deg); }
body .emp-intake-drawer .emp-intake-more > .emp-intake-detail > summary:hover { background: var(--wp-surface-muted); }
body .emp-intake-drawer .emp-intake-more > .emp-intake-detail > :not(summary) { margin-left: 16px; margin-right: 16px; }
body .emp-intake-drawer .emp-intake-more > .emp-intake-detail[open] { padding-bottom: 14px; }
body .emp-intake-drawer .emp-intake-more > .emp-intake-detail[open] > summary { border-bottom: 1px solid var(--wp-border); margin-bottom: 12px; }
body .emp-intake-drawer .emp-intake-more label { display: grid; gap: 7px; margin-bottom: 12px; font-size: var(--wp-fs-sm); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { body .emp-intake-drawer .emp-intake-more > .emp-intake-detail > summary::after { transition: none; } }

/* Fulls i diàlegs: el mateix marcador de plegable que a les pàgines (cap triangle del navegador). */
body :is(.sheet, .emp-assignment-dialog, .emp-intake-drawer) details:not(.emp-intake-detail):not(.emp-secondary-actions) > summary { display: flex; align-items: center; gap: 8px; min-height: 40px; list-style: none; cursor: pointer; font-weight: 550; }
body :is(.sheet, .emp-assignment-dialog, .emp-intake-drawer) details > summary::-webkit-details-marker { display: none; }
body :is(.sheet, .emp-assignment-dialog, .emp-intake-drawer) details:not(.emp-intake-detail):not(.emp-secondary-actions) > summary::before {
  content: ""; width: 16px; height: 16px; flex: 0 0 auto; background: var(--wp-text-secondary);
  -webkit-mask: url(redisseny/assets/tabler/chevron-right.svg) center / contain no-repeat;
  mask: url(redisseny/assets/tabler/chevron-right.svg) center / contain no-repeat;
  transition: transform .15s ease;
}
body :is(.sheet, .emp-assignment-dialog, .emp-intake-drawer) details[open]:not(.emp-intake-detail):not(.emp-secondary-actions) > summary::before { transform: rotate(90deg); }
