@font-face { font-family: "Bricolage"; src: url("/assets/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
:root { --nit: #1F2140; --nit-2: #2B2E57; --groc: #F2B705; --groc-suau: #FFF4CC; --molsa: #3E6B48; --molsa-suau: #E3EEE5; --paper: #FAFAF6; --blanc: #fff; --tinta: #1F2140; --tinta-2: #4B4F6B; --linia: #E3E4DC; --vermell: #B3261E; --radi: 18px; --display: "Bricolage", system-ui, sans-serif; --cos: "Figtree", system-ui, sans-serif; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--tinta); font: 400 1rem/1.55 var(--cos); }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; letter-spacing: -.01em; }
a { color: inherit; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.cap { background: var(--nit); color: var(--paper); }
.cap-in { max-width: 1040px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.marca { display: flex; align-items: center; gap: 10px; }
.marca .logo { width: 40px; height: 40px; border-radius: 12px; background: var(--groc); display: grid; place-items: center; font-size: 1.3rem; }
.marca b { display: block; font-family: var(--display); font-size: 1.1rem; }
.marca small { color: #C9CBE0; font-size: .8rem; }
.avis-cap { background: rgba(242,183,5,.18); color: var(--groc); font-weight: 700; font-size: .78rem; padding: .3rem .7rem; border-radius: 999px; white-space: nowrap; }

.intro { padding: 36px 0 20px; display: grid; gap: 12px; max-width: 760px; }
.etiqueta { font: 700 .76rem/1.2 var(--cos); letter-spacing: .14em; text-transform: uppercase; color: var(--molsa); }
.intro h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
.entradeta { font-size: 1.1rem; color: var(--tinta-2); margin: 0; }
.avis { margin: 0; background: var(--groc-suau); border-left: 4px solid var(--groc); padding: 10px 14px; border-radius: 10px; font-size: .93rem; font-weight: 600; }

.xifres { background: var(--nit); color: var(--paper); border-radius: var(--radi); padding: 20px; margin: 8px 0 24px; }
.xifres h2 { font-size: 1rem; color: var(--groc); margin-bottom: 12px; font-family: var(--cos); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.xifres-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.xifres-grid div { display: grid; gap: 2px; }
.xifres-grid b { font: 800 2rem/1 var(--display); color: var(--groc); }
.xifres-grid span { color: #C9CBE0; font-size: .88rem; }

.pestanyes { display: flex; gap: 8px; margin: 0 0 18px; overflow-x: auto; scrollbar-width: none; }
.pestanya { flex: none; font: 700 .95rem/1.2 var(--cos); color: var(--tinta); background: var(--blanc); border: 1.5px solid var(--linia); border-radius: 999px; padding: .65rem 1rem; cursor: pointer; transition: background .2s ease-out, border-color .2s ease-out; }
.pestanya[aria-selected="true"] { background: var(--nit); border-color: var(--nit); color: var(--paper); }

.panell, .form-caixa, .flux, .comp-intro, .comp-tiquet, .comp-drive { background: var(--blanc); border: 1px solid var(--linia); border-radius: var(--radi); padding: 20px; margin-bottom: 20px; }
.panell-cap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panell-cap h2, .form h2, .flux h2, .comp-intro h2 { font-size: 1.4rem; }
.flota { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.vehicle { background: var(--paper); border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: 12px 1fr; column-gap: 8px; align-items: center; }
.vehicle small { grid-column: 2; color: var(--tinta-2); font-size: .82rem; }
.punt { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.reserves { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.reserves li { display: grid; grid-template-columns: 12px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--linia); border-radius: 12px; }
.reserves li small { display: block; color: var(--tinta-2); font-size: .85rem; }
.reserves li.nova { border-color: var(--groc); background: var(--groc-suau); animation: entra .3s ease-out; }
.xip { font-size: .76rem; font-weight: 700; background: var(--molsa-suau); color: var(--molsa); padding: .25rem .6rem; border-radius: 999px; white-space: nowrap; }

.boto { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: .7rem 1.2rem; border-radius: 999px; font: 800 .98rem/1.2 var(--cos); text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: transform .2s ease-out, background .2s ease-out; }
.boto:active { transform: scale(.97); }
.boto:disabled { opacity: .6; cursor: progress; }
.boto-groc { background: var(--groc); color: var(--nit); }
.boto-linia { background: transparent; color: var(--nit); border-color: var(--nit); }
.boto-text { background: none; color: var(--tinta-2); text-decoration: underline; padding-inline: .4rem; }
.botons { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
:focus-visible { outline: 3px solid var(--groc); outline-offset: 3px; border-radius: 6px; }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
.form input[type=date], .form input:not([type]) { font: 500 1rem var(--cos); padding: .7rem .8rem; border: 1.5px solid var(--linia); border-radius: 12px; background: var(--paper); width: 100%; min-width: 0; }
.dues { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.models { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.models legend { font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
#f-models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.model { cursor: pointer; }
.model input { position: absolute; opacity: 0; }
.model span { display: grid; gap: 2px; border: 1.5px solid var(--linia); border-radius: 12px; padding: 10px 12px; height: 100%; transition: border-color .2s ease-out, background .2s ease-out; }
.model small { color: var(--tinta-2); font-weight: 500; }
.model input:checked + span { border-color: var(--nit); background: var(--groc-suau); }
.model input:focus-visible + span { outline: 3px solid var(--groc); outline-offset: 2px; }
.preu { margin: 0; font-size: 1rem; }
.nota { color: var(--tinta-2); font-size: .85rem; margin: 6px 0 0; }

.linia { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 0; }
.pas { display: grid; grid-template-columns: 40px 1fr; gap: 14px; position: relative; padding-bottom: 18px; }
.pas:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--linia); }
.pas.fet:not(:last-child)::before { background: var(--molsa); transition: background .25s ease-out; }
.bola { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--linia); font: 800 .95rem var(--display); color: var(--tinta-2); transition: background .25s ease-out, border-color .25s ease-out, color .25s ease-out; }
.pas.fet .bola { background: var(--molsa); border-color: var(--molsa); color: #fff; }
.pas.fet .bola i { font-style: normal; }
.pas.sim.fet .bola { background: var(--groc); border-color: var(--groc); color: var(--nit); }
.pas-cos { padding-top: 6px; }
.pas-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: baseline; }
.pas-cap time { font-size: .8rem; font-weight: 700; color: var(--molsa); white-space: nowrap; }
.pas-cos p { margin: 4px 0 0; color: var(--tinta-2); font-size: .95rem; }
.pas.espera .pas-cos { opacity: .35; }
.pas.fet .pas-cos { opacity: 1; animation: entra .3s ease-out; }
.xip-sim { display: inline-block; margin-top: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; background: var(--groc); color: var(--nit); padding: .2rem .55rem; border-radius: 6px; }

.dni-bloc { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 16px; margin-top: 12px; align-items: start; }
.dni, .tiquet { position: relative; overflow: hidden; }
.dni { background: linear-gradient(135deg, #E8EEF8, #D5DFEF); border-radius: 12px; padding: 10px 12px; box-shadow: 0 6px 18px rgba(31,33,64,.15); font-size: .72rem; color: #24304d; }
.dni-cap { font-weight: 800; font-size: .66rem; letter-spacing: .06em; color: #2a3f73; margin-bottom: 8px; }
.dni-cos { display: grid; grid-template-columns: 60px 1fr; gap: 10px; }
.dni-foto { background: #f3f6fb; border-radius: 6px; padding: 4px; }
.dni dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 1px 8px; }
.dni dt { color: #5a6a90; } .dni dd { margin: 0; font-weight: 800; overflow-wrap: anywhere; }
.especimen { position: absolute; inset: 0; display: grid; place-items: center; font: 900 1.9rem var(--display); color: rgba(179,38,30,.28); transform: rotate(-18deg); letter-spacing: .12em; pointer-events: none; }
.escaner { position: absolute; left: 0; right: 0; top: -20%; height: 18%; background: linear-gradient(180deg, transparent, rgba(242,183,5,.55), transparent); opacity: 0; pointer-events: none; }
.llegint .escaner, .tiquet.llegint .escaner { animation: escaneja 1.1s ease-out 1; }
.dni-dades { display: grid; gap: 6px; }
.dni-dades small, .tiq-res small { color: var(--tinta-2); font-weight: 700; }
.dni-dades ul, .camps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dni-dades li, .camps li { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; border-bottom: 1px dashed var(--linia); padding: 3px 0; }
.dni-dades li span, .camps li span { color: var(--tinta-2); }
.pas.fet .dni-dades li, .camps li { animation: entra .25s ease-out both; }
.pas.fet .dni-dades li:nth-child(2) { animation-delay: .1s } .pas.fet .dni-dades li:nth-child(3) { animation-delay: .2s } .pas.fet .dni-dades li:nth-child(4) { animation-delay: .3s }
.camps li { animation-delay: calc(var(--k) * .1s); }
.ok, .ok-comp { margin: 6px 0 0; font-weight: 700; color: var(--molsa); font-size: .92rem; }

.resum { margin-top: 10px; background: var(--nit); color: var(--paper); border-radius: var(--radi); padding: 20px; display: grid; gap: 8px; animation: entra .3s ease-out; }
.resum b { font: 800 1.35rem/1.2 var(--display); color: var(--groc); }
.resum p { margin: 0; color: #D9DBEA; }
.resum .boto-linia { color: var(--paper); border-color: var(--paper); }
.resum .boto-text { color: #C9CBE0; }

/* Comptabilitat */
.comp-intro { display: grid; gap: 12px; }
.destacat { margin: 0; font: 800 1.15rem/1.35 var(--display); color: var(--molsa); }
.tres { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: c; }
.tres li { background: var(--paper); border-radius: 14px; padding: 16px; display: grid; gap: 4px; position: relative; }
.tres li span { font-size: 1.8rem; }
.tres li b { font-family: var(--display); font-size: 1.1rem; }
.tres li small { color: var(--tinta-2); }
.tres li:not(:last-child)::after { content: "→"; position: absolute; right: -11px; top: 50%; transform: translateY(-50%); font-weight: 900; color: var(--groc); font-size: 1.2rem; }
.comp-tiquet h3, .comp-drive h3 { font-size: 1.2rem; }
.tiq-grid { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 20px; margin: 14px 0 20px; align-items: start; }
.tiquet { display: grid; gap: 3px; text-align: left; font: 500 .8rem/1.35 ui-monospace, "SFMono-Regular", Menlo, monospace; color: #2b2b2b; background: #fffdf6; border: 0; border-radius: 4px; padding: 16px 14px 18px; box-shadow: 0 8px 22px rgba(31,33,64,.18); cursor: pointer; transform: rotate(-1.5deg); transition: transform .25s ease-out, box-shadow .25s ease-out; width: 100%; }
.tiquet:hover { transform: rotate(0) translateY(-2px); }
.tiquet.fet { box-shadow: 0 0 0 3px var(--molsa), 0 8px 22px rgba(31,33,64,.18); }
.tiq-nom { font-weight: 800; text-align: center; }
.tiq-l { text-align: center; color: #666; }
.tiq-sep { border-top: 1px dashed #bbb; margin: 4px 0; }
.tiq-row { display: flex; justify-content: space-between; gap: 8px; }
.tiq-total { font-weight: 800; font-size: .92rem; }
.tiquet .especimen { font-size: 1.6rem; }
.tiq-res { display: grid; gap: 6px; align-content: start; }
.tiq-res p { margin: 0; color: var(--tinta-2); }
.llegint-txt { font-weight: 700; color: var(--molsa) !important; }
.mov-titol { margin-bottom: 8px; }
.taula-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--linia); border-radius: 12px; }
.taula { border-collapse: collapse; width: 100%; font-size: .86rem; }
.taula th, .taula td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--linia); white-space: nowrap; }
.taula th { background: var(--paper); font-weight: 800; font-size: .78rem; color: var(--tinta-2); text-transform: uppercase; letter-spacing: .04em; }
.taula .n { text-align: right; font-variant-numeric: tabular-nums; }
.taula .neg { color: var(--vermell); } .taula .pos { color: var(--molsa); }
.taula tr.nova td { background: var(--groc-suau); animation: entra .3s ease-out; }
.taula .mono { font-family: ui-monospace, Menlo, monospace; color: var(--tinta-2); }
.enllac { color: #1F5FBF; text-decoration: underline; }
.drive-cap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.drive { margin-top: 14px; border: 1px solid var(--linia); border-radius: 14px; overflow: hidden; }
.drive-ruta { background: var(--paper); padding: 10px 14px; font-size: .92rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.drive-ruta span { color: var(--tinta-2); }
.lectura { margin-left: auto; font-style: normal; font-size: .76rem; font-weight: 700; background: var(--molsa-suau); color: var(--molsa); padding: .2rem .6rem; border-radius: 999px; }
.fitxers { list-style: none; margin: 0; padding: 0; }
.fitxers li { border-top: 1px solid var(--linia); }
.fitxer { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; text-align: left; background: var(--blanc); border: 0; padding: 12px 14px; cursor: pointer; font: inherit; color: inherit; transition: background .2s ease-out; }
.fitxer:hover { background: var(--paper); }
.fitxer.flash { animation: flash .6s ease-out; }
.fi-ico { font-size: 1.5rem; }
.fi-nom b { display: block; font-size: .95rem; }
.fi-nom small { color: var(--tinta-2); font-size: .8rem; }
.fi-obre { font-weight: 800; font-size: .85rem; color: var(--molsa); }
.t3 { padding: 10px 14px; color: var(--tinta-2); font-size: .88rem; }
.drive-estat { margin: 0; padding: 0 14px; font-weight: 700; font-size: .9rem; color: var(--molsa); }
.drive-estat:empty { display: none; }
.drive-estat.gira, .drive-estat.fet { padding: 10px 14px; border-top: 1px solid var(--linia); }
.drive-estat.gira::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid var(--molsa); border-right-color: transparent; border-radius: 50%; animation: gira .8s linear infinite; vertical-align: -1px; }
.previa { margin-top: 14px; border: 2px solid var(--nit); border-radius: 14px; overflow: hidden; animation: entra .25s ease-out; }
.previa-cap { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--nit); color: var(--paper); padding: 6px 8px 6px 14px; }
.previa-cap .boto-text { color: #C9CBE0; min-height: 36px; }
.previa-cos { padding: 14px; }
.previa-cos .taula-wrap { border-radius: 8px; }
.doc p { margin: 0 0 8px; }
.garanties-comp { margin: 16px 0 8px; padding-left: 20px; display: grid; gap: 6px; color: var(--tinta-2); }

.peu { max-width: 1040px; margin: 0 auto; padding: 20px 16px 40px; color: var(--tinta-2); font-size: .85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

@keyframes entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes escaneja { 0% { top: -20%; opacity: 1; } 100% { top: 105%; opacity: 1; } }
@keyframes flash { 0% { background: var(--groc-suau); } 100% { background: var(--blanc); } }
@keyframes gira { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .xifres-grid { grid-template-columns: 1fr 1fr; }
  .flota, #f-models, .tres { grid-template-columns: 1fr; }
  .tres li:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -15px; transform: translateX(-50%); }
  .dni-bloc, .tiq-grid { grid-template-columns: 1fr; }
  .tiquet { max-width: 280px; }
  .avis-cap { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
