/* YM INTERNAL UX SYSTEM 20260826 v2 — carregado por último nas telas internas */

/* MOTOR — estados visuais precisam manter contraste em qualquer viewport */
.vosg-chip{color:#526b7e!important;background:#fff!important;border-color:#dce4ed!important}
.vosg-chip:hover{color:#0a2540!important;background:#f5f8fb!important}
.vosg-chip.ok{color:#276746!important;background:#f5fcf8!important;border-color:#b9dec9!important}
.vosg-chip.active{color:#fff!important;background:#0a2540!important;border-color:#0a2540!important}
.vosg-chip.ok.active{color:#fff!important;background:#0a2540!important;border-color:#0a2540!important;box-shadow:0 0 0 2px rgba(91,224,162,.28)}
.vosg-step{color:#fff!important}
.vosg-step.active{color:#0a2540!important;background:#fff!important}
.vosg-step.done:not(.active){color:#fff!important}

/* Proteções gerais contra corte horizontal e herança acidental de largura */
.ym-main,.ym-content{min-width:0}
.ym-title,.ym-lead,.ym-copy,.ym-meta,.ym-card,.ym-block,.ym-section,.ym-panel{overflow-wrap:anywhere}

@media (max-width: 760px) {
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  body{min-width:0}
  .ym-main,.ym-content,.workspace,.motor-grid,.motor-section,.motor-section .body,.ym-card,.ym-panel,.ym-block,.ym-detail-grid,.ym-formgrid,.ym-filterbar{min-width:0;max-width:100%}
  .ym-content{width:100%;padding-left:14px!important;padding-right:14px!important}
  .ym-topbar{gap:8px;align-items:center}.ym-topbar>div{min-width:0}.ym-topbar-title{white-space:normal;line-height:1.2;overflow-wrap:anywhere}.ym-topbar-meta{min-width:0}.ym-chip{max-width:100%;white-space:normal;text-align:center}
  .ym-header,.ym-section-head{width:100%;min-width:0}.ym-header>*,.ym-section-head>*{min-width:0;max-width:100%}.ym-actions{width:100%;display:flex;flex-wrap:wrap}.ym-actions>.ym-btn,.ym-actions>a.ym-btn{flex:1 1 145px;white-space:normal;text-align:center}
  .ym-title,.ym-lead,.ym-copy,.ym-meta,.ym-block h3,.ym-section h2{max-width:100%;overflow-wrap:anywhere}
  .ym-grid>*{min-width:0}.ym-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}.ym-kpi{min-width:0}.ym-kpi b{overflow-wrap:anywhere}
  .ym-formgrid,.ym-filterbar,.ym-detail-grid{grid-template-columns:minmax(0,1fr)!important}.ym-wide{grid-column:auto!important}
  .ym-input,.ym-select,.ym-textarea{width:100%!important;max-width:100%!important;min-width:0!important;font-size:16px!important}.ym-textarea{line-height:1.5}
  .ym-btn{white-space:normal;line-height:1.25;min-height:44px}.ym-badge{white-space:normal;text-align:center;line-height:1.25}
  .ym-modal-back,.crm-modal-back,.target-back{padding:0!important;align-items:stretch!important}.ym-modal,.crm-modal,.target-modal{width:100%!important;max-width:none!important;max-height:100dvh!important;height:100dvh;border-radius:0!important}.ym-modal-body,.crm-modal-body,.target-body{max-height:none!important;flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.ym-modal header,.crm-modal>header,.target-modal>header{min-height:64px}.ym-modal header button,.crm-modal>header button,.target-modal>header button{min-width:42px;min-height:42px}
  .table-wrap,[class*="table-wrap"]{width:100%;max-width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch}.table{max-width:none}.tabbar,.fin-tabs,.preset-row{max-width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity}.tabbar button,.fin-tab,.preset{scroll-snap-align:start}

  /* MOTOR — viewport mobile real, não desktop comprimido */
  #workspace{width:100%;max-width:100%;overflow-x:hidden!important}
  #workspace *{min-width:0}
  #workspace .case-hero,#workspace .motor-section,#workspace .p8-card,#workspace .p8-body,#workspace .guide-intro,#workspace .guide-box,#workspace .check-row,#workspace .analysis-fields,#workspace .entry,#workspace .investigation-intro,#workspace .test-box,#workspace .mvc,#workspace .vosg-wrap,#workspace .vosg-card,#workspace .vosg-callout,#workspace .vosg-invest-step{width:100%;max-width:100%;box-sizing:border-box}
  #workspace .case-hero{padding:18px 16px!important;border-radius:18px}.case-hero h2{overflow-wrap:anywhere;line-height:1.12}.case-hero p{overflow-wrap:anywhere}
  #workspace .motor-section>header{padding:14px!important}.motor-section .body{padding:14px!important}
  #workspace .p8-summary{width:100%;gap:8px;align-items:flex-start}.p8-summary-main{min-width:0!important}.p8-summary h4,.p8-summary small{white-space:normal!important;overflow-wrap:anywhere}
  #workspace .check-row{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:9px!important;padding:12px!important}.check-row span{display:block!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;word-break:normal!important;line-height:1.5!important}.check-select{width:100%!important;max-width:100%!important;font-size:16px!important;min-height:46px!important}
  #workspace textarea,#workspace select,#workspace input{max-width:100%!important;min-width:0!important;box-sizing:border-box!important}

  /* MOTOR guiado v3 */
  #workspace .vosg-hero{padding:17px 15px!important;border-radius:18px!important}.vosg-hero h2{font-size:23px!important;line-height:1.12!important;overflow-wrap:anywhere}.vosg-hero p{font-size:14px!important;line-height:1.55!important;overflow-wrap:anywhere}
  #workspace .vosg-progress{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.vosg-step{width:100%!important;min-height:50px!important;padding:9px 8px!important;white-space:normal!important;line-height:1.25!important;font-size:11.5px!important;overflow-wrap:anywhere}
  #workspace .vosg-card{padding:15px!important}.vosg-card h3{font-size:20px!important;line-height:1.2!important}.vosg-card h4{font-size:14px!important}.vosg-copy{font-size:14px!important;line-height:1.6!important}.vosg-muted{font-size:12.5px!important;line-height:1.55!important}.vosg-kicker{font-size:11px!important}.vosg-callout{padding:12px!important}
  #workspace .vosg-pchips,#workspace .vosg-hchips{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;overflow:visible!important;padding:2px 0 10px!important}
  #workspace .vosg-chip{width:100%!important;min-width:0!important;min-height:46px!important;padding:9px 8px!important;border-radius:12px!important;white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.3!important;text-align:center!important;font-size:12.5px!important;display:flex!important;align-items:center!important;justify-content:center!important}
  #workspace .vosg-question{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:9px!important;width:100%!important;padding:12px!important}.vosg-question span{font-size:14px!important;line-height:1.55!important;white-space:normal!important;overflow-wrap:anywhere!important}.vosg-question select{width:100%!important;font-size:16px!important;min-height:46px!important}
  #workspace .vosg-grid2{grid-template-columns:minmax(0,1fr)!important}.vosg-form label{font-size:12.5px!important}.vosg-form textarea,.vosg-form input,.vosg-form select{font-size:16px!important;max-width:100%!important}
  #workspace .vosg-nav{flex-direction:column!important;align-items:stretch!important;gap:8px!important}.vosg-nav>div,.vosg-nav .ym-btn{width:100%!important}.vosg-actions{display:grid!important;grid-template-columns:minmax(0,1fr)!important}.vosg-actions .ym-btn{width:100%!important;font-size:14px!important;min-height:44px!important}
  .vosg-term{font-size:11.5px!important;white-space:normal!important}.vosg-list li{font-size:13.5px!important;line-height:1.55!important}.vosg-choice label{padding:12px!important}.vosg-choice b{font-size:13.5px!important}.vosg-choice span{font-size:12.5px!important}.vosg-status span{font-size:11px!important}.vosg-history summary{font-size:12.5px!important}.vosg-history pre{font-size:12px!important}.vosg-glossary-btn{font-size:12px!important}.vosg-modal{padding:0!important;align-items:stretch!important}.vosg-modal-card{width:100%!important;max-width:none!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important}.vosg-modal-body{overflow:auto!important}.vosg-modal-head b{font-size:14px!important}.vosg-modal-head p{font-size:12px!important}.vosg-close{min-width:42px!important;min-height:42px!important}.vosg-gloss b{font-size:12.5px!important}.vosg-gloss p{font-size:13px!important}.vosg-order{grid-template-columns:34px minmax(0,1fr)!important}

  #workspace :is([class*="tabs"],[class*="p8-nav"],[class*="step-nav"],[class*="stage-nav"],[class*="review-nav"]){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;width:100%!important;max-width:100%!important;overflow:visible!important;white-space:normal!important}
  #workspace :is([class*="tabs"],[class*="p8-nav"],[class*="step-nav"],[class*="stage-nav"],[class*="review-nav"]) button{width:100%!important;max-width:100%!important;min-width:0!important;min-height:48px!important;padding:9px 8px!important;white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.25!important;text-align:center!important}
  #workspace .prereq{grid-template-columns:minmax(0,1fr)!important}.prereq>div{min-width:0}
  #workspace .mvc-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}.mvc-grid{grid-template-columns:minmax(0,1fr)!important}.mvc-card.wide{grid-column:auto!important;overflow-x:auto!important}.mvc-table{min-width:620px}.mvc-source{grid-template-columns:minmax(0,1fr) auto!important}.mvc-copy,.mvc-source small,.mvc-blocker,.mvc-note{overflow-wrap:anywhere}
  .case-index{max-width:100%;overflow:hidden}.case-items{max-width:100%}.case-item{max-width:100%}.case-item b,.case-item span{white-space:normal!important;overflow-wrap:anywhere}

  /* CRM */
  .crm-toolbar{grid-template-columns:minmax(0,1fr)!important}.lead-summary{max-width:100%;grid-template-columns:36px minmax(0,1fr) auto!important}.lead-name{min-width:0}.lead-name b,.lead-name span{white-space:normal!important;overflow-wrap:anywhere}.lead-body,.lead-context,.visual-profile,.lead-quick,.detail-tabs,.source-queue{min-width:0;max-width:100%}.lead-context,.lead-quick,.detail-tabs,.source-queue{grid-template-columns:minmax(0,1fr)!important}

  /* Financeiro / Dashboard / Conteúdos / Identidade */
  .metric-grid,.insight-grid,.scenario-grid,.period-summary,.target-grid{grid-template-columns:minmax(0,1fr)!important}.hero-metrics{grid-template-columns:minmax(0,1fr)!important}.trend-month{min-width:0}.custom-range{grid-template-columns:minmax(0,1fr)!important}.section>header{min-width:0}.section>header>*{min-width:0}.section h2,.section header p,.hero h2,.hero-note{overflow-wrap:anywhere}
}
@media (max-width: 390px){
  .ym-kpis{grid-template-columns:minmax(0,1fr)!important}
  #workspace .vosg-progress,#workspace .vosg-pchips,#workspace .vosg-hchips{grid-template-columns:minmax(0,1fr)!important}
  #workspace :is([class*="tabs"],[class*="p8-nav"],[class*="step-nav"],[class*="stage-nav"],[class*="review-nav"]){grid-template-columns:minmax(0,1fr)!important}
}

/* YM INTERNAL TYPOGRAPHY GUARD 20260901 — escala oficial: corpo 15, UI 14, apoio 13, meta 12 */
.ym-main{font-size:15px;line-height:1.55}
.ym-main [style*="font-size:7px"],.ym-main [style*="font-size:7.5px"],.ym-main [style*="font-size:8px"],.ym-main [style*="font-size:8.5px"],.ym-main [style*="font-size:9px"],.ym-main [style*="font-size:9.5px"],.ym-main [style*="font-size:10px"],.ym-main [style*="font-size:10.5px"],.ym-main [style*="font-size:11px"],.ym-main [style*="font-size:11.5px"]{font-size:12px!important;line-height:1.45!important}

/* Conteúdos */
.ct-intro p{font-size:15px!important;line-height:1.65!important}.ct-rule b{font-size:15px!important}.ct-rule p{font-size:13px!important;line-height:1.55!important}
.ct-icp .eyebrow{font-size:12px!important}.ct-icp h3{font-size:15px!important}.ct-icp p{font-size:13px!important;line-height:1.55!important}.ct-pill{font-size:12px!important;padding:6px 8px!important}
.ct-tab{font-size:13px!important;min-height:40px!important;padding:9px 12px!important}.ct-kpi span{font-size:12px!important}.ct-week div{font-size:12px!important}.ct-date{font-size:12px!important}.ct-day{min-height:128px!important}.ct-event{font-size:12px!important;line-height:1.35!important;padding:6px 7px!important}.ct-event small{font-size:12px!important;line-height:1.35!important}
.ct-card h3{font-size:15px!important;line-height:1.35!important}.ct-card p{font-size:13px!important;line-height:1.55!important}.ct-label{font-size:12px!important}.ct-tag,.ct-proof-status{font-size:12px!important}.ct-modal>header h2{font-size:18px!important}.ct-section{font-size:14px!important}.ct-help{font-size:12px!important;line-height:1.5!important}.ct-panel h3{font-size:15px!important}.ct-panel p,.ct-panel li{font-size:13px!important;line-height:1.55!important}.ct-learning b{font-size:13px!important}.ct-empty{font-size:13px!important;line-height:1.55!important}

/* Central administrativa */
.ca-subnav button{font-size:13px!important}.ca-row b{font-size:13px!important}.ca-row small{font-size:12px!important}.ca-client h3{font-size:14px!important}.ca-client p{font-size:13px!important}.ca-cell b{font-size:12px!important}.ca-cell span{font-size:13px!important}.ca-badge{font-size:12px!important}.ca-week div{font-size:12px!important}.ca-day-num{font-size:12px!important}.ca-event{font-size:12px!important}.ca-drawer>header small{font-size:12px!important}.ca-client-tabs button{font-size:13px!important}.ca-soft small{font-size:12px!important}.ca-soft b{font-size:13px!important}.ca-form h3,.ca-project h3{font-size:14px!important}.ca-link,.ca-note{font-size:13px!important}.ca-empty{font-size:13px!important}

/* CRM */
.lead-name b{font-size:14px!important}.lead-name span,.cell{font-size:13px!important}.cell b{font-size:12px!important}.visual-profile .meta{font-size:13px!important}.visual-profile .chips span{font-size:12px!important}.profile-actions button{font-size:13px!important}.quick h4{font-size:14px!important}.quick p{font-size:13px!important}.editor h4{font-size:14px!important}.helper{font-size:12px!important}.history-wrap h4{font-size:14px!important}.history-line{font-size:13px!important}.create-box summary{font-size:14px!important}.queue h4{font-size:14px!important}.queue-row b{font-size:13px!important}.queue-row span{font-size:12px!important}.kpi-pct{font-size:12px!important}.tabbar button{font-size:13px!important}

/* Dashboard */
.dash-filter{font-size:14px!important;min-height:42px!important}.dash-kpi span{font-size:12px!important}.dash-kpi small{font-size:12px!important}.dash-kpi[data-detail]:after{font-size:12px!important}.dash-section-head p{font-size:13px!important}.funnel-label{font-size:13px!important}.funnel-value{font-size:12px!important}.mini-table th{font-size:12px!important}.mini-table td{font-size:13px!important}.empty{font-size:13px!important}.gate b{font-size:14px!important}.gate span{font-size:13px!important}.p8-row:first-child{font-size:12px!important}.p8-row:not(:first-child){font-size:13px!important}.pill{font-size:12px!important}.recent-case b{font-size:13px!important}.recent-case span{font-size:12px!important}.loading,.error{font-size:13px!important}.updated{font-size:12px!important}.dash-modal header h3{font-size:18px!important}.detail-row b{font-size:13px!important}.detail-row span{font-size:12px!important}

/* Financeiro */
.fin-status{font-size:12px!important}.fin-tab{font-size:13px!important}.filter-head strong{font-size:14px!important}.filter-head span{font-size:13px!important}.preset{font-size:12px!important}.custom-range label{font-size:12px!important}.custom-range input{font-size:14px!important}.period-pill{font-size:12px!important}.hero-eyebrow{font-size:12px!important}.hero-label{font-size:14px!important}.hero-progress-label{font-size:12px!important}.hero-metric span{font-size:12px!important}.hero-note{font-size:13px!important}.section h2{font-size:16px!important}.section header p{font-size:13px!important}.section-lead{font-size:13px!important}.metric .k{font-size:12px!important}.metric .d{font-size:13px!important}.summary-card span{font-size:13px!important}.trend-month .m{font-size:13px!important}.bar-line label{font-size:12px!important}.trend-values{font-size:12px!important}.insight .tag{font-size:12px!important}.insight span{font-size:13px!important}.scenario h3{font-size:14px!important}.scenario p{font-size:13px!important}.scenario .minirow{font-size:12px!important}.table th{font-size:12px!important}.table td{font-size:13px!important}.badge{font-size:12px!important}.source-box strong{font-size:14px!important}.source-box p{font-size:13px!important}.sheet>summary{font-size:14px!important}.source-note{font-size:13px!important}.target-grid label{font-size:12px!important}.target-grid input,.target-grid textarea{font-size:14px!important}.target-history-row{font-size:12px!important}

/* Identidade */
.id-intro p{font-size:15px!important}.id-rule-card h3{font-size:15px!important}.id-rule-card p{font-size:13px!important}.id-cat{font-size:12px!important}.id-card h3{font-size:15px!important}.id-card p{font-size:13px!important}.id-meta span{font-size:12px!important}.id-meta b{font-size:12px!important}.id-modal>header h2{font-size:18px!important}.id-rule{font-size:13px!important}

/* MOTOR — remove os últimos microtextos abaixo do piso oficial */
.vosg-step{font-size:12px!important}.vosg-kicker,.vosg-status span{font-size:12px!important}.vosg-term{font-size:12px!important}.p8-summary small,.check-help{font-size:12px!important}

@media(max-width:760px){
  .ct-tab,.ca-subnav button,.tabbar button,.fin-tab{font-size:14px!important;min-height:44px!important}
  .ct-card p,.ct-panel p,.ct-panel li,.ca-client p,.quick p,.history-line,.section header p,.metric .d,.summary-card span,.insight span,.scenario p,.id-card p,.id-rule-card p{font-size:14px!important}
  .ct-day{min-height:132px!important}.ct-week div,.ct-date,.ct-event,.ct-event small{font-size:12px!important}
}
