/* Panorama executivo: uma superfície de trabalho dentro de Linhas.
 * Regras limitadas à raiz, sem alterar alunos, conta, Robô ou navegação. */
.ex-dashboard {
  --ex-rule: var(--linha2, #34373d);
  --ex-muted: var(--texto2, #bac0c8);
  --ex-red: var(--marca-txt, #ff6868);
  --ex-canvas: var(--void, #0f1012);
  --ex-panel: var(--sup, #141619);
  color: var(--texto, #f7f8fa);
  width: 100%; min-width: 0; max-width: 1580px; margin: 0 auto;
  font-family: Geist, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 14px; line-height: 1.5;
  padding: 10px 0 36px;
  scrollbar-color: var(--linha2) transparent;
}
.ex-dashboard *, .ex-dashboard *::before, .ex-dashboard *::after { box-sizing: border-box; }
.ex-dashboard ::selection { background: #943236; color: #fff; }
.ex-dashboard :is(input,select) { caret-color: var(--ex-red); }
.ex-dashboard :is(button,input,select,summary):focus-visible { outline: 2px solid var(--linhas-foco, #ff4545); outline-offset: 4px; }
.ex-dashboard :is(h1,h2,h3,p,dl,dd,ul) { margin: 0; }
.ex-dashboard h1 { font-size: clamp(26px, 2.7vw, 38px); line-height: 1.15; font-weight: 650; letter-spacing: -.035em; text-wrap: balance; }
.ex-dashboard h2 { font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: -.02em; }
.ex-dashboard h3 { font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: -.015em; }
.ex-dashboard small { display: block; font-size: 12px; line-height: 1.55; color: var(--ex-muted); }
.ex-header { display: flex; gap: 24px; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.ex-heading { min-width: 0; }
.ex-heading p { margin-top: 9px; font-size: 14px; color: var(--ex-muted); }
.ex-header-actions { display: flex; flex-shrink: 0; gap: 8px; flex-wrap: wrap; }
.ex-dashboard .ex-button {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; padding: 9px 13px; border: 1px solid var(--ex-rule);
  border-radius: 6px; background: transparent; color: var(--texto); font: inherit;
  font-size: 12px; font-weight: 600; line-height: 1.4; cursor: pointer;
  transition: background-color .16s ease-out, border-color .16s ease-out;
}
.ex-dashboard .ex-button:hover { background: var(--sup3); border-color: var(--texto3); }
.ex-dashboard .ex-button:disabled { cursor: wait; opacity: .6; }
.ex-dashboard .ex-button-primary { background: var(--marca-2, #d60000); border-color: var(--marca-2, #d60000); color: white; }
.ex-dashboard .ex-button-primary:hover { background: #b80000; border-color: #b80000; }
.ex-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--ex-rule); }
.ex-periods { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--ex-rule); border-radius: 6px; padding: 3px; }
.ex-dashboard .ex-period { padding: 7px 16px; border: 0; border-radius: 4px; background: transparent; color: var(--ex-muted); font: inherit; font-size: 12px; font-weight: 550; cursor: pointer; min-height: 32px; }
.ex-dashboard .ex-period:hover { color: var(--texto); background: var(--sup2); }
.ex-dashboard .ex-period[aria-pressed="true"] { background: var(--sup3); color: var(--texto); }
.ex-live-update { display: flex; align-items: center; gap: 8px; color: var(--ex-muted); font-size: 12px; }
.ex-refresh-status { display: flex; align-items: center; gap: 7px; }
.ex-refresh-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.ex-period-description { color: var(--ex-muted); font-size: 12px; padding-bottom: 16px; }
.ex-date-range { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 0 0 14px; }
.ex-date-field { display: grid; gap: 5px; min-width: 0; width: 170px; color: var(--ex-muted); font-size: 12px; }
.ex-dashboard .ex-date-field input {
  appearance: auto; width: 100%; min-width: 0; min-height: 40px;
  padding: 8px 10px; border: 1px solid var(--ex-rule); border-radius: 6px;
  background: var(--ex-panel); color: var(--texto); font: inherit; font-size: 13px;
}
.ex-dashboard .ex-date-field input[aria-invalid="true"] { border-color: var(--ex-red); }
.ex-date-range .ex-button { min-height: 40px; }
.ex-period-error { flex-basis: 100%; color: var(--ex-red); font-size: 12px; }
.ex-period-error[hidden] { display: none; }
.ex-period-description { padding-bottom: 5px; }
.ex-period-scope { color: var(--ex-muted); font-size: 12px; padding-bottom: 18px; max-width: 95ch; }
.ex-environment { display: flex; align-items: center; gap: 9px; padding: 11px 14px; font-size: 12px; line-height: 1.5; background: var(--sup2); border-radius: 6px; margin-bottom: 16px; color: var(--ex-muted); }
.ex-environment strong { color: var(--texto); font-weight: 550; }
.ex-demonstration { background: #302418; color: #f0cba2; }
.ex-demonstration strong { color: #fff1da; }
.ex-icon { display: inline-flex; align-items: center; flex: 0 0 auto; }
.ex-icon svg { width: 17px; height: 17px; }
.ex-notices { border: 1px solid var(--amarelo); border-radius: 6px; padding: 12px 16px; color: var(--amarelo); margin: 0 0 16px; }
.ex-notices[hidden] { display: none; }
.ex-notices p+p { margin-top: 6px; }
.ex-overview { display: grid; grid-template-columns: minmax(0,1.9fr) minmax(270px,1fr); gap: 20px; align-items: stretch; }
.ex-live { grid-column: 2; grid-row: 1 / span 2; }
.ex-revenue, .ex-live, .ex-plans, .ex-renewals, .ex-movements, .ex-sources {
  min-width: 0; border: 1px solid var(--linha); border-radius: 8px; background: var(--ex-panel); padding: 23px;
}
.ex-revenue { min-height: 437px; }
.ex-revenue-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.ex-revenue-heading h2 { font-size: 14px; color: var(--ex-muted); }
.ex-revenue-value { font-size: clamp(31px,3.2vw,46px); line-height: 1.12; letter-spacing: -.035em; font-weight: 550; padding-top: 9px; }
.ex-revenue-context { text-align: right; max-width: 170px; padding-top: 3px; }
.ex-coverage { font-size: 11px; color: var(--ok); white-space: nowrap; }
.ex-revenue-context small { margin-top: 7px; font-size: 11px; }
.ex-measure-note { color: var(--ex-muted); font-size: 11px; line-height: 1.65; max-width: 74ch; margin-top: 12px !important; }
.ex-contract-summary { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; border-top: 1px solid var(--linha); margin-top: 22px !important; padding-top: 18px; }
.ex-fact dt { font-size: 12px; color: var(--ex-muted); font-weight: 400; }
.ex-fact dd { font-size: 23px; line-height: 1.35; letter-spacing: -.02em; margin-top: 3px; font-weight: 550; }
.ex-fact small { font-size: 11px; margin-top: 3px; }
.ex-chart { min-width: 0; margin-top: 24px; }
.ex-chart > svg { display: block; width: 100%; height: auto; overflow: visible; }
.ex-grid-line { stroke: var(--linha2); stroke-width: 1; stroke-dasharray: 3 5; }
.ex-axis { fill: var(--ex-muted); font-family: Geist, Arial, sans-serif; font-size: 12px; font-variant-numeric: tabular-nums; }
.ex-chart-line { fill: none; stroke: var(--ex-red); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ex-chart-point { fill: var(--ex-red); stroke: var(--ex-panel); stroke-width: 2; }
.ex-crosshair { stroke: var(--texto3); stroke-width: 1; stroke-dasharray: 3 4; opacity: .7; }
.ex-chart-inspect { display: flex; gap: 22px; align-items: center; margin-top: 5px; }
.ex-chart-reading { color: var(--ex-muted); font-size: 11px; white-space: nowrap; min-width: 115px; }
.ex-dashboard input.ex-chart-range { display: block; width: 100%; height: 20px; min-height: 20px; padding: 0; margin: 0; accent-color: var(--ex-red); background: transparent; border: 0; cursor: ew-resize; }
.ex-data-details { border-top: 1px solid var(--linha); margin-top: 15px; padding-top: 11px; }
.ex-data-details summary { color: var(--ex-muted); font-size: 11px; cursor: pointer; width: fit-content; }
.ex-data-details[open] summary { margin-bottom: 12px; }
.ex-data-details .ex-table-scroll { max-height: 245px; }
.ex-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.ex-muted { font-size: 11px; color: var(--ex-muted); }
.ex-presence-mark { display: flex; align-items: center; gap: 6px; color: var(--ok); font-size: 10px; white-space: nowrap; }
.ex-presence-mark::before, .ex-online::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }
.ex-snapshot { color: var(--ex-muted); }
.ex-snapshot::before { background: var(--ex-muted); }
.ex-activity-coverage { font-size: 11px; }
.ex-online-total { display: flex; gap: 10px; align-items: baseline; }
.ex-online-total strong { font-size: 39px; line-height: 1.1; font-weight: 550; letter-spacing: -.03em; }
.ex-online-total > span { color: var(--ex-muted); font-size: 12px; }
.ex-active-counts { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; padding-top: 20px; }
.ex-active-counts .ex-fact dd { font-size: 18px; }
.ex-active-counts .ex-fact dt { font-size: 11px; }
.ex-inline-check { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ex-muted); border-top: 1px solid var(--linha); padding-top: 18px; margin-top: 18px; }
.ex-dashboard .ex-inline-check input { width: 14px; height: 14px; min-height: 0; padding: 0; margin: 0; accent-color: var(--ex-red); }
.ex-people { max-height: 430px; overflow-y: auto; scrollbar-width: thin; }
.ex-people-list { padding: 0; list-style: none; }
.ex-person { display: flex; gap: 10px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--linha); }
.ex-person:last-child { border-bottom: 0; }
.ex-avatar { width: 29px; height: 29px; border-radius: 6px; background: var(--sup3); color: var(--texto); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 10px; font-weight: 600; }
.ex-person-info { min-width: 0; flex: 1; }
.ex-person-info strong { display: block; font-weight: 550; font-size: 12px; overflow-wrap: anywhere; }
.ex-person-info small { font-size: 10px; overflow-wrap: anywhere; }
.ex-person-state { text-align: right; max-width: 83px; font-size: 10px; }
.ex-person-state small { font-size: 9px; }
.ex-online { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; color: var(--ok); }
.ex-activity-history { grid-column: 1; min-width: 0; border: 1px solid var(--linha); border-radius: 8px; background: var(--ex-panel); padding: 20px 23px; }
.ex-activity-history h3 { font-size: 14px; }
.ex-activity-history .ex-chart { margin-top: 15px; }
.ex-activity-history .ex-chart-inspect { gap: 8px; flex-wrap: wrap; }
.ex-activity-history .ex-chart-range { max-width: 150px; }
.ex-collection-note { font-size: 10px !important; margin-top: 12px; }
.ex-account-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px; padding: 24px 2px; margin: 4px 0 13px !important; border-bottom: 1px solid var(--ex-rule); }
.ex-account-summary .ex-fact dd { font-size: 26px; }
.ex-detail-grid { display: grid; grid-template-columns: minmax(270px,1fr) minmax(0,1.65fr); gap: 20px; align-items: start; }
.ex-plan { padding: 10px 0 22px; }
.ex-plan + .ex-plan { border-top: 1px solid var(--linha); padding-top: 20px; }
.ex-plan-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.ex-plan-title p { font-size: 12px; color: var(--ex-muted); margin-top: 3px; }
.ex-plan-number { font-size: 26px; font-weight: 550; letter-spacing: -.02em; }
.ex-plan-bar { height: 5px; background: var(--sup3); overflow: hidden; border-radius: 2px; margin-top: 16px; }
.ex-plan-bar span { display: block; background: var(--ex-red); height: 100%; min-width: 0; border-radius: inherit; }
.ex-plan:nth-child(2) .ex-plan-bar span { background: var(--texto2); }
.ex-access-breakdown { padding-top: 4px; }
.ex-access-breakdown .ex-fact { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--linha); }
.ex-access-breakdown .ex-fact dd { font-size: 14px; margin: 0; }
.ex-renewal-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ex-renewal-summary .ex-fact dd { font-size: 23px; }
.ex-dashboard select { appearance: auto; padding: 7px 9px; font: inherit; font-size: 11px; min-height: 34px; max-width: 100%; border-radius: 6px; border: 1px solid var(--ex-rule); color: var(--texto); background: var(--sup2); }
.ex-search { position: relative; display: flex; align-items: center; margin: 18px 0 5px; gap: 10px; border: 1px solid var(--ex-rule); border-radius: 6px; padding-left: 12px; color: var(--ex-muted); }
.ex-dashboard .ex-search input { width: 100%; background: transparent; border: 0; padding: 10px 12px 10px 0; min-height: 38px; font: inherit; font-size: 12px; color: var(--texto); }
.ex-dashboard input::placeholder { color: var(--texto3); opacity: 1; }
.ex-renewal-list { max-height: 390px; overflow-y: auto; scrollbar-width: thin; }
.ex-renewal-items { list-style: none; padding: 0; }
.ex-renewal-item { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; gap: 14px; padding: 17px 0; border-bottom: 1px solid var(--linha); align-items: center; }
.ex-renewal-date strong { font-size: 12px; font-weight: 500; color: var(--ex-muted); }
.ex-renewal-person strong { font-size: 12px; font-weight: 550; }
.ex-renewal-person small { overflow-wrap: anywhere; font-size: 10px; }
.ex-renewal-price { text-align: right; }
.ex-renewal-price strong { font-size: 12px; font-weight: 550; white-space: nowrap; }
.ex-renewal-price small { font-size: 10px; }
.ex-renewal-status { grid-column: 2 / -1; font-size: 10px; color: var(--ex-muted); margin-top: -9px; }
.ex-movements, .ex-sources { margin-top: 20px; }
.ex-table-scroll { min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.ex-dashboard table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ex-dashboard table th { font-size: 11px; color: var(--ex-muted); text-align: left; font-weight: 500; padding: 12px 16px; border-bottom: 1px solid var(--ex-rule); white-space: nowrap; }
.ex-dashboard table td { padding: 15px 16px; border-bottom: 1px solid var(--linha); color: var(--texto); vertical-align: middle; }
.ex-dashboard table :is(th,td):first-child { padding-left: 0; }
.ex-dashboard table :is(th,td):last-child { padding-right: 0; }
.ex-dashboard table td strong { font-weight: 550; }
.ex-dashboard table td small { font-size: 11px; margin-top: 2px; }
.ex-dashboard .ex-money { white-space: nowrap; font-weight: 550; }
.ex-dashboard .ex-paid { color: var(--ok); }
.ex-source-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
.ex-source-grid .ex-fact dd { font-size: 12px; letter-spacing: 0; margin-top: 8px; }
.ex-source-grid .ex-fact small { font-size: 10px; }
.ex-dashboard .ex-warning { color: var(--amarelo); }
.ex-empty { min-height: 100px; display: flex; flex-direction: column; justify-content: center; gap: 9px; padding: 24px 0; }
.ex-empty strong { font-weight: 500; font-size: 15px; max-width: 40ch; }
.ex-empty p { color: var(--ex-muted); font-size: 12px; line-height: 1.75; max-width: 60ch; }
.ex-chart > .ex-empty { min-height: 185px; border-top: 1px solid var(--linha); border-bottom: 1px solid var(--linha); }
.ex-live .ex-empty { min-height: 110px; }
.ex-live .ex-empty strong { font-size: 12px; }
.ex-live .ex-empty p { font-size: 11px; }
.ex-demo-control { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 26px; color: var(--ex-muted); font-size: 12px; }
.ex-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* A curva aparece inteira: atualizações nunca apagam o histórico para animá-lo. */
@media (min-width: 1550px) { .ex-dashboard { padding-top: 15px; } .ex-overview { grid-template-columns: minmax(0,2.2fr) minmax(330px,1fr); } }
@media (max-width: 1190px) {
  .ex-header { align-items: flex-start; }
  .ex-header-actions { justify-content: flex-end; max-width: 145px; }
  .ex-overview { grid-template-columns: minmax(0,1.65fr) minmax(240px,1fr); gap: 14px; }
  .ex-revenue,.ex-live,.ex-plans,.ex-renewals,.ex-movements,.ex-sources { padding: 18px; }
  .ex-revenue-heading { flex-wrap: wrap; }
  .ex-revenue-context { text-align: left; max-width: none; display: flex; align-items: baseline; gap: 10px; }
  .ex-revenue-context small { margin: 0; }
  .ex-detail-grid { gap: 14px; grid-template-columns: minmax(230px,1fr) minmax(0,1.55fr); }
  .ex-section-heading { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
  .ex-contract-summary { gap: 14px; }
  .ex-contract-summary .ex-fact dd { font-size: 21px; }
  .ex-source-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .ex-overview { grid-template-columns: minmax(0,1fr); }
  .ex-live { grid-column: auto; grid-row: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .ex-live > .ex-section-heading { grid-column: 1/-1; }
  .ex-live-body { grid-row: 2/4; }
  .ex-inline-check { border-top: 0; padding: 0; margin: 0 0 8px; }
  .ex-people { max-height: 180px; }
  .ex-activity-history { grid-column: 1/-1; }
  .ex-activity-history .ex-chart-inspect { flex-wrap: nowrap; }
  .ex-account-summary { gap: 16px; }
  .ex-detail-grid { grid-template-columns: 1fr; }
  .ex-plan-list { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
  .ex-plan + .ex-plan { padding-top: 10px; border-top: 0; }
  .ex-access-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
}
@media (max-width: 620px) {
  .ex-dashboard { padding-top: 3px; }
  .ex-header { display: block; margin-bottom: 20px; }
  .ex-heading p { font-size: 12px; }
  .ex-header-actions { margin-top: 18px; max-width: none; justify-content: flex-start; }
  .ex-dashboard .ex-button { min-height: 44px; }
  .ex-toolbar { flex-wrap: wrap; gap: 12px; }
  .ex-periods { width: 100%; }
  .ex-dashboard .ex-period { flex: 1; min-height: 44px; }
  .ex-dashboard .ex-period { padding-inline: 10px; }
  .ex-date-range { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .ex-date-field { width: auto; }
  .ex-date-range .ex-button,.ex-period-error { grid-column: 1/-1; }
  .ex-dashboard .ex-date-field input { min-height: 44px; }
  .ex-dashboard select, .ex-dashboard .ex-search input { min-height: 44px; }
  .ex-dashboard input.ex-chart-range { min-height: 44px; }
  .ex-data-details summary { min-height: 44px; display: flex; align-items: center; }
  .ex-live-update { width: 100%; }
  .ex-overview { gap: 14px; }
  .ex-revenue-value { font-size: 35px; }
  .ex-contract-summary { grid-template-columns: 1fr 1fr; gap: 14px; }
  .ex-contract-summary .ex-fact dd { font-size: 20px; }
  .ex-fact dt { font-size: 11px; }
  .ex-live { display: block; }
  .ex-inline-check { padding-top: 16px; border-top: 1px solid var(--linha); margin-top: 16px; }
  .ex-people { max-height: 230px; }
  .ex-account-summary { grid-template-columns: 1fr 1fr; gap: 22px 20px; }
  .ex-account-summary .ex-fact dd { font-size: 24px; }
  .ex-plan-list,.ex-access-breakdown { display: block; }
  .ex-plan + .ex-plan { border-top: 1px solid var(--linha); padding-top: 20px; }
  .ex-source-grid { gap: 22px 18px; }
  .ex-chart-inspect { align-items: flex-start; gap: 6px; flex-wrap: wrap; }
  .ex-chart-range { max-width: 200px; }
  .ex-renewal-summary { gap: 16px; }
  .ex-renewal-summary .ex-fact dd { font-size: 22px; }
  .ex-renewal-item { gap: 10px; grid-template-columns: 45px minmax(0,1fr) auto; }
  .ex-demo-control { flex-direction: column; text-align: center; gap: 10px; }
  .ex-dashboard table { min-width: 600px; }
  .ex-dashboard .ex-data-details table { min-width: 0; }
}
