/* Agenda: botão do próximo passo + menu "Ações", colunas enxutas e painel lateral (notebook). */
.mini-theme .reference-table td.row-actions{white-space:nowrap;min-width:0;width:1%}
.mini-theme .reference-table td.row-actions>.row-action{display:inline-block;width:auto;vertical-align:middle;margin:0 4px 0 0!important;padding:4px 10px!important;min-height:30px;line-height:1.2}
.mini-theme .reference-table td.row-actions>.row-action:last-of-type{margin-right:0!important}
.mini-theme .row-action.row-more{background:var(--surface)!important;color:var(--ink)!important;border:1px solid var(--line)!important;border-radius:6px;font-weight:700;cursor:pointer}
.mini-theme .row-action.row-more:hover,.mini-theme .row-action.row-more[aria-expanded="true"]{background:var(--raised)!important;border-color:var(--accent)!important}
.mini-theme .reference-table th.actions-head{text-align:left}
.mini-theme .reference-table .balance-cell small.of-total{display:block;color:var(--muted);font-weight:400;font-size:.82em;margin-top:1px}
.mini-theme .hotel-tag{display:inline-block;margin-left:4px;font-size:.92em;cursor:help;white-space:nowrap}

/* Notebook menor (1280px): a data quebra em duas linhas só quando precisa, para a tabela caber sem rolar para o lado */
@media (max-width:1340px){
  .mini-theme .reference-table td.cell-inline:first-child{white-space:normal;min-width:170px}
  .mini-theme .reference-table td.cell-inline small.await-close{display:inline-block!important;margin-top:2px!important}
}

/* Menu flutuante */
.row-menu-pop{position:fixed;z-index:1000;min-width:230px;max-width:300px;padding:6px;border-radius:10px;background:var(--surface,#fff);color:var(--ink,#202b28);border:1px solid var(--line,#c4cec7);box-shadow:0 12px 32px rgba(0,0,0,.22);font-size:calc(14px * var(--ui-font-scale,1))}
.row-menu-pop[hidden]{display:none}
.row-menu-pop [role=menuitem]{display:block;width:100%;box-sizing:border-box;text-align:left;padding:8px 10px;border:0;border-radius:6px;background:transparent!important;color:inherit!important;font:inherit;font-weight:600;text-decoration:none;cursor:pointer;min-height:0;box-shadow:none}
.row-menu-pop [role=menuitem]:hover,.row-menu-pop [role=menuitem]:focus-visible{background:var(--raised,#edf0ed)!important;outline:2px solid var(--accent,#d5b46e);outline-offset:-2px}
.row-menu-pop [role=menuitem].danger{color:#a3283a!important}
.mini-theme.theme-dark .row-menu-pop [role=menuitem].danger,.theme-dark .row-menu-pop [role=menuitem].danger{color:#ff9d8f!important}
.row-menu-pop hr{border:0;border-top:1px solid var(--line,#c4cec7);margin:5px 4px}

/* Linha aberta no painel e linha recém-atualizada */
.mini-theme .reference-table tr.row-selected>td{box-shadow:inset 0 2px 0 var(--accent),inset 0 -2px 0 var(--accent)}
.mini-theme .reference-table tr.row-selected>td:first-child{box-shadow:inset 4px 0 0 var(--accent),inset 0 2px 0 var(--accent),inset 0 -2px 0 var(--accent)}
.mini-theme .reference-table tr.row-updated>td{animation:row-flash 2.4s ease-out}
@keyframes row-flash{0%{background:var(--partial)}100%{background:var(--row-bg,transparent)}}
@media (prefers-reduced-motion:reduce){.mini-theme .reference-table tr.row-updated>td{animation:none}}

/* Painel lateral: só em telas largas (notebook/computador). Não bloqueia a Agenda. */
@media (min-width:1100px){
  .reference-dialog.side{position:fixed;inset:0 0 0 auto;margin:0;height:100vh;max-height:100vh;width:min(560px,42vw)!important;max-width:42vw!important;border-radius:0;border-width:0 0 0 1px;box-shadow:-14px 0 36px rgba(0,0,0,.18);overflow:auto;z-index:900;padding:16px 18px 28px!important}
  .reference-dialog.side .dialog-close{position:sticky;top:0;float:right;z-index:2}
  .reference-dialog.side .quick-details{clear:none}
}

/* Mini-tela de desconto */
.qa-discount .qa-preview{font-size:1.05em;margin:6px 0}
.qa-discount .qa-preview .warn{color:#a3283a;font-weight:700}
.theme-dark .qa-discount .qa-preview .warn{color:#ff9d8f}

/* Barra de ações no topo do painel: troca de ação sem fechar o painel */
.qa-actionbar{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 12px}
.reference-dialog .qa-actionbar .qa-chip,.qa-actionbar .qa-chip{display:inline-block;min-height:0;padding:5px 10px;border-radius:999px;border:1px solid var(--line,#c4cec7)!important;background:var(--surface,#fff)!important;color:var(--ink,#202b28)!important;font-size:.88em;font-weight:600;text-decoration:none;cursor:pointer;box-shadow:none;line-height:1.3}
.qa-actionbar .qa-chip:hover{border-color:var(--accent,#d5b46e)!important;background:var(--raised,#edf0ed)!important}
.qa-actionbar .qa-chip.on{background:var(--accent,#d5b46e)!important;color:#1f2a26!important;border-color:#a8892f!important}
.qa-actionbar .qa-chip.danger{color:#a3283a!important}
.qa-actionbar .qa-group{flex:0 0 auto}
.qa-actionbar .qa-group[open]{flex:1 0 100%}
.qa-actionbar .qa-group-title{list-style:none;user-select:none}
.qa-actionbar .qa-group-title::-webkit-details-marker{display:none}
.qa-actionbar .qa-group-title::after{content:" ▾";font-size:.85em}
.qa-actionbar .qa-group[open]>.qa-group-title::after{content:" ▴"}
.qa-actionbar .qa-group[open]>.qa-group-title{background:var(--raised,#edf0ed)!important;border-color:var(--accent,#d5b46e)!important}
.qa-actionbar .qa-group-items{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px;padding-left:10px;border-left:3px solid var(--accent,#d5b46e)}
.theme-dark .qa-actionbar .qa-chip.danger{color:#ff9d8f!important}

/* Tema escuro: nome do cliente legível nas linhas coloridas */
.mini-theme.theme-dark .reference-table .row-link,.mini-theme.theme-dark .reference-table td>a:not(.row-action){color:var(--ink)!important}

/* Topo: botão de instalar o app (só aparece quando o navegador permite) */
.install-app[hidden]{display:none!important}
#header .install-app,.portal-header .install-app{background:transparent;color:var(--accent,#d5b46e);border:1px solid var(--accent,#d5b46e);border-radius:6px;padding:6px 12px;font:inherit;font-weight:700;cursor:pointer;margin-right:10px;min-height:0}
#header .install-app:hover,.portal-header .install-app:hover{background:var(--accent,#d5b46e);color:#1f2a26}

/* Configurações da minha conta */
.my-account .choice-row{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0}
.my-account .choice{background:var(--surface,#fff)!important;color:var(--ink,#202b28)!important;border:1px solid var(--line,#c4cec7)!important;border-radius:8px;padding:9px 16px;font-weight:600;cursor:pointer;min-height:0}
.my-account .choice:hover{border-color:var(--accent,#d5b46e)!important}
.my-account .choice.on{background:var(--accent,#d5b46e)!important;color:#1f2a26!important;border-color:#a8892f!important}
.my-account .install-app.big{padding:11px 20px;font-weight:800}
.my-account .install-status{color:var(--muted,#52635b)}
.my-account details ul{margin:8px 0 0;padding-left:20px}.my-account details li{margin:6px 0}

/* Topo enxuto: nome da pessoa + Instalar app + Sair, sempre legível */
#user-tools{display:flex;align-items:center;gap:12px}
#user-tools #logout-form{display:inline-block;margin:0}
#user-tools #logout-form button{background:var(--accent,#d5b46e)!important;color:#1f2a26!important;border:1px solid #a8892f!important;border-radius:6px;padding:6px 14px;font:inherit;font-size:13px;font-weight:700;letter-spacing:0;text-transform:none;cursor:pointer;min-height:0;opacity:1}
#user-tools #logout-form button:hover{filter:brightness(1.06)}
.mini-theme:not(.theme-dark) #user-tools strong{color:var(--ink,#202b28)!important}
.mini-theme.theme-dark #user-tools strong{color:var(--navink,#f4f1e9)!important}

/* Taxa a informar e pagamentos de cada venda (Financeiro e Relatório) */
.badge-warn{display:inline-block;padding:1px 8px;border-radius:999px;background:#fff0d6;color:#7a4b00;border:1px solid #e6c27a;font-size:.8em;font-weight:700;white-space:nowrap}
.theme-dark .badge-warn{background:#3a2c12;color:#f3c977;border-color:#6b5222}
.money .badge-warn,.money small.badge-warn{display:block;margin-top:2px;width:max-content;margin-left:auto}
.receipt-item.fee-pending{border-left:4px solid #e6a23c;padding-left:10px}
.fin-sales tbody.fin-sale{border-top:2px solid var(--line,#c4cec7)}
.fin-sales tr.fin-pay td{font-size:.88em;color:var(--muted,#52635b);padding-top:4px;padding-bottom:4px;background:transparent}
.fin-sales tr.fin-pay td:first-child{padding-left:22px}
.fin-pay-n{font-weight:700;color:var(--ink,#202b28)}
.fin-account select{min-height:0;padding:3px 6px;font-size:.95em;border-radius:6px;max-width:150px}
.quick-edit-grid .qa-check{grid-column:1/-1;margin:2px 0}
.quick-edit-grid .qa-check label{display:flex;gap:10px;align-items:flex-start;font-weight:600;cursor:pointer}
.quick-edit-grid .qa-check input[type=checkbox]{width:20px;height:20px;flex:0 0 auto;margin-top:2px}
.fin-fee{display:flex;gap:4px;justify-content:flex-end;align-items:center;margin:0}
.fin-fee input{width:86px;min-height:0;padding:3px 6px;text-align:right;font-size:.95em;border-radius:6px}
.fin-fee button{min-height:0;padding:3px 8px;font-size:.85em}
.mini-theme .reference-table .fin-fee input{width:92px!important;height:28px!important;min-height:0!important;padding:2px 8px!important;font-size:13px!important;line-height:1!important;margin:0!important;box-sizing:border-box}
.mini-theme .reference-table .fin-fee button{height:28px!important;padding:0 10px!important;font-size:12px!important;margin:0!important}
.fin-sales tfoot tr.fin-total td{border-top:3px double var(--line,#c4cec7);background:var(--raised,#edf0ed);padding-top:8px;padding-bottom:8px}
.reference-metrics small{display:block;color:var(--muted,#52635b);font-size:.8em;margin-top:2px}

/* Despesas: quem pagou (Ivan / Acassia / empresa) e itens a conferir */
.payer-metrics .warn strong{color:#a3283a}
.theme-dark .payer-metrics .warn strong{color:#ff9d8f}
.expense-history .payer-form{display:flex;gap:4px;align-items:center;flex-wrap:wrap;margin:0}
.mini-theme .expense-history .payer-form select{min-height:0!important;height:30px!important;padding:2px 6px!important;font-size:13px!important;max-width:170px}
.mini-theme .expense-history .payer-form button{min-height:0!important;height:30px!important;padding:0 10px!important;font-size:12px!important}
.expense-history tr.needs-review>td:first-child{box-shadow:inset 4px 0 0 #e6a23c}
.expense-history .review-note{display:block;width:auto;margin-top:4px;white-space:normal;font-weight:600}
.expense-sheet-form .expense-required{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:4px 14px}
.expense-sheet-form [hidden]{display:none!important}
.inline-check{display:flex;gap:6px;align-items:center}
.expense-history .payer-cell small{display:block;color:var(--muted,#52635b)}
.expense-history .payer-edit summary{cursor:pointer;font-size:.85em;color:var(--muted,#52635b);margin-top:2px}
.expense-history .payer-edit .payer-form{margin-top:4px}
.expense-history .review-form{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:4px 0 0}
.expense-history .review-form .review-note{margin:0}
.mini-theme .expense-history .review-form button{min-height:0!important;height:26px!important;padding:0 10px!important;font-size:12px!important}
.mini-theme .reference-table td.payer-cell,.mini-theme .reference-table td.payer-col{min-width:150px;max-width:none;white-space:normal;overflow:visible;text-overflow:clip}
.mini-theme .reference-table td.payer-cell strong,.mini-theme .reference-table td.payer-cell small{white-space:normal;overflow:visible;text-overflow:clip;max-width:none}

/* Despesas: lista por mês + quanto cada um gastou */
.expense-list-page .reference-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.expense-list-page .new-expense-btn{font-weight:800;padding:10px 18px}
.expense-list-page .new-expense{margin:0 0 18px}
.expense-list-page .new-expense[hidden]{display:none}
.expense-month{border:1px solid var(--line,#c4cec7);border-radius:10px;margin:0 0 14px;background:var(--surface,#fff)}
.expense-month>summary{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap;padding:12px 16px;cursor:pointer;list-style:none}
.expense-month>summary::-webkit-details-marker{display:none}
.expense-month>summary::before{content:'▸';margin-right:6px;color:var(--muted,#52635b)}
.expense-month[open]>summary::before{content:'▾'}
.expense-month .em-title{font-size:1.2em;font-weight:800;margin-right:auto}
.expense-month .em-sum{color:var(--muted,#52635b);font-size:.95em}
.expense-month .em-sum strong{color:var(--ink,#202b28)}
.expense-month .em-open{color:#a3283a!important}
.theme-dark .expense-month .em-open{color:#ff9d8f!important}
.expense-month .reference-table-wrap{margin:0;border-radius:0 0 10px 10px;border-width:1px 0 0}
.expense-by-person{margin-top:26px}
.expense-by-person tfoot tr.fin-total td{border-top:3px double var(--line,#c4cec7);background:var(--raised,#edf0ed)}
.review-banner{display:block;width:auto;padding:8px 12px;border-radius:8px;margin:0 0 14px;white-space:normal}
.expense-more{margin-top:20px;color:var(--muted,#52635b)}

/* Despesas: barra de meses (um mês por vez) */
.month-bar{display:flex;gap:8px;overflow-x:auto;padding:4px 0 10px;margin:0 0 6px;position:sticky;top:0;z-index:5;background:var(--bg,#f4f4f1)}
.month-bar .month-chip{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:1px;padding:8px 14px;border:1px solid var(--line,#c4cec7);border-radius:10px;background:var(--surface,#fff);color:var(--ink,#202b28);text-decoration:none;font-weight:700;min-width:84px}
.month-bar .month-chip small{font-weight:500;color:var(--muted,#52635b);font-size:.8em}
.month-bar .month-chip:hover{border-color:var(--accent,#d5b46e)}
.month-bar .month-chip.on{background:var(--accent,#d5b46e);border-color:#a8892f;color:#1f2a26}
.month-bar .month-chip.on small{color:#1f2a26}
.month-heading{margin:6px 0 10px;font-size:1.5em}
.month-cards .warn strong{color:#a3283a}
.expense-by-person tr.row-selected td{font-weight:700;background:var(--raised,#edf0ed)}
.expense-metrics.month-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin:0 0 12px}
.expense-metrics.month-cards>div{padding:8px 12px!important;min-height:0!important;font-size:.88em}
.expense-metrics.month-cards>div strong{display:block;font-size:1.25em!important;margin-top:2px!important;line-height:1.2}

/* Financeiro: soma do mês e contas pagas no cartão Recebido */
.fin-sales tr.fin-pay-other td{opacity:.6}
.fin-other{display:inline-block;padding:0 6px;border-radius:999px;border:1px solid var(--line,#c4cec7);font-size:.8em}
.fin-card .fin-spent{display:block;margin-top:6px}
.fin-sales tfoot tr.fin-sub td,.reference-table tfoot tr.fin-sub td{font-size:.88em;color:var(--muted,#52635b);background:transparent}
.fin-wait-text{color:#7a4b00}
.theme-dark .fin-wait-text{color:#f3c977}
tr.fin-waiting td{background:#fff8e8}
.theme-dark tr.fin-waiting td{background:#2e2614}
.my-commission strong.blocked{color:#7a4b00;margin-left:8px}
.theme-dark .my-commission strong.blocked{color:#f3c977}
/* Minhas comissões: indicadores em cartões */
.kpi-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin:12px 0 18px}
.kpi-row article{background:var(--surface,#fff);border:1px solid var(--line,#c4cec7);border-radius:10px;padding:10px 14px;display:flex;flex-direction:column;gap:2px}
.kpi-row article>small:first-child{font-weight:700;color:var(--muted,#52635b);text-transform:uppercase;font-size:.75em;letter-spacing:.04em}
.kpi-row article strong{font-size:1.35em}
.kpi-row article small{color:var(--muted,#52635b)}
#header .mobile-panel-link,.portal-header .mobile-panel-link{display:inline-block;color:var(--accent,#d5b46e)!important;border:1px solid var(--accent,#d5b46e);border-radius:6px;padding:6px 12px;font-weight:700;text-decoration:none;margin-right:10px;white-space:nowrap}
#header .mobile-panel-link:hover,.portal-header .mobile-panel-link:hover{background:var(--accent,#d5b46e);color:#1f2a26!important}
/* Cartão dividido: recebido | despesas da empresa */
.fin-split-card .fin-halves{display:grid;grid-template-columns:1fr 1fr;gap:0;margin-top:6px;text-align:left}
.fin-split-card .fin-half{display:flex;flex-direction:column;gap:2px;padding:0 12px}
.fin-split-card .fin-half:first-child{padding-left:0;border-right:1px solid var(--line,#c4cec7)}
.fin-split-card .fin-half>small{font-weight:700;color:var(--muted,#52635b);font-size:.78em}
.fin-split-card .fin-half strong.currency{font-size:1.6em!important;line-height:1.2;margin:2px 0!important}
.fin-split-card .fin-half .metric-note{font-size:.82em}
.fin-split-card .fin-balance{display:block;margin-top:10px;padding-top:8px;border-top:1px solid var(--line,#c4cec7);font-weight:600;text-align:left}
.fin-split-grid.fin-two:has(> div:nth-child(3)){grid-template-columns:repeat(3,1fr)}
@media (min-width:900px){.mini-theme .metrics.fin-cards{grid-template-columns:1fr 2fr 1fr!important}}
.fin-split-card .fin-half strong.currency{font-size:1.9em!important;white-space:nowrap}
/* Financeiro com 4 cartões: previsto | recebido·despesas (dobro) | pendente | despesas a pagar */
@media (min-width:1200px){.mini-theme .metrics.fin-cards.fin-four{grid-template-columns:1fr 2fr 1fr 1fr!important}}
@media (min-width:900px) and (max-width:1199px){.mini-theme .metrics.fin-cards.fin-four{grid-template-columns:1fr 1fr!important}.mini-theme .metrics.fin-cards.fin-four .fin-split-card{grid-column:1/-1}}
.reference-total .same-as{color:var(--muted,#52635b)}
.reference-total a{text-decoration:underline}
.mini-theme .metrics.fin-four .metric>strong.currency{font-size:24px!important;white-space:nowrap}
.mini-theme .metrics.fin-four .metric{padding:18px 16px}
/* Saldos em conta */
.mini-theme .metrics.bank-cards{grid-template-columns:1fr 1fr!important;margin-bottom:14px}
@media (max-width:700px){.mini-theme .metrics.bank-cards{grid-template-columns:1fr!important}}
.bank-card strong.currency{font-size:26px!important}
.bank-adjust{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end;margin:6px 0 14px;padding:10px;border:1px dashed var(--line,#c4cec7);border-radius:8px}
.bank-adjust label{display:flex;flex-direction:column;gap:2px;font-weight:600}
.bank-adjust input{max-width:180px}
.bank-adjust small{flex-basis:100%;color:var(--muted,#52635b)}
.bank-transfer{margin:0}
.mini-theme .bank-table .bank-transfer button{min-height:0!important;height:28px!important;padding:0 10px!important;font-size:12px!important;white-space:nowrap}
.expense-history td.row-links{white-space:nowrap}
.expense-history td.row-links a{margin-right:8px}
.expense-edit .quick-edit-grid [hidden]{display:none!important}

/* Despesas: linha rápida e ações de um clique */
.quick-line{margin:0 0 16px;padding:14px 16px!important}
.quick-line h2{margin:0 0 8px;font-size:1.1em}
.quick-line .ql-row{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end}
.quick-line label{display:flex;flex-direction:column;gap:2px;font-weight:600;font-size:.85em;color:var(--muted,#52635b)}
.quick-line label input,.quick-line label select{min-height:0;height:38px;padding:4px 8px;font-size:15px;color:var(--ink,#202b28)}
.quick-line .ql-date input{width:150px}.quick-line .ql-supplier{flex:1 1 220px}.quick-line .ql-supplier input{width:100%}
.quick-line .ql-amount input{width:120px;text-align:right}.quick-line .ql-payer select{width:190px}.quick-line .ql-repeat select{width:130px}.quick-line .ql-times input{width:70px}
.quick-line .ql-save{height:38px;padding:0 20px;font-weight:800}
.quick-line [hidden]{display:none!important}
.quick-line .ql-hint{margin:6px 0 0;color:var(--muted,#52635b);font-size:.88em}
.quick-line .ql-more summary{cursor:pointer;margin-top:6px;color:var(--muted,#52635b);font-size:.9em}
.quick-line .ql-more .ql-row{margin-top:8px}
.full-form-btn{font-size:.85em}
.quick-messages{margin:0 0 10px}
.pay-many{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 8px}
.expense-history th.sel,.expense-history td.sel{width:28px;text-align:center}
.expense-history td.sel input{width:18px;height:18px}
.expense-history .pay-now{display:inline;margin:0}
.mini-theme .expense-history .pay-now button{min-height:0!important;height:28px!important;padding:0 12px!important;font-size:12px!important;font-weight:800}
.expense-history .pay-other{display:inline-block;margin-left:6px}
.expense-history .pay-other summary{cursor:pointer;font-size:.8em;color:var(--muted,#52635b)}
.expense-history .pay-other form{display:flex;gap:4px;margin-top:4px;flex-wrap:wrap}
.expense-history .pay-other input{width:120px;min-height:0;height:28px;padding:2px 6px}
.month-bar .month-chip.future{border-style:dashed}
.month-bar{scroll-behavior:auto}

/* Despesas: painéis laterais (Categorias e Editar) */
dialog.expense-side{position:fixed;inset:0 0 0 auto;margin:0;height:100vh;max-height:100vh;width:min(560px,100vw);max-width:100vw;border:0;border-left:1px solid var(--line,#c4cec7);border-radius:0;padding:18px 20px 28px;background:var(--surface,#fff);color:var(--ink,#202b28);box-shadow:-14px 0 36px rgba(0,0,0,.2);overflow:auto}
dialog.expense-side::backdrop{background:rgba(0,0,0,.25)}
dialog.expense-side .dialog-close{float:right;position:sticky;top:0;z-index:2}
dialog.expense-side h2{margin-top:4px}
.expense-edit-panel .quick-edit-grid{grid-template-columns:1fr 1fr}
.expense-edit-panel [hidden]{display:none!important}
.head-actions{display:flex;gap:8px;flex-wrap:wrap}
.cat-new{display:flex;gap:8px;margin:10px 0 14px}.cat-new input{flex:1}
.cat-list{list-style:none;margin:0;padding:0}
.cat-list li{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:8px 0;border-bottom:1px solid var(--line,#c4cec7)}
.cat-list li small{color:var(--muted,#52635b);min-width:90px}
.cat-list form{display:flex;gap:4px;margin:0;align-items:center}
.cat-rename{flex:1 1 220px}.cat-rename input{flex:1;min-height:0;height:34px}
.cat-list button{min-height:0!important;height:32px;padding:0 10px!important;font-size:13px!important}
.cat-list button.danger,.cat-clear button.danger{color:#a3283a!important}
.cat-clear{margin-top:18px}.cat-clear summary{cursor:pointer;color:#a3283a}
.cat-clear form{display:flex;flex-direction:column;gap:8px;max-width:320px}
/* Aprovar clientes (condutor jovem / CNH recente) */
#header .approvals-link,.portal-header .approvals-link{display:inline-block;background:#f0b429;color:#1f2a26!important;border-radius:6px;padding:6px 12px;font-weight:700;text-decoration:none;margin-right:10px;white-space:nowrap}
#header .approvals-link b,.portal-header .approvals-link b{display:inline-block;min-width:1.4em;margin-left:4px;padding:0 6px;border-radius:999px;background:#1f2a26;color:#fff;text-align:center}
.driver-approvals .approval-card{border:1px solid var(--line,#d9d4c7);border-left:6px solid #f0b429;border-radius:10px;padding:14px 16px;margin:0 0 14px;background:var(--card,#fff)}
.driver-approvals .approval-approved{border-left-color:#2f8f5b}.driver-approvals .approval-rejected{border-left-color:#c0392b}
.driver-approvals .approval-card header{display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-size:1.1em;margin-bottom:6px}
.driver-approvals .approval-reasons{margin:6px 0 8px 18px;font-weight:600}
.driver-approvals .approval-actions{display:flex;gap:14px;flex-wrap:wrap;margin-top:10px}
.driver-approvals .approval-actions form{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap;flex:1 1 280px}
.driver-approvals .approval-actions label{flex:1 1 180px;display:flex;flex-direction:column;gap:4px;font-size:.9em}
.driver-approvals .approval-actions button{min-height:44px;padding:0 18px;font-weight:800}
.driver-approvals button.approve{background:#2f8f5b;color:#fff;border-color:#2f8f5b}
.driver-approvals button.reject{background:#fff;color:#c0392b;border:2px solid #c0392b}
/* Preços e regras */
.pricing-panel .pricing-nav{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}.pricing-panel .pricing-nav a{border:1px solid var(--line,#d9d4c7);border-radius:999px;padding:6px 14px;text-decoration:none;font-weight:600}
.pricing-panel .pricing-card{border:1px solid var(--line,#d9d4c7);border-radius:12px;padding:16px 18px;margin:0 0 18px;background:var(--card,#fff);scroll-margin-top:90px}
.pricing-panel .pricing-card h2{margin:0 0 4px}.pricing-panel .pricing-scroll{overflow-x:auto;margin:10px 0}
.pricing-panel table{border-collapse:collapse;width:100%;min-width:640px}.pricing-panel th,.pricing-panel td{padding:8px;border-bottom:1px solid var(--line,#e5e0d4);text-align:left;vertical-align:middle}
.pricing-panel .pricing-grid td input{width:100%;min-width:84px;text-align:right;font-weight:600;min-height:40px}
.pricing-panel .pricing-grid th[scope=row]{white-space:nowrap}.pricing-panel .pricing-grid th small{display:block;font-weight:400;opacity:.75}
.pricing-panel .new-col{background:rgba(213,181,119,.12)}.pricing-panel .new-col input[name=new_hours]{width:3.2em;margin-left:4px}
.pricing-panel .dot{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:6px;border:1px solid rgba(0,0,0,.2);vertical-align:middle}
.pricing-panel .pricing-field-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px 16px;margin:12px 0}
.pricing-panel .pricing-field-grid label{display:flex;flex-direction:column;gap:4px;font-weight:600}.pricing-panel .pricing-field-grid label.wide{grid-column:1/-1}
.pricing-panel .pricing-field-grid input,.pricing-panel .pricing-field-grid select,.pricing-panel .pricing-field-grid textarea{min-height:40px}
.pricing-panel .pricing-fleet tr.off{opacity:.55}.pricing-panel .actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.pricing-panel label.check{display:flex;gap:8px;align-items:flex-start;margin:12px 0}
.pricing-panel .base-pick{display:flex;flex-direction:column;gap:4px;font-weight:600;max-width:520px;margin:8px 0 4px}.pricing-panel .base-pick select{min-height:42px}
.pricing-panel .pricing-grid tbody th,.pricing-panel .pricing-grid thead th{background:transparent!important;color:inherit!important;font-weight:700}.pricing-panel .pricing-grid thead th{font-size:.82em;text-transform:none;letter-spacing:0}
.pricing-panel .pricing-grid tbody th small{color:inherit;opacity:.7}.pricing-panel .pricing-grid td input{min-width:96px}
.qa-bonus-list{margin:8px 0 14px;padding-left:22px}.qa-bonus-list li{margin:0 0 8px}.qa-bonus-list li span{display:inline-block;margin-right:8px}.qa-bonus-list form{display:inline}.qa-bonus-list button{min-height:34px;padding:0 12px}
.qa-bonus input[name=bonus-description]{width:100%}
/* Nova locação em etapas */
.rental-steps{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:8px 0 18px;counter-reset:none}
.rental-steps li{display:flex;align-items:center;gap:8px;padding:8px 14px;border:1px solid var(--line,#d9d4c7);border-radius:999px;background:var(--card,#fff);font-weight:600;opacity:.7}
.rental-steps li span{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#e8e2d3;font-size:.85em}
.rental-steps li[aria-current]{opacity:1;border-color:#c8a35b;background:#fbf4e4}.rental-steps li[aria-current] span{background:#c8a35b;color:#1f2a26}
.rental-steps li.done{opacity:1}.rental-steps li.done span{background:#2f8f5b;color:#fff}.rental-steps li.clickable{cursor:pointer}
.rental-step .step-nav{display:flex;justify-content:space-between;gap:10px;margin-top:14px}.rental-step .step-nav button{min-height:46px;padding:0 22px;font-weight:700}
.rental-step .step-nav [data-step-next],.rental-step .step-nav [type=submit]{margin-left:auto}
.rental-step .value-mode{border:1px solid var(--line,#d9d4c7);border-radius:10px;padding:10px 14px;margin:12px 0;display:flex;flex-wrap:wrap;gap:8px 22px}
.rental-step .value-mode label{display:flex;gap:8px;align-items:center;font-weight:600}
/* Segundo condutor (1.37) */
.second-driver{border:1px solid var(--line,#d8d2c4);border-radius:12px;padding:12px 14px;margin:14px 0}
.second-driver legend{font-weight:700;padding:0 6px}
.second-driver .sd-modes{display:flex;flex-direction:column;gap:8px;margin:4px 0 10px}
.second-driver .sd-modes label{display:flex;align-items:center;gap:8px;font-weight:600}
.second-driver .sd-hint{font-size:.9rem;opacity:.85;margin:6px 0 10px}
.second-driver [hidden]{display:none!important}
.customer-picked{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin:8px 0 12px;padding:10px 12px;border:1px solid #b9975b;border-radius:10px;background:rgba(185,151,91,.12)}
.customer-picked small{opacity:.8}
.customer-picked[hidden]{display:none!important}
/* 1.39 — tela inteira (cara de sistema): o conteúdo ocupa toda a largura, do canto esquerdo ao direito */
.app-layout>.page-main,#main-content.page-main,#container .colM#content,#container #content.colM{max-width:none!important;width:auto!important;flex:1 1 auto!important;min-width:0;margin-left:0!important;margin-right:0!important;padding-left:16px!important;padding-right:16px!important}
.reference-ui,.new-rental,.form-panel{max-width:none!important}
body.sidebar-collapsed .app-layout>.page-main,body.sidebar-collapsed #container .colM{margin-left:0!important}
.experience-sidebar{flex:0 0 auto}
/* 1.41 — Contratos e documentos */
.docs-search{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0}
.docs-search input[type=search]{flex:1 1 260px;min-width:0}
.docs-table-wrap{overflow-x:auto}
.docs-table{width:100%;border-collapse:collapse;font-size:.9rem}
.docs-table th,.docs-table td{border:1px solid #ddd5c6;padding:6px 8px;text-align:left;vertical-align:middle}
.docs-table th{background:#efe9de;font-size:.8rem;text-transform:uppercase}
.docs-table td:nth-child(n+5):not(:last-child){text-align:center}
.doc-ok{color:#1d7a3a;font-weight:700}.doc-no{color:#a23b2a}
.doc-files{list-style:none;padding:0;margin:6px 0;display:flex;flex-direction:column;gap:6px}
.doc-files li{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:6px 8px;border:1px solid #ddd5c6;border-radius:8px}
.doc-thumb{width:64px;height:48px;object-fit:cover;border-radius:4px;border:1px solid #ccc}
.doc-name{flex:1 1 180px}
.button.small{padding:4px 10px;font-size:.85rem}
.docs-upload p{margin:6px 0}
@media (max-width:700px){.docs-table thead{display:none}.docs-table,.docs-table tbody,.docs-table tr,.docs-table td{display:block;width:100%}.docs-table tr{border:1px solid #ddd5c6;border-radius:10px;margin-bottom:10px;padding:6px}.docs-table td{border:0;text-align:left!important;padding:3px 6px}.docs-table td[data-label]::before{content:attr(data-label) ": ";font-weight:600}}
.docs-search input,.docs-search button{width:auto!important;margin:0!important}
.docs-search input[type=search]{flex:1 1 320px}.docs-search input[type=month]{flex:0 0 190px}
.ql-parts{margin-top:6px}.ql-parts label{flex:0 1 200px}.ql-parts small{align-self:center}
.ql-parts [hidden]{display:none!important}
.doc-row{display:grid;grid-template-columns:minmax(180px,240px) 1fr auto;gap:10px 16px;align-items:center;padding:10px 0;border-bottom:1px solid #e6dfd2}
.doc-row:last-child{border-bottom:0}
.doc-row-head h3{margin:0;font-size:1rem}.doc-row-head{display:flex;flex-direction:column;gap:2px}
.doc-model{font-size:.82rem}
.doc-row .doc-files{margin:0}.doc-row .doc-row-files>p{margin:0}
.doc-upload{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.doc-upload label.button{position:relative;overflow:hidden;cursor:pointer;margin:0;white-space:nowrap}
.doc-upload label.button input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%!important}
.doc-upload input[name=title]{width:200px!important;margin:0!important}
.doc-missing .doc-row-head h3{color:#7a2a1d}
@media (max-width:760px){.doc-row{grid-template-columns:1fr}.doc-upload{justify-content:flex-start}}
.doc-upload [hidden]{display:none!important}
.commission-bar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:8px 0;padding:8px 12px;border:1px solid #ddd5c6;border-radius:10px;background:#faf7f1}
.commission-table td small{opacity:.85}
.docs-search select{width:auto!important;margin:0!important;flex:0 1 260px}
.commission-table td{white-space:normal!important;vertical-align:middle}
.commission-table td:nth-child(3){min-width:260px}
/* 1.42.1 — Total e Falta em colunas separadas */
.mini-theme .reference-table td.total-cell{white-space:nowrap;color:var(--muted,#555);font-weight:500}
.mini-theme .reference-table td.balance-cell{white-space:nowrap}
/* Data, Retirada e Devolução em colunas */
.mini-theme .reference-table td.time-cell{white-space:nowrap}
.mini-theme .reference-table td.time-cell small,.mini-theme .reference-table td.date-cell small{display:block;color:var(--muted,#666);font-size:.8em;font-weight:400}
.mini-theme .reference-table td.date-cell .await-close{display:inline-block;margin-top:2px}
.mini-theme .reference-table td.duration-cell{font-weight:600}
.docs-table td .doc-upload-cell{justify-content:center;flex-wrap:nowrap}
.docs-table td .button.small{white-space:nowrap}
.docs-table td a.doc-view{min-width:52px;text-align:center}
.bill-grid p[hidden],form p[hidden]{display:none!important}
.update-banner{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:9999;background:#1f2a1f;color:#fff;padding:10px 14px;border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.25);display:flex;gap:10px;align-items:center;max-width:calc(100% - 32px);font-size:.95rem}
.update-banner button{background:#d4b26a;color:#1b1b1b;border:0;border-radius:8px;padding:6px 12px;font-weight:700;cursor:pointer}

/* 1.44: vencimento + pago em na linha rápida; colunas Ivan / Acassia / Empresa */
.quick-line .ql-paid-box{display:flex;gap:4px;align-items:center}
.mini-theme .quick-line .ql-today{min-height:0!important;height:38px!important;padding:0 10px!important;font-size:12px!important}
.expense-history td.part{white-space:nowrap}
.expense-history td.money .muted{color:var(--muted,#52635b)}
.bill-value{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin:6px 0 14px;padding:12px;border:1px solid var(--line,#d8d3c4);border-radius:8px}
.bill-value label{display:flex;flex-direction:column;gap:2px;font-weight:600}
.bill-value label.check{flex-direction:row;align-items:center;gap:6px;font-weight:500}
.bill-value input[name=amount]{width:160px;text-align:right}
.bill-value small{flex-basis:100%;color:var(--muted,#52635b)}

/* 1.44.1: filtro por situação na lista do mês */
.status-filter{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 10px}
.status-filter .filter-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border:1px solid var(--line,#c4cec7);border-radius:999px;background:var(--surface,#fff);color:var(--ink,#202b28);text-decoration:none;font-weight:700}
.status-filter .filter-chip small{font-weight:600;color:var(--muted,#52635b)}
.status-filter .filter-chip:hover{border-color:var(--accent,#d5b46e)}
.status-filter .filter-chip.on{background:var(--accent,#d5b46e);border-color:#a8892f;color:#1f2a26}
.status-filter .filter-chip.on small{color:#1f2a26}
.status-filter .f-pagas:not(.on){border-left:5px solid #9fd3b4}
.status-filter .f-vencidas:not(.on){border-left:5px solid #e7a9b0}
.status-filter .f-pendentes:not(.on){border-left:5px solid #e6d7a8}

/* 1.44.2: ações da lista de despesas mais claras */
.expense-history .row-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start}
.expense-history .row-actions .act{display:inline-flex;align-items:center;height:32px;padding:0 12px;border:1px solid var(--line,#c4cec7);border-radius:8px;background:var(--surface,#fff);color:var(--ink,#202b28);font-size:14px;font-weight:700;text-decoration:none;cursor:pointer;white-space:nowrap;margin:0}
.expense-history .row-actions .act:hover{border-color:var(--accent,#d5b46e)}
.expense-history .row-actions summary.act{list-style:none}
.expense-history .row-actions summary.act::-webkit-details-marker{display:none}
.expense-history .row-actions .danger-link{color:#a3222f;border-color:#e3b3b8}
.mini-theme .expense-history .pay-now button{height:32px!important;font-size:14px!important;padding:0 14px!important}
.expense-history .pay-other,.expense-history .row-delete{display:inline-block;margin:0}
.expense-history .pay-other summary{font-size:14px;color:var(--ink,#202b28)}
.expense-history .pay-other[open] form,.expense-history .row-delete[open] form{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end;margin-top:6px;padding:10px;border:1px solid var(--line,#c4cec7);border-radius:8px;background:var(--surface,#fff)}
.expense-history .pay-other label{display:flex;flex-direction:column;font-size:13px;font-weight:600}
.expense-history .pay-other input{width:150px;height:32px}
.expense-history .row-delete p{margin:0;flex-basis:100%;font-size:14px;white-space:normal}
.mini-theme .expense-history .row-delete button.danger{background:#a3222f!important;border-color:#a3222f!important;color:#fff!important;height:32px!important;min-height:0!important;padding:0 12px!important;font-size:13px!important}
.quick-line.copying{box-shadow:0 0 0 3px var(--accent,#d5b46e)}
.quick-line .copy-note{margin:0 0 8px;padding:8px 10px;border-radius:8px;background:#fbf3dc;font-weight:600}
.quick-line.copying .ql-date input{outline:2px solid var(--accent,#d5b46e)}
.expense-history td.row-links{white-space:normal;min-width:250px}
.expense-history td.row-links{min-width:430px}
.expense-history .row-actions details[open]{flex-basis:100%;order:10}
.expense-history .row-actions details[open]>summary{background:var(--accent,#d5b46e);border-color:#a8892f}

/* Tempo em duas linhas na agenda e prévia do editor de horário */
.reference-table td.duration-cell small.duration-detail,td.duration-cell small.duration-detail{display:block;font-weight:400;font-size:.9em;color:#5c5c5c}
.when-result{margin:10px 0;padding:8px 10px;background:#f6eed9;border-radius:6px;font-weight:600}
