/* Nexo Finanças — Projeção. Identidade Inter / Iconoir 1.2 / red #ec0000,
 * superfícies e bordas do próprio aplicativo. Apenas a cópia de testes. */
.projection-view{display:grid;gap:17px;max-width:1500px;margin:0 auto 35px;min-width:0}
.projection-view .page-head{margin-bottom:0}
.projection-view button>.nexo-icon,.projection-view button svg.nexo-icon{width:19px;height:19px;stroke-width:1.2}
.projection-month-toolbar{
 display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
 background:var(--nexo-surface);
 border:1px solid var(--nexo-surface-border,#e2ebf2);border-radius:17px;
 padding:12px 16px;
 box-shadow:0 6px 16px rgba(52,71,91,.035);
}
.projection-month-picker{display:flex;align-items:center;gap:10px;min-width:0}
.projection-month-picker strong{color:var(--text-primary);font-size:15px;font-weight:600;min-width:155px;text-align:center}
.projection-month-picker button{
 display:grid;place-items:center;width:38px;height:38px;
 border:1px solid #dce5ed;border-radius:50%;background:#fff;
 color:var(--text-secondary);cursor:pointer;box-shadow:0 2px 7px rgba(44,68,91,.055)
}
.projection-month-picker button:is(:hover,:focus-visible){border-color:#aabccc;color:var(--text-primary)}
.projection-safe-badge{
 display:inline-flex;align-items:center;gap:7px;padding:8px 11px;
 background:#eff9f3;border:1px solid #d9eee0;border-radius:999px;
 color:#367b54;font-size:12px;font-weight:500
}
.projection-safe-badge .nexo-icon{width:15px;height:15px}
.projection-month-chips{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:1px 0}
.projection-month-chips::-webkit-scrollbar{display:none}
.projection-month-chips button{
 flex:1 0 auto;min-width:55px;min-height:36px;padding:7px 13px;
 border:1px solid #e0e9f1;border-radius:15px;
 background:var(--nexo-surface);color:var(--text-secondary);font-size:12px;font-weight:500;
 cursor:pointer
}
.projection-month-chips button.is-current{
 background:#ec0000;border-color:#ec0000;color:white;box-shadow:0 4px 10px #ec000014
}
.projection-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.08fr);gap:16px;align-items:start;min-width:0}
.projection-view .projection-panel{
 box-sizing:border-box;min-width:0;border:1px solid var(--nexo-surface-border,#e0e8ef);
 border-radius:17px;background:var(--nexo-surface);
 padding:20px;box-shadow:0 7px 20px rgba(48,72,95,.045)
}
.projection-panel-head{display:flex;align-items:center;gap:11px;margin-bottom:18px;min-width:0}
.projection-panel-head>div{min-width:0}
.projection-panel-head h2{font-size:16px;font-weight:600;color:var(--text-primary);letter-spacing:-.02em;margin:0}
.projection-panel-head p{font-size:12px;font-weight:400;color:var(--text-muted);margin:3px 0 0}
.projection-panel-icon{
 display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;
 background:#eef3f7;border:1px solid #e1eaf2;border-radius:15px;color:var(--text-secondary)
}
.projection-panel-icon .nexo-icon{width:20px;height:20px;stroke-width:1.2}
.projection-view .projection-field{display:grid;gap:8px;min-width:0}
.projection-view .projection-field>span{font-size:12px;color:var(--text-secondary);font-weight:500}
.projection-view .projection-field>input{
 box-sizing:border-box;width:100%;height:46px;min-height:46px;
 border:1px solid #e0e9f1;border-radius:17px;background:#f2f4f7;
 padding:0 14px;font-size:14px;font-family:Inter,Arial,sans-serif;
 color:var(--text-primary);outline:none;box-shadow:none
}
.projection-view .projection-field>input::placeholder{color:var(--text-muted)}
.projection-view .projection-field>input:focus{border-color:#a7b9ca;box-shadow:0 0 0 2px rgba(151,174,193,.13)}
.projection-view .projection-modes,.projection-view .projection-source,.projection-view .projection-payments{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;
 height:46px;min-height:46px;padding:4px;border:1px solid #d0dfea;
 border-radius:17px;background:#e7eef4
}
.projection-view .projection-modes button,.projection-view .projection-source button,.projection-view .projection-payments button{
 min-height:36px;height:36px;min-width:0;padding:5px 10px;
 border:0;border-radius:13px;background:transparent;box-shadow:none;
 color:var(--text-secondary);font-family:inherit;font-size:12px;font-weight:400;cursor:pointer
}
.projection-view .projection-modes button.selected,.projection-view .projection-source button.selected,.projection-view .projection-payments button.selected{
 background:#fff;color:var(--text-primary);box-shadow:0 2px 5px rgba(49,71,91,.09)
}
.projection-planning-panel{display:grid;gap:17px}
.projection-planning-panel>.projection-panel-head{margin-bottom:0}
.projection-base-block{display:grid;gap:11px;padding:13px;border:1px solid #e3ebf2;background:#f8fafc;border-radius:17px}
.projection-base-title{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.projection-base-title span{font-size:12px;color:var(--text-secondary)}
.projection-base-title strong{color:var(--text-primary);font-size:14px;font-weight:650}
.projection-base-edit[hidden]{display:none!important}
.projection-add-head{padding-top:16px;border-top:1px solid #e7edf2}
.projection-add-form{display:grid;gap:14px}
.projection-add-button{
 justify-self:start;display:inline-flex;align-items:center;justify-content:center;gap:8px;
 min-height:44px;min-width:170px;padding:9px 17px;border-radius:17px!important;
 font-family:Inter,Arial,sans-serif;font-size:13px;font-weight:600
}
.projection-form-error{margin:0;font-size:12px;color:#c52828}
.projection-form-error[hidden]{display:none}
.projection-results{display:grid;gap:16px;min-width:0}
.projection-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.projection-kpi{display:grid;align-content:center;gap:9px;min-width:0;padding:14px;border-radius:15px;background:#f4f7fa;border:1px solid #e9eff4}
.projection-kpi>span{font-size:12px;color:var(--text-secondary)}
.projection-kpi>strong{font-size:19px;line-height:1.2;font-weight:600;color:var(--text-primary);overflow-wrap:anywhere}
.projection-kpi-balance{grid-column:1/-1;background:#eff8f3;border:1px solid #e1eee5}
.projection-kpi-balance>strong{color:#287447;font-size:26px;letter-spacing:-.03em}
.projection-summary-panel[data-status=negative] .projection-kpi-balance{background:#fff1f1;border-color:#f4dada}
.projection-summary-panel[data-status=negative] .projection-kpi-balance>strong{color:#d52531}
.projection-summary-panel[data-status=limit] .projection-kpi-balance>strong{color:#bb7b18}
.projection-summary-panel[data-status=empty] .projection-kpi-balance{background:#f4f7fa;border-color:#e9eff4}
.projection-summary-panel[data-status=empty] .projection-kpi-balance>strong{color:var(--text-secondary)}
.projection-margin{margin-top:15px;display:grid;gap:8px}
.projection-margin-title{display:flex;align-items:center;justify-content:space-between;gap:8px}
.projection-margin-title span{color:var(--text-secondary);font-size:12px}
.projection-margin-title strong{color:#25734b;font-size:15px;font-weight:600}
.projection-summary-panel[data-status=negative] .projection-margin-title strong{color:#d52531}
.projection-track{overflow:hidden;height:9px;border-radius:999px;background:#e8eff4}
.projection-track i{display:block;height:100%;width:0;border-radius:999px;background:#1fb46b;transition:width .22s ease}
.projection-summary-panel[data-status=negative] .projection-track i{background:#ec0000}
.projection-margin p{font-size:12px;color:var(--text-secondary);margin:3px 0 1px;line-height:1.5}
.projection-breakdown{display:grid;gap:0;margin-top:17px;border-top:1px solid #e6edf3}
.projection-breakdown>div{display:flex;gap:8px;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid #e6edf3}
.projection-breakdown>div[hidden]{display:none}
.projection-breakdown span{font-size:12px;color:var(--text-secondary)}
.projection-breakdown strong{font-size:13px;font-weight:600;color:var(--text-primary);text-align:right}
.projection-empty{min-height:90px;display:grid;place-content:center;justify-items:center;gap:9px;text-align:center;background:#f5f7f9;border:1px dashed #d8e3ed;border-radius:17px;color:var(--text-muted);font-size:12px}
.projection-empty .nexo-icon{width:22px;height:22px}
.projection-items{display:grid;gap:8px}
.projection-item{display:flex;align-items:center;gap:10px;padding:10px 8px;border:1px solid #e5edf3;border-radius:15px;background:#f7f9fb;min-width:0}
.projection-item-icon{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:11px;background:#e9f0f5;color:var(--text-secondary)}
.projection-item-icon .nexo-icon{width:17px;height:17px}
.projection-item>div{display:grid;gap:3px;flex:1;min-width:0}
.projection-item>div>strong{font-size:13px;font-weight:550;color:var(--text-primary);overflow-wrap:anywhere}
.projection-item>div>small{font-size:11px;color:var(--text-muted)}
.projection-item>b{font-size:13px;font-weight:600;color:var(--text-primary);white-space:nowrap}
.projection-item>button{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border:1px solid #e1e8ef;border-radius:50%;background:#fff;color:#b33444;cursor:pointer}
.projection-item>button .nexo-icon{width:16px;height:16px}
.projection-clear{
 display:flex;
 align-items:center;
 justify-content:center;
 gap:6px;
 justify-self:end;
 width:max-content;
 max-width:100%;
 margin:12px 0 0 auto;
 padding:8px 2px;
 border:0;
 background:transparent;
 color:#a13f4e;
 font-size:12px;
 white-space:nowrap;
 cursor:pointer;
}
.projection-clear .nexo-icon{flex-shrink:0}
.projection-clear[hidden]{display:none}
.projection-view button:focus-visible{outline:2px solid #90abc5;outline-offset:2px}
@media(max-width:1000px){.projection-grid{grid-template-columns:minmax(0,1fr)}.projection-results{grid-template-columns:minmax(0,1fr)}}
@media(max-width:800px){
 .projection-view{gap:12px;padding-bottom:25px}
 .projection-view .projection-panel{padding:15px;border-radius:17px}
 .projection-month-toolbar{padding:10px 12px}
 .projection-month-picker strong{min-width:127px;font-size:14px}
 .projection-safe-badge{font-size:11px;padding:6px 8px}
 .projection-kpi>strong{font-size:17px}
 .projection-kpi-balance>strong{font-size:24px}
 .projection-kpis{gap:8px}
 .projection-item{padding:9px 8px}
}
@media(max-width:360px){
 .projection-month-toolbar{gap:7px}
 .projection-month-picker{gap:4px}
 .projection-month-picker strong{min-width:115px}
 .projection-safe-badge{font-size:10px}
 .projection-view .projection-panel{padding:12px}
}
@media (prefers-reduced-motion:reduce) and (max-width:800px){.projection-track i{transition:none}}


/* v55 — calendário simplificado: somente meses deslizáveis (ano atual + próximo).
   O seletor grande foi removido do HTML, sem modificar os cálculos. */
.projection-view .projection-month-chips{
 position:relative;
 display:flex;
 flex-wrap:nowrap;
 align-items:center;
 gap:7px;
 box-sizing:border-box;
 width:100%;
 min-width:0;
 padding:2px 0 7px;
 overflow-x:auto;
 overflow-y:hidden;
 overscroll-behavior-x:contain;
 -webkit-overflow-scrolling:touch;
 touch-action:pan-x;
 scrollbar-width:none;
 scroll-snap-type:x proximity;
 cursor:grab;
 user-select:none;
 -webkit-user-select:none;
}
.projection-view .projection-month-chips:active{cursor:grabbing}
.projection-view .projection-month-chips::-webkit-scrollbar{display:none}
.projection-view .projection-month-chips > button{
 flex:0 0 auto;
 scroll-snap-align:start;
 white-space:nowrap;
 border-radius:15px;
}
.projection-view .projection-month-chips:focus-visible{
 outline:2px solid #9bafc3;
 outline-offset:2px;
 border-radius:15px;
}
/* Selo realocado para a direita de "Seu cenário". */
.projection-view .projection-scenario-head{
 display:flex;
 align-items:center;
 gap:10px;
}
.projection-view .projection-scenario-title{
 flex:1 1 auto;
 min-width:0;
}
.projection-view .projection-scenario-head > .projection-safe-badge{
 flex:0 0 auto;
 margin-left:auto;
 padding:7px 9px;
 gap:5px;
 white-space:nowrap;
 font-size:11px;
 line-height:1.2;
}
.projection-view .projection-scenario-head > .projection-safe-badge .nexo-icon{
 width:14px;
 height:14px;
 flex:0 0 14px;
}
@media(max-width:360px){
 .projection-view .projection-scenario-head{
   flex-wrap:wrap;
   column-gap:7px;
   row-gap:5px;
 }
 .projection-view .projection-scenario-title{flex:1 1 calc(100% - 45px)}
 .projection-view .projection-scenario-head > .projection-safe-badge{
   margin-left:auto;
   padding:6px 8px;
   font-size:10.5px;
 }
}


/* v55b: em aparelhos de 320px, manter o selo na MESMA linha
   do título Seu cenário, em vez de movê-lo para baixo. */
@media(max-width:360px){
 .projection-view .projection-scenario-head{
   display:grid;
   grid-template-columns:38px minmax(0,1fr) auto;
   align-items:start;
   gap:7px;
 }
 .projection-view .projection-scenario-head > .projection-panel-icon{
   grid-column:1;
   grid-row:1;
 }
 .projection-view .projection-scenario-title{
   grid-column:2;
   grid-row:1;
   min-width:0;
   flex:none;
 }
 .projection-view .projection-scenario-title h2{font-size:14px}
 .projection-view .projection-scenario-title p{font-size:11px;line-height:1.35}
 .projection-view .projection-scenario-head > .projection-safe-badge{
   grid-column:3;
   grid-row:1;
   justify-self:end;
   align-self:start;
   margin:0;
   font-size:10px;
   padding:6px 7px;
   gap:4px;
 }
 .projection-view .projection-scenario-head > .projection-safe-badge .nexo-icon{
   width:12px;height:12px;flex-basis:12px;
 }
}


/* v56 — Reusar os campos do formulário original (Nome/descrição).
   O título e a estrela obrigatória ficam juntos, sem linha extra.
   A aparência do preenchimento/foco segue os tokens já aprovados. */
#app .projection-view #projection-add .projection-field {
  gap:7px;
}
#app .projection-view #projection-add .projection-field > .required-label-text {
  display:inline-flex;
  align-items:baseline;
  gap:3px;
  width:fit-content;
  max-width:100%;
  font:400 13px/16px Inter,Arial,sans-serif;
  color:var(--text-secondary);
  white-space:nowrap;
}
#app .projection-view #projection-add .projection-field > .required-label-text .required-marker {
  display:inline;
  width:auto;
  color:#ec0000;
  font-size:13px;
  line-height:1;
  font-weight:500;
  margin:0;
}
#app .projection-view #projection-add .projection-field > input {
  box-sizing:border-box;
  height:44px;
  min-height:44px;
  border-radius:15px!important;
  padding:10px 12px;
  font-family:Inter,Arial,sans-serif;
  font-size:14px;
  font-weight:400;
  background:var(--navigation-glass)!important;
  border:1px solid var(--navigation-glass-edge)!important;
  border-top-color:transparent!important;
  box-shadow:var(--navigation-glass-shadow)!important;
  -webkit-backdrop-filter:blur(24px) saturate(1.65);
  backdrop-filter:blur(24px) saturate(1.65);
  outline:0;
}
#app .projection-view #projection-add .projection-field > input:focus,
#app .projection-view #projection-add .projection-field > input:focus-visible {
  border-color:var(--navigation-glass-edge)!important;
  border-top-color:transparent!important;
  box-shadow:var(--navigation-glass-shadow)!important;
  outline:0!important;
}
#app .projection-view #projection-add .projection-add-button {
  justify-self:center!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
/* Arredondamento COPIADO do summary-icon de Visão geral.
   A referência tem 13px no desktop e 11px no mobile. */
#app .projection-view .projection-panel-icon {
  border-radius:13px!important;
}
@media(max-width:800px){
  #app .projection-view .projection-panel-icon {
    border-radius:11px!important;
  }
  #app .projection-view #projection-add .projection-field > input {
    font-size:16px!important;
  }
}


/* v57 — O campo "Quanto terei disponível" usa exatamente o mesmo
   padrão visual dos campos Descrição/Valor (v56).
   Permanece opcional; não introduzir required/asterisco. */
#app .projection-view .projection-planning-panel > label.projection-field[for="projection-cash"] {
  gap:7px;
}
#app .projection-view .projection-planning-panel > label.projection-field[for="projection-cash"] > span {
  display:inline-flex;
  align-items:baseline;
  width:fit-content;
  max-width:100%;
  font:400 13px/16px Inter,Arial,sans-serif;
  color:var(--text-secondary);
  white-space:nowrap;
}
#app .projection-view #projection-cash {
  box-sizing:border-box;
  height:44px;
  min-height:44px;
  border-radius:15px!important;
  padding:10px 12px;
  font-family:Inter,Arial,sans-serif;
  font-size:14px;
  font-weight:400;
  background:var(--navigation-glass)!important;
  border:1px solid var(--navigation-glass-edge)!important;
  border-top-color:transparent!important;
  box-shadow:var(--navigation-glass-shadow)!important;
  -webkit-backdrop-filter:blur(24px) saturate(1.65);
  backdrop-filter:blur(24px) saturate(1.65);
  outline:0;
}
#app .projection-view #projection-cash:focus,
#app .projection-view #projection-cash:focus-visible {
  border-color:var(--navigation-glass-edge)!important;
  border-top-color:transparent!important;
  box-shadow:var(--navigation-glass-shadow)!important;
  outline:0!important;
}
@media(max-width:800px){
  #app .projection-view #projection-cash {
    font-size:16px!important;
  }
}

/* v55: bank account mode uses the Nexo registered account balance. */
.projection-view .projection-account-picker > select {box-sizing:border-box;width:100%;min-width:0;min-height:46px;padding:0 38px 0 13px;border:1px solid #dce6ee;border-radius:15px;background:#f2f4f7;color:var(--text-primary);font:400 14px Inter,Arial,sans-serif;outline:none;cursor:pointer;}
.projection-view .projection-account-picker > select:focus-visible {border-color:#9bafc3;box-shadow:0 0 0 2px #9baec324;}
.projection-view .projection-account-picker > select:disabled {opacity:.65;cursor:not-allowed;}
.projection-view .projection-account-note {margin:0;color:var(--text-secondary);font-size:11px;line-height:1.5;}
.projection-view .projection-payment-static {display:flex;align-items:center;min-height:42px;padding:0 14px;border-radius:15px;border:1px solid #dce6ee;background:#f2f4f7;color:var(--text-secondary);font-size:13px;}
.projection-view [data-proj-cash][readonly] {cursor:default;background:#eaf0f5;color:var(--text-primary);}
@media(max-width:800px){.projection-view .projection-account-picker > select {font-size:16px;}}

/* v56 - payments recorded in the invoice but not deducted from bank balance. */
.projection-view .projection-reconcile {min-width:0;border-top:1px solid #e0e8f0;padding-top:10px;margin-top:4px;}
.projection-view .projection-reconcile > summary {cursor:pointer;color:var(--text-secondary);font-size:12px;font-weight:550;line-height:1.5;}
.projection-view .projection-reconcile > p {color:var(--text-secondary);font-size:11px;line-height:1.55;margin:9px 0;}
.projection-view .projection-reconcile-list {display:grid;gap:7px;max-height:265px;overflow:auto;}
.projection-view .projection-reconcile-item {display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;background:#fff;border:1px solid #e3eaf1;border-radius:13px;padding:9px;}
.projection-view .projection-reconcile-item > span {display:grid;gap:3px;min-width:0;}
.projection-view .projection-reconcile-item strong {font-size:12px;overflow-wrap:anywhere;}
.projection-view .projection-reconcile-item small {color:var(--text-secondary);font-size:11px;}
#app .projection-view .projection-reconcile-item > button[data-proj-reconcile] {background:#edf2f6;color:var(--text-secondary);border:1px solid var(--control-glass-border,#ccdbe7);border-radius:11px!important;font-size:11px;padding:9px;flex:none;cursor:pointer;}
@media(max-width:800px){.projection-view .projection-reconcile-item {align-items:flex-start;flex-wrap:wrap;}.projection-view .projection-reconcile-item button{min-height:36px;}}
