body{background:#f6f5f9;color:#272332}.rev-main{max-width:1100px;margin:auto}.rev-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:16px 0}h1{font-size:1.5rem}h2{font-size:1.25rem}.btn-primary{background:#7438b8;border-color:#7438b8}.btn-outline-primary{color:#7438b8;border-color:#7438b8}.rev-card{background:white;border:1px solid #eee9f3;border-radius:14px;padding:20px}.rev-filtros{display:grid;grid-template-columns:1fr 220px;gap:12px}dialog{border:1px solid #eee9f3;border-radius:16px;padding:24px;width:min(660px,calc(100% - 24px));max-height:90vh;overflow:auto}dialog::backdrop{background:#1c122855}.rev-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.rev-grid label{font-size:.9rem}.rev-grid input,.rev-grid select{margin-top:5px}.rev-wide{grid-column:1/-1}.rev-resumo{padding:12px;background:#f5effc;border-radius:10px;font-size:.9rem}.rev-resumo:empty{display:none}#erro{color:#a52035}#aviso{font-size:.85rem;color:#706778}summary{cursor:pointer;color:#63339a}fieldset{min-width:0}@media(max-width:600px){.rev-top{flex-wrap:wrap}.rev-filtros{grid-template-columns:1fr}.rev-card{padding:12px}.rev-grid{gap:10px}dialog{padding:16px}.table{font-size:.85rem}.table th,.table td{min-width:95px}.table td:first-child{min-width:155px}}

@media(max-width:600px){.rev-card .table-responsive{overflow:visible}.rev-card thead{display:none}.rev-card tbody,.rev-card tr{display:block}.rev-card tr{border:1px solid #ece6f3;border-radius:12px;margin:12px 0;padding:12px}.rev-card .table td{display:flex;justify-content:space-between;gap:12px;min-width:0;border:0;padding:7px 0}.rev-card td:first-child{display:block;font-weight:600}.rev-card td:not(:first-child):not(:last-child)::before{content:attr(data-label);color:#777;font-size:.85rem}.rev-card td:last-child{justify-content:flex-end}}

.rev-main{max-width:1180px}.rev-main> .rev-top{margin:18px 0 24px}.rev-main h1{font-weight:650;letter-spacing:-.5px}.rev-card{box-shadow:0 7px 30px #39225705;border-color:#eae4f0;padding:24px}.rev-card table th{color:#8a8093;font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;font-weight:600;border-bottom-color:#eee}.rev-card table td{padding-top:18px;padding-bottom:18px}.rev-card table td:first-child{font-weight:600}.rev-card table small{font-weight:400;margin-top:4px}#cadastro{width:min(820px,calc(100% - 24px));padding:28px;box-shadow:0 24px 80px #24133333}#cadastro>.rev-top,#cadastro form>.rev-top:first-child{margin-top:0}#campos>.rev-grid{gap:18px}.rev-grid .form-control,.rev-grid .form-select{border-color:#e2dbe9;border-radius:9px;min-height:42px}.rev-grid label,.rev-label label{color:#655d70;font-size:.82rem;font-weight:500}.rev-label{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:5px}.rev-link{border:0;background:none;color:#7539b6;font-size:.8rem;font-weight:600;padding:3px 0}.rev-autocomplete{position:relative}.rev-sugestoes{position:absolute;top:100%;left:0;right:0;z-index:1100;background:white;border:1px solid #ddd1ec;border-radius:10px;box-shadow:0 10px 25px #20103015;max-height:220px;overflow:auto}.rev-sugestoes button{display:block;width:100%;border:0;background:white;text-align:left;padding:11px 13px;font-size:.85rem}.rev-sugestoes button:hover,.rev-sugestoes button[aria-selected=true]{background:#f2eafa}.rev-resumo{background:linear-gradient(120deg,#f1e9fa,#faf8fd);padding:16px;margin-top:20px;line-height:1.8}#gastosArea{border-top:1px solid #eee4f5;padding-top:18px}#gastosArea>summary{font-weight:600}.prep-top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:24px 0 12px}.prep-top h3{font-size:1.1rem;margin:5px 0}.rev-eyebrow{font-size:.65rem;font-weight:700;letter-spacing:.12em;color:#9a83b2}.rev-chip{font-size:.7rem;border:1px solid #e5d9f3;border-radius:20px;color:#795998;padding:5px 12px;background:#fcfaff}.prep-layout{display:grid;grid-template-columns:160px 1fr;gap:24px;align-items:center;background:#f9f7fb;border:1px solid #efe8f6;border-radius:16px;padding:18px;margin-bottom:18px}.prep-phone{max-width:140px;justify-self:center}.prep-phone svg{width:100%;max-height:235px;display:block}.prep-componentes{display:grid;grid-template-columns:1fr 1fr;gap:10px}.prep-componente{border:1px solid #e4ddea;background:white;display:flex;align-items:center;gap:8px;min-height:50px;padding:10px;border-radius:10px;font-size:.83rem;color:#60536e;text-align:left}.prep-componente:hover,.prep-componente[aria-pressed=true]{border-color:#9161bf;background:#f1e8fc;color:#6934a0}.prep-dot{width:7px;height:7px;background:#c6b3da;border-radius:50%;flex-shrink:0}.prep-componente[aria-pressed=true] .prep-dot{background:#8c4ac5}#gastos p{background:#fbf9fd;border:1px solid #eee7f5;border-radius:9px;padding:10px 12px;font-size:.85rem}#gastoForm{padding:16px;background:#faf8fc;border:1px solid #eee7f5;border-radius:12px}#gastoForm button{align-self:end;min-height:42px}#novoClienteForm>label{display:block;margin-top:14px}#novoClienteDialog{width:min(640px,calc(100% - 24px))}#novoClienteDialog input{margin-top:5px}#cadastro input:not([type=date]):not([type=number]):not([type=email]){text-transform:uppercase}@media(max-width:600px){#cadastro{padding:18px}.rev-card{padding:12px}.prep-layout{grid-template-columns:90px 1fr;padding:12px;gap:12px}.prep-componentes{grid-template-columns:1fr}.prep-componente{min-height:34px;padding:7px 9px}.prep-phone svg{max-height:210px}.rev-card table td{padding:7px 0}.rev-grid{grid-template-columns:1fr 1fr}#novoClienteDialog .row{margin:0}}

.prep-phone [role=button]{cursor:pointer}.prep-phone [role=button]:hover,.prep-phone [role=button]:focus{stroke:#ad86ce;outline:none}#cadastro select{text-transform:uppercase}

.prep-layout{grid-template-columns:minmax(220px,1fr) minmax(280px,1.15fr);align-items:start;gap:22px}.prep-phone{max-width:100%;width:100%;align-self:center}.prep-phone svg{max-height:340px;width:100%}.prep-componente{font-size:.71rem;line-height:1.35;min-height:48px}.prep-mais{margin-top:10px;border:1px dashed #bca4d2;background:transparent;border-radius:9px;width:100%;padding:9px;color:#805399;font-size:.8rem}.prep-extras{margin-top:10px}.prep-extras[hidden],.prep-componente[hidden]{display:none!important}@media(max-width:600px){.prep-layout{grid-template-columns:1fr;gap:14px}.prep-phone{max-width:270px;margin:auto}.prep-phone svg{max-height:240px}.prep-componentes{grid-template-columns:1fr 1fr}.prep-componente{font-size:.7rem;min-height:44px}}

.prep-historico #gastos{max-height:180px;overflow:auto;margin-top:12px}.prep-historico summary{font-size:.83rem}

/* Campos e grades devem caber no diálogo móvel, inclusive inputs nativos do iOS. */
@media(max-width:600px){
 #cadastro{box-sizing:border-box;max-width:calc(100vw - 24px);overflow-x:hidden;}
 #cadastro .rev-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
 #cadastro .rev-grid>*,#cadastro .prep-layout>*,#cadastro .prep-componentes>*{min-width:0;}
 #cadastro input,#cadastro select,#cadastro textarea{box-sizing:border-box;width:100%;min-width:0;max-width:100%;}
 #cadastro .prep-componentes{grid-template-columns:repeat(2,minmax(0,1fr));}
 #cadastro .rev-resumo,#cadastro #gastos,#cadastro .prep-componente{overflow-wrap:anywhere;}
 #cadastro .rev-top{flex-wrap:wrap;}#cadastro .prep-phone{min-width:0;max-width:100%;}
}
