/* Direção visual AQQ orientada por unslop, Damir Sokolovsky, CC BY 4.0. */
html:root .manager-team{margin-bottom:24px;min-width:0}
html:root .manager-table{min-width:1040px;width:100%}
html:root .manager-table th{white-space:nowrap}
html:root .manager-table td{vertical-align:middle;padding:16px 20px}
html:root .manager-table small{display:block;font-size:11px;color:var(--muted);margin-top:4px;font-weight:400}
html:root .manager-table .text-button{text-align:left;font-size:13px;font-weight:500}
html:root .manager-selected{background:#f4f7f3}
html:root .manager-progress{min-width:180px;max-width:360px;font-size:12px}
html:root .manager-progress>div:first-child{display:flex;gap:16px;justify-content:space-between;margin-bottom:8px}
html:root .manager-progress strong{font-weight:500;color:var(--blue)}
html:root .manager-progress span,html:root .manager-progress small{color:var(--muted);font-size:11px}
html:root .manager-track{height:8px;background:#e8ece8;border-radius:4px;overflow:hidden;margin-bottom:8px}
html:root .manager-track i{display:block;height:100%;background:var(--blue);border-radius:4px}
html:root .manager-detail{margin-bottom:24px}
html:root .manager-detail>.stats-grid{padding:0 24px;margin-bottom:24px}
html:root .manager-detail .stat-card{border:0;border-radius:0;padding:0 16px 0 0;background:transparent}
html:root .manager-detail .stat-value{font-size:24px}
html:root .manager-detail-bottom{display:grid;grid-template-columns:1fr 1fr;gap:32px;border-top:1px solid var(--line);padding:24px}
html:root .manager-detail-bottom h3{font-size:14px;margin:0 0 16px}
html:root .manager-detail-bottom p{font-size:12px;color:var(--muted);margin-top:8px}
html:root .manager-weighted{font-weight:500;font-size:28px}
html:root .manager-note{font-size:12px;line-height:1.6;color:var(--muted);margin:16px 0}
@media(max-width:700px){html:root .manager-detail-bottom{grid-template-columns:1fr;gap:24px}html:root .manager-detail>.stats-grid{grid-template-columns:1fr 1fr;gap:24px}html:root .manager-summary{grid-template-columns:1fr 1fr}html:root .manager-summary .stat-value{font-size:23px}}
@media(max-width:480px){
 html:root .manager-summary,html:root .manager-detail>.stats-grid{grid-template-columns:1fr}
 html:root .manager-summary .stat-card,html:root .manager-detail .stat-card{display:grid;grid-template-columns:1fr auto;column-gap:12px;align-items:center}
 html:root .manager-summary .stat-value,html:root .manager-detail .stat-value{font-size:23px;margin-top:0;white-space:nowrap}
 html:root .manager-summary .stat-foot,html:root .manager-detail .stat-foot{grid-column:1/-1;margin-top:8px}
}
/* Gestão organizada por tarefa: Equipe e Metas são áreas independentes. */
html:root .manager-results-table{min-width:780px}
html:root .manager-goals-table{min-width:900px}
html:root .manager-goal-summary{display:grid;grid-template-columns:2fr 1fr 1fr;padding:24px;gap:24px;margin-bottom:24px}
html:root .manager-goal-summary>div+div{border-left:1px solid var(--line);padding-left:24px}
html:root .manager-goal-summary span{display:block;font-size:12px;color:var(--muted);margin-bottom:8px}
html:root .manager-goal-summary strong{font-size:28px;font-weight:500}
html:root .manager-goal-summary small{font-size:14px;font-weight:400;color:var(--muted)}
html:root .dashboard-grid .sales-chart-card{min-width:0}
html:root .dashboard-summary .stat-value{overflow-wrap:normal}
/* Refinamento 0.8.3: calendário ao lado do gráfico, favoritos abaixo. */
html:root .dashboard-grid{grid-template-columns:minmax(0,2fr) minmax(308px,1fr);grid-template-areas:"sales calendar" "recent favorites";align-items:start;gap:24px}
html:root .sales-chart-card{grid-area:sales}
html:root .mini-calendar{grid-area:calendar;min-width:0}
html:root .mini-calendar>.card-bottom-link{width:100%}
html:root .recent-orders{grid-area:recent;min-width:0}
html:root .top-products{grid-area:favorites;min-width:0}
html:root .chart-legend{display:flex;flex-wrap:wrap;gap:12px 20px;min-height:24px}
html:root .sales-chart-card>.card-heading{padding:20px 24px 12px}
html:root .sales-goal-line{stroke:#aebbb4;stroke-width:1.7;stroke-dasharray:5 5}
html:root .mini-calendar-body{padding:0 24px 20px}
html:root .mini-calendar .card-heading{padding-bottom:16px}
html:root .mini-calendar-month{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
html:root .mini-calendar-month strong{font-size:13px;font-weight:500}
html:root .mini-calendar-month .icon-button{width:32px;height:32px}
html:root .mini-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
html:root .mini-weekday{font-size:11px;color:var(--muted);text-align:center;padding:4px 0 8px}
html:root .mini-calendar-day{height:40px;position:relative;display:flex;align-items:center;justify-content:center;min-width:0;border:1px solid var(--density-border);border-radius:6px;background:var(--density-bg);color:var(--density-text);font-size:12px;font-variant-numeric:tabular-nums}
html:root .mini-calendar-day small{position:absolute;right:3px;bottom:1px;font-size:9px;line-height:1}
html:root .mini-calendar .density-0{--density-bg:#fafbfd;--density-border:#e0e7ef;--density-text:#415b72}
html:root .mini-calendar .density-1{--density-bg:#eaf1ff;--density-border:#adc4e8;--density-text:#204f96}
html:root .mini-calendar .density-2{--density-bg:#bfd4fa;--density-border:#95b4e5;--density-text:#1d3e70}
html:root .mini-calendar .density-3{--density-bg:#436eae;--density-border:#365e99;--density-text:#fff}
html:root .mini-calendar .density-4{--density-bg:#245bc0;--density-border:#194b9f;--density-text:#fff}
html:root .mini-calendar-day:disabled{opacity:1;cursor:default;color:var(--muted)}
html:root .mini-calendar-day:not(:disabled):hover{box-shadow:inset 0 0 0 1px var(--density-text)}
html:root .mini-calendar-day.is-today{outline:2px solid var(--blue);outline-offset:1px}
html:root .mini-calendar-legend{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:16px;color:var(--muted);font-size:10px}
html:root .mini-calendar-legend>span{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
html:root .mini-calendar-legend i{width:10px;height:10px;display:block;background:var(--density-bg);border:1px solid var(--density-border);border-radius:2px}
html:root .mini-calendar-count{font-size:12px;color:var(--muted);margin-top:12px}
html:root .mini-calendar-body>.text-button{margin-top:8px;font-size:12px}
html:root .document-list-toolbar{flex-wrap:wrap;align-items:center;gap:12px}
.order-billing-page-status{margin:0 20px 12px}
html:root .document-list-toolbar>.input-with-icon{flex:1 1 220px;max-width:none}
html:root #list-seller-slot{min-width:0;max-width:100%}
html:root .document-list-toolbar .seller-filter{display:flex;align-items:center;gap:8px;max-width:340px}
html:root .seller-filter>span{font-size:12px;color:var(--muted)}
html:root .document-list-toolbar .seller-filter select{max-width:240px;min-width:0;width:100%;font-size:12px}
@media(max-width:1100px){
 html:root .dashboard-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:"sales" "calendar" "recent" "favorites"}
 html:root .mini-calendar-body{max-width:420px;margin:0 auto}
}
@media(max-width:600px){
 html:root .mini-calendar-body{padding:0 20px 20px}
 html:root .recent-orders table{min-width:640px}
 html:root .recent-orders .record-identity{min-width:240px}
 html:root .recent-orders .record-number{white-space:nowrap}
 html:root .document-list-toolbar>.input-with-icon{flex-basis:100%;min-width:0}
 html:root #list-seller-slot{width:100%}
 html:root .document-list-toolbar .seller-filter{max-width:none;width:100%}
 html:root .document-list-toolbar .seller-filter select{max-width:none}
 html:root .document-list-toolbar>.filter-select{max-width:none;width:100%}
 html:root .document-list-toolbar>.filter-select select{max-width:none;width:100%}
}
@media(max-width:600px){
 html:root .manager-goal-summary{grid-template-columns:1fr 1fr;padding:20px;gap:20px}
 html:root .manager-goal-summary>div:first-child{grid-column:1/-1}
 html:root .manager-goal-summary>div:nth-child(2){border:0;padding:0}
}

html:root .dashboard-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(min-width:1680px){html:root .dashboard-summary{grid-template-columns:repeat(6,minmax(0,1fr))}}
html:root .dashboard-summary .stat-value{font-size:clamp(20px,1.8vw,28px)}
@media(max-width:1200px){html:root .dashboard-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
 html:root .dashboard-summary{grid-template-columns:1fr}
 html:root .dashboard-summary .stat-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 12px;align-items:center}
 html:root .dashboard-summary .stat-value{font-size:24px;margin-top:0;white-space:nowrap}
 html:root .dashboard-summary .stat-foot{grid-column:1/-1;margin-top:8px}
}

html:root .mini-calendar-month [data-offset="-1"] .icon{transform:rotate(180deg)}

/* Progresso mensal informado pelo backend; direção AQQ / unslop preservada. */
html:root .goal-period-control{display:flex;align-items:center;gap:8px}
html:root .goal-period-control>.icon-button{height:40px;width:32px;border:1px solid var(--line);border-radius:8px;background:white;flex-shrink:0}
html:root .goal-period-control [data-offset="-1"] .icon{transform:rotate(180deg)}
html:root .crm-toolbar .seller-filter{margin-left:0}
@media(max-width:600px){
 html:root .goal-period-control{width:100%}
 html:root .goal-period-control .period-picker{flex:1;min-width:0;justify-content:center}
 html:root .crm-toolbar .seller-filter{width:100%}
}
/* Faixa de meta da referência escolhida pelo usuário; AQQ / unslop, CC BY 4.0. */
html:root .goal-banner{min-height:164px}
html:root .goal-banner-copy{flex:1;min-width:0}
html:root .goal-banner h2{font-size:22px;line-height:1.35}
html:root .goal-owner-note{display:block;font-size:12px;color:var(--muted);margin-top:16px}
html:root .goal-banner .banner-goal{width:360px;max-width:100%}
html:root .goal-values{gap:8px 24px;flex-wrap:wrap;font-variant-numeric:tabular-nums}
html:root .goal-values>div{min-width:0;flex:1 0 auto}
html:root .goal-values strong{white-space:nowrap}
html:root .goal-values>span{white-space:nowrap}
html:root .goal-caption{gap:12px;flex-wrap:wrap}
html:root .monthly-goal-legend{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:12px}
html:root .monthly-goal-legend>i{width:16px;height:0;background:none;border-radius:0;border-top:2px dashed #aebbb4}
html:root .interactive-sales-chart{position:relative;min-width:0}
html:root .chart-hit-point{cursor:crosshair;pointer-events:all}
html:root .chart-hit-point:focus{outline:none}
html:root .chart-hit-point:focus-visible{outline:none;fill:#385f9d0a}
html:root .chart-hover-guide{stroke:#385f9d;stroke-width:1;stroke-dasharray:3 3;pointer-events:none}
html:root .chart-hover-marker{fill:#385f9d;stroke:white;stroke-width:2;pointer-events:none}
html:root .sales-chart-tooltip{position:absolute;top:8px;z-index:2;width:248px;max-width:calc(100% - 16px);padding:16px;border:1px solid var(--line);border-radius:8px;background:white;box-shadow:0 4px 16px #25352c1c;pointer-events:none;font-variant-numeric:tabular-nums}
html:root .sales-chart-tooltip[hidden]{display:none}
html:root .chart-tooltip-date{display:block;font-size:13px;font-weight:500;color:var(--ink)}
html:root .chart-tooltip-label{display:block;margin-top:12px;font-size:11px;color:var(--muted)}
html:root .chart-tooltip-value{display:block;margin-top:4px;font-size:22px;font-weight:500;color:var(--blue)}
html:root .sales-chart-tooltip dl{margin-top:12px;padding-top:8px;border-top:1px solid var(--line)}
html:root .sales-chart-tooltip dl>div{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-top:4px;font-size:11px}
html:root .sales-chart-tooltip dt{color:var(--muted);max-width:120px}
html:root .sales-chart-tooltip dd{margin:0;color:var(--ink);white-space:nowrap}
html:root .chart-help{font-size:11px;color:var(--muted);margin:4px 24px 12px}
@media(max-width:1000px){
 html:root .goal-banner .banner-goal{width:100%}
}
@media(max-width:600px){
 html:root .goal-banner{min-height:0}
 html:root .goal-banner .banner-goal{margin-top:0;padding-top:20px;border-top:1px solid var(--line)}
 html:root .goal-values{gap:12px}
 html:root .goal-values>span{font-size:36px}
 html:root .goal-values div strong{font-size:24px}
}


#quote-approvals {
  display: grid;
  gap: 16px;
}
.approval-list,
.approval-review {
  min-width: 0;
}
.approval-toolbar,
.approval-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
html:root .approval-queue,
html:root .approval-items {
  min-width: 36rem;
}
.approval-queue td:last-child {
  text-align: right;
}
.approval-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 16px 24px;
}
.approval-review .card-heading {
  padding-bottom: 12px;
}
.approval-facts dt {
  color: var(--muted);
  font-size: .86rem;
}
.approval-facts dd {
  font-weight: 540;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}
.approval-amounts {
  border-bottom: 1px solid var(--line);
}
.approval-amounts dd {
  font-variant-numeric: tabular-nums;
}
.approval-amounts div:last-child dd {
  font-size: 1.12rem;
}
.approval-comment .approval-installments {
  padding: 8px 0 0;
}
.approval-review .approval-comment,
.approval-review > .approval-actions,
.approval-review > .data-scope,
.approval-review form {
  padding: 16px 24px;
  margin: 0;
}
.approval-comment p,
.quote-approval-notice p {
  margin: 4px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.approval-review form textarea {
  min-height: 88px;
  resize: vertical;
}
.approval-review form .approval-actions {
  margin-top: 12px;
}
.approval-review .approval-actions {
  justify-content: flex-end;
}
.quote-approval-notice {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.quote-approval-badge {
  margin-left: 4px;
}
.approval-queue .quote-approval-badge,
.approval-review .quote-approval-badge,
.quote-approval-notice .quote-approval-badge {
  margin-left: 0;
}
@media (max-width: 600px) {
  html:root .approval-queue,
  html:root .approval-items {
    min-width: 0;
  }
  .approval-queue thead,
  .approval-items thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .approval-queue tbody,
  .approval-items tbody {
    display: block;
  }
  .approval-queue tr,
  .approval-items tr {
    display: grid;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }
  .approval-queue tr {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .approval-items tr {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  html:root .approval-queue td,
  html:root .approval-items td {
    min-width: 0;
    padding: 0;
    border: 0;
    overflow-wrap: anywhere;
  }
  .approval-queue td:first-child,
  .approval-queue td:last-child,
  .approval-queue td[colspan],
  .approval-items td[colspan] {
    grid-column: 1 / -1;
  }
  .approval-items td:first-child:not([colspan]) {
    grid-column: span 2;
  }
  .approval-items td[data-label]::before {
    display: block;
    content: attr(data-label);
    font-size: .82em;
    color: var(--muted);
  }
  .approval-list .card-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .approval-toolbar {
    justify-content: space-between;
    width: 100%;
  }
  .approval-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .approval-facts,
  .approval-review .approval-comment,
  .approval-review > .approval-actions,
  .approval-review > .data-scope,
  .approval-review form {
    padding-left: 16px;
    padding-right: 16px;
  }
}
