/* InvoMaster Dashboard – nur dashboard-spezifische Styles.
   Die globale Oberfläche/Navigation kommt ausschließlich aus /system_style.php. */

.mod_dashboard {
  --dashboard-max: 1400px;
}

/* Das Dashboard nutzt den schmaleren Inhaltsbereich und eigenen Innenabstand. */
.module-dashboard .container {
  max-width: 1400px;
  padding: 18px;
}

.mod_dashboard .grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.2fr .8fr;
}

@media (max-width: 1000px) {
  .mod_dashboard .grid {
    grid-template-columns: 1fr;
  }
}

.mod_dashboard .dashboard-chart-clickable {
  cursor: zoom-in;
  position: relative;
}
.mod_dashboard .dashboard-chart-clickable::after {
  content: "Zum Vergrößern klicken";
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 11px;
  color: rgba(220,227,238,.62);
  background: rgba(15,23,42,.78);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  padding: 4px 9px;
  pointer-events: none;
}
.mod_dashboard .dashboard-chart-svg text {
  font-family: inherit;
}
.mod_dashboard .dashboard-chart-point:hover circle {
  r: 5;
}
.mod_dashboard .dashboard-chart-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.mod_dashboard .dashboard-chart-meta .mini-stat {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.025);
  border-radius: 12px;
  padding: 8px 10px;
  min-width: 130px;
}
.mod_dashboard .dashboard-chart-meta .mini-label {
  font-size: 11px;
  color: var(--muted, #9aa6b2);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 3px;
}
.mod_dashboard .dashboard-chart-meta .mini-value {
  font-weight: 800;
  color: var(--gold, #d8bf84);
}
.dashboard-chart-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2,6,23,.78);
  backdrop-filter: blur(6px);
  padding: 16px;
}
.dashboard-chart-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}
.dashboard-chart-modal-card {
  width: 98vw;
  height: 96vh;
  max-height: 96vh;
  overflow: auto;
  background: #111827;
  border: 1px solid rgba(216,191,132,.55);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.dashboard-chart-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.dashboard-chart-modal-title {
  font-weight: 900;
  color: var(--gold, #d8bf84);
  font-size: 20px;
}
.dashboard-chart-close {
  cursor: pointer;
}
.dashboard-chart-modal .chart {
  flex: 1 1 auto;
  min-height: 0;
}
.dashboard-chart-modal .chart svg {
  width: 100%;
  height: 100%;
  display: block;
}
@media (max-width: 760px) {
  .dashboard-chart-modal { padding: 8px; }
  .dashboard-chart-modal-card { width: 100vw; height: 100vh; border-radius: 0; }
}
.mod_dashboard .mini-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin-top: 4px;
}
.mod_dashboard .mini-block {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.025);
  border-radius: 12px;
  padding: 10px 12px;
}
.mod_dashboard .mini-block .mini-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold, #d8bf84);
  line-height: 1.15;
}
.mod_dashboard .mini-block .mini-num small {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #9aa6b2);
  margin-left: 4px;
}
.mod_dashboard .mini-block .mini-cap {
  font-size: 11px;
  color: var(--muted, #9aa6b2);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 2px;
}
.mod_dashboard .warn-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.mod_dashboard .warn-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  border-bottom: 1px dashed rgba(255,255,255,.08);
  padding-bottom: 6px;
  font-size: 13px;
}
.mod_dashboard .warn-row:last-child { border-bottom: 0; padding-bottom: 0; }
.mod_dashboard .warn-row .wr-name { color: #dfe6f7; }
.mod_dashboard .warn-row .wr-sub { color: var(--muted, #9aa6b2); }
.mod_dashboard .section-grid-3 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0,1fr));
}
@media (max-width: 1000px) { .mod_dashboard .section-grid-3 { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------------------
   Diagramme: zurückhaltender, fachlicher und stärker in das Dashboard
   integriert. Umsatz = Säulen, Liquidität = Linie/Prognose.
   ------------------------------------------------------------------------- */
.mod_dashboard .dashboard-chart-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mod_dashboard .dashboard-chart-grid line {
  stroke: rgba(220, 227, 238, .075);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.mod_dashboard .dashboard-chart-ylabels text,
.mod_dashboard .dashboard-chart-axis-label {
  fill: rgba(220, 227, 238, .52);
  font-size: 10px;
  font-weight: 500;
}

.mod_dashboard .dashboard-chart-value {
  fill: rgba(232, 207, 151, .94);
  font-size: 9px;
  font-weight: 700;
}

/* Umsatz: echte diskrete Werte als Säulen statt künstlicher Flächenkurve. */
.mod_dashboard .dashboard-chart-bars .dashboard-chart-bar rect {
  fill: rgba(216, 191, 132, .72);
  stroke: rgba(238, 209, 145, .45);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: opacity .16s ease, filter .16s ease;
}
.mod_dashboard .dashboard-chart-bars .dashboard-chart-bar:hover rect {
  fill: rgba(226, 200, 140, .92);
}

/* Prognose: feine Linie mit nur einem sehr dezenten Untergrund. */
.mod_dashboard .dashboard-chart-linegraph .dashboard-chart-area {
  fill: rgba(216, 191, 132, .085);
}
.mod_dashboard .dashboard-chart-linegraph .dashboard-chart-line {
  fill: none;
  stroke: rgba(226, 200, 140, .95);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.mod_dashboard .dashboard-chart-linegraph .dashboard-chart-point circle {
  fill: #d8bf84;
  stroke: #111827;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}
.mod_dashboard .dashboard-chart-linegraph .dashboard-chart-point:hover circle {
  r: 5;
}

/* Keine "eingeklebte" Diagrammfläche: das Chart fügt sich ruhig in die Card ein. */
.mod_dashboard .chart.dashboard-chart-clickable {
  background: rgba(255,255,255,.012);
  border-color: rgba(255,255,255,.085);
}
