/* Tela inicio: estilos próprios desta tela, para não disputar o styles.css com outras rodadas. */
/* Medidas tiradas da referência de 1440 × 900 (captura em escala 2); cores por amostragem de pixels. */

.inicio {
  --ini-border: #dfe2e6;
  --ini-head: #f7f7f7;
  --ini-ink: #1f2a33;
  --ini-muted: #5f6b75;
  --ini-green: #317031;
  --ini-green-bg: #e2ece3;
  --ini-red: #9b2f35;
  --ini-red-bg: #f1e2e3;
  --ini-bar-red: #cb444a;
  --ini-neutral-bg: #dddfe0;
  display: grid;
  gap: 17px;
  padding-top: 1px;
  color: var(--ini-ink);
  font-family: "Source Sans Pro", sans-serif;
}

.inicio-crumb { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ini-ink, #1f2a33); }
.inicio-crumb svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

.inicio svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Cartões do topo */
.inicio-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; }
.inicio-card {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 133px;
  padding: 14px 16px 14px;
  background: #fff;
  border: 1px solid var(--ini-border);
  border-radius: 3px;
  min-width: 0;
}
.inicio-card-head { display: flex; align-items: center; gap: 10px; min-height: 40px; padding-right: 2px; }
.inicio-card-icon {
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 3px;
}
.inicio-card-icon svg { width: 18px; height: 18px; stroke-width: 2.6; }
.inicio-card-icon.money { background: var(--ini-neutral-bg); color: #1f2a33; }
.inicio-card-icon.money svg { stroke-width: 1.9; }
.inicio-card-icon.up, .inicio-card-icon.plus { background: var(--ini-green-bg); color: var(--ini-green); }
.inicio-card-icon.down, .inicio-card-icon.minus { background: var(--ini-red-bg); color: var(--ini-red); }
.inicio-card-label { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.35; }
.inicio-card-gear { color: #6d757c; display: inline-grid; align-self: flex-start; margin-top: 2px; }
.inicio-card-gear svg { width: 15px; height: 15px; stroke-width: 2.2; }
.inicio-card-value {
  margin-top: 12px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inicio-card-eye {
  position: absolute;
  right: 16px;
  top: 64px;
  padding: 2px;
  border: 0;
  background: none;
  color: #4a535b;
  cursor: pointer;
}
.inicio-card-eye svg { width: 16px; height: 16px; }
.inicio-card:has(.inicio-card-eye) .inicio-card-value { padding-right: 26px; }
.inicio-card-note { margin-top: 7px; font-size: 13px; color: var(--ini-muted); line-height: 1.3; }

.inicio-hide-values .inicio-value { color: transparent !important; text-shadow: 0 0 9px rgba(31, 42, 51, 0.55); user-select: none; }

/* Círculo de porcentagem */
.inicio-ring { position: relative; flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; font-size: 9px; font-weight: 600; }
.inicio-ring svg { position: absolute; inset: 0; width: 40px; height: 40px; }
.inicio-ring circle { fill: none; stroke-width: 2.4; }
.inicio-ring .track { stroke: #e6ebe6; }
.inicio-ring .fill { stroke-linecap: butt; }
.inicio-ring.up { color: var(--ini-green); }
.inicio-ring.up .fill { stroke: #3c8a3c; }
.inicio-ring.down { color: var(--ini-red); }
.inicio-ring.down .track { stroke: #f1e2e3; }
.inicio-ring.down .fill { stroke: var(--ini-red); }

/* Quadros */
.inicio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 17px; align-items: stretch; }
.inicio-panel { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--ini-border); border-radius: 3px; overflow: hidden; }
.inicio-panel-flow, .inicio-panel-sales { min-height: 422px; }
.inicio-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 74px;
  padding: 13px 19px 10px 19px;
  background: var(--ini-head);
  border-bottom: 1px solid var(--ini-border);
}
.inicio-panel-head h2 {
  display: flex !important;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ini-ink);
}
.inicio-panel-head h2::before { content: none !important; display: none !important; }
.inicio-panel-head h2 strong { font-weight: 600; }
.inicio-panel-head h2 svg { width: 18px; height: 18px; flex: 0 0 18px; stroke-width: 1.9; }
.inicio-panel-head p { margin: 4px 0 0; font-size: 13px; color: var(--ini-muted); }
.inicio-panel-actions { display: flex; gap: 6px; padding-top: 9px; }
.inicio-icon-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: #f8f9fa;
  border: 1px solid var(--ini-border);
  border-radius: 3px;
  color: #4a535b;
  cursor: pointer;
}
.inicio-icon-button:disabled { cursor: default; opacity: 1; }
.inicio-icon-button svg { width: 15px; height: 15px; stroke-width: 2; }
.inicio-outline-button {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #1f2a33;
  border-radius: 3px;
  background: #fff;
  color: #1f2a33;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.inicio-outline-button:hover { background: #f3f4f5; }

.inicio-panel-body { display: grid; gap: 6px; padding: 18px 19px 14px; flex: 1; align-content: start; }
.inicio-stats { display: flex; flex-wrap: wrap; gap: 4px 32px; margin: 0; }
.inicio-stats div { min-width: 0; }
.inicio-stats dt { font-size: 14px; color: var(--ini-muted); }
.inicio-stats dd { margin: 4px 0 0; font-size: 14px; font-weight: 600; color: var(--ini-ink); }

.inicio-chart { position: relative; margin: 8px 0 0; }
.inicio-chart svg { display: block; width: 100%; height: auto; }
.inicio-chart .grid { stroke: #eef0f2; stroke-width: 1; }
.inicio-chart .grid.base { stroke: var(--ini-border); }
.inicio-chart .month { fill: #6d757c; stroke: none; font-size: 11px; font-family: "Source Sans Pro", sans-serif; }
.inicio-chart figcaption {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  padding: 4px 10px;
  background: #fff;
  font-size: 13px;
  color: var(--ini-muted);
  white-space: nowrap;
}

.inicio-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0 0 0 10px; list-style: none; font-size: 14px; color: var(--ini-muted); }
.inicio-legend li { display: inline-flex; align-items: center; gap: 7px; }
.inicio-legend .mark { display: inline-block; }
.inicio-legend .bar-up { width: 11px; height: 11px; background: var(--ini-green); }
.inicio-legend .bar-down { width: 11px; height: 11px; background: var(--ini-bar-red); }
.inicio-legend .solid { width: 11px; height: 11px; background: #1f2a33; }
.inicio-legend .dot-line { width: 16px; height: 6px; background: radial-gradient(circle, #fff 1.6px, #6d757c 1.7px, #6d757c 2.6px, transparent 2.7px) center / 6px 6px no-repeat, linear-gradient(#9aa1a7, #9aa1a7) center / 100% 1px no-repeat; }
.inicio-legend .dotted { width: 16px; border-top: 1px dotted #6d757c; }

/* Contas e agenda */
.inicio-accounts { margin: 0; padding: 0; list-style: none; }
.inicio-accounts li { display: flex; align-items: center; gap: 16px; min-height: 54px; padding: 8px 19px; border-bottom: 1px solid var(--ini-border); }
.inicio-accounts li > div { flex: 1; min-width: 0; display: grid; gap: 1px; }
.inicio-accounts li > div strong { font-size: 14px; font-weight: 600; }
.inicio-accounts li > div small { font-size: 12px; color: var(--ini-muted); }
.inicio-accounts li > .inicio-value { font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inicio-account-icon { flex: 0 0 32px; display: grid; place-items: center; width: 32px; height: 32px; background: #f8f9fa; border: 1px solid var(--ini-border); border-radius: 3px; color: #4a535b; }
.inicio-account-icon svg { width: 16px; height: 16px; }

.inicio-empty { display: grid; justify-items: center; gap: 6px; padding: 38px 19px 34px; text-align: center; }
.inicio-empty svg { width: 46px; height: 46px; padding: 11px; border-radius: 50%; background: #f1f2f3; color: #4a535b; box-sizing: border-box; }
.inicio-empty strong { margin-top: 6px; font-size: 16px; font-weight: 600; }
.inicio-empty p { margin: 0; font-size: 13px; color: var(--ini-muted); }
.inicio-empty .inicio-bank-link { margin-top: 6px; }

.inicio-bank { display: grid; }
.inicio-bank-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 46px; padding: 8px 19px; border-bottom: 1px solid var(--ini-border); font-size: 14px; font-weight: 600; }
.inicio-bank-total .inicio-value { font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inicio-bank-link { justify-self: start; margin: 12px 19px 14px; font-size: 14px; color: var(--ini-ink); text-decoration: underline; }

@media (max-width: 1180px) {
  .inicio-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .inicio-grid { grid-template-columns: 1fr; }
  .inicio-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .inicio-cards { grid-template-columns: 1fr; }
}

/* Séries mensais do Início (GET dashboard/monthly). */
.inicio-negative { color: var(--ini-bar-red); }
.inicio-chart .axis { fill: #6d757c; stroke: none; font-size: 11px; font-family: "Source Sans Pro", sans-serif; }
.inicio-chart .zero { stroke: #c9ced3; stroke-width: 1; }
.inicio-chart .bar-up { fill: var(--ini-green); }
.inicio-chart .bar-down { fill: var(--ini-bar-red); }
.inicio-chart .balance { fill: none; stroke: #6d757c; stroke-width: 1; stroke-dasharray: 1.5 2.5; }
.inicio-chart .balance-dot { fill: #fff; stroke: #6d757c; stroke-width: 1.2; }
.inicio-chart .sales-area { fill: #eceef1; stroke: none; }
.inicio-chart .sales-line { fill: none; stroke: #1f2a33; stroke-width: 2; }
.inicio-chart .sales-dot { fill: #fff; stroke: #1f2a33; stroke-width: 2; }
.inicio-chart .average { stroke: #6d757c; stroke-width: 1; stroke-dasharray: 1.5 2; }

/* Seus aplicativos e Novidades do sistema */
.inicio-apps, .inicio-news { display: flex; flex-direction: column; gap: 12px; padding: 14px 19px 16px; flex: 1; }
.inicio-apps-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.inicio-app { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--ini-border); border-radius: 3px; color: var(--ini-ink); text-decoration: none; background: #fff; }
.inicio-app strong { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.inicio-app em { font-style: normal; font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 8px; background: #fde8c8; color: #8a5200; }
.inicio-app small { font-size: 11px; line-height: 1.4; color: var(--ini-muted); }
.inicio-app.is-off { cursor: default; }
.inicio-more { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--ini-ink); text-decoration: underline; }
.inicio-more.is-off { cursor: default; }
.inicio-news-empty { margin: 0; color: var(--ini-muted); font-size: 13px; }

/* Novidades do sistema (leva 2): lista com data, título e texto, como no original. */
.inicio-news-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.inicio-news-item { display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; padding: 10px 0; border-top: 1px solid var(--ini-border); cursor: default; }
.inicio-news-item:first-child { border-top: 0; padding-top: 0; }
.inicio-news-date { grid-row: 1 / span 2; font-size: 11px; color: var(--ini-muted); padding-top: 2px; }
.inicio-news-item strong { font-size: 13px; font-weight: 600; color: var(--ini-ink); }
.inicio-news-item small { font-size: 11px; line-height: 1.4; color: var(--ini-muted); }
