:root{font-family:Arial,Helvetica,sans-serif;color:#172b26;background:#f2f5f4;font-size:16px}*{box-sizing:border-box}body{margin:0}a{color:#12664e}header{background:#222;color:#fff;padding:16px 5%;display:flex;align-items:center;gap:24px;flex-wrap:wrap}header img{width:120px;height:auto}header span{margin-left:auto}nav{display:flex;gap:8px;flex-wrap:wrap;background:#fff;padding:16px 5%;border-bottom:1px solid #d9e3de}nav a{text-decoration:none;padding:10px 14px;border-radius:8px}nav a.active{background:#166c52;color:#fff}main{max-width:1250px;margin:36px auto;padding:0 24px}h1{font-size:2rem;letter-spacing:-.03em}h2{font-size:1.25rem}p{line-height:1.6}.card{background:#fff;border:1px solid #dce5e0;border-radius:12px;padding:24px;margin:16px 0}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.metric{font-size:2.25rem;font-weight:bold;color:#166c52}.muted{color:#60716a}.fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}label{display:block;font-weight:600;font-size:.9rem}input,select,textarea{width:100%;padding:12px;border:1px solid #b9c9c0;border-radius:7px;font:inherit;margin:8px 0 16px;background:#fff}textarea{min-height:100px}button,.button{display:inline-block;background:#166c52;border:0;color:white;padding:12px 18px;border-radius:7px;cursor:pointer;font:inherit;text-decoration:none}button:hover,.button:hover{background:#10513e}header button{padding:8px 12px}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left}td,th{padding:14px 12px;border-bottom:1px solid #e3eae6;vertical-align:top}th{font-size:.85rem;color:#60716a}details{margin:12px 0}summary{cursor:pointer;color:#166c52;padding:8px}.notice{padding:16px;background:#e1f3e9;border-radius:8px}.error{background:#ffe5e2;color:#822f26;padding:16px;border-radius:8px}.login{max-width:420px;margin:7vh auto}.login img{display:block;width:210px;margin:0 auto 24px}.login input{text-align:center;font-size:1.5rem;letter-spacing:.3em}.login button{width:100%}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.9rem}.actions{display:flex;gap:12px;align-items:center}.tag{padding:4px 8px;border-radius:5px;background:#e9f2ed;display:inline-block;font-size:.85rem}footer{text-align:center;color:#64756c;padding:24px;font-size:.875rem}@media(max-width:600px){main{padding:0 16px;margin-top:24px}header{gap:12px}header span{font-size:.875rem}nav{padding:10px;gap:0}nav a{padding:10px;font-size:.875rem}.card{padding:18px}h1{font-size:1.7rem}}

.actions,.user-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.actions button,.actions .button,.user-actions button,.user-actions .button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:11px 16px;line-height:1.25;white-space:nowrap}.user-actions form{margin:0}.button.secondary{background:#edf3ef;color:#16543f;border:1px solid #c7d7cd}.button.secondary:hover{background:#ddeae1}

.field-icon{display:inline-block;width:16px;height:16px;margin-right:7px;vertical-align:-3px;fill:none;stroke:#33795e;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}th .field-icon{width:15px;height:15px}label .field-icon{margin-right:6px}

.tablewrap td,.tablewrap th{padding:9px 10px}.tablewrap td{font-size:.9rem;line-height:1.4}.tablewrap td p{margin:4px 0}.tablewrap .user-actions{flex-direction:column;align-items:stretch;gap:6px;min-width:135px}.tablewrap .user-actions .button,.tablewrap .user-actions button{min-height:32px;padding:7px 10px;font-size:.8125rem;line-height:1.15}.tablewrap .user-actions form button{width:100%}.tablewrap .tag{font-size:.8125rem;padding:3px 7px}input[readonly]{background:#edf2ef;color:#3a5448;cursor:default}

.preparation-vehicle{padding:16px 20px}.preparation-vehicle h2{margin:0 0 12px}.preparation-list{display:flex;flex-direction:column;gap:7px}.preparation-row{display:grid;grid-template-columns:minmax(170px,1.2fr) 112px minmax(120px,.8fr) 140px minmax(130px,1.3fr) auto;align-items:center;gap:12px;border:1px solid #dce5e0;border-radius:7px;padding:9px 12px;font-size:.875rem;line-height:1.35;background:#fafcfb}.task-status{display:inline-block;font-size:.8125rem;font-weight:600;padding:4px 7px;border-radius:5px;background:#edf1ef;color:#455b50;text-align:center}.task-pending{background:#fde7e7;color:#a12020}.task-done{background:#e0f1e6;color:#176240}.preparation-owner,.preparation-date{color:#53685d}.preparation-note{overflow-wrap:anywhere;color:#60716a}.preparation-actions{display:flex;gap:6px;align-items:center}.preparation-actions .button{font-size:.8125rem;line-height:1.2;padding:7px 10px;white-space:nowrap}.preparation-name{font-weight:600}@media(max-width:1050px){.preparation-vehicle{overflow-x:auto}.preparation-row{min-width:970px}.preparation-list{min-width:970px}}

.fields{align-items:start}.fields .field-notes{grid-column:1 / -1}.field-notes textarea{display:block;width:100%;min-height:110px;resize:vertical}.fields .field-delivery{grid-column:span 2}.field-delivery .field-title{white-space:nowrap;display:inline-block}.field-delivery input{display:block}.field-delivery .field-title .field-icon{margin-right:6px}@media(max-width:600px){.fields{grid-template-columns:minmax(0,1fr)}.fields .field-delivery{grid-column:1 / -1}.field-delivery .field-title{font-size:.8125rem;letter-spacing:-.02em}}

.preparation-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.preparation-heading h2{margin:0}.add-task{display:inline-flex;align-items:center;gap:5px;color:#326e55;text-decoration:none;font-size:.8125rem;white-space:nowrap}.add-task:hover{text-decoration:underline}.button.danger,button.danger{background:#fae9e7;color:#9f2922;border:1px solid #e6beb9}.delete-task{position:relative;margin:0}.delete-task summary{list-style:none}.delete-task summary::-webkit-details-marker{display:none}.delete-task form{background:#fff;border:1px solid #d8e1dc;border-radius:8px;padding:12px;width:220px;margin-top:8px}.delete-task[open]{align-self:start}.delete-task label{font-size:.8125rem}.delete-task input{font-size:1rem;letter-spacing:.15em;padding:8px;margin-bottom:8px}.delete-task form button{font-size:.8125rem;padding:8px 10px}

.task-type-field{min-width:0}.add-task-type{margin-top:-7px;margin-bottom:16px;padding:0;font-size:.8125rem}

.fields-task{grid-template-columns:repeat(4,minmax(0,1fr));align-items:start}.fields-task .field-task-details{grid-column:span 2}.field-task-details textarea{width:100%;min-height:78px;margin-bottom:16px;resize:vertical}.fields-task .field-delivery{grid-column:span 2}.fields-task .field-notes{grid-column:1 / -1}@media(max-width:800px){.fields-task{grid-template-columns:repeat(2,minmax(0,1fr))}.fields-task .field-task-details,.fields-task .field-delivery{grid-column:1 / -1}}@media(max-width:480px){.fields-task{grid-template-columns:minmax(0,1fr)}}

.win-area{grid-column:1 / -1;padding:16px 20px;border:1px solid #b8dccb;border-radius:10px;background:linear-gradient(110deg,#e2f5eb,#eef2ff,#fff4da)}.win-area[hidden]{display:none}.win-message{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:12px;color:#245f47}.win-message>span:first-child{font-size:1.7rem}.win-message strong{font-size:1.25rem}.win-message>span:last-child{font-size:.9375rem}.win-area input{max-width:400px;margin-bottom:0}

.vehicle-fold{padding:0;overflow:hidden}.vehicle-summary{display:flex;align-items:center;gap:12px;padding:18px 20px;list-style:none;color:#18392b;margin:0;cursor:pointer}.vehicle-summary::-webkit-details-marker{display:none}.vehicle-chevron{font-size:1.6rem;line-height:1;transition:transform .15s;color:#367358}.vehicle-fold[open]>.vehicle-summary .vehicle-chevron{transform:rotate(90deg)}.vehicle-summary-info{margin-left:auto;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.delivery-badge{background:#fff0cd;border:1px solid #ecd494;color:#76500c;border-radius:6px;font-size:.8125rem;font-weight:600;padding:6px 9px}.remaining-badge{font-size:.8125rem;color:#52685a;background:#edf3ef;padding:6px 9px;border-radius:6px}.vehicle-priority{border-left:5px solid #e0a52c;background:#fffdf7}.vehicle-overdue{border-left-color:#c24c40}.vehicle-overdue .delivery-badge{background:#fde8e4;color:#9f2922;border-color:#ebc3bd}.vehicle-content{padding:0 20px 18px}.vehicle-content .preparation-heading{margin-top:0}.vehicle-summary:focus-visible{outline:2px solid #166c52;outline-offset:-4px}@media(max-width:700px){.vehicle-summary{flex-wrap:wrap;padding:15px}.vehicle-summary-info{margin-left:26px;flex-basis:100%}.vehicle-content{padding:0 15px 15px;overflow-x:auto}}

.developer-credit{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:28px 24px}.developer-credit span{font-size:.8125rem;color:#60716a}.developer-credit img{display:block;width:130px;max-width:100%;height:auto;border-radius:4px}

.developer-credit{gap:7px}.developer-credit img{width:65px;height:auto;border-radius:0;filter:brightness(0) saturate(100%);opacity:.75}.developer-credit .copyright{font-size:.75rem;color:#60716a}

.developer-credit{gap:5px;padding:20px 16px}.developer-credit img{width:42px}.developer-credit>span{font-size:.75rem}.developer-links{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap;font-size:.75rem;color:#6a776f}.developer-links a{display:inline-flex;align-items:center;gap:4px;color:#63736a;text-decoration:none;padding:3px 0}.developer-links a:hover{text-decoration:underline;color:#166c52}.developer-links svg{flex-shrink:0}.developer-credit .copyright{font-size:.75rem}

.delivery-confirm{margin:0 0 14px}.delivery-confirm>summary{width:max-content;list-style:none;font-size:.8125rem;padding:8px 12px}.delivery-confirm>summary::-webkit-details-marker{display:none}.delivery-confirm form{margin-top:12px;padding:16px;border:1px solid #d0ddd5;border-radius:8px;background:#fff}.delivered-badge{background:#e0f1e6;color:#176240;border:1px solid #b9d8c4;border-radius:6px;font-size:.8125rem;padding:6px 9px;font-weight:600}.vehicle-delivered{border-left:5px solid #398461}.delivery-warning{font-size:.875rem;color:#855810}

.delivery-trigger{font-size:.8125rem;padding:8px 12px}.delivery-confirm>summary{display:none}.delivery-confirm:not([open]){display:none}

.vehicle-record{padding:0;overflow:hidden}.vehicle-record[open]>.vehicle-summary .vehicle-chevron{transform:rotate(90deg)}.vehicle-record-content{padding:0 20px 20px}.vehicle-record-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 20px;margin:12px 0 18px;font-size:.9rem;line-height:1.5}.vehicle-full-width{grid-column:1 / -1}.delivery-information{display:flex;align-items:center;gap:15px;flex-wrap:wrap;padding:12px;border-radius:7px;background:#e0f1e6;color:#176240;margin-bottom:16px;font-size:.875rem}.vehicle-record .actions .button{font-size:.8125rem;padding:8px 12px}@media(max-width:800px){.vehicle-record-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:480px){.vehicle-record-fields{grid-template-columns:minmax(0,1fr)}}

.postsale-section{border-top:1px solid #dae5de;margin-top:18px;padding-top:16px}.postsale-section h2{font-size:1.05rem;margin:0 0 12px}.postsale-section .muted{font-size:.875rem}

.lead-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 20px;border-bottom:1px solid #d4e0d8}.lead-tabs a{display:flex;align-items:center;gap:8px;text-decoration:none;padding:12px 16px;border-bottom:3px solid transparent;color:#577164;font-size:.9375rem}.lead-tabs a.selected{border-bottom-color:#166c52;color:#166c52;font-weight:600}.lead-tabs span{font-size:.8125rem;background:#e1eee6;border-radius:12px;padding:2px 7px}

/* ===== Outubro 2026: alertas, números, ficheiros, importação ===== */
.small{font-size:.8125rem}
.nav-badge{display:inline-block;min-width:20px;padding:1px 8px;white-space:nowrap;margin-left:4px;border-radius:999px;background:#b42318;color:#fff;font-size:.75rem;font-weight:700;text-align:center;line-height:18px}
nav a.active .nav-badge{background:#fff;color:#b42318}
.alerts h2{margin-top:0}
.alert-group{border-left:4px solid #8a9a92;padding:4px 0 4px 14px;margin:14px 0}
.alert-group h3{font-size:1rem;margin:4px 0 8px;display:flex;align-items:center;gap:8px}
.alert-group ul{margin:0;padding-left:20px}
.alert-group li{margin:5px 0;line-height:1.45}
.alert-icon{display:inline-flex;width:20px;height:20px;border-radius:50%;align-items:center;justify-content:center;font-size:.75rem;color:#fff;background:#60716a}
.alert-count{font-size:.8125rem;color:#60716a;font-weight:600}
.alert-critical{border-color:#b42318}.alert-critical .alert-icon{background:#b42318}
.alert-warning{border-color:#b54708}.alert-warning .alert-icon{background:#b54708}
.alert-info{border-color:#175cd3}.alert-info .alert-icon{background:#175cd3}
.mine-tag{display:inline-block;padding:1px 6px;border-radius:4px;background:#e1f3e9;color:#166c52;font-size:.75rem;font-weight:700}
.stats-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-top:28px}
.stats-head h2{margin:0 0 12px}
.year-form{display:flex;gap:10px;align-items:flex-end}
.year-form select{margin-bottom:0;min-width:110px}
.stat-tiles .card{margin:0}
.stat-tiles .metric{font-size:1.9rem}
.stats h3{margin-top:0;font-size:1.05rem}
.chart{width:100%;height:auto;display:block}
.chart-grid{stroke:#e3eae6;stroke-width:1}
.chart-axis{stroke:#b9c9c0;stroke-width:1}
.chart-fill{fill:#166c52}
.chart-track{fill:#edf2ef}
.chart-hit{fill:transparent}
.chart-bar:hover .chart-fill{fill:#10513e}
.chart-bar:hover .chart-hit{fill:#f2f5f4}
.chart-value{font-size:12px;fill:#172b26;text-anchor:middle;font-weight:700}
.chart-label{font-size:12px;fill:#60716a;text-anchor:middle}
.stats-pair{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(420px,100%),1fr));gap:16px}
.stats-pair>*{min-width:0}
.stats-pair .card{margin:16px 0 0}
.inline-bar{display:inline-flex;align-items:center;gap:8px}
.list-tools{margin:4px 0 12px}
.vehicle-files{border-top:1px solid #e3eae6;margin:16px 0;padding-top:12px}
.vehicle-files h3{font-size:1rem;margin:4px 0 12px}
.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;margin-bottom:12px}
.gallery figure{margin:0;position:relative}
.gallery img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:7px;display:block;background:#edf2ef;border:1px solid #dce5e0}
.gallery .file-delete{margin:4px 0 0}
.file-delete summary{font-size:.8125rem;color:#a12020;padding:2px 0}
.file-delete form{background:#fff;border:1px solid #dce5e0;border-radius:7px;padding:10px;margin-top:4px}
.file-delete input{margin:6px 0 8px;padding:8px}
.doc-list{padding-left:20px}
.doc-list li{margin:6px 0}
.doc-list .file-delete{display:inline-block;margin:0 0 0 8px;vertical-align:top}
.upload-form{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}
.upload-form label{flex:1 1 320px}
.upload-form input[type=file]{margin-bottom:0;padding:9px}
.photo-pick{display:flex;flex-direction:column;gap:6px;font-weight:400;cursor:pointer}
.photo-pick input{width:auto;margin:0 6px 0 0}
button[disabled]{opacity:.5;cursor:not-allowed}
@media(max-width:600px){.stats-pair{grid-template-columns:1fr}.gallery{grid-template-columns:repeat(2,1fr)}}
.lead-tabs .open-count{background:#fde7e7;color:#a12020}
.financier-other[hidden],label[hidden]{display:none}
.won-warning{display:flex;flex-direction:column;gap:6px;margin:0 0 18px;padding:16px 18px;border:2px solid #b54708;border-left-width:8px;border-radius:8px;background:#fff4e5;color:#7a2e0e}
.won-warning strong{font-size:1.1rem}
.delete-lead{margin:0}
.delete-lead form{margin-top:6px;padding:10px;border:1px solid #e6beb9;border-radius:7px;background:#fff;min-width:220px}
.delete-lead input{margin:6px 0 10px;padding:8px}
.delete-lead button{width:100%}
.delete-warning{margin:0 0 8px;font-size:.8125rem;line-height:1.4;color:#7a2e0e}
.vehicle-multi{grid-column:1/-1;border:1px solid #b9c9c0;border-radius:8px;padding:12px 14px;margin:0 0 8px;min-width:0}
.vehicle-multi legend{font-weight:600;font-size:.9rem;padding:0 6px}
.vehicle-multi .vehicle-filter{margin:4px 0 10px;padding:9px}
.vehicle-checks{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:6px 14px;max-height:240px;overflow:auto;padding:2px}
.vehicle-check{display:flex;align-items:center;gap:8px;font-weight:400;padding:6px 8px;border-radius:6px;background:#fafcfb;border:1px solid #e3eae6;cursor:pointer}
.vehicle-check input{width:auto;margin:0}
.vehicle-check:has(input:checked){background:#e1f3e9;border-color:#9fd0b5}
.vehicle-check[hidden]{display:none}
.lead-proposals{margin:0 0 18px}
.lead-proposals h3{font-size:1rem;margin:4px 0 8px}
.chosen-vehicle td{background:#f3faf6}
/* Botão Eliminar lead: mesma largura dos outros, vermelho com letras brancas */
.tablewrap .user-actions .delete-lead{width:100%}
.delete-lead>summary{list-style:none}
.delete-lead>summary::-webkit-details-marker{display:none}
.tablewrap .user-actions .delete-lead>summary.button,.delete-lead button.danger{display:flex;align-items:center;justify-content:center;width:100%;min-height:32px;padding:7px 10px;font-size:.8125rem;font-weight:700;line-height:1.15;background:#c0261b;color:#fff;border:1px solid #9b1c13;border-radius:7px}
.tablewrap .user-actions .delete-lead>summary.button:hover,.delete-lead button.danger:hover{background:#9b1c13;color:#fff}
.delete-lead[open]>summary.button{background:#9b1c13}
.vehicle-field{min-width:0}
.vehicle-field>label select,.vehicle-extra select{margin-bottom:6px}
.vehicle-extra{display:flex;gap:6px;align-items:center}
.vehicle-extra select{margin-top:0}
.remove-vehicle{flex:0 0 auto;background:transparent;color:#a12020;border:1px solid #e6beb9;padding:6px 10px;margin-bottom:6px;line-height:1}
.remove-vehicle:hover{background:#fae9e7}
.add-vehicle{background:none;border:0;padding:0;margin:0 0 16px;cursor:pointer;font:inherit;font-size:.8125rem;color:#326e55}
.add-vehicle:hover{background:none;text-decoration:underline}
/* Exportar para CSV: texto pequeno e discreto */
.export-link{font-size:.75rem;color:#8a9a92;text-decoration:none}
.export-link:hover{color:#326e55;text-decoration:underline}
.list-tools{justify-content:space-between}
.list-tools .export-link{order:2;margin-left:auto}
/* Veículos e propostas dentro da lead */
.vehicle-field{grid-column:1/-1;border:1px solid #dce5e0;border-radius:8px;padding:10px 12px 4px;background:#fafcfb}
.lead-vehicle-head,.lead-vehicle-row{display:grid;grid-template-columns:minmax(0,2.2fr) minmax(0,1fr) minmax(0,1fr) 74px;gap:10px;align-items:center}
.lead-vehicle-head span{font-weight:600;font-size:.9rem}
.lead-vehicle-row select,.lead-vehicle-row input{margin:6px 0}
.lead-vehicle-row .remove-vehicle{justify-self:start;margin:0}
.main-tag{font-size:.75rem;font-weight:700;color:#166c52;background:#e1f3e9;border-radius:4px;padding:3px 6px;justify-self:start}
.vehicle-field .add-vehicle{margin:4px 0 4px}
.vehicle-help{margin:2px 0 6px}
@media(max-width:700px){.lead-vehicle-head{display:none}.lead-vehicle-row{grid-template-columns:1fr 1fr auto;column-gap:8px;row-gap:0;border-bottom:1px dashed #dce5e0;padding-bottom:6px}.lead-vehicle-row>select:first-child{grid-column:1/3;grid-row:1}.lead-vehicle-row>.main-tag,.lead-vehicle-row>.remove-vehicle{grid-column:3;grid-row:1}.lead-vehicle-row>input{grid-column:1;grid-row:2}.lead-vehicle-row>select:nth-of-type(2){grid-column:2/4;grid-row:2}}
.proposal-vehicle-help{display:block;margin-top:-10px;margin-bottom:12px;font-weight:400}
/* Marca Volta */
header img.app-brand{width:auto;height:44px;border-left:1px solid #444;padding-left:20px}
.login img.login-brand{width:260px;margin:0 auto 8px}
.login .card h1{text-align:center;font-size:1.4rem;margin:8px 0 4px}
.login .card>.muted{text-align:center}
@media(max-width:600px){header img.app-brand{height:34px;padding-left:12px}}
/* Ficha do veículo organizada */
.vehicle-specs{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:14px;margin:6px 0 4px}
.spec-group{border:1px solid #e3eae6;border-radius:9px;padding:12px 14px;background:#fafcfb;min-width:0}
.spec-group.spec-wide{grid-column:1/-1}
.spec-group h4{margin:0 0 8px;font-size:.78rem;letter-spacing:.08em;text-transform:uppercase;color:#60716a}
.spec-group dl{margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px 16px}
.spec-group dt{font-size:.75rem;color:#60716a}
.spec-group dd{margin:1px 0 0;font-size:.95rem;font-weight:600;color:#172b26;overflow-wrap:anywhere}
.spec-group .spec-notes{grid-column:1/-1}.spec-group .spec-notes dd{font-weight:400}
.fields>h3.field-group{grid-column:1/-1;margin:10px 0 -6px;font-size:.8rem;letter-spacing:.08em;text-transform:uppercase;color:#60716a;border-bottom:1px solid #e3eae6;padding-bottom:6px}
.dedupe-photos{margin:0 0 12px}
.dedupe-photos form{max-width:420px}
/* Ícones nos botões */
.btn-icon{width:1.05em;height:1.05em;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:-.17em;margin-right:.45em;opacity:.9}
button,.button,summary.button{display:inline-flex;align-items:center;justify-content:center}
.file-delete>summary .btn-icon,.export-link .btn-icon{width:.95em;height:.95em;margin-right:.3em}
/* Pesquisar + Importar anúncio lado a lado */
.search-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.search-actions .button-search{background:#edf3ef;color:#16543f;border:1px solid #c7d7cd}
.search-actions .button-search:hover{background:#ddeae1}
.button.button-highlight{background:#166c52;color:#fff;font-weight:700;padding:12px 22px;box-shadow:0 2px 0 #0e4a38,0 6px 16px rgba(22,108,82,.28);border:1px solid #0e4a38}
.button.button-highlight:hover{background:#10513e}
.button.button-highlight .btn-icon{stroke:#a6e3a1;opacity:1}
/* Visualizador de fotografias */
.lb-open-page{overflow:hidden}
.lightbox{position:fixed;inset:0;z-index:1000;background:rgba(10,14,13,.97);display:grid;grid-template-columns:72px 1fr 72px;grid-template-rows:auto 1fr auto;color:#fff}
.lightbox[hidden]{display:none}
.lb-top{grid-column:1/-1;display:flex;align-items:center;gap:14px;padding:12px 16px}
.lb-counter{font-weight:700;font-size:.95rem;font-variant-numeric:tabular-nums}
.lb-caption{flex:1;font-size:.85rem;color:#b9c9c0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lb-btn,.lb-nav{display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18);color:#fff;border-radius:50%;cursor:pointer;padding:0;transition:background .15s}
.lb-btn{width:42px;height:42px}
.lb-btn:hover,.lb-nav:hover{background:rgba(255,255,255,.22)}
.lb-btn svg,.lb-nav svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.lb-nav{width:52px;height:52px;align-self:center;justify-self:center}
.lb-nav svg{width:28px;height:28px}
.lb-stage{margin:0;display:flex;align-items:center;justify-content:center;min-height:0;min-width:0;padding:4px}
.lb-stage img{max-width:100%;max-height:100%;object-fit:contain;border-radius:6px;box-shadow:0 10px 40px rgba(0,0,0,.5);transition:opacity .15s}
.lb-loading .lb-stage img{opacity:.35}
.lb-thumbs{grid-column:1/-1;display:flex;gap:8px;overflow-x:auto;padding:10px 16px 16px;justify-content:safe center}
.lb-thumbs button{flex:0 0 auto;width:72px;height:52px;padding:0;border:2px solid transparent;border-radius:6px;background:none;overflow:hidden;opacity:.55;cursor:pointer}
.lb-thumbs button.active{border-color:#a6e3a1;opacity:1}
.lb-thumbs button:hover{opacity:.9;background:none}
.lb-thumbs img{width:100%;height:100%;object-fit:cover;display:block}
.lb-single .lb-nav,.lb-single .lb-thumbs{visibility:hidden}
.gallery a{cursor:zoom-in}
@media(max-width:600px){.lightbox{grid-template-columns:44px 1fr 44px}.lb-nav{width:40px;height:40px}.lb-thumbs button{width:56px;height:42px}}
/* Menu com ícones e "O meu acesso" no cabeçalho */
nav a{display:inline-flex;align-items:center;gap:7px}
.nav-icon{width:17px;height:17px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;opacity:.85}
nav a.active .nav-icon{opacity:1}
header .user-box{margin-left:auto;display:flex;flex-direction:column;align-items:flex-end;gap:3px;line-height:1.2}
header .user-box .user-name{margin:0}
header span.user-name{margin-left:0}
.my-access{display:inline-flex;align-items:center;gap:4px;font-size:.72rem;color:#9fb3aa;text-decoration:none}
.my-access .nav-icon{width:12px;height:12px}
.my-access:hover,.my-access.active{color:#a6e3a1}
@media(max-width:600px){.nav-icon{width:15px;height:15px}nav a{gap:5px}}
/* Estado de legalização com legenda */
.legal-badge{display:inline-flex;align-items:center;gap:7px;padding:4px 10px;border-radius:999px;font-size:.85rem;font-weight:600;border:1px solid transparent;white-space:nowrap}
.legal-badge small{font-size:.68rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75}
.legal-todo{background:#f3f4f2;color:#55625c;border-color:#dfe5e1}
.legal-progress{background:#fff4e5;color:#8a4b0c;border-color:#f5d7ad}
.legal-ok{background:#e1f3e9;color:#166c52;border-color:#b9e0c8}
@media(max-width:600px){.legal-badge small{display:none}}
/* Pesquisa geral na barra do menu */
nav{align-items:center}
.global-search{margin-left:auto;display:flex;align-items:center;gap:6px;min-width:0}
.global-search input{margin:0;width:260px;max-width:100%;padding:8px 12px;font-size:.875rem;border-radius:999px}
.global-search button{padding:8px 14px;font-size:.85rem;border-radius:999px;background:#edf3ef;color:#16543f;border:1px solid #c7d7cd}
.global-search button:hover{background:#ddeae1}
.search-group h2{display:flex;align-items:center;gap:8px;font-size:1.1rem;margin:0 0 10px}
.search-group h2 .nav-icon{width:19px;height:19px;stroke:#166c52}
.search-group ul{list-style:none;margin:0;padding:0}
.search-group li{padding:10px 0;border-top:1px solid #e3eae6}
.search-group li:first-child{border-top:0}
.search-snippet{font-size:.82rem;color:#60716a;margin-top:3px}
@media(max-width:900px){.global-search{margin-left:0;flex:1 1 100%;margin-top:6px}.global-search input{flex:1;width:auto}}
/* Matrícula no cartão do veículo */
.plate{display:inline-flex;align-items:stretch;margin-left:10px;border:1.5px solid #1d2b26;border-radius:4px;background:#fff;font-family:Arial,Helvetica,sans-serif;font-weight:700;font-size:.82rem;letter-spacing:.06em;color:#111;overflow:hidden;line-height:1;vertical-align:middle}
.plate i{font-style:normal;background:#1f4bb5;color:#fff;font-size:.62rem;padding:4px 4px 3px;display:flex;align-items:flex-end}
.plate{padding-right:7px;align-items:center;min-height:22px}.plate i{margin-right:6px;align-self:stretch;align-items:center}
.plate-foreign{background:#fffbe6}
/* Veículos: três ações principais */
.vehicle-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin:4px 0 14px}
.va-tile{display:flex;align-items:center;gap:12px;padding:14px 16px;background:#fff;border:1px solid #dce5e0;border-radius:12px;text-decoration:none;color:#172b26;transition:border-color .15s,box-shadow .15s,transform .15s}
.va-tile:hover{border-color:#9fd0b5;box-shadow:0 4px 14px rgba(22,108,82,.10);transform:translateY(-1px)}
.va-icon{flex:0 0 auto;width:40px;height:40px;border-radius:10px;background:#e8f3ed;display:flex;align-items:center;justify-content:center}
.va-icon svg{width:22px;height:22px;fill:none;stroke:#166c52;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.va-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.va-text strong{font-size:.95rem;font-weight:700}
.va-text small{font-size:.78rem;color:#60716a}
.va-tile.va-primary{background:#166c52;border-color:#166c52;color:#fff}
.va-tile.va-primary .va-icon{background:rgba(255,255,255,.14)}
.va-tile.va-primary .va-icon svg{stroke:#a6e3a1}
.va-tile.va-primary small{color:#cfe9da}
.va-tile.va-primary:hover{background:#10513e;border-color:#10513e}
.va-tile.is-open{border-color:#166c52;box-shadow:0 0 0 2px rgba(22,108,82,.15)}
.add-vehicle-form>summary{display:none}
.add-vehicle-form:not([open]){display:none}
/* Entrega: fechar a venda */
.delivery-close{margin:4px 0 8px}
.close-summary{background:#f3faf6;border:1px solid #cfe9da;border-radius:8px;padding:10px 14px;font-size:.88rem;margin:0 0 10px}
.close-summary ul{margin:6px 0 0;padding-left:18px}
.confirm-check{display:flex;align-items:flex-start;gap:8px;font-weight:600;font-size:.9rem;background:#fff4e5;border:1px solid #f5d7ad;border-radius:8px;padding:10px 12px}
.confirm-check input{width:auto;margin:3px 0 0}
.cleanup{max-width:560px}
/* Histórico compacto */
.history-list{background:#fff;border:1px solid #e3eae6;border-radius:10px;overflow:hidden;margin:6px 0 14px}
.history-head,.history-row>summary{display:grid;grid-template-columns:92px 84px minmax(110px,1fr) minmax(140px,1.3fr) minmax(130px,1.1fr);column-gap:22px;align-items:center;padding:5px 14px}
.history-head{background:#f6f9f7;border-bottom:1px solid #e3eae6;font-size:.7rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#60716a;padding-top:7px;padding-bottom:7px}
.history-head span{display:inline-flex;align-items:center;gap:5px}
.history-head svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.history-row{margin:0;border-bottom:1px solid #eef2f0}
.history-row:last-child{border-bottom:0}
.history-row>summary{font-size:.8rem;line-height:1.3;color:#172b26;cursor:pointer;list-style:none}
.history-row>summary::-webkit-details-marker{display:none}
.history-row>summary:hover{background:#f6f9f7}
.history-row[open]>summary{background:#eef6f1}
.h-date{font-variant-numeric:tabular-nums}
.h-time{font-variant-numeric:tabular-nums;color:#60716a}
.h-action{font-weight:600}
.h-record{color:#60716a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-changes{margin:0;font-size:.78rem;background:#fafcfb}
.history-changes td,.history-changes th{padding:4px 14px}
.history-note{margin:0;padding:4px 14px 8px;font-size:.78rem;color:#60716a}
@media(max-width:700px){.history-head{display:none}.history-row>summary{grid-template-columns:auto auto 1fr;row-gap:2px;column-gap:12px}.h-action,.h-record{grid-column:1/-1}}
.history-changes th{font-size:.68rem;letter-spacing:.05em;text-transform:uppercase;padding-top:5px;padding-bottom:5px}.history-changes .field-icon{width:11px;height:11px}

/* ===== Formulários mais arrumados e legíveis ===== */
form .fields{gap:14px 20px;align-items:start}
form .fields label{font-size:.78rem;font-weight:600;color:#3f5249;letter-spacing:.01em}
form .fields label .field-icon{width:13px;height:13px;stroke:#7d9288;margin-right:5px;vertical-align:-2px}
form .fields input,form .fields select,form .fields textarea{margin:6px 0 0;padding:9px 12px;font-size:.93rem;border:1px solid #cfdcd5;border-radius:8px;background:#fff;color:#172b26;transition:border-color .15s,box-shadow .15s}
form .fields select{padding-right:30px}
form .fields input:focus,form .fields select:focus,form .fields textarea:focus{outline:none;border-color:#166c52;box-shadow:0 0 0 3px rgba(22,108,82,.14)}
form .fields input::placeholder,form .fields textarea::placeholder{color:#9aaba3}
form .fields input[readonly]{background:#f3f6f4}
form .fields textarea{min-height:90px}
.fields>h3.field-group{grid-column:1/-1;display:flex;align-items:center;gap:10px;margin:14px 0 -2px;padding:0;border:0;font-size:.72rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:#166c52}
.fields>h3.field-group::after{content:"";flex:1;height:1px;background:#e3eae6}
.fields>h3.field-group:first-child{margin-top:0}
form .fields .field-notes{grid-column:1/-1}
form>.actions{margin-top:20px;padding-top:16px;border-top:1px solid #edf2ef}
details.card>form,div.card>form{margin-top:4px}
/* bloco dos veículos da lead alinhado com o resto */
.vehicle-field{background:#f8fbf9;border-color:#e3eae6;padding:12px 14px 8px}
.lead-vehicle-head span{font-size:.78rem;font-weight:600;color:#3f5249}
.lead-vehicle-row select,.lead-vehicle-row input{margin:6px 0;padding:9px 12px;font-size:.93rem;border:1px solid #cfdcd5;border-radius:8px}
.vehicle-help{font-size:.75rem}
/* área "Ganha" mais discreta */
.win-area{padding:12px 16px;border-radius:10px}
.win-message{margin-bottom:6px;font-size:.9rem}
.win-message>span:first-child{font-size:1.3rem}

/* ===== Listas: dados em grelha fácil de ler ===== */
.tablewrap table{font-size:.88rem}
.tablewrap th{font-size:.7rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#60716a;background:#f6f9f7}
.tablewrap td{vertical-align:top}
.rec-fields{margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:8px 18px}
.rec-fields>div{min-width:0}
.rec-fields dt{font-size:.68rem;font-weight:600;letter-spacing:.03em;color:#7d9288;text-transform:uppercase}
.rec-fields dd{margin:1px 0 0;font-size:.88rem;color:#172b26;overflow-wrap:anywhere}
.rec-fields .rec-wide{grid-column:1/-1}
.rec-updated{white-space:nowrap;font-size:.8rem;color:#60716a}
.tablewrap td .tag{margin:6px 0 0}
.tablewrap th .field-icon{width:12px;height:12px;vertical-align:-2px}
/* Lista: título do registo à esquerda, detalhes com espaço, ações estreitas */
.tablewrap td.rec-head{width:190px;min-width:150px}
.rec-head strong{font-size:.75rem;color:#7d9288;font-weight:600}
.rec-title{display:block;font-weight:700;font-size:.98rem;color:#172b26;margin:2px 0 6px;line-height:1.25}
.tablewrap td:nth-child(2){min-width:380px;width:auto}
.tablewrap td.rec-updated{width:110px}
.tablewrap td:last-child{width:170px}
.rec-fields{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}
/* Clientes */
.client-card .rec-fields{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
.client-card dd a{color:#166c52}
.sec-title{font-size:1rem;margin:0 0 10px}
.nif-lookup{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding-top:20px}
.nif-lookup .nif-btn{min-height:34px;padding:6px 12px;font-size:.8125rem;border-radius:8px;cursor:pointer}
.nif-msg{font-size:.8125rem;color:#5b6b63}.nif-msg.is-ok{color:#166c52}.nif-msg.is-error{color:#a3352b}
input.nif-filled{background:#f0f8f3;border-color:#8fc9ac}
/* Importação: fotografias repetidas; entrega */
.photo-pick.photo-dup img{opacity:.45;filter:grayscale(.6)}
.dup-tag{font-style:normal;font-size:.75rem;color:#a3352b;background:#fbecea;border-radius:6px;padding:1px 6px;margin-left:4px}
.delivery-pin{max-width:260px;margin-top:10px}
.undo-delivery{margin-left:auto}
.undo-delivery form{display:grid;gap:10px;max-width:460px}
.delivery-information{flex-wrap:wrap;align-items:flex-start}
/* Botão PDF (folha de preparação) */
.pdf-btn{display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 12px 0 6px;border-radius:8px;background:#fff;border:1px solid #e3b9b3;color:#8f1d12;font-size:.8125rem;font-weight:600;text-decoration:none;white-space:nowrap;box-shadow:0 1px 2px rgba(143,29,18,.08);transition:background .15s,border-color .15s}
.pdf-btn:hover{background:#fff4f2;border-color:#c9675b}
.pdf-btn:focus-visible{outline:2px solid #c9675b;outline-offset:2px}
.pdf-ico{position:relative;display:inline-flex;width:24px;height:24px}
.pdf-ico svg{width:24px;height:24px;fill:#fff;stroke:#b42318;stroke-width:1.6;stroke-linejoin:round}
.pdf-ico b{position:absolute;left:-3px;bottom:2px;background:#b42318;color:#fff;font-size:7.5px;line-height:1;padding:2px 3px;border-radius:2px;letter-spacing:.04em}
/* Intervenções nas folhas de obra */
.interventions{grid-column:1/-1;display:grid;gap:12px}
.iv-item{margin:0;border:1px solid #dfe8e3;border-radius:12px;padding:12px 14px 14px;background:#fbfdfc}
.iv-item legend{display:flex;align-items:center;gap:12px;padding:0 6px;font-size:.78rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#166c52}
.iv-remove{background:none;border:0;padding:0;min-height:0;font:inherit;font-size:.75rem;font-weight:500;letter-spacing:0;text-transform:none;color:#a3352b;cursor:pointer}
.iv-remove:hover{background:none;text-decoration:underline}
.iv-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 14px}
.iv-grid label{margin:0;font-size:.8125rem}
.iv-grid .iv-wide{grid-column:1/-1}
.iv-grid textarea{min-height:64px}
.iv-add{display:inline-flex;align-items:center;gap:6px;justify-self:start;background:none;border:0;padding:2px 0;min-height:0;margin:0;cursor:pointer;font:inherit;font-size:.8125rem;color:#326e55}
.iv-add svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.iv-add:hover{background:none;text-decoration:underline}
@media(max-width:900px){.iv-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.iv-grid{grid-template-columns:1fr}}
.user-actions .pdf-btn{height:34px}
.iv-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.iv-grid .iv-span2{grid-column:span 2}
@media(max-width:1100px){.iv-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.iv-grid .iv-span2{grid-column:1/-1}}
@media(max-width:520px){.iv-grid{grid-template-columns:1fr}}
/* Leads: escolher cliente */
.client-picker{grid-column:1/-1;position:relative}
.cp-search,.cp-chosen,.cp-newbox{display:none}
.client-picker[data-mode=search] .cp-search{display:block}
.client-picker[data-mode=chosen] .cp-chosen{display:flex}
.client-picker[data-mode=new] .cp-newbox{display:flex}
.cp-search label{margin:0}
.cp-input{position:relative;display:block}
.cp-input svg{position:absolute;left:12px;top:50%;width:17px;height:17px;transform:translateY(-50%);fill:none;stroke:#6b7a72;stroke-width:1.8;pointer-events:none}
.cp-input input{padding-left:38px}
.cp-results{position:absolute;z-index:30;left:0;right:0;margin:4px 0 0;padding:4px;list-style:none;background:#fff;border:1px solid #d7e3dc;border-radius:10px;box-shadow:0 10px 28px rgba(20,40,30,.14);max-height:320px;overflow:auto}
.cp-results li{display:flex;flex-direction:column;gap:1px;padding:8px 10px;border-radius:7px;cursor:pointer}
.cp-results li span{font-size:.78rem;color:#60716a}
.cp-results li:hover,.cp-results li.is-active{background:#eef6f1}
.cp-results .cp-create{color:#166c52;font-weight:600;font-size:.85rem;border-top:1px solid #edf2ef;border-radius:0 0 7px 7px}
.cp-results .cp-none{cursor:default;color:#60716a;font-size:.85rem}
.cp-new,.cp-change{display:inline-flex;align-items:center;gap:6px;background:none;border:0;padding:2px 0;min-height:0;margin:8px 0 0;cursor:pointer;font:inherit;font-size:.8125rem;color:#326e55}
.cp-new svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.cp-new:hover,.cp-change:hover{background:none;text-decoration:underline}
.cp-chosen,.cp-newbox{align-items:center;flex-wrap:wrap;gap:6px 12px;padding:10px 14px;border:1px solid #d7e5dd;border-radius:12px;background:#f4f9f6}
.cp-chosen .cp-change,.cp-newbox .cp-change{margin:0 0 0 auto}
.cp-badge{font-size:.68rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#fff;background:#166c52;border-radius:6px;padding:3px 7px}
.cp-badge-new{background:#b7791f}
.cp-name{font-size:1rem}
.cp-meta{font-size:.8125rem;color:#60716a}
.cp-link{font-size:.8125rem;color:#166c52}
.cp-newfields{flex-basis:100%;display:grid;grid-template-columns:repeat(2,minmax(0,220px));gap:10px 14px;margin-top:4px}
.cp-newfields label{margin:0;font-size:.8125rem}
input.cp-locked{background:#f3f6f4;color:#40514a}
label[hidden]{display:none!important}
.client-picker .cp-input input[type=search]{padding-left:40px}
/* Leads: preço da ficha junto ao valor proposto */
.price-hint{grid-column:1/-1;display:block;margin:0 0 6px;padding:6px 10px;border-radius:8px;font-size:.8rem;line-height:1.35}
.price-hint[hidden]{display:none}
.price-hint b{font-weight:700}
.price-hint.is-info{background:#eef5fb;color:#1d4f73;border:1px solid #cfe0ee}
.price-hint.is-ok{background:#e9f5ee;color:#166c52;border:1px solid #c8e4d4}
.price-hint.is-up{background:#eef5fb;color:#1d4f73;border:1px solid #cfe0ee}
.price-hint.is-warn{background:#fdf0e6;color:#8a3d0c;border:1px solid #f1cfb5}
.price-hint.is-none{background:#f4f6f5;color:#60716a;border:1px dashed #d3ddd8}
.ph-icon{margin-right:6px;vertical-align:-2px;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;background:#c2570c;color:#fff;font-size:.7rem;font-weight:800}
.ph-use{background:none;border:0;padding:0;min-height:0;margin:0 0 0 4px;font:inherit;font-size:.8rem;color:#166c52;text-decoration:underline;cursor:pointer}
.ph-use:hover{background:none}
/* Leads: acompanhamento adicional */
.followers{grid-column:1/-1;display:grid;gap:8px}
.fl-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,.8fr) minmax(0,1.4fr) 28px;gap:10px 14px;align-items:end;padding:10px 12px;border:1px solid #dfe8e3;border-radius:10px;background:#fbfdfc}
.fl-row label{margin:0;font-size:.8125rem}
.fl-remove{background:none;border:0;min-height:0;padding:0 0 10px;margin:0;font-size:1.25rem;line-height:1;color:#a3352b;cursor:pointer}
.fl-remove:hover{background:none}
.fl-add{display:inline-flex;align-items:center;gap:6px;justify-self:start;background:none;border:0;padding:2px 0;min-height:0;margin:0;cursor:pointer;font:inherit;font-size:.8125rem;color:#326e55}
.fl-add svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.fl-add:hover{background:none;text-decoration:underline}
@media(max-width:820px){.fl-row{grid-template-columns:1fr 1fr}.fl-row .fl-note{grid-column:1/-1}.fl-remove{grid-column:2;justify-self:end}}
/* Leads: fechar a lead */
.lead-close{grid-column:1/-1;display:grid;gap:12px}
.lc-actions{display:flex;flex-wrap:wrap;gap:8px}
.lc-btn{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:7px 14px;border-radius:999px;border:1px solid #cfdcd5;background:#fff;color:#33463e;font:inherit;font-size:.86rem;font-weight:600;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.lc-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.lc-btn:hover{background:#f2f7f4}
.lc-won.is-active{background:#166c52;border-color:#166c52;color:#fff}
.lc-lost.is-active{background:#a3352b;border-color:#a3352b;color:#fff}
.lc-open.is-active{background:#eef3f0;border-color:#9fb8ab;color:#1f2a25}
.lead-close .win-area{position:relative;overflow:hidden;display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:4px 16px;align-items:end;padding:14px 18px;border:1px solid #b8dccb;border-radius:12px;background:linear-gradient(110deg,#e2f5eb,#eef6ff 60%,#fff6dc)}
.lead-close .win-area[hidden],.lost-area[hidden]{display:none}
.lead-close .win-message{grid-column:1/-1;display:flex;align-items:center;gap:12px;margin:0 0 6px;color:#1f5a42}
.lead-close .win-message strong{display:block;font-size:1.05rem}
.lead-close .win-message span{font-size:.86rem}
.win-cup{font-size:1.9rem;line-height:1}
.lead-close .win-area label{margin:0}
.lost-area{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px 16px;padding:12px 16px;border:1px solid #efd2ce;border-radius:12px;background:#fdf4f3}
.lost-area label{margin:0}
.confetti{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.confetti i{position:absolute;top:-12px;width:8px;height:13px;border-radius:2px;opacity:.95;animation:confetti-fall 2s ease-in forwards}
@keyframes confetti-fall{to{top:110%;opacity:.2;translate:0 0;rotate:540deg}}
/* Felicitação depois de gravar a venda */
.celebrate{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(20,32,27,.45);animation:cel-in .25s ease-out}
.celebrate.is-out{opacity:0;transition:opacity .3s}
.cel-card{position:relative;z-index:2;max-width:420px;width:100%;text-align:center;padding:30px 28px 24px;border-radius:18px;background:linear-gradient(160deg,#ffffff,#f1faf5);box-shadow:0 24px 60px rgba(10,30,20,.35);animation:cel-pop .45s cubic-bezier(.2,1.4,.4,1)}
.cel-cup{font-size:3.2rem;line-height:1;margin-bottom:6px}
.cel-kicker{margin:0;font-size:.72rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:#166c52}
.cel-card h2{margin:4px 0 8px;font-size:1.6rem;color:#14201b}
.cel-text{margin:0;font-weight:600;color:#26332d}
.cel-sub{margin:6px 0 18px;font-size:.88rem;color:#60716a}
.cel-close{min-width:160px}
.celebrate .confetti{position:fixed;z-index:1}
.celebrate .confetti i{width:9px;height:15px}
@keyframes cel-in{from{opacity:0}}
@keyframes cel-pop{from{transform:scale(.8);opacity:0}}
@media (prefers-reduced-motion:reduce){.celebrate,.cel-card{animation:none}}
.lead-close .win-message strong .win-seller{font-size:inherit}.lead-close .win-message .win-cup{font-size:1.9rem}
/* Folhas de obra: fechar / reabrir */
.wo-close,.wo-reopen{display:inline-block;position:relative}
.wo-close>summary,.wo-reopen>summary{list-style:none}
.wo-close>summary::-webkit-details-marker,.wo-reopen>summary::-webkit-details-marker{display:none}
.wo-close-btn{background:#1f2a25;border-color:#1f2a25}
.wo-close[open]>form,.wo-reopen[open]>form{display:grid;gap:10px;margin-top:8px;padding:12px 14px;min-width:260px;max-width:360px;border:1px solid #d7e3dc;border-radius:10px;background:#fff;box-shadow:0 6px 18px rgba(20,40,30,.08)}
.wo-close form label,.wo-reopen form label{margin:0;font-size:.8125rem}
.wo-reopen textarea{min-height:72px}
.wo-closed-tag{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;background:#eef3f0;color:#3f5249;font-size:.78rem;font-weight:600}
.wo-closed-tag svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8}
.wo-closed-card h2{margin-top:0}
.user-actions .wo-close,.user-actions .wo-reopen{display:block;width:100%}.user-actions .wo-close>summary,.user-actions .wo-reopen>summary{display:flex;justify-content:center;width:100%;box-sizing:border-box}
/* Paginação */
.pager{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:4px;margin:12px 0 4px;font-size:.85rem}
.pager-info{margin-right:auto;color:#60716a;font-size:.8rem}
.pager a,.pager span{display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:0 8px;border-radius:8px;text-decoration:none;color:#26332d}
.pager a{border:1px solid #d7e3dc;background:#fff}
.pager a:hover{background:#eef6f1;border-color:#9fc2b0}
.pager .is-current{background:#166c52;color:#fff;font-weight:700}
.pager .is-off{color:#b5c2bb}
.pager .pager-gap{min-width:16px;color:#8a978f}
/* Folhas de obra: abas e linhas compactas */
.wo-tabs{display:flex;gap:4px;margin:6px 0 10px;border-bottom:1px solid #dfe8e3}
.wo-tab{display:inline-flex;align-items:center;gap:8px;padding:9px 14px;margin-bottom:-1px;border:1px solid transparent;border-radius:10px 10px 0 0;color:#4c5a53;text-decoration:none;font-weight:600;font-size:.9rem}
.wo-tab span{min-width:22px;padding:1px 7px;border-radius:999px;background:#e7eeea;color:#3f5249;font-size:.75rem;text-align:center}
.wo-tab:hover{color:#166c52}
.wo-tab.is-active{background:#fff;border-color:#dfe8e3;border-bottom-color:#fff;color:#166c52}
.wo-tab.is-active span{background:#166c52;color:#fff}
.wo-list table{font-size:.86rem}
.wo-list th{white-space:nowrap}
.wo-list td{padding:7px 10px;vertical-align:middle}
.wo-row:hover td{background:#f7faf8}
.wo-n b{font-variant-numeric:tabular-nums;font-size:.82rem;color:#1f2a25;white-space:nowrap}
.wo-veh strong{display:block;font-size:.88rem;line-height:1.25}
.wo-veh .plate{transform:scale(.85);transform-origin:left center;margin-top:2px}
.wo-date{white-space:nowrap;font-variant-numeric:tabular-nums}
.wo-st{display:inline-block;padding:2px 9px;border-radius:999px;font-size:.75rem;font-weight:700;white-space:nowrap}
.wo-st.is-open{background:#fdf1e3;color:#8a4d10}
.wo-st.is-wait{background:#eef2ff;color:#3446a0}
.wo-st.is-closed{background:#e1f2e9;color:#166c52}
.wo-meta{display:block;font-size:.72rem;color:#7a8a82;margin-top:1px}
.wo-desc{max-width:340px}
.wo-desc span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wo-owner{white-space:nowrap}
.wo-act-h{text-align:right}
.wo-act{text-align:right;white-space:nowrap}
.ico-group{display:inline-flex;align-items:center;gap:4px}
.ico-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:0;padding:0;border-radius:8px;border:1px solid #d7e3dc;background:#fff;color:#33463e;cursor:pointer;list-style:none}
.ico-btn::-webkit-details-marker{display:none}
.ico-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ico-btn:hover{background:#eef6f1;border-color:#9fc2b0;color:#166c52}
.ico-pdf{color:#b42318;border-color:#efc9c3}.ico-pdf:hover{background:#fff4f2;color:#8f1d12;border-color:#c9675b}
.ico-close{color:#1f2a25}
.ico-reopen{color:#8a4d10;border-color:#ecd3b4}
.ico-pop{position:relative;display:inline-block}
.ico-pop[open]>form{position:absolute;right:0;top:38px;z-index:20;display:grid;gap:9px;width:280px;padding:12px 14px;text-align:left;white-space:normal;background:#fff;border:1px solid #d7e3dc;border-radius:10px;box-shadow:0 10px 28px rgba(20,40,30,.16)}
.ico-pop form label{margin:0;font-size:.8125rem}
.ico-pop form textarea{min-height:70px}
.wo-is-closed td{color:#5f6f67}
@media(max-width:900px){
 .wo-list table,.wo-list tbody{display:block}.wo-list thead{display:none}
 .wo-row{display:grid;grid-template-columns:1fr auto;gap:2px 10px;padding:10px 4px;border-bottom:1px solid #e3eae6}
 .wo-row td{display:block;padding:0;border:0}
 .wo-row .wo-veh{grid-column:1}.wo-row .wo-n{grid-column:1;order:-1}
 .wo-row .wo-act{grid-column:2;grid-row:1/3;align-self:start}
 .wo-desc{max-width:none}
}
.wo-list table{table-layout:fixed;width:100%;min-width:0}
.wo-list th:nth-child(1){width:92px}.wo-list th:nth-child(2){width:24%}.wo-list th:nth-child(3){width:96px}.wo-list th:nth-child(4){width:140px}.wo-list th:nth-child(6){width:110px}.wo-list th:nth-child(7){width:160px}
.wo-list td{padding:6px 10px;line-height:1.3}
.wo-veh .wo-vline{display:flex;align-items:center;gap:6px;min-width:0}
.wo-veh strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.wo-veh .plate{flex:none;margin:0;transform:scale(.85);transform-origin:left center}
.wo-desc{max-width:none;overflow:hidden}
.wo-owner{overflow:hidden;text-overflow:ellipsis}
@media(max-width:900px){.wo-list table{table-layout:auto}.wo-list th{width:auto}}
.wo-list th:nth-child(7){width:176px}.ico-group{flex-wrap:nowrap}
.ico-group .ico-pop{margin:0}
.wo-tab{white-space:nowrap}@media(max-width:520px){.wo-tab{padding:8px 10px;font-size:.85rem}}
@media(max-width:900px){
 .wo-list{padding:6px 12px}
 .wo-list tr.wo-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"n st" "veh veh" "desc desc" "meta act";gap:3px 10px;padding:10px 2px!important;margin:0;border-bottom:1px solid #e3eae6;background:none}
 .wo-list tr.wo-row>td{display:block!important;padding:0!important;border:0!important;min-height:0!important;background:none!important;width:auto!important}
 .wo-list tr.wo-row>td::before{display:none!important}
 .wo-row .wo-n{grid-area:n;align-self:center}
 .wo-row .wo-stc{grid-area:st;justify-self:end;text-align:right}
 .wo-row .wo-stc .wo-meta{display:none}
 .wo-row .wo-veh{grid-area:veh}
 .wo-row .wo-desc{grid-area:desc}
 .wo-row .wo-desc span{white-space:normal}
 .wo-row .wo-date{grid-area:meta;align-self:center;font-size:.78rem;color:#60716a}
 .wo-row .wo-owner{display:none!important}
 .wo-row .wo-act{grid-area:act;justify-self:end}
 .ico-pop[open]>form{right:0;width:min(280px,80vw)}
}
@media(max-width:900px){.wo-list tr.wo-row>td.wo-owner{display:none!important}}
/* Pós-venda: veículos entregues compactos */
.dv-list th:nth-child(1){width:26%}.dv-list th:nth-child(2){width:18%}.dv-list th:nth-child(3){width:96px}.dv-list th:nth-child(4){width:110px}.dv-list th:nth-child(5){width:140px}.dv-list th:nth-child(6){width:auto}.dv-list th:nth-child(7){width:176px}
.dv-client a{color:#166c52;text-decoration:none;font-weight:600}.dv-client a:hover{text-decoration:underline}
.dv-client,.dv-war{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wo-st.is-none{background:#eef1ef;color:#6b7a72}
.ico-wo{color:#166c52}
.back-link{margin:4px 0 10px}.back-link a{color:#166c52;font-weight:600;text-decoration:none}
@media(max-width:900px){
 .dv-list tr.wo-row{grid-template-areas:"veh st" "cli cli" "meta act"}
 .dv-list .dv-client{grid-area:cli}
 .dv-list .wo-date{grid-area:meta}
 .dv-list tr.wo-row>td.dv-war{display:none!important}
}
.wo-tabs{overflow-x:auto;scrollbar-width:none}.wo-tabs::-webkit-scrollbar{display:none}.dv-list th:nth-child(4){width:128px}
/* Lembretes */
.nav-badge-rem{background:#b7791f}
.rem-form{padding:12px 18px}
.rem-form>summary{list-style:none}
.rem-form>summary::-webkit-details-marker{display:none}
.rem-add{display:inline-flex;align-items:center;gap:7px;cursor:pointer;font-size:.9rem;font-weight:600;color:#166c52}
.rem-add svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.rem-form[open]>summary{margin-bottom:10px}
.rem-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);gap:10px 14px}
.rem-grid label{margin:0}
.rem-grid .rem-notes{grid-column:1/-1}
.rem-ref-chip{margin:0 0 10px;font-size:.85rem;color:#4c5a53}.rem-ref-chip a{color:#166c52;font-weight:600}
.rem-list{padding:4px 16px}
.rem-empty{padding:14px 0;margin:0}
.rem-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:9px 0;border-bottom:1px solid #edf2ef}
.rem-row:last-child{border-bottom:0}
.rem-check,.rem-del{margin:0;display:inline}
.rem-tick{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;min-height:0;padding:0;border-radius:50%;border:2px solid #b9c7bf;background:#fff;cursor:pointer}
.rem-tick svg{width:15px;height:15px;fill:none;stroke:transparent;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.rem-tick:hover{border-color:#166c52;background:#eef6f1}.rem-tick:hover svg{stroke:#9fc2b0}
.rem-row.is-done .rem-tick{background:#166c52;border-color:#166c52}.rem-row.is-done .rem-tick svg{stroke:#fff}
.rem-main{min-width:0}
.rem-main strong{display:block;font-size:.92rem;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rem-main small{display:block;font-size:.76rem;color:#6b7a72;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rem-main small a{color:#166c52}
.rem-row.is-done .rem-main strong{text-decoration:line-through;color:#7a8a82;font-weight:500}
.rem-when{font-size:.78rem;font-weight:600;white-space:nowrap;padding:2px 9px;border-radius:999px;background:#eef1ef;color:#4c5a53}
.rem-when.is-late{background:#fbe7e5;color:#a3352b}
.rem-when.is-today{background:#fdf1e3;color:#8a4d10}
.rem-when.is-soon{background:#eef5fb;color:#1d4f73}
.ico-del{color:#a3352b;border-color:#efd2ce}.ico-del:hover{background:#fdf0ee;color:#8f1d12}
.rem-quick{display:inline-flex;align-items:center;justify-content:center;gap:5px;font-size:.78rem;color:#8a4d10;text-decoration:none;padding:4px 0}
.rem-quick svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8}
.rem-quick:hover{text-decoration:underline}
.rem-digest{border-left:4px solid #b7791f}
.rem-digest h2{display:flex;align-items:center;gap:8px;margin:0 0 8px;font-size:1rem}
.rem-digest h2 svg{width:18px;height:18px;fill:none;stroke:#b7791f;stroke-width:1.8}
.rem-digest h2 span{background:#b7791f;color:#fff;border-radius:999px;font-size:.72rem;padding:1px 8px}
.rem-digest ul{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.rem-digest li{display:flex;align-items:center;gap:10px;font-size:.9rem}
.rem-all{display:inline-block;margin-top:8px;font-size:.85rem;color:#166c52;font-weight:600;text-decoration:none}
@media(max-width:700px){.rem-grid{grid-template-columns:1fr}.rem-row{grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"t m g" "t w g"}.rem-row .rem-check{grid-area:t}.rem-row .rem-main{grid-area:m}.rem-row .rem-when{grid-area:w;justify-self:start}.rem-row .ico-group{grid-area:g}}
/* Resumo: frase do dia */
.motto{margin:0 0 18px;padding:18px 22px 16px;border-radius:14px;background:linear-gradient(115deg,#14201b 0%,#1d3a2e 55%,#166c52 100%);color:#fff;position:relative;overflow:hidden}
.motto::after{content:"";position:absolute;right:-40px;top:-40px;width:180px;height:180px;border-radius:50%;background:radial-gradient(circle,rgba(166,227,161,.28),rgba(166,227,161,0) 70%)}
.motto-greet{margin:0 0 6px;font-size:.88rem;font-weight:600;color:#a6e3a1}
.motto-greet span{font-weight:400;color:#c9d8d0}
.motto .motto-text{margin:0;font-size:1.5rem;line-height:1.3;font-weight:700;letter-spacing:-.01em;color:#fff;max-width:900px}
.motto-sub{margin:8px 0 0;font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;color:#8fb3a1}
@media(max-width:600px){.motto{padding:14px 16px}.motto .motto-text{font-size:1.15rem}}
/* Telemóvel: menu ☰ */
.nav-toggle{display:none}
@media(max-width:820px){
 header{position:relative;flex-wrap:nowrap;padding:12px 16px;gap:10px}
 header>img{height:42px;width:auto}
 header .app-brand{height:30px}
 header .user-box{display:none}
 header form{margin-left:auto}
 header form button{min-height:40px;padding:8px 12px}
 .nav-toggle{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;min-height:0;padding:0;border:0;border-radius:10px;background:#161d2e;color:#fff;cursor:pointer;box-shadow:0 1px 0 rgba(255,255,255,.06) inset}
 .nav-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
 .nav-toggle:hover,.nav-toggle[aria-expanded=true]{background:#0f1522}
 .nav-toggle-dot{position:absolute;top:8px;right:8px;width:8px;height:8px;border-radius:50%;background:#e4572e;box-shadow:0 0 0 2px #161d2e}
 #main-nav{display:none}
 body.nav-open #main-nav{display:flex;flex-direction:column;align-items:stretch;gap:2px;position:absolute;left:12px;right:12px;z-index:60;margin-top:8px;padding:10px;border-radius:14px;background:#fff;border:1px solid #dfe8e3;box-shadow:0 18px 40px rgba(15,25,20,.22)}
 body.nav-open #main-nav a{justify-content:flex-start;padding:12px 14px;border-radius:10px;font-size:1rem}
 body.nav-open #main-nav .global-search{order:-1;margin:0 0 6px;width:100%;display:flex;gap:6px}
 body.nav-open #main-nav .global-search input{flex:1;min-width:0}
 body.nav-open::after{content:"";position:fixed;inset:0;z-index:50;background:rgba(15,25,20,.25)}
 body.nav-open #main-nav{z-index:61}
 .nav-user-mobile{display:block}
}
.nav-mobile-only{display:none!important}@media(max-width:820px){body.nav-open #main-nav a.nav-mobile-only{display:flex!important;border-top:1px solid #edf2ef;margin-top:4px;color:#60716a;font-size:.9rem}}
@media(max-width:820px){
 header{overflow:hidden}
 header>img:first-child{height:36px}
 header .app-brand{height:26px;min-width:0;flex:0 1 auto}
 header form button{width:44px;height:44px;min-height:0;padding:0;font-size:0;gap:0;border-radius:10px;justify-content:center}
 header form button svg{width:20px;height:20px;margin:0}
}
@media(max-width:360px){header .app-brand{display:none}}
@media(max-width:820px){header form button .btn-icon{width:20px!important;height:20px!important;margin:0!important}}
/* Leads: + Adicionar estado (discreto) */
.state-add{display:block;margin:4px 0 0;font-size:.75rem;font-weight:400}
.state-add-link{background:none;border:0;padding:0;min-height:0;margin:0;font:inherit;font-size:.75rem;color:#7a8a82;cursor:pointer}
.state-add-link:hover{background:none;color:#166c52;text-decoration:underline}
.state-add-box{display:inline-flex;align-items:center;gap:6px;margin-top:2px}
.state-add-box[hidden]{display:none}
.state-add-box input{width:190px;padding:6px 9px;font-size:.82rem;min-height:0}
.state-add-ok{min-height:0;padding:6px 10px;font-size:.78rem;border-radius:7px}
.state-add-cancel{min-height:0;padding:2px 6px;background:none;border:0;color:#a3352b;font-size:1rem;cursor:pointer}
.state-add-cancel:hover{background:none}
.state-add-msg{display:block;color:#60716a;font-size:.72rem;margin-top:2px}
/* Leads: Estado mais largo e Próximo contacto alinhado à direita */
@media(min-width:1000px){
 .fields>label:has(select[name="status"]){grid-column:span 2}
 .fields>label:has(input[name="next_contact"]){grid-column:-2/-1}
}
.state-manage-link{background:none;border:0;padding:0 0 0 4px;min-height:0;margin:0;font:inherit;font-size:.75rem;color:#9aa8a1;cursor:pointer}
.state-manage-link:hover{background:none;color:#166c52;text-decoration:underline}
.state-manage{margin-top:6px;padding:10px 12px;border:1px solid #dfe8e3;border-radius:10px;background:#fbfdfc;display:grid;gap:6px}
.state-manage[hidden]{display:none}
.sm-title{margin:0 0 2px;font-size:.72rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#60716a}
.sm-empty{margin:0;color:#60716a}
.sm-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:6px;align-items:center}
.sm-row input{padding:6px 9px;font-size:.82rem;min-height:0}
.sm-row small{grid-column:1/-1;margin-top:-3px;color:#8a978f;font-size:.7rem}
.sm-save,.sm-del,.sm-close{min-height:0;padding:5px 10px;font-size:.75rem;border-radius:7px;cursor:pointer}
.sm-del{background:#fff;color:#a3352b;border:1px solid #efd2ce}.sm-del:hover{background:#fdf0ee}
.sm-close{justify-self:start;background:none;border:0;color:#60716a;padding:2px 0}.sm-close:hover{background:none;text-decoration:underline}
.state-add [hidden]{display:none!important}
/* Leads: data, hora e canal do contacto alinhados com a linha de cima */
@media(min-width:1000px){
 .fields>label:has(input[name="contact_date"]){grid-column:1/2}
 .fields>label:has(input[name="contact_time"]){grid-column:2/3}
 .fields>label:has(select[name="contact_channel"]){grid-column:3/4}
}
.rem-form-title{margin:0 0 12px;font-size:1rem}
.rem-note{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}.rem-others{color:#166c52;font-weight:600;text-decoration:none}.rem-others.is-active,.rem-others:hover{text-decoration:underline}
/* Acompanhamento adicional: mesmo formulário e alinhamento da linha principal */
.fl-row{position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 20px;padding:14px 14px 12px;align-items:end}
.fl-row .fl-c1{grid-column:1}.fl-row .fl-c2{grid-column:2}.fl-row .fl-c3{grid-column:3}.fl-row .fl-c4{grid-column:4}.fl-row .fl-c23{grid-column:2/4}
.fl-row .fl-remove{position:absolute;top:6px;right:8px;padding:0;font-size:1.15rem}
@media(max-width:1000px){.fl-row{grid-template-columns:1fr 1fr}.fl-row label{grid-column:auto!important}}
@media(max-width:520px){.fl-row{grid-template-columns:1fr}}
/* Leads compactas */
.ld-list th:nth-child(1){width:19%}.ld-list th:nth-child(2){width:18%}.ld-list th:nth-child(3){width:150px}.ld-list th:nth-child(4){width:108px}.ld-list th:nth-child(5){width:110px}.ld-list th:nth-child(6){width:auto}.ld-list th:nth-child(7){width:216px}
.ld-cli strong,.ld-veh span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ld-cli strong{font-size:.88rem}
.ld-val{white-space:nowrap;font-variant-numeric:tabular-nums}
.ld-ct{font-size:.8rem;overflow:hidden}
.ld-ct small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ld-next{font-weight:600;white-space:nowrap}.ld-next.is-late{color:#a3352b}
.wo-st{max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
.wo-st.is-lost{background:#fbe7e5;color:#a3352b}
.wo-st.is-new{background:#eef5fb;color:#1d4f73}
@media(max-width:900px){
 .ld-list tr.wo-row{grid-template-areas:"cli st" "veh val" "ct act"}
 .ld-list .ld-cli{grid-area:cli}.ld-list .ld-veh{grid-area:veh}.ld-list .ld-val{grid-area:val;justify-self:end}.ld-list .ld-ct{grid-area:ct}
 .ld-list tr.wo-row>td.wo-owner{display:none!important}
}
/* Cada acompanhamento com cor própria */
.followers{counter-reset:fl 1}
.fl-row{counter-increment:fl;border-left:4px solid var(--fl,#166c52);background:var(--flbg,#f6fbf8);padding-top:10px}
.fl-row:nth-of-type(4n+1){--fl:#2f7fbf;--flbg:#f3f8fd}
.fl-row:nth-of-type(4n+2){--fl:#b7791f;--flbg:#fdf9f1}
.fl-row:nth-of-type(4n+3){--fl:#7c5cbf;--flbg:#f8f5fd}
.fl-row:nth-of-type(4n+4){--fl:#1f8a7a;--flbg:#f2fbf9}
.fl-head{grid-column:1/-1;display:flex;align-items:center;gap:10px;margin:0 0 2px}
.fl-badge{font-size:.68rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#fff;background:var(--fl);border-radius:6px;padding:3px 8px}
.fl-badge::after{content:" " counter(fl)}
.fl-who{font-weight:700;font-size:.9rem;color:var(--fl)}
.fl-row .fl-head .fl-remove{position:static;margin-left:auto;font-size:.78rem;color:#a3352b;padding:0}
.ld-list .wo-stc .wo-meta,.ld-list .wo-owner .wo-meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:900px){.ld-list .wo-stc{max-width:62vw}.ld-list .wo-st{max-width:100%}}
/* Linhas compactas mais baixas (leads, folhas de obra, veículos entregues) */
@media(min-width:901px){
 .wo-list td{padding:3px 8px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.84rem}
 .wo-list th{padding-top:6px;padding-bottom:6px}
 .wo-list td>strong,.wo-list td>span{display:inline}
 .wo-list .wo-meta{display:inline;margin:0 0 0 6px;font-size:.72rem}
 .wo-list .ld-cli strong,.wo-list .ld-veh span{display:inline}
 .wo-list .wo-veh .wo-vline{gap:4px}
 .wo-list .plate{transform:scale(.78)}
 .wo-list .wo-st{padding:1px 7px;font-size:.7rem}
 .wo-list .ico-group{gap:3px}
 .wo-list .ico-btn{width:27px;height:27px;border-radius:7px}
 .wo-list .ico-btn svg{width:15px;height:15px}
 .wo-list .wo-desc span{display:inline}
 .wo-list .ld-ct .ld-next{display:inline}
}
