/* Meu Portal · 08 — desempenho
   Indicadores, gráficos, insights e palavras (camada original). */

/* Analytics */
.analytics-section { margin-bottom: 2rem; }
.analytics-shell {
  border: 1px solid #d7ddd9;
  border-radius: 22px;
  padding: 1.2rem;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 34%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.10), transparent 28%),
    #fffef8;
  box-shadow: 0 18px 46px rgba(17, 34, 38, 0.08);
}
.analytics-hero {
  border: 1px solid rgba(215, 221, 217, 0.95);
  border-radius: 18px;
  padding: 1.15rem 1.15rem 1rem;
  background: rgba(255, 255, 255, 0.92);
}
.analytics-eyebrow {
  margin: 0 0 .45rem;
  color: #0b5f58;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.analytics-hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.analytics-title {
  margin-bottom: .45rem;
  font-family: "Sora", sans-serif;
  font-weight: 700;
}
.analytics-subtitle {
  margin: 0;
  max-width: 64ch;
  color: #5e6c70;
  line-height: 1.55;
  font-size: .92rem;
}
.analytics-toolbar {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.analytics-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid #d7ddd9;
  background: #fff;
  border-radius: 999px;
  padding: .5rem .8rem;
  font-size: .8rem;
  font-weight: 700;
  color: #2e4144;
  white-space: nowrap;
}
.analytics-pill-active {
  border-color: #9fccc5;
  background: #e6f5f2;
  color: #0b5f58;
}
.analytics-period-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: .95rem;
  flex-wrap: wrap;
}
.analytics-period-row label {
  font-size: .85rem;
  font-weight: 700;
  color: #405356;
}
.analytics-period-row select {
  border: 1px solid #cfd8d3;
  border-radius: 999px;
  padding: .5rem .85rem;
  font-size: .85rem;
  background: #fff;
  outline: none;
  cursor: pointer;
  color: #203437;
  font-family: inherit;
}
.analytics-loading-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 .7rem;
  border-radius: 999px;
  background: #f3f7f5;
  border: 1px solid #dce5e1;
  font-size: .8rem;
  color: #5e6c70;
}
.analytics-inline-hint {
  margin: .85rem 0 0;
  padding: .8rem .95rem;
  border-radius: 12px;
  border: 1px solid #f5dbb0;
  background: #fff7e7;
  color: #8a5310;
  font-size: .84rem;
  opacity: 1;
}
.analytics-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: .85rem;
  margin: 1rem 0;
}
.analytics-card {
  background: #fff;
  border: 1px solid #dce5e1;
  border-radius: 16px;
  padding: 1rem 1rem .95rem;
  min-width: 0;
  box-shadow: 0 10px 24px rgba(18, 37, 39, 0.06);
}
.analytics-card-label {
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #5e6c70;
  margin-bottom: .55rem;
}
.analytics-card-value {
  font-size: 1.78rem;
  line-height: 1.05;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  color: #122527;
}
.analytics-card-sub {
  font-size: .79rem;
  color: #657679;
  margin-top: .35rem;
  line-height: 1.45;
}
.analytics-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
  align-items: stretch;
  min-width: 0;
}
.analytics-side-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: .9rem;
  min-width: 0;
}
.analytics-panel {
  background: #fff;
  border: 1px solid #dce5e1;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 10px 24px rgba(18, 37, 39, 0.06);
  min-width: 0;
}
.analytics-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .9rem;
  margin-bottom: .9rem;
  flex-wrap: wrap;
}
.analytics-panel-title {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1a2d30;
}
.analytics-panel-note {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .35rem .7rem;
  background: #f2f5f3;
  color: #516467;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}
.analytics-chart-wrap {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  width: 100%;
}
.analytics-chart-wrap.analytics-chart-wrap-sm { min-height: 220px; }
#analyticsChartCanvas,
#analyticsHourlyCanvas {
  width: 100% !important;
  height: 100% !important;
  max-height: none;
}
.analytics-peak-summary {
  margin-top: .9rem;
  padding: .8rem .9rem;
  border-radius: 12px;
  background: #f4fbf8;
  border: 1px solid #d3eee6;
  color: #234549;
  font-size: .83rem;
  line-height: 1.5;
}
.analytics-insights-list {
  margin: 0;
  padding-left: 1rem;
  color: #294043;
  line-height: 1.55;
  font-size: .9rem;
}
.analytics-insights-list li + li { margin-top: .5rem; }
.analytics-words-panel { margin-top: .9rem; }
.analytics-words-list {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding-top: .15rem;
}
.analytics-word-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: .84rem;
  color: #203437;
}
.analytics-word-text {
  min-width: 94px;
  font-weight: 700;
  color: #173033;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.analytics-word-bar-wrap {
  flex: 1;
  background: #edf2ef;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}
.analytics-word-bar {
  height: 100%;
  background: linear-gradient(90deg, #0f766e, #14a38f);
  border-radius: 999px;
  transition: width .4s ease;
}
.analytics-word-count {
  min-width: 32px;
  text-align: right;
  font-size: .8rem;
  color: #5e6c70;
  font-weight: 700;
}
#analyticsWordsEmpty,
#analyticsInsightsEmpty {
  font-size: .85rem;
  color: #5e6c70;
  padding: .2rem 0;
}
@media (max-width: 1180px) {
  .meubot-dashboard-row,
  .meubot-dashboard-row-wide { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .meubot-page { width: min(100%, calc(100vw - 1.25rem)); padding-top: 1.35rem; }
  .analytics-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-box { max-width: 660px; }
}
@media (max-width: 640px) {
  .meubot-page { width: min(100%, calc(100vw - .75rem)); padding-bottom: 3rem; }
  .meubot-page-head { padding: 0 .1rem; }
  .meubot-utility-panel { padding: 1rem; border-radius: 18px; }
  .analytics-shell { padding: .95rem; border-radius: 18px; }
  .analytics-hero { padding: 1rem; }
  .analytics-cards { grid-template-columns: 1fr; }
  .analytics-card-value { font-size: 1.6rem; }
  .analytics-chart-wrap { min-height: 205px; }
  .analytics-chart-wrap.analytics-chart-wrap-sm { min-height: 190px; }
  .analytics-toolbar { justify-content: flex-start; }
  .meubot-sessions-shell { padding: .95rem; border-radius: 18px; }
  .meubot-sessions-hero { padding: 1rem; }
  .meubot-sessions-toolbar { grid-template-columns: 1fr; }
  .meubot-sessions-summary { min-width: 0; }
  .meubot-sessions-filters { padding: .85rem; }
  .meubot-msg { max-width: 92%; }
  .modal-box { max-width: 100%; padding: 1.2rem 1rem; }
  .field-builder-row,
  .botagenda-field-item-grid,
  .conditional-builder-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .analytics-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-chart-wrap { min-height: 180px; }
  .analytics-chart-wrap.analytics-chart-wrap-sm { min-height: 160px; }
  .analytics-shell { padding: .75rem; }
  .analytics-panel { padding: .85rem; }
}
