/* READ · Reunions B2B
   Disseny: identitat de read.barcelona (paper, tinta, lila i la franja de cinc colors).
   Pensat per a persones poc avesades: lletra gran, botons grans, un sol camí per pantalla. */
@font-face { font-family: 'Clash'; src: url('fonts/ClashDisplay-Variable.woff2') format('woff2'); font-weight: 200 700; font-display: swap; }
@font-face { font-family: 'General'; src: url('fonts/GeneralSans-Variable.woff2') format('woff2'); font-weight: 200 700; font-display: swap; }

:root {
  --paper: #f1f2ed; --surface: #ffffff; --sunk: #e7e9e2; --ink: #15171a; --muted: #5f625c; --line: #d6d8d0;
  --accent: #4928c8; --accent-ink: #ffffff; --accent-soft: #ebe7fb; --ok: #2c7a26; --ok-soft: #e2f0dc; --warn: #a94f12; --warn-soft: #fbeadc;
  --danger: #b3261e; --hatch: #d0d2ca;
  --s-blue: #1152c5; --s-red: #cf322d; --s-green: #66a333; --s-purple: #4928c8; --s-orange: #d78338;
  --display: 'Clash', 'Arial Narrow', Arial, sans-serif; --body: 'General', 'Helvetica Neue', Arial, sans-serif; --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --r: 10px; --tap: 52px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #121316; --surface: #1b1d21; --sunk: #24272c; --ink: #ecede8; --muted: #a4a79f; --line: #33363c;
  --accent: #a596ff; --accent-ink: #121316; --accent-soft: #2a2546; --ok: #86c977; --ok-soft: #1f3320; --warn: #eba36c; --warn-soft: #3a2919; --danger: #ff8a80; --hatch: #3a3d43; color-scheme: dark; } }
:root[data-theme="dark"] {
  --paper: #121316; --surface: #1b1d21; --sunk: #24272c; --ink: #ecede8; --muted: #a4a79f; --line: #33363c;
  --accent: #a596ff; --accent-ink: #121316; --accent-soft: #2a2546; --ok: #86c977; --ok-soft: #1f3320; --warn: #eba36c; --warn-soft: #3a2919; --danger: #ff8a80; --hatch: #3a3d43; color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--body); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 560; letter-spacing: -0.02em; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(30px, 5vw, 46px); }
h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
h3 { font-size: 19px; }
p { margin: 0; }
.ic { flex-shrink: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .9em; }
.sel { user-select: all; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 15px; }
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.row { display: flex; align-items: center; } .wrap { flex-wrap: wrap; } .gap { gap: 12px; } .gap-s { gap: 6px; } .between { justify-content: space-between; } .end { justify-content: flex-end; } .center { justify-content: center; }
.stack { display: flex; flex-direction: column; gap: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wordmark { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; line-height: 1; }
.wordmark .logo { display: block; height: 34px; width: auto; }
.login-top .wordmark .logo { height: 40px; }
.strip { display: flex; height: 6px; } .strip i { flex: 1; background: var(--s-blue); } .strip i:nth-child(2) { background: var(--s-red); } .strip i:nth-child(3) { background: var(--s-green); } .strip i:nth-child(4) { background: var(--s-purple); } .strip i:nth-child(5) { background: var(--s-orange); }

/* ── botons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--ink); background: transparent; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; text-align: center; }
.btn.big { min-height: var(--tap); padding: 12px 26px; font-size: 18px; }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: 14px; border-width: 1.5px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.ghost { border-color: var(--line); background: var(--surface); }
.btn.ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn.danger { color: var(--danger); }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.iconbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--sunk); cursor: pointer; }
body.is-busy { cursor: progress; } body.is-busy .btn, body.is-busy .time, body.is-busy .aslot { pointer-events: none; }

.langs { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang { border: 0; background: transparent; min-width: 42px; min-height: 38px; font-size: 13px; font-weight: 650; letter-spacing: .05em; cursor: pointer; }
.lang.on { background: var(--ink); color: var(--paper); }

/* ── camps ── */
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
label, legend { font-weight: 600; font-size: 16px; }
legend { margin-bottom: 6px; padding: 0; }
.field em { color: var(--danger); font-style: normal; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-height: var(--tap); padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 17px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
.form { display: flex; flex-direction: column; gap: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; } .inline select { width: auto; min-height: 44px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip, .chip-radio span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 550; cursor: pointer; font-size: 15px; }
.chip.on, .chip-radio input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip-radio input { position: absolute; opacity: 0; } .chip-radio input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ── pantalla d'entrada ── */
.login-wrap { min-height: 100%; }
.login-top { display: flex; justify-content: space-between; align-items: center; padding-block: 20px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); max-width: 1120px; margin: 0 auto; }
.login { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; max-width: 1120px; margin: 0 auto; padding-block: 48px 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); align-items: start; }
.login-intro h1 { font-size: clamp(40px, 6vw, 68px); margin-bottom: 18px; }
.lead { font-size: 19px; max-width: 34ch; }
.facts { margin: 32px 0 0; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts dd { margin: 0; font-weight: 550; }
.login-card { background: var(--surface); border-radius: 14px; padding: 32px; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--accent); display: flex; flex-direction: column; gap: 18px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-card h2 { font-size: 28px; }
input.code { font-family: var(--mono); font-size: 34px !important; letter-spacing: .4em; text-align: center; font-weight: 700; padding-left: .4em !important; }
.help { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--accent-soft); font-size: 16px; }
.note.warn { background: var(--warn-soft); } .note.ok { background: var(--ok-soft); display: block; }

/* ── capçalera de l'app ── */
.top { background: var(--paper); }
.top-in { display: flex; align-items: center; gap: 18px; max-width: 1120px; margin: 0 auto; padding-block: 14px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.top-title { display: flex; flex-direction: column; border-left: 1.5px solid var(--line); padding-left: 18px; min-width: 0; }
.top-title strong { font-size: 16px; } .top-title span { font-size: 14px; color: var(--muted); }
.top-right { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: var(--surface); font-weight: 700; font-size: 14px; cursor: pointer; }
.tabs { display: flex; gap: 4px; max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 10px 0; border-bottom: 1.5px solid var(--line); }
.tab { position: relative; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 10px 18px; border: 0; border-bottom: 4px solid transparent; background: none; font-weight: 600; font-size: 16px; cursor: pointer; color: var(--muted); }
.tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.tab:hover { color: var(--ink); }
.badge { min-width: 22px; height: 22px; border-radius: 11px; background: var(--s-red); color: #fff; font-size: 13px; display: grid; place-items: center; padding: 0 6px; }

.main { max-width: 1120px; margin: 0 auto; padding-block: 32px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 28px; }
.foot { max-width: 1120px; margin: 0 auto; padding-block: 18px 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

.credit { width: 100%; font-size: 12px; color: var(--muted); margin: 0; }
.credit a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.credit a:hover { color: var(--ink); }
.login-foot { max-width: 1120px; margin: 0 auto; padding-block: 0 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.page-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.page-head > div:first-child { min-width: 0; flex: 1 1 320px; }
.summary { margin-top: 10px; font-size: 18px; color: var(--muted); }
.my-table { display: grid; justify-items: center; padding: 12px 22px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--surface); min-width: 130px; }
.my-table small { font-size: 12px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.my-table b { font-family: var(--display); font-size: 52px; line-height: 1; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.my-table.none b { color: var(--muted); } .my-table span { font-size: 12px; color: var(--muted); max-width: 16ch; text-align: center; }
.card { background: var(--surface); border-radius: 14px; padding: 24px; border: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.actions-bar { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── agenda ── */
.incoming { background: var(--warn-soft); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 14px; border: 2px solid var(--warn); }
.incoming h2 { color: var(--ink); }
.day { display: flex; flex-direction: column; gap: 10px; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.day-head span { color: var(--muted); font-size: 15px; }
.empty-day { color: var(--muted); padding: 10px 0; }
.mrow { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 18px; align-items: start; background: var(--surface); border-radius: var(--r); padding: 16px 18px; border: 1.5px solid var(--line); }
.mrow.confirmed { border-left: 6px solid var(--ok); }
.mrow.pending { border-left: 6px solid var(--warn); }
.mrow.declined, .mrow.cancelled { opacity: .65; }
.mrow.session { border-left: 6px solid var(--s-blue); }
.mtime { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.mtime b { font-family: var(--display); font-size: 28px; font-weight: 600; line-height: 1; }
.mtime span { color: var(--muted); font-size: 14px; margin-top: 4px; }
.mbody { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mbody h3 { overflow-wrap: anywhere; }
.who { color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 4px; }
.where { font-size: 14px; color: var(--muted); }
.msg { font-style: italic; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; } .msg.plain { font-style: normal; }
.mside { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.tbl { display: grid; justify-items: center; min-width: 72px; padding: 6px 10px; border-radius: 8px; background: var(--accent-soft); }
.tbl small { font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tbl b { font-family: var(--display); font-size: 24px; line-height: 1.05; color: var(--accent); font-variant-numeric: tabular-nums; }
.tbl.big b { font-size: 32px; } .tbl.none b { color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 650; padding: 4px 10px; border-radius: 999px; background: var(--sunk); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn); color: var(--surface); } .pill.wait { background: var(--warn-soft); color: var(--warn); } .pill.off { color: var(--muted); } .pill.soft { background: var(--accent-soft); color: var(--ink); font-weight: 550; }
.history summary { cursor: pointer; font-weight: 600; color: var(--muted); padding: 10px 0; min-height: 44px; }
.history { display: flex; flex-direction: column; gap: 10px; }
.empty { align-items: flex-start; } .empty p { max-width: 60ch; }
.print-head { display: none; }

/* ── participants ── */
.searchbar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 2px solid var(--ink); border-radius: 999px; padding: 0 18px; }
.searchbar input { border: 0 !important; background: transparent !important; padding-left: 0 !important; font-size: 18px; }
.searchbar.small { border-width: 1.5px; border-color: var(--line); }
.filter { margin-top: -10px; }
.count { color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pcard { background: var(--surface); border-radius: 14px; border: 1.5px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pcard > .btn { margin-top: auto; }
.pc-top { display: flex; gap: 12px; align-items: flex-start; }
.pc-avatar { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--s-blue); flex-shrink: 0; }
.pc-avatar.k-magazine { background: var(--s-red); } .pc-avatar.k-agency { background: var(--s-green); } .pc-avatar.k-institution { background: var(--s-orange); } .pc-avatar.k-other { background: var(--s-purple); }
.pc-id { min-width: 0; flex: 1; } .pc-id h3 { overflow-wrap: anywhere; } .pc-id p { color: var(--muted); font-size: 15px; }
.pc-table { font-size: 13px; color: var(--muted); white-space: nowrap; text-align: right; } .pc-table b { display: block; font-family: var(--display); font-size: 24px; color: var(--accent); line-height: 1; }
.pill.goal { background: transparent; border: 1.5px solid var(--line); color: var(--ink); font-weight: 600; }
.pill.g-buy { border-color: var(--s-blue); } .pill.g-sell { border-color: var(--s-red); } .pill.g-network { border-color: var(--s-green); }
.pc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; color: var(--muted); } .pc-meta span { display: inline-flex; gap: 4px; align-items: center; }
.pc-bio { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.pc-web { font-size: 14px; color: var(--accent); display: inline-flex; gap: 5px; align-items: center; overflow-wrap: anywhere; }
.pc-already { font-size: 14px; color: var(--ok); background: var(--ok-soft); padding: 8px 12px; border-radius: 8px; display: flex; gap: 8px; align-items: flex-start; }

/* ── full de reserva ── */
.overlay { position: fixed; inset: 0; background: rgba(10, 11, 13, .55); z-index: 50; display: flex; justify-content: center; align-items: flex-start; overflow-y: auto; padding: max(24px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.sheet { background: var(--paper); width: min(760px, 100%); border-radius: 16px; border: 2px solid var(--ink); overflow: hidden; }
.sheet-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 22px 24px; background: var(--surface); border-bottom: 1.5px solid var(--line); }
.sheet-head h2 { font-size: 28px; } .sheet-head p { color: var(--muted); }
.sheet-body { padding: 24px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 26px; }
.steps li { display: flex; flex-direction: column; gap: 12px; }
.steps h3 { display: flex; align-items: center; gap: 10px; }
.n { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-family: var(--body); font-size: 16px; font-weight: 700; }
.daybtns { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.daybtns.compact { display: flex; flex-wrap: wrap; }
.daybtn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 64px; padding: 10px 16px; border-radius: var(--r); border: 2px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; }
.daybtn b { font-size: 17px; } .daybtn span { font-size: 14px; color: var(--muted); }
.daybtn.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.daybtn:disabled { opacity: .5; cursor: not-allowed; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.time { min-height: var(--tap); border-radius: var(--r); border: 2px solid var(--ink); background: var(--surface); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px; font-variant-numeric: tabular-nums; }
.time b { font-size: 18px; } .time small { font-size: 12px; color: var(--muted); }
.time.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .time.on small { color: var(--accent-ink); }
.time.no { border-color: var(--line); border-style: dashed; background: repeating-linear-gradient(135deg, transparent 0 6px, var(--sunk) 6px 8px); color: var(--muted); cursor: not-allowed; }
.time:hover:not(:disabled):not(.on) { background: var(--accent-soft); }
.confirm-bar { position: sticky; bottom: 0; margin: 24px -24px -24px; padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 2px solid var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.sum { font-size: 16px; }
.done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 16px 0; }
.done > .ic { color: var(--ok); background: var(--ok-soft); border-radius: 50%; padding: 10px; width: 72px; height: 72px; }
.done p { max-width: 46ch; }
.done .sum { background: var(--surface); border: 1.5px solid var(--line); padding: 12px 18px; border-radius: var(--r); }
.loading { color: var(--muted); padding: 24px 0; }

/* ── disponibilitat ── */
.avail { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.aslot { min-height: 60px; border-radius: var(--r); border: 2px solid var(--line); background: var(--surface); cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 8px 12px; text-align: left; font-variant-numeric: tabular-nums; }
.aslot b { font-size: 18px; } .aslot span { font-size: 13px; color: var(--muted); }
.aslot.s-free { border-color: var(--ok); } .aslot.s-free span { color: var(--ok); font-weight: 600; }
.aslot.s-blocked { background: repeating-linear-gradient(135deg, var(--sunk) 0 6px, var(--hatch) 6px 8px); border-style: dashed; }
.aslot.s-meeting { background: var(--accent-soft); border-color: var(--accent); cursor: default; }
.aslot.s-session { background: var(--sunk); border-color: var(--s-blue); cursor: default; }
.aslot.s-break, .aslot.s-past { opacity: .5; cursor: default; }
.aslot:disabled { opacity: 1; } .aslot.s-break:disabled, .aslot.s-past:disabled { opacity: .5; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--muted); }
.lg { width: 18px; height: 18px; border-radius: 4px; border: 2px solid var(--line); display: inline-block; margin-left: 6px; }
.lg.s-free { border-color: var(--ok); background: var(--surface); } .lg.s-blocked { background: repeating-linear-gradient(135deg, var(--sunk) 0 3px, var(--hatch) 3px 5px); border-style: dashed; } .lg.s-meeting { background: var(--accent-soft); border-color: var(--accent); } .lg.s-session { border-color: var(--s-blue); background: var(--sunk); }

.welcome { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.table-hero { display: flex; align-items: center; gap: 12px; font-weight: 600; } .table-hero b { font-family: var(--display); font-size: 40px; color: var(--accent); }

/* ── organització ── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.stats div { padding: 14px 16px 14px 0; display: flex; flex-direction: column; }
.stats b { font-family: var(--display); font-size: 36px; line-height: 1; font-variant-numeric: tabular-nums; } .stats span { color: var(--muted); font-size: 14px; }
.subtabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table.adm { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 720px; } .adm td.em { font-size: 13px; overflow-wrap: anywhere; max-width: 220px; }
.adm th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 10px 12px; background: var(--sunk); white-space: nowrap; }
.adm td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.adm tr.off td { opacity: .55; }
.adm td.num { font-variant-numeric: tabular-nums; }
.adm .acts { white-space: nowrap; } .adm .acts .btn { margin: 2px; } .adm .acts .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
input.tblin { width: 84px !important; min-height: 40px !important; padding: 6px 8px !important; font-variant-numeric: tabular-nums; }
.lrow { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.lrow:first-child { border-top: 0; }
.daypick { display: inline-flex; align-items: center; gap: 4px; } .daypick input { width: auto !important; }
.brk select { width: auto; }
.full { width: 100%; }
ul.plain { padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.tsheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tsheet { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; break-inside: avoid; }
.tsheet header { display: flex; gap: 14px; align-items: center; }
.tnum { font-family: var(--display); font-size: 48px; font-weight: 600; line-height: 1; color: var(--accent); min-width: 64px; font-variant-numeric: tabular-nums; }
.tsheet header div { display: flex; flex-direction: column; } .tsheet header div span { font-size: 14px; color: var(--muted); }
.tsheet ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; } .tsheet li { display: grid; grid-template-columns: 58px 1fr; gap: 4px 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 15px; font-variant-numeric: tabular-nums; } .tsheet li em { grid-column: 2; font-size: 13px; color: var(--warn); font-style: normal; }

/* ── diàleg i avisos ── */
.dialog { background: var(--surface); border-radius: 16px; border: 2px solid var(--ink); padding: 26px; width: min(560px, 100%); display: flex; flex-direction: column; gap: 16px; margin-top: 8vh; }
.dlg-body { display: flex; flex-direction: column; gap: 10px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 140%); background: var(--ink); color: var(--paper); padding: 14px 22px; border-radius: 12px; font-weight: 600; z-index: 80; max-width: min(560px, calc(100% - 32px)); transition: transform .25s, opacity .25s; opacity: 0; visibility: hidden; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; } .toast.bad { background: var(--danger); color: var(--paper); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ── mòbil ── */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .login { grid-template-columns: 1fr; gap: 28px; padding-block: 16px 40px; }
  .login-card { padding: 22px; box-shadow: 5px 5px 0 var(--accent); }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .wordmark .logo, .login-top .wordmark .logo { height: 30px; }
  .top-title { display: none; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1.5px solid var(--line); border-bottom: 0; max-width: none; gap: 0; padding-block: 0 env(safe-area-inset-bottom, 0px); }
  .tab { flex: 1; flex-direction: column; gap: 2px; font-size: 12px; padding: 8px 2px; min-height: 62px; border-bottom: 0; border-top: 4px solid transparent; }
  .tab.on { border-top-color: var(--accent); }
  .tab .badge { position: absolute; top: 4px; right: calc(50% - 26px); }
  .main { padding-block: 20px 100px; gap: 22px; }
  .foot { padding-bottom: 96px; }
  .login-foot { padding-bottom: 24px; }
  .mrow { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .mtime b { font-size: 22px; }
  .mside { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
  .mside .stack { flex-direction: row; }
  .sheet-body { padding: 18px; } .confirm-bar { margin: 20px -18px -18px; padding-inline: 18px; } .confirm-bar .btn { width: 100%; }
  .overlay { padding: 0; } .sheet { border-radius: 0; border: 0; min-height: 100%; } .dialog { margin: auto 16px; }
  .my-table { min-width: 0; padding: 8px 16px; } .my-table b { font-size: 40px; }
  .card { padding: 18px; }
}

/* ── impressió: agenda personal o fulls de taula ── */
@media print {
  :root { --paper: #fff; --surface: #fff; --ink: #000; --muted: #444; --line: #bbb; --accent: #000; --accent-soft: #eee; }
  body { font-size: 12pt; }
  .top, .foot, .login-foot, .noprint, .actions-bar, .incoming, .tabs, .toast, .subtabs, .stats, .page-head .my-table { display: none !important; }
  .print-head { display: block; margin-bottom: 8pt; } .print-head .wordmark { margin-right: 12pt; vertical-align: middle; } .print-head .wordmark .logo { height: 24pt; }
  .mrow { break-inside: avoid; border: 1px solid #999 !important; }
  .tsheet { break-after: page; border: 0; } .tsheets { display: block; } .tnum { font-size: 72pt; }
  .main { padding: 0; max-width: none; }
}
