/* Golf SG — analys-dashboard (Fas 8). Bygger på style.css (samma mörka tema,
 * samma #bar-header). Chart.js renderar i canvasarna. Mobilvänligt grid. */

body.dash { display: block; height: auto; min-height: 100%; }

#bar .chk {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
#bar .chk input { accent-color: var(--accent); }
#bar a.btn { text-decoration: none; align-self: center; }

#dash {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 16px 48px;
}

.caveat {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid #ffcf5b;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 16px;
}
.caveat b { color: var(--fg); }

/* KPI-kort */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.kpi .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 24px; font-weight: 700; margin-top: 4px; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi .value.pos { color: #5bd07f; }
.kpi .value.neg { color: #ff7a7a; }

/* kort + layout */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.card h3 { margin: 0 0 12px; font-size: 14px; }
.card h3 .hint { color: var(--muted); font-weight: 400; font-size: 12px; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .row2 { grid-template-columns: 1fr; } }

.chart-wrap { position: relative; height: 240px; }
.chart-wrap.tall { height: 300px; }

/* prioritering (D4) */
.prio-list { margin: 0; padding-left: 22px; }
.prio-list li { margin: 8px 0; line-height: 1.45; }
.prio-list .area { font-weight: 700; color: var(--fg); }
.prio-list .cost { color: #ff7a7a; font-weight: 700; }
.prio-list .why { color: var(--muted); font-size: 12.5px; }
.prio-list .trend-up { color: #5bd07f; }
.prio-list .trend-down { color: #ff7a7a; }

/* tabell */
table.data { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
table.data th, table.data td { padding: 5px 8px; text-align: right; border-bottom: 1px solid var(--line); }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
table.data tr.bleed td { background: rgba(255, 122, 122, 0.08); }
table.data .pos { color: #5bd07f; }
table.data .neg { color: #ff7a7a; }
table.data .lown { color: #ffcf5b; }

.fineprint { font-size: 11.5px; color: var(--muted); margin: 10px 0 0; line-height: 1.4; }

/* rund-lista */
.rounds-list .grp { margin-bottom: 10px; }
.rounds-list .grp h4 { margin: 0 0 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rounds-list a.round {
  display: flex; justify-content: space-between; gap: 8px;
  text-decoration: none; color: var(--fg);
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; margin: 4px 0;
  font-size: 13px;
}
.rounds-list a.round:hover { border-color: var(--accent); }
.rounds-list a.round .sg { font-weight: 700; }
.rounds-list a.round .sg.pos { color: #5bd07f; }
.rounds-list a.round .sg.neg { color: #ff7a7a; }

.empty { color: var(--muted); font-size: 13px; padding: 20px; text-align: center; }
