/* v06: medidas e alinhamentos comuns, sem alterar as regras comerciais. */
:root{--control-height:40px;--compact-control-height:36px}
.page-heading>div:first-child,.panel-header>div,.section-title>h3{min-width:0}
.page-heading,.panel-header,.section-title{gap:16px}
.page-heading>div:first-child{flex:1}
.page-heading>.btn,.heading-actions{flex-shrink:0}
.page-heading :is(h1,h2),.dialog-head h2{overflow-wrap:anywhere}
.btn{min-height:var(--control-height);line-height:1.4;max-width:100%;text-align:center}
.btn.small{min-height:var(--compact-control-height)}
.btn:hover{transform:none}
.btn-row{align-items:center;gap:8px}
.toolbar select,.saved-view-bar select,.heading-actions input,.theme-picker select,.routine-explanation select{min-height:var(--control-height);box-sizing:border-box}
.toolbar select{height:auto}
.segmented{min-height:var(--control-height);align-items:center;padding:3px;box-sizing:border-box}
.segmented button{min-height:calc(var(--control-height) - 6px);display:flex;align-items:center;justify-content:center;gap:5px;line-height:1.4}
.heading-actions{align-items:center}
.saved-view-bar .btn{min-height:var(--control-height)}
.kpi strong,.table-money,.report-row>strong,.goal-label>strong,.after-values strong,.pipeline-summary b,.column-summary,.data-table .count-cell{font-variant-numeric:tabular-nums}
.kpi small{display:block;line-height:1.7}
.data-table th,.data-table td{vertical-align:middle;line-height:1.6}
.data-table .number-cell,.data-table .table-money{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.data-table .count-cell{text-align:center;font-variant-numeric:tabular-nums}
.lead-table th:last-child,.lead-table td:last-child{text-align:center}
.lead-table .table-open{margin-inline:auto}
.inbox-table th:last-child,.inbox-table td:last-child{text-align:right}
.inbox-table .btn-row{justify-content:flex-end}
.source-panel .table-wrap{min-width:0}
.report-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.report-grid>.panel,.insight-grid>.panel{display:flex;flex-direction:column;min-width:0}
.report-grid>.panel>.section-footer,.insight-grid>.panel>.section-footer{margin-top:auto}
.report-grid>.panel>.history-bars{flex:1;align-items:center;padding-block:20px;min-height:230px}
.history-bars{justify-content:space-between;gap:10px}
.history-bars .chart-bar-item{width:auto;flex:1;min-width:0}
.history-bars .bar-count{white-space:nowrap;text-align:center}
.history-bars .dual-track,html[data-theme=dark] .history-bars .dual-track{background:transparent}
.history-legend{flex-wrap:wrap;gap:10px 18px}
.goal-panel .panel-header{flex-wrap:wrap;align-items:center}
.goal-panel .panel-header>div{flex:1;min-width:200px}
.goal-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.goal-label{align-items:center;min-height:26px;line-height:1.6}
.report-row{align-items:center;gap:16px}
.report-row>.label{min-width:0;overflow-wrap:anywhere;line-height:1.6}
.report-row>strong{text-align:right;flex-shrink:0;line-height:1.6}
.report-details>summary,.portfolio-potential{color:var(--muted)}
.portfolio-potential strong{color:var(--ink)}
.card-open{display:grid;grid-template-rows:22px 60px 34px 38px 27px 43px;gap:7px;align-content:start}
.card-top{min-width:0}
.deal-card h3{margin:0;align-self:start;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.deal-card .company{margin:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:1.6}
.deal-card .product-tags{margin:0;align-self:start;align-content:flex-start;gap:4px;min-width:0}
.deal-card .value{margin:0;line-height:1.6;white-space:nowrap;font-variant-numeric:tabular-nums}
.deal-card .card-bottom{margin:0;padding-top:10px;align-items:center;min-width:0}
.deal-card .next-action{flex:1;min-width:0;max-width:none}
.deal-card .avatar{flex-shrink:0}
.drag-handle{min-height:36px;line-height:1.3}
.column{display:flex;flex-direction:column;min-width:0}
.column-cards{flex:1}
.add-column{min-height:var(--compact-control-height);margin-top:5px}
.task-row{align-items:center}
.task-check{margin-top:0;flex-shrink:0}
.task-meta{align-self:center}
.growth-grid{align-items:stretch}
.growth-card{display:flex;flex-direction:column;align-items:stretch}
.growth-card-footer{margin-top:auto;padding-top:18px}
.growth-card .rule-flow{flex:1}
.workspace-options .growth-card{align-items:flex-start}
.after-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.after-summary>span{display:flex;flex-direction:column;gap:6px;line-height:1.6}
.after-summary b{margin:0;font-size:22px;font-variant-numeric:tabular-nums}
.after-card .product-tags{display:flex;flex-wrap:wrap;gap:6px}
.after-values{align-items:baseline;gap:8px 15px;line-height:1.6}
.after-dates{align-items:start}
.after-dates dd{overflow-wrap:anywhere}
.after-card>.btn-row{align-items:stretch}
.detail-section .section-title{flex-wrap:wrap;align-items:center}
.detail-section .section-title>h3{margin-right:auto}
.detail-summary .values{flex-wrap:wrap;gap:18px 30px}
.form-footer{flex-wrap:wrap;align-items:stretch}
.form-footer>.btn{white-space:normal}
.template-picker>div{align-items:stretch}
.template-picker select{min-height:var(--control-height)}
.field .check-products input{width:16px;min-height:0;height:16px;padding:0;flex-shrink:0}
@media(max-width:900px){
 .page-heading:has(.heading-actions){flex-wrap:wrap}
 .page-heading:has(.heading-actions)>div:first-child{flex-basis:100%}
 .heading-actions{width:100%;flex-basis:100%;justify-content:flex-start}
 .report-grid{grid-template-columns:minmax(0,1fr)}
 .source-panel{grid-column:auto}
 .after-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
 .report-grid>.panel>.history-bars{min-height:215px}
}
@media(max-width:640px){
 :root{--control-height:44px;--compact-control-height:44px}
 .toolbar,.toolbar-left,.saved-view-bar{align-items:center;gap:10px}
 .toolbar-left{max-width:100%}
 .toolbar select{font-size:16px;max-width:100%;min-width:0}
 .saved-view-bar select{min-width:0;max-width:none;font-size:16px}
 .saved-view-bar .btn{font-size:10px;flex-shrink:0;min-height:44px}
 .segmented button{font-size:11px;white-space:normal}
 .page-heading{align-items:flex-start;gap:12px}
 .page-heading>.btn{margin-top:0;width:44px;height:44px;min-width:44px}
 .page-heading:has(.heading-actions){flex-wrap:wrap}
 .page-heading:has(.heading-actions)>div:first-child{flex-basis:100%}
 .page-heading:has(.heading-actions) p{max-width:none}
 .heading-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;width:100%;flex-basis:100%;align-items:stretch}
 .heading-actions input{min-width:0;max-width:none;width:100%;font-size:16px;padding:9px 10px}
 .heading-actions .btn{font-size:11px;padding:9px 12px;min-height:44px}
 .goal-panel .panel-header{gap:12px}
 .goal-grid{grid-template-columns:minmax(0,1fr);gap:23px}
 .goal-label{min-height:26px}
 .report-grid>.panel>.history-bars{min-height:195px}
 .history-bars .bar-track{height:112px}
 .card-open{grid-template-rows:22px 65px 36px 38px 30px 43px;padding:16px 14px 13px}
 .deal-card .value{font-size:18px}
 .drag-handle{min-height:44px}
 .routine-row .btn,.growth-card .btn,.after-card .btn{min-height:44px;white-space:normal;line-height:1.5}
 .routine-tabs button{min-height:98px;justify-content:space-between}
 .after-summary{gap:18px;padding:18px}
 .after-summary>span{flex-basis:auto}
 .after-summary b{font-size:21px}
 .after-card>.btn-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .after-card>.btn-row>.btn:first-child{grid-column:1/-1}
 .form-footer{display:grid;grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr);gap:10px}
 .form-footer>.btn{width:100%;min-height:44px;font-size:11px;line-height:1.5;padding:10px}
 .detail-section .section-title{gap:10px}
 .detail-section .section-title>.btn,.detail-section .section-title .btn-row{max-width:100%}
 .detail-summary .values{gap:17px 22px}
 .theme-picker select{min-height:44px}
}
@media(max-width:360px){
 .kpis{grid-template-columns:minmax(0,1fr)}
 .saved-view-bar{display:grid;grid-template-columns:minmax(0,1fr)}
 .saved-view-bar select{width:100%}
 .saved-view-bar .btn{justify-self:start}
 .heading-actions{grid-template-columns:minmax(0,1fr)}
 .heading-actions .btn{width:100%}
 .routine-tabs{gap:6px}
 .routine-tabs button{padding:10px 8px;font-size:10px}
 .report-row{gap:10px}
 .report-row>strong{font-size:10px}
 .form-footer{grid-template-columns:minmax(0,1fr)}
}

/* Perfil dentro do cartão, com respiro simétrico e texto que pode quebrar. */
.sidebar-bottom .user-block{padding:12px 8px;min-height:60px;gap:8px;align-items:center}
.user-block>.avatar{flex-shrink:0;width:30px;height:30px}
.user-block>div:not(.avatar){min-width:0;flex:1}
.user-block strong{line-height:1.5;overflow-wrap:anywhere}
.user-block span{display:block;line-height:1.5;margin-top:2px}
.user-block .logout{flex-shrink:0;display:grid;place-items:center;width:28px;height:32px;padding:4px;margin:0}
