/* Portal de l'equip · Fundació Origo */
:root {
  --verd: #273837; --verd-2: #1d2b2a; --verd-3: #33494a;
  --blau: #A0C9CB; --blau-2: #5f8f92; --blau-clar: #e7f1f1;
  --crema: #F5F4ED; --paper: #FBFBF7; --blanc: #fff;
  --terra: #733635; --lima: #C1F879; --taronja: #FF6037;
  --text: #273837; --suau: rgba(39, 56, 55, .64); --linia: rgba(39, 56, 55, .12);
  --ombra: 0 1px 2px rgba(39,56,55,.06), 0 8px 24px -12px rgba(39,56,55,.25);
  --ombra-gran: 0 30px 80px -30px rgba(10,20,19,.55);
  --r: 18px; --r-petit: 12px;
  --barra: 72px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.op { font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); background: var(--crema);
  -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--verd); }
[hidden] { display: none !important; }

/* ─── Botons i camps ─── */
.op-boto { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--verd); color: #fff; font-weight: 700; padding: 12px 20px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 10px 24px -12px rgba(39,56,55,.8); transition: transform .15s ease, background .15s ease; }
.op-boto:hover { background: var(--verd-2); }
.op-boto:active { transform: scale(.98); }
.op-boto[disabled] { opacity: .55; cursor: progress; }
.op-boto--gran { width: 100%; padding: 16px 22px; font-size: 16px; }
.op-boto--clar { background: var(--blanc); color: var(--verd); border: 1px solid var(--linia); box-shadow: none; }
.op-boto--clar:hover { background: var(--crema); }
.op-boto--perill { background: #fff; color: #9c2b24; border: 1px solid #efc9c5; box-shadow: none; }
.op-boto--petit { padding: 8px 14px; font-size: 13px; }
.op-boto svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.op-enllac { background: none; border: 0; padding: 4px; color: var(--suau); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.op-form { display: grid; gap: 14px; }
.op-camp { display: grid; gap: 6px; }
.op-camp > span { font-size: 13px; font-weight: 700; }
.op-camp small { font-weight: 500; color: var(--suau); }
.op-camp input, .op-camp select, .op-camp textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--linia); border-radius: var(--r-petit); background: var(--blanc);
  font-size: 16px; transition: border-color .15s ease, box-shadow .15s ease; -webkit-appearance: none; appearance: none; }
.op-camp select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23273837' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 38px; }
.op-camp textarea { min-height: 96px; resize: vertical; }
.op-camp input:focus, .op-camp select:focus, .op-camp textarea:focus { outline: none; border-color: var(--blau-2); box-shadow: 0 0 0 4px rgba(160,201,203,.35); }
.op-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.op-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--verd); flex-shrink: 0; }
.op-error { margin: 0; padding: 10px 14px; border-radius: var(--r-petit); background: #fbeceb; color: #8f2f28; font-weight: 600; font-size: 14px; }
.op-avís { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--r-petit); background: #fff3d9; color: #7a5200; font-weight: 600; font-size: 14px; }
.op-parany { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.op-etiqueta { margin: 0 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blau-2); }
.op-spinner { width: 18px; height: 18px; border: 2.5px solid var(--blau); border-top-color: var(--verd); border-radius: 50%; display: inline-block; animation: op-gira .8s linear infinite; vertical-align: -3px; }
@keyframes op-gira { to { transform: rotate(360deg); } }

/* ─── Porta (entrada, alta, confirmació) ─── */
.op-porta { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; }
.op-porta__fons { position: fixed; inset: 0; background: var(--verd) center / cover no-repeat; filter: saturate(.9); }
.op-porta__fons::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(29,43,42,.55), rgba(29,43,42,.88)); }
.op-porta__targeta { position: relative; width: min(440px, 100%); background: var(--paper); border-radius: 26px; padding: 30px 26px 26px; box-shadow: var(--ombra-gran); }
.op-porta__marca img { display: block; height: 40px; width: auto; margin-bottom: 22px; }
.op-porta__titol { margin: 0 0 8px; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.015em; }
.op-porta__text { margin: 0 0 20px; color: var(--suau); }
.op-porta__peu { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--suau); }
.op-foto { justify-self: center; width: 116px; height: 116px; border-radius: 50%; border: 2px dashed var(--blau-2); background: var(--blau-clar);
  cursor: pointer; padding: 0; overflow: hidden; display: grid; place-items: center; color: var(--blau-2); }
.op-foto img { width: 100%; height: 100%; object-fit: cover; }
.op-foto__buit { display: grid; justify-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.op-foto__buit svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.op-foto.te-foto { border-style: solid; border-color: var(--verd); }
.op-fet { text-align: center; }
.op-fet__icona svg { width: 84px; height: 84px; fill: none; stroke: var(--verd); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.op-fet__icona circle { stroke: var(--blau); }

/* ─── Aplicació ─── */
.op-carrega { min-height: 100dvh; display: grid; place-items: center; color: var(--suau); font-weight: 600; }
.op-shell { min-height: 100dvh; display: grid; grid-template-columns: 248px 1fr; }
.op-lateral { position: sticky; top: 0; height: 100dvh; background: var(--verd); color: #e9f1f0; padding: 22px 16px; display: flex; flex-direction: column; gap: 22px; }
.op-lateral__marca { display: flex; align-items: center; gap: 10px; padding: 4px 8px 0; }
.op-lateral__marca img { height: 30px; width: auto; filter: brightness(0) invert(1); opacity: .95; }
.op-lateral__marca span { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blau); }
.op-nav { display: grid; gap: 4px; }
.op-nav button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; color: inherit; padding: 11px 12px; border-radius: 12px;
  font-weight: 600; cursor: pointer; text-align: left; transition: background .15s ease; }
.op-nav button:hover { background: rgba(255,255,255,.07); }
.op-nav button.is-actiu { background: rgba(160,201,203,.18); color: #fff; }
.op-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.op-nav .op-nav__compte { margin-left: auto; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--taronja); color: #fff; }
.op-lateral__jo { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.06); }
.op-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--blau); color: var(--verd); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex-shrink: 0; overflow: hidden; }
.op-lateral__jo div { min-width: 0; }
.op-lateral__jo strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-lateral__jo small { color: var(--blau); font-weight: 600; }
.op-lateral__jo button { margin-left: auto; background: none; border: 0; color: #cfdedd; cursor: pointer; padding: 6px; border-radius: 8px; }
.op-lateral__jo button:hover { background: rgba(255,255,255,.08); }
.op-lateral__jo svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.op-principal { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 120px; }
.op-capcalera { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.op-capcalera h1 { margin: 0; font-size: clamp(24px, 3.2vw, 32px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.op-capcalera p { margin: 4px 0 0; color: var(--suau); }
.op-capcalera__accions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.op-entorn { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 6px; background: #fff1d6; color: #8a5a00; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; }

.op-barra-filtres { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.op-cerca { flex: 1 1 220px; position: relative; }
.op-cerca input { width: 100%; padding: 12px 14px 12px 40px; border: 1px solid var(--linia); border-radius: 999px; background: var(--blanc); font-size: 15px; }
.op-cerca input:focus { outline: none; border-color: var(--blau-2); box-shadow: 0 0 0 4px rgba(160,201,203,.3); }
.op-cerca svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--suau); stroke-width: 2; }
.op-xips { display: flex; gap: 6px; flex-wrap: wrap; }
.op-xip { border: 1px solid var(--linia); background: var(--blanc); border-radius: 999px; padding: 8px 13px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.op-xip.is-actiu { background: var(--verd); color: #fff; border-color: var(--verd); }
.op-xip b { font-weight: 800; opacity: .7; margin-left: 4px; }
.op-selector { border: 1px solid var(--linia); background: var(--blanc); border-radius: 999px; padding: 9px 34px 9px 14px; font-size: 13px; font-weight: 700; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23273837' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }

/* Targetes */
.op-graella { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.op-targeta { background: var(--blanc); border-radius: var(--r); box-shadow: var(--ombra); padding: 16px; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; text-align: left; width: 100%; display: block; }
.op-targeta:hover { transform: translateY(-2px); border-color: rgba(95,143,146,.35); }
.op-targeta__cap { display: flex; gap: 12px; align-items: flex-start; }
.op-targeta__titol { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.3; }
.op-targeta__sub { margin: 2px 0 0; color: var(--suau); font-size: 13.5px; }
.op-targeta__peu { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.op-targeta__autor { margin-left: auto; font-size: 12px; color: var(--suau); font-weight: 600; }
.op-pastilla { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--crema); color: var(--verd); }
.op-pastilla--blau { background: var(--blau-clar); color: #2f5d60; }
.op-pastilla--verd { background: #e3f3e6; color: #1f5130; }
.op-pastilla--taronja { background: #ffe9e1; color: #9a3412; }
.op-pastilla--gris { background: #eeeeea; color: #5d6564; }
.op-pastilla--lila { background: #eee9ff; color: #4c3a99; }
.op-pastilla--fosc { background: var(--verd); color: #fff; }
.op-icona-tipus { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; background: var(--blau-clar); color: var(--verd); }
.op-icona-tipus svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.op-edifici-foto { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; margin: -4px 0 12px; background: linear-gradient(135deg, var(--blau-clar), var(--crema)); display: grid; place-items: center; color: var(--blau-2); overflow: hidden; }
.op-edifici-foto img { width: 100%; height: 100%; object-fit: cover; }
.op-edifici-foto svg { width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.op-buit { padding: 40px 20px; text-align: center; color: var(--suau); background: var(--blanc); border-radius: var(--r); border: 1px dashed var(--linia); }
.op-buit strong { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }

/* Inici */
.op-xifres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.op-xifra { background: var(--blanc); border-radius: var(--r); padding: 16px; box-shadow: var(--ombra); border: 0; text-align: left; cursor: pointer; }
.op-xifra b { display: block; font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.op-xifra span { display: block; margin-top: 6px; font-size: 13px; color: var(--suau); font-weight: 600; }
.op-xifra--fosca { background: var(--verd); color: #fff; }
.op-xifra--fosca span { color: var(--blau); }
.op-blocs { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.op-bloc { background: var(--blanc); border-radius: var(--r); box-shadow: var(--ombra); padding: 18px; }
.op-bloc h2 { margin: 0 0 12px; font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.op-llista { list-style: none; margin: 0; padding: 0; display: grid; }
.op-llista li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--linia); cursor: pointer; }
.op-llista li:first-child { border-top: 0; }
.op-llista__data { width: 48px; text-align: center; flex-shrink: 0; background: var(--crema); border-radius: 10px; padding: 5px 0; }
.op-llista__data b { display: block; font-size: 17px; font-weight: 800; line-height: 1; }
.op-llista__data span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--suau); }
.op-llista__text { min-width: 0; flex: 1; }
.op-llista__text strong { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-llista__text small { color: var(--suau); }
.op-llista li[data-membre], .op-llista li[data-pendent] { flex-wrap: wrap; }
.op-llista li .op-boto { flex-shrink: 0; }
[data-resultat]:empty { display: none; }
.op-taula { width: 100%; border-collapse: collapse; font-size: 14px; }
.op-taula th { text-align: left; font-size: 12px; font-weight: 700; color: var(--suau); padding: 6px 8px; border-bottom: 1px solid var(--linia); }
.op-taula td { padding: 10px 8px; border-bottom: 1px solid var(--linia); }
.op-taula td.num { text-align: center; font-weight: 800; }

/* Full (fitxa i formulari) */
.op-full { position: fixed; inset: 0; z-index: 50; display: grid; justify-items: end; grid-template-rows: minmax(0, 1fr); height: 100dvh; }
.op-full__fons { position: absolute; inset: 0; background: rgba(17,27,26,.45); backdrop-filter: blur(3px); animation: op-apareix .2s ease; }
.op-full__panell { position: relative; width: min(680px, 100%); height: 100%; background: var(--paper); box-shadow: var(--ombra-gran); display: flex; flex-direction: column; animation: op-llisca .28s cubic-bezier(.2,.7,.2,1); }
@keyframes op-apareix { from { opacity: 0; } }
@keyframes op-llisca { from { transform: translateX(40px); opacity: 0; } }
.op-full__cap { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--linia); background: var(--paper); }
.op-full__cap h2 { margin: 0; font-size: 18px; font-weight: 800; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-tanca { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(39,56,55,.07); cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.op-tanca svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.op-full__cos { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.op-full__peu { display: flex; gap: 10px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linia); background: var(--paper); }
.op-full__peu .op-boto { flex: 1; }
.op-seccio { margin: 22px 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--blau-2); }
.op-seccio:first-child { margin-top: 0; }
.op-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.op-opcions { display: flex; flex-wrap: wrap; gap: 8px; }
.op-opcio { position: relative; cursor: pointer; }
.op-opcio input { position: absolute; opacity: 0; pointer-events: none; }
.op-opcio span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 999px; border: 1px solid var(--linia); background: var(--blanc); font-size: 14px; font-weight: 600; }
.op-opcio input:checked + span { background: var(--verd); color: #fff; border-color: var(--verd); }
.op-opcio input:focus-visible + span { box-shadow: 0 0 0 4px rgba(160,201,203,.45); }
.op-dades { display: grid; gap: 2px; margin: 0; }
.op-dades div { display: grid; grid-template-columns: 140px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--linia); }
.op-dades dt { color: var(--suau); font-size: 13px; font-weight: 600; }
.op-dades dd { margin: 0; font-weight: 600; white-space: pre-wrap; word-break: break-word; }
.op-galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.op-galeria a { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--crema); display: block; }
.op-galeria img { width: 100%; height: 100%; object-fit: cover; }
.op-docs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.op-docs li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--blanc); border-radius: 10px; border: 1px solid var(--linia); }
.op-docs a { font-weight: 700; text-decoration: none; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-pujar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.op-progres { font-size: 13px; color: var(--suau); font-weight: 600; }
.op-acord { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px; border: 1px solid var(--linia); border-radius: 12px; background: var(--blanc); margin-bottom: 8px; }
.op-acord__fila { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; align-items: end; }
.op-tagsel { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--linia); border-radius: 12px; background: var(--blanc); min-height: 48px; }
.op-tagsel label { cursor: pointer; }
.op-tagsel input { position: absolute; opacity: 0; pointer-events: none; }
.op-tagsel span { display: inline-block; padding: 6px 11px; border-radius: 999px; background: var(--crema); font-size: 13px; font-weight: 600; }
.op-tagsel input:checked + span { background: var(--verd); color: #fff; }
.op-enllac-generat { background: var(--blau-clar); border-radius: 14px; padding: 14px; margin-top: 10px; }
.op-enllac-generat code { display: block; font-size: 12px; word-break: break-all; background: #fff; padding: 10px; border-radius: 8px; margin: 8px 0; }

/* Botó flotant i barra inferior (mòbil) */
.op-fab { position: fixed; right: 22px; bottom: 26px; z-index: 30; width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--taronja); color: #fff; cursor: pointer;
  box-shadow: 0 16px 34px -12px rgba(255,96,55,.8); display: grid; place-items: center; transition: transform .15s ease; }
.op-fab:active { transform: scale(.94); }
.op-fab svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.op-menu-nou { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; justify-items: center; }
.op-menu-nou__fons { position: absolute; inset: 0; background: rgba(17,27,26,.45); }
.op-menu-nou__panell { position: relative; width: min(520px, 100%); background: var(--paper); border-radius: 24px 24px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); animation: op-puja .25s cubic-bezier(.2,.7,.2,1); }
@keyframes op-puja { from { transform: translateY(30px); opacity: 0; } }
.op-menu-nou h2 { margin: 0 0 14px; font-size: 18px; font-weight: 800; }
.op-menu-nou__opcions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.op-menu-nou__opcions button { display: grid; gap: 8px; justify-items: start; padding: 16px; border-radius: 16px; border: 1px solid var(--linia); background: var(--blanc); cursor: pointer; text-align: left; font-weight: 700; }
.op-menu-nou__opcions small { font-weight: 500; color: var(--suau); }
.op-barra-baix { display: none; }
.op-toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 80; background: var(--verd); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700; box-shadow: var(--ombra-gran); animation: op-puja .2s ease; max-width: calc(100% - 32px); }
.op-toast--error { background: #9c2b24; }

@media (max-width: 900px) {
  .op-shell { grid-template-columns: 1fr; }
  .op-lateral { display: none; }
  .op-principal { padding: 18px 14px calc(var(--barra) + 90px); }
  .op-barra-sup { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--verd); color: #fff; position: sticky; top: 0; z-index: 20; }
  .op-barra-sup img { height: 26px; width: auto; filter: brightness(0) invert(1); }
  .op-barra-sup span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blau); }
  .op-barra-sup .op-avatar { margin-left: auto; width: 34px; height: 34px; cursor: pointer; border: 0; }
  .op-barra-baix { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: rgba(251,251,247,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--linia); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .op-barra-baix button { border: 0; background: none; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; font-size: 10.5px; font-weight: 700; color: var(--suau); cursor: pointer; position: relative; }
  .op-barra-baix button.is-actiu { color: var(--verd); }
  .op-barra-baix svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .op-barra-baix .op-nav__compte { position: absolute; top: 2px; right: 22%; font-size: 10px; padding: 0 5px; border-radius: 999px; background: var(--taronja); color: #fff; }
  .op-fab { bottom: calc(var(--barra) + 14px + env(safe-area-inset-bottom)); right: 16px; width: 56px; height: 56px; }
  .op-full__panell { width: 100%; border-radius: 0; animation: op-puja .25s cubic-bezier(.2,.7,.2,1); }
  .op-2 { grid-template-columns: 1fr; }
  .op-acord__fila { grid-template-columns: 1fr 1fr; }
  .op-dades div { grid-template-columns: 110px 1fr; }
  .op-capcalera__accions { margin-left: 0; width: 100%; }
}
@media (min-width: 901px) {
  .op-barra-sup { display: none; }
  .op-menu-nou { align-items: center; padding: 24px; }
  .op-menu-nou__panell { border-radius: 24px; padding: 24px 22px; box-shadow: var(--ombra-gran); animation: op-apareix .2s ease; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ═══ Capa visual v2 (09-10-2026): imatge, profunditat i moviment ═══ */
:root { --serif: "Playfair Display", Georgia, serif; --suau-2: rgba(39,56,55,.5); --vidre: rgba(255,255,255,.72); }
body.op--app { background:
  radial-gradient(1200px 600px at 100% -10%, rgba(160,201,203,.28), transparent 60%),
  radial-gradient(900px 500px at -10% 110%, rgba(193,101,76,.10), transparent 60%), var(--crema); background-attachment: fixed; }

/* Entrada esglaonada i transició de vista */
@keyframes op-entra { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.op-entra { animation: op-entra .55s cubic-bezier(.2,.75,.25,1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes op-vista { from { opacity: 0; } }
.op-vista-entra { animation: op-vista .35s ease both; }

/* Barra lateral */
.op-lateral { background:
  radial-gradient(420px 260px at 0% 0%, rgba(160,201,203,.16), transparent 70%),
  radial-gradient(360px 300px at 100% 100%, rgba(193,101,76,.16), transparent 70%),
  linear-gradient(180deg, #2b3f3e, #1b2827); box-shadow: inset -1px 0 0 rgba(255,255,255,.05); padding: 26px 16px 18px; }
.op-lateral__marca { flex-direction: column; align-items: flex-start; gap: 10px; padding: 0 10px 10px; border-bottom: 1px solid rgba(255,255,255,.08); }
.op-lateral__marca img { height: 70px; filter: none; opacity: 1; }
.op-lateral__marca span { font-size: 10.5px; letter-spacing: .2em; color: rgba(160,201,203,.85); }
.op-nav { gap: 2px; }
.op-nav button { position: relative; padding: 12px 14px; color: rgba(233,241,240,.78); transition: background .2s ease, color .2s ease, transform .2s ease; }
.op-nav button:hover { color: #fff; transform: translateX(2px); }
.op-nav button.is-actiu { background: linear-gradient(90deg, rgba(160,201,203,.22), rgba(160,201,203,.06)); color: #fff; }
.op-nav button.is-actiu::before { content: ''; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(180deg, var(--lima), var(--blau)); box-shadow: 0 0 14px rgba(193,248,121,.55); }
.op-nav button.is-actiu svg { color: var(--lima); }
.op-lateral__jo { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(6px); }

/* Capçalera amb imatge */
.op-capcalera { position: relative; isolation: isolate; overflow: hidden; align-items: flex-end; min-height: 148px; padding: 26px 28px; border-radius: 26px; color: #fff; margin-bottom: 22px;
  box-shadow: 0 24px 60px -34px rgba(10,20,19,.7); background: var(--verd); }
.op-capcalera::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--img) center 40% / cover no-repeat; transform: scale(1.06); animation: op-kenburns 22s ease-in-out infinite alternate; }
.op-capcalera::after { content: ''; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(100deg, rgba(23,35,34,.92) 0%, rgba(23,35,34,.72) 42%, rgba(23,35,34,.25) 100%),
  linear-gradient(0deg, rgba(23,35,34,.55), transparent 60%); }
@keyframes op-kenburns { to { transform: scale(1.14) translate(-1.5%, -1%); } }
.op-capcalera h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.01em; line-height: 1.05; text-shadow: 0 2px 24px rgba(0,0,0,.25); }
.op-capcalera h1 em { font-style: italic; color: var(--lima); }
.op-capcalera p { color: rgba(255,255,255,.82); max-width: 560px; }
.op-capcalera__eyebrow { margin: 0 0 10px !important; font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--blau) !important; display: flex; align-items: center; gap: 10px; }
.op-capcalera__eyebrow::before { content: ''; width: 26px; height: 2px; border-radius: 2px; background: var(--lima); }
.op-capcalera .op-entorn { margin-left: 4px; background: rgba(255,184,77,.95); color: #3b2600; }
.op-capcalera__accions .op-boto { background: var(--lima); color: var(--verd); box-shadow: 0 14px 30px -14px rgba(193,248,121,.9); }
.op-capcalera__accions .op-boto:hover { background: #d4ff9a; transform: translateY(-1px); }
.op-capcalera__accions .op-selector { background-color: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.28); backdrop-filter: blur(8px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
.op-capcalera__accions .op-selector option { color: var(--verd); }
.op-capcalera--hero { min-height: 270px; padding: 34px 34px 92px; }
.op-capcalera--hero h1 { font-size: clamp(38px, 5.4vw, 62px); }
.op-capcalera--hero p { font-size: 16px; }

/* Xifres sobre la imatge */
.op-xifres { position: relative; z-index: 2; margin: -72px 18px 26px; gap: 14px; }
.op-xifra { position: relative; overflow: hidden; padding: 18px 18px 16px; border-radius: 20px; background: var(--vidre); backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.7); box-shadow: 0 18px 40px -24px rgba(10,20,19,.55); transition: transform .25s ease, box-shadow .25s ease; }
.op-xifra:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -24px rgba(10,20,19,.6); }
.op-xifra i { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--blau-clar); color: var(--verd); }
.op-xifra i svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.op-xifra b { font-family: var(--serif); font-size: 42px; font-weight: 700; letter-spacing: -.01em; }
.op-xifra b small { font-family: "Plus Jakarta Sans", sans-serif; font-size: 15px; font-weight: 700; opacity: .45; }
.op-xifra--fosca { background: linear-gradient(140deg, #2f4544, #1b2827); border-color: rgba(255,255,255,.08); }
.op-xifra--fosca i { background: rgba(193,248,121,.16); color: var(--lima); }
.op-xifra--fosca b { color: #fff; }

/* Blocs i llistes */
.op-bloc { border-radius: 22px; padding: 20px; border: 1px solid rgba(39,56,55,.06); box-shadow: 0 1px 2px rgba(39,56,55,.04), 0 18px 40px -30px rgba(39,56,55,.45); }
.op-bloc h2 { font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: 0; }
.op-llista li { border-radius: 12px; padding: 10px 8px; margin: 0 -8px; transition: background .2s ease; }
.op-llista li:hover { background: rgba(160,201,203,.14); }
.op-llista__data { background: linear-gradient(160deg, var(--blau-clar), #f3f1e8); box-shadow: inset 0 0 0 1px rgba(39,56,55,.05); }
.op-llista__data b { font-family: var(--serif); font-size: 19px; }

/* Filtres */
.op-cerca input { background: rgba(255,255,255,.85); backdrop-filter: blur(8px); box-shadow: 0 8px 22px -18px rgba(39,56,55,.6); }
.op-xip { transition: all .2s ease; }
.op-xip:hover { border-color: var(--blau-2); }
.op-xip.is-actiu { box-shadow: 0 10px 20px -12px rgba(39,56,55,.8); }

/* Targetes */
.op-graella { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.op-targeta { border-radius: 22px; padding: 18px; border: 1px solid rgba(39,56,55,.06); box-shadow: 0 1px 2px rgba(39,56,55,.04), 0 16px 34px -28px rgba(39,56,55,.5);
  transition: transform .3s cubic-bezier(.2,.75,.25,1), box-shadow .3s ease, border-color .3s ease; position: relative; overflow: hidden; }
.op-targeta::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s ease; }
.op-targeta:hover { transform: translateY(-5px); border-color: rgba(95,143,146,.3); box-shadow: 0 2px 4px rgba(39,56,55,.05), 0 30px 50px -30px rgba(39,56,55,.55); }
.op-targeta:hover::after { transform: translateX(120%); }
.op-targeta__titol { font-size: 16.5px; letter-spacing: -.01em; }
.op-targeta .op-avatar { width: 44px; height: 44px; font-size: 15px; box-shadow: 0 8px 18px -10px rgba(39,56,55,.7); }
.op-icona-tipus { background: linear-gradient(150deg, var(--blau-clar), #f4f2ea); box-shadow: inset 0 0 0 1px rgba(39,56,55,.05); }
.op-pastilla { font-weight: 700; letter-spacing: .01em; }

/* Edificis: foto a sang */
.op-targeta--edifici { padding: 0 0 16px; }
.op-targeta--edifici > :not(.op-edifici-foto) { margin-left: 18px; margin-right: 18px; }
.op-targeta--edifici .op-edifici-foto { position: relative; margin: 0 0 14px; border-radius: 0; aspect-ratio: 16 / 10; }
.op-targeta--edifici .op-edifici-foto img { transition: transform .9s cubic-bezier(.2,.75,.25,1); }
.op-targeta--edifici:hover .op-edifici-foto img { transform: scale(1.07); }
.op-targeta--edifici.te-foto .op-edifici-foto::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(23,35,34,.35), transparent 45%); }
.op-targeta--edifici .op-targeta__peu .op-targeta__autor { margin-right: 0; }
.op-fitxa-foto { margin: -20px -20px 18px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--crema); position: relative; }
.op-fitxa-foto img { width: 100%; height: 100%; object-fit: cover; display: block; animation: op-zoom 1.2s cubic-bezier(.2,.75,.25,1) both; }
.op-fitxa-foto::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(251,251,247,1), transparent 30%); }
@keyframes op-zoom { from { transform: scale(1.08); opacity: 0; } }
.op-galeria a { border-radius: 14px; transition: transform .25s ease, box-shadow .25s ease; }
.op-galeria a:hover { transform: scale(1.04); box-shadow: 0 14px 26px -16px rgba(39,56,55,.7); }

/* Buit */
.op-buit { border-radius: 22px; padding: 48px 22px; background: rgba(255,255,255,.7); border: 1.5px dashed rgba(95,143,146,.35); }
.op-buit strong { font-family: var(--serif); font-size: 22px; font-weight: 700; margin-bottom: 6px; }

/* Full lateral */
.op-full__fons { background: rgba(17,27,26,.5); backdrop-filter: blur(6px); }
.op-full__panell { box-shadow: -30px 0 80px -30px rgba(10,20,19,.6); }
.op-full__cap { background: rgba(251,251,247,.86); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 2; }
.op-full__cap h2 { font-family: var(--serif); font-size: 22px; font-weight: 700; }
.op-full__peu { background: rgba(251,251,247,.92); backdrop-filter: blur(12px); }
.op-seccio { display: flex; align-items: center; gap: 10px; }
.op-seccio::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(95,143,146,.35), transparent); }
.op-opcio span, .op-tagsel span { transition: all .18s ease; }
.op-opcio input:checked + span, .op-tagsel input:checked + span { box-shadow: 0 8px 18px -10px rgba(39,56,55,.8); }

/* Botó + i menú */
.op-fab { background: radial-gradient(circle at 30% 25%, #ff8a5e, var(--taronja) 55%, #d9441f); box-shadow: 0 18px 36px -12px rgba(255,96,55,.85), 0 0 0 0 rgba(255,96,55,.45);
  animation: op-pols 2.8s ease-out infinite; transition: transform .3s cubic-bezier(.2,.75,.25,1); }
.op-fab:hover { transform: scale(1.06); }
.op-fab svg { transition: transform .3s cubic-bezier(.2,.75,.25,1); }
.op-fab.is-obert { animation: none; }
.op-fab.is-obert svg { transform: rotate(45deg); }
@keyframes op-pols { 0% { box-shadow: 0 18px 36px -12px rgba(255,96,55,.85), 0 0 0 0 rgba(255,96,55,.45); } 70%, 100% { box-shadow: 0 18px 36px -12px rgba(255,96,55,.85), 0 0 0 16px rgba(255,96,55,0); } }
.op-menu-nou__fons { background: rgba(17,27,26,.5); backdrop-filter: blur(6px); animation: op-apareix .2s ease; }
.op-menu-nou h2 { font-family: var(--serif); font-size: 24px; font-weight: 700; }
.op-menu-nou__opcions button { transition: transform .25s cubic-bezier(.2,.75,.25,1), box-shadow .25s ease, border-color .25s ease; animation: op-entra .4s cubic-bezier(.2,.75,.25,1) both; }
.op-menu-nou__opcions button:nth-child(2) { animation-delay: .04s; } .op-menu-nou__opcions button:nth-child(3) { animation-delay: .08s; }
.op-menu-nou__opcions button:nth-child(4) { animation-delay: .12s; } .op-menu-nou__opcions button:nth-child(5) { animation-delay: .16s; }
.op-menu-nou__opcions button:hover { transform: translateY(-3px); border-color: rgba(95,143,146,.4); box-shadow: 0 18px 30px -22px rgba(39,56,55,.7); }
.op-menu-nou__opcions button:nth-child(1) .op-icona-tipus { background: linear-gradient(150deg, #dfeeee, #c6e0e1); }
.op-menu-nou__opcions button:nth-child(2) .op-icona-tipus { background: linear-gradient(150deg, #ffe6dc, #ffd0bd); color: #9a3412; }
.op-menu-nou__opcions button:nth-child(3) .op-icona-tipus { background: linear-gradient(150deg, #eef6dd, #dcefb8); color: #3d5a1e; }
.op-menu-nou__opcions button:nth-child(4) .op-icona-tipus { background: linear-gradient(150deg, #e9e6f7, #d6d0f0); color: #3d3478; }
.op-menu-nou__opcions button:nth-child(5) .op-icona-tipus { background: linear-gradient(150deg, #fbeedd, #f3dcb8); color: #7a4b12; }
.op-menu-nou__opcions button:nth-child(6) .op-icona-tipus { background: linear-gradient(150deg, #2f4544, #1b2827); color: var(--lima); }
.op-menu-nou__opcions button:nth-child(6) { animation-delay: .2s; }
.op-avatar--org { border-radius: 14px; background: linear-gradient(135deg, #f3dcb8, #e2b77a) !important; color: #6b4210 !important; }
.op-avatar--org svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Avís */
.op-toast { display: flex; align-items: center; gap: 10px; padding: 12px 20px 12px 14px; background: rgba(27,40,39,.94); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.08); }
.op-toast svg { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--lima); color: var(--verd); fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.op-toast--error { background: rgba(126,31,42,.95); }
.op-toast--error svg { background: #fff; color: #7e1f2a; }

/* Porta (alta i entrada) */
.op-porta__fons { animation: op-kenburns 26s ease-in-out infinite alternate; transform: scale(1.06); }
.op-porta__targeta { background: rgba(251,251,247,.94); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.6); animation: op-entra .6s cubic-bezier(.2,.75,.25,1) both; }
.op-porta__titol { font-family: var(--serif); font-weight: 700; font-size: 34px; letter-spacing: -.005em; }
.op-porta .op-boto--gran { background: linear-gradient(135deg, #2f4544, var(--verd) 60%, #1b2827); }

/* Ajustos */
.op-xifra b span { display: inline; margin: 0; font-size: inherit; color: inherit; font-weight: inherit; }
.op-xifra:not(.op-xifra--fosca) { background: rgba(255,255,255,.95); }
.op-llista { grid-template-columns: minmax(0, 1fr); }
.op-llista li { min-width: 0; margin: 0; padding: 10px 8px; border-radius: 0; }
.op-llista li:hover { background: rgba(160,201,203,.12); }
.op-bloc { overflow: hidden; }

/* Notes de veu */
.op-boto--veu { width: 100%; padding: 15px 20px; font-size: 15.5px; margin-bottom: 14px; background: linear-gradient(135deg, #2f4544, #1b2827); box-shadow: 0 16px 30px -18px rgba(10,20,19,.9); }
.op-boto--veu svg { color: var(--lima); width: 20px; height: 20px; }
.op-veus { display: grid; gap: 10px; margin-bottom: 14px; }
.op-veu { padding: 14px; border-radius: 18px; background: var(--blanc); border: 1px solid rgba(39,56,55,.07); box-shadow: 0 14px 30px -26px rgba(39,56,55,.6); animation: op-entra .45s cubic-bezier(.2,.75,.25,1) both; }
.op-veu__cap { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.op-veu__cap svg { width: 30px; height: 30px; padding: 6px; border-radius: 10px; background: var(--blau-clar); fill: none; stroke: var(--verd); stroke-width: 1.9; stroke-linecap: round; }
.op-veu__cap small { color: var(--suau); font-weight: 600; }
.op-veu__cap .op-enllac { margin-left: auto; }
.op-veu audio { width: 100%; height: 40px; }
.op-veu__text { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: linear-gradient(160deg, #f6f9f4, #eef4ef); border-left: 3px solid var(--lima); white-space: pre-wrap; line-height: 1.6; font-size: 14.5px; }
.op-veu__estat { margin-top: 10px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; color: var(--blau-2); }
.op-veu__estat--error { color: #8f2f28; }
.op-ones { display: inline-flex; gap: 3px; align-items: center; height: 18px; }
.op-ones i { width: 4px; border-radius: 3px; background: var(--blau-2); animation: op-ona 1s ease-in-out infinite; }
.op-ones i:nth-child(2) { animation-delay: .15s; } .op-ones i:nth-child(3) { animation-delay: .3s; } .op-ones i:nth-child(4) { animation-delay: .45s; }
@keyframes op-ona { 0%, 100% { height: 5px; } 50% { height: 18px; } }
.op-gravadora { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 18px; }
.op-gravadora__fons { position: absolute; inset: 0; background: radial-gradient(700px 500px at 50% 40%, rgba(47,69,68,.92), rgba(15,24,23,.97)); backdrop-filter: blur(8px); animation: op-apareix .25s ease; }
.op-gravadora__panell { position: relative; width: min(460px, 100%); text-align: center; color: #fff; animation: op-entra .4s cubic-bezier(.2,.75,.25,1) both; }
.op-gravadora__titol { margin: 0 0 22px; font-family: var(--serif); font-size: 28px; font-weight: 700; }
.op-gravadora__punt { width: 104px; height: 104px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,96,55,.16); animation: op-batec 1.6s ease-in-out infinite; }
.op-gravadora__punt span { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff8a5e, var(--taronja) 60%, #c9381a); box-shadow: 0 0 30px rgba(255,96,55,.8); }
@keyframes op-batec { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,96,55,.35); } 50% { box-shadow: 0 0 0 22px rgba(255,96,55,0); } }
.op-gravadora__temps { font-family: var(--serif); font-size: 54px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.op-gravadora__ones { width: 100%; height: 90px; margin: 10px 0 8px; }
.op-gravadora__ajuda { margin: 0 auto 22px; max-width: 340px; color: rgba(255,255,255,.7); font-size: 14px; }
.op-gravadora__botons { display: flex; gap: 10px; justify-content: center; }
.op-gravadora__botons .op-boto { flex: 1; max-width: 200px; padding: 15px 18px; }
.op-gravadora__botons .op-boto--clar { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); }
.op-boto--atura { background: var(--lima); color: var(--verd); box-shadow: 0 16px 30px -14px rgba(193,248,121,.9); }
.op-carrega-mini { display: grid; place-items: center; padding: 20px; }
.op-veu-form { padding: 14px; border-radius: 18px; background: linear-gradient(160deg, #eef4ef, #e7f1f1); border: 1px solid rgba(95,143,146,.18); }
.op-veu-form .op-boto--veu { margin-bottom: 8px; }
.op-veu-form__ajuda { margin: 0; font-size: 13px; color: var(--suau); text-align: center; }
.op-nota-form { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: var(--blanc); animation: op-entra .4s cubic-bezier(.2,.75,.25,1) both; }
.op-nota-form svg { width: 26px; height: 26px; padding: 5px; border-radius: 8px; background: var(--lima); fill: none; stroke: var(--verd); stroke-width: 2; stroke-linecap: round; }
.op-nota-form span { font-weight: 700; font-size: 14px; }
.op-nota-form audio { grid-column: 1 / -1; width: 100%; height: 36px; }
.op-nota-form .op-enllac { grid-column: 3; grid-row: 1; }

/* Dictat per veu als camps llargs */
.op-dicta { position: relative; }
.op-dicta textarea { padding-right: 58px; transition: border-color .2s ease, box-shadow .2s ease, background .4s ease; }
.op-dicta__boto { position: absolute; right: 8px; bottom: 8px; height: 42px; min-width: 42px; padding: 0 10px; border-radius: 999px; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(135deg, #2f4544, #1b2827); color: var(--lima);
  box-shadow: 0 10px 20px -12px rgba(10,20,19,.9); transition: transform .2s ease, background .2s ease; }
.op-dicta__boto:active { transform: scale(.94); }
.op-dicta__boto svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.op-dicta__boto b { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.op-dicta__boto b:empty { display: none; }
.op-dicta.is-gravant textarea { border-color: var(--taronja); box-shadow: 0 0 0 4px rgba(255,96,55,.18); }
.op-dicta.is-gravant .op-dicta__boto { background: radial-gradient(circle at 35% 30%, #ff8a5e, var(--taronja) 60%, #c9381a); color: #fff; animation: op-pols 1.6s ease-out infinite; }
.op-dicta.is-gravant .op-dicta__boto svg { display: none; }
.op-dicta.is-gravant .op-dicta__boto::before { content: ''; width: 10px; height: 10px; border-radius: 2px; background: #fff; }
.op-dicta.is-transcrivint textarea { background: linear-gradient(90deg, #fff, #eef6e4, #fff); background-size: 200% 100%; animation: op-brilla 1.4s linear infinite; }
.op-dicta.is-transcrivint .op-dicta__boto { pointer-events: none; }
.op-dicta.is-transcrivint .op-dicta__boto svg { display: none; }
.op-dicta.is-transcrivint .op-dicta__boto::before { content: ''; width: 18px; height: 18px; border: 2.5px solid rgba(193,248,121,.35); border-top-color: var(--lima); border-radius: 50%; animation: op-gira .8s linear infinite; }
.op-dicta.is-transcrivint::after { content: 'Transcrivint…'; position: absolute; left: 14px; bottom: 12px; font-size: 12.5px; font-weight: 800; color: var(--blau-2); }
@keyframes op-brilla { to { background-position: -200% 0; } }
.op-dicta textarea.is-nou { border-color: #8fd14f; box-shadow: 0 0 0 4px rgba(193,248,121,.45); }

/* Mòbil */
.op-avatar-boto { margin-left: auto; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; }
@media (max-width: 900px) {
  .op-barra-sup { background: rgba(31,46,45,.9); backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 10px 30px -20px rgba(0,0,0,.6); }
  .op-barra-sup img { height: 34px; filter: none; }
  .op-barra-sup .op-avatar { width: 34px; height: 34px; }
  .op-capcalera { border-radius: 22px; padding: 22px 20px; min-height: 132px; }
  .op-capcalera--hero { min-height: 250px; padding: 26px 22px 86px; }
  .op-capcalera h1 { font-size: 30px; }
  .op-capcalera__eyebrow { font-size: 10px; letter-spacing: .14em; flex-wrap: wrap; }
  .op-capcalera__eyebrow::before { width: 18px; }
  .op-capcalera--hero h1 { font-size: 42px; }
  .op-capcalera__accions .op-boto { width: auto; }
  .op-xifres { grid-template-columns: 1fr 1fr; margin: -66px 10px 22px; gap: 10px; }
  .op-xifra { padding: 14px; }
  .op-xifra b { font-size: 34px; }
  .op-xifra i { width: 32px; height: 32px; right: 10px; top: 10px; border-radius: 10px; }
  .op-xifra span { font-size: 12px; }
  .op-barra-baix { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); border-radius: 24px; padding: 6px; border: 1px solid rgba(255,255,255,.7);
    background: rgba(251,251,247,.82); backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 20px 40px -20px rgba(10,20,19,.55); }
  .op-barra-baix button { border-radius: 18px; transition: color .2s ease, background .2s ease; }
  .op-barra-baix button.is-actiu { background: var(--verd); color: #fff; box-shadow: 0 10px 20px -12px rgba(39,56,55,.9); }
  .op-barra-baix button.is-actiu svg { color: var(--lima); }
  .op-fab { bottom: calc(var(--barra) + 28px + env(safe-area-inset-bottom)); }
  .op-principal { padding-bottom: calc(var(--barra) + 110px); }
  .op-toast { bottom: calc(var(--barra) + 30px); }
  .op-fitxa-foto { margin: -20px -20px 16px; }
}
@media (prefers-reduced-motion: reduce) { .op-capcalera::before, .op-porta__fons, .op-fab { animation: none !important; } }

/* ═══ Opcions en columnes amb casella (regla de Josep, 12-10-2026: res d'etiquetes ovalades als formularis) ═══ */
.op-opcions, .op-tagsel { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 10px; padding: 0; border: 0; background: none; min-height: 0; }
.op-opcio, .op-tagsel label { position: relative; display: block; cursor: pointer; margin: 0; }
.op-opcio input, .op-tagsel input { position: absolute; opacity: 0; pointer-events: none; }
.op-opcio span, .op-tagsel span { display: flex !important; align-items: center; gap: 11px; width: 100%; min-height: 44px; padding: 10px 12px !important; border-radius: 10px !important;
  border: 1px solid var(--linia) !important; background: var(--blanc) !important; color: var(--text) !important; font-size: 14.5px !important; font-weight: 600 !important; line-height: 1.25;
  box-shadow: none !important; transition: background .15s ease, border-color .15s ease, color .15s ease; text-align: left; }
.op-opcio span::before, .op-tagsel span::before { content: ''; flex: 0 0 20px; width: 20px; height: 20px; border: 2px solid rgba(39,56,55,.35); border-radius: 5px; background: #fff center / 13px no-repeat;
  transition: background-color .15s ease, border-color .15s ease; }
.op-opcio input[type=radio] + span::before { border-radius: 50%; }
.op-opcio:hover span, .op-tagsel label:hover span { border-color: rgba(95,143,146,.55) !important; }
.op-opcio input:checked + span, .op-tagsel input:checked + span { background: #e9f2ea !important; border-color: var(--verd) !important; color: var(--verd) !important; font-weight: 700 !important; }
.op-opcio input[type=checkbox]:checked + span::before, .op-tagsel input:checked + span::before {
  background-color: var(--verd); border-color: var(--verd);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C1F879' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.op-opcio input[type=radio]:checked + span::before { border-color: var(--verd); background: radial-gradient(circle, var(--verd) 0 45%, #fff 50%); }
.op-opcio input:focus-visible + span, .op-tagsel input:focus-visible + span { box-shadow: 0 0 0 3px rgba(160,201,203,.5) !important; }
@media (max-width: 520px) { .op-opcions, .op-tagsel { grid-template-columns: 1fr 1fr; } .op-opcio span, .op-tagsel span { font-size: 13.5px !important; padding: 9px 10px !important; gap: 9px; } }
