/* Visão geral (index.html): números do mês, pendências, gráfico e análise da IA. */
main.home { max-width: 1200px; }

.home-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 4px 0 18px; }
.home-head .titles { flex: 1; min-width: 220px; }
.home-head h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.home-head p { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); }
.home-head .month-picker { width: auto; }
.auth-code { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
.auth-code-v { font-size: 18px; font-weight: 800; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.auth-code.old .auth-code-v { color: var(--text-subtle); }

.home-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.home-kpis .kpi { padding: 14px 15px; gap: 6px; }
.home-kpis .kpi-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.home-kpis .kpi-value { font-size: 20px; }
.home-kpis .kpi-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-muted); }
.kpi-value.pos { color: var(--success); }
.kpi-value.warn { color: var(--warn); }

.home-section-title { font-size: 14.5px; font-weight: 700; margin: 26px 0 10px; }

.todo-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.todo {
  display: flex; flex-direction: column; gap: 4px; min-height: 84px;
  padding: 13px 15px; border-radius: var(--r); text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-xs), var(--hairline);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.todo:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.todo:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring); }
.todo .n { font-family: var(--font-mono); font-size: 24px; font-weight: 600; line-height: 1.1; color: var(--brand); }
.todo .t { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.todo.zero .n { color: var(--text-subtle); }
.todo.hot { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.todo.hot .n { color: var(--warn); }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; margin-top: 26px; align-items: start; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .fat { background: color-mix(in srgb, var(--chart) 35%, var(--surface)); }
.legend .luc { background: var(--chart); }

.top-list { display: flex; flex-direction: column; }
.top-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.top-row:last-child { border-bottom: 0; }
.top-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.top-row .vl { font-family: var(--font-mono); font-weight: 600; flex-shrink: 0; }
.top-row small { display: block; color: var(--text-subtle); font-size: 11.5px; }

.ai-panel { margin-top: 12px; }
.ai-resumo { margin: 0 0 14px; font-size: 14px; line-height: 1.55; }
.ai-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ai-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; line-height: 1.5; }
.ai-card .area { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.ai-card b { font-size: 13.5px; }
.ai-card p { margin: 0; color: var(--text-muted); }
.ai-card.alerta { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.ai-card.alerta .area { color: var(--warn); }
.ai-card.positivo .area { color: var(--success); }
.ai-foot { margin-top: 12px; font-size: 12px; color: var(--text-subtle); }

@media (max-width: 1100px) {
  .home-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .todo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rep-metrics { grid-template-columns: minmax(0, 1fr); }
  .ai-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .home-kpis, .todo-grid, .ai-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-grid { grid-template-columns: minmax(0, 1fr); }
  .home-kpis .kpi-value { font-size: 18px; }
}
.home-grid .panel { min-width: 0; }
.home-grid .panel-head { flex-wrap: wrap; }

/* Reputação no Mercado Livre */
.rep-panel { margin-top: 12px; }
.rep-when { font-size: 12px; color: var(--text-subtle); }
.rep-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.rep-thermo { display: flex; gap: 4px; }
.rep-thermo .seg { width: 34px; height: 10px; border-radius: 3px; opacity: .25; }
.rep-thermo .seg.on { opacity: 1; height: 14px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px currentColor; }
.rep-thermo .red { background: #d93025; color: #d93025; }
.rep-thermo .orange { background: #f57c00; color: #f57c00; }
.rep-thermo .yellow { background: #f2c200; color: #f2c200; }
.rep-thermo .light_green { background: #8bc34a; color: #8bc34a; }
.rep-thermo .green { background: #2e9e4f; color: #2e9e4f; }
.rep-level { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.rep-level small { flex-basis: 100%; font-size: 12px; color: var(--text-muted); }
.rep-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rep-metric { padding: 11px 13px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); }
.rep-mh { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; }
.rep-mh b { font-family: var(--font-mono); }
.rep-bar { height: 6px; border-radius: 3px; background: var(--surface-3); margin: 8px 0 6px; overflow: hidden; }
.rep-bar i { display: block; height: 100%; background: var(--success); border-radius: 3px; }
.rep-metric.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.rep-metric.warn .rep-bar i { background: var(--warn); }
.rep-metric.over { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.rep-metric.over .rep-bar i { background: var(--danger); }
.rep-ms { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }
.rep-note { margin: 10px 0 0; font-size: 11.5px; color: var(--text-subtle); }
@media (max-width: 1100px) {
  .rep-metrics { grid-template-columns: minmax(0, 1fr); }
}

/* Meta do mês */
.goal-panel { margin-top: 12px; }
.goal-row { margin-bottom: 14px; }
.goal-row:last-child { margin-bottom: 0; }
.goal-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.goal-top b { font-family: var(--font-mono); }
.goal-top small { font-family: var(--font); font-weight: 400; color: var(--text-muted); }
.goal-bar { position: relative; height: 10px; border-radius: 5px; background: var(--surface-3); margin: 7px 0 5px; }
.goal-bar i { display: block; height: 100%; border-radius: 5px; background: var(--chart); }
.goal-bar em { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--text); opacity: .55; transform: translateX(-1px); }
.goal-sub { font-size: 12px; color: var(--text-muted); }
.goal-sub.ok b { color: var(--success); }
.goal-sub.warn b { color: var(--warn); }
.goal-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; }
.goal-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.goal-form input { width: 140px; }
.goal-form small { flex-basis: 100%; color: var(--text-subtle); }
