@import url("/shared/tool-page.css");

/* ============ Dashboard design ============ */
.dashboard-view {
  --dash-ink: #12263f;
  --dash-muted: #64748b;
  --dash-border: #e6eaf1;
  --dash-card-radius: 14px;
  --blue: #4f7cff;
  --teal: #14b8a6;
  --green: #22c55e;
  --orange: #f5a623;
  --purple: #8b5cf6;
  --red: #e5484d;
  --track: #eef1f6;
  max-width: 1900px;
  margin: 0 auto;
  padding: 40px;
  color: var(--dash-ink);
}

.dash-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.dash-divider {
  border: 0;
  border-top: 1px solid var(--dash-border);
  margin: 26px 0;
}

/* ---- generic card ---- */
.stat-card,
.product-card,
.tasks-panel,
.journey-card,
.task-card,
.issue-box {
  background: #fff;
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-card-radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* ================= Stat row ================= */
.stat-row {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 1.25fr 1.35fr;
  gap: 16px;
}

.stat-card {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 96px;
}

.stat-card--wcag {
  background: #eafaf5;
  border-color: var(--teal);
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.15);
}

.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-label {
  font-size: 13px;
  font-weight: 700;
  color: #445068;
}

.info-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0f2a43;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  font-style: italic;
  display: grid;
  place-items: center;
}

.stat-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--dash-ink);
  line-height: 1.1;
}

.stat-value--lg { font-size: 30px; }
.stat-value--md { font-size: 22px; }

.stat-fraction {
  font-size: 20px;
  font-weight: 800;
}
.stat-fraction small {
  font-size: 13px;
  font-weight: 700;
  color: var(--dash-muted);
}

.stat-sub {
  font-size: 12px;
  color: var(--dash-muted);
}
.stat-sub--accent { color: var(--green); font-weight: 700; }

.trend {
  font-size: 12px;
  font-weight: 700;
}
.trend--up { color: var(--green); }

.stat-card--split {
  flex-direction: row;
  gap: 28px;
}
.split-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* progress bars */
.progress-track {
  position: relative;
  height: 6px;
  background: var(--track);
  border-radius: 999px;
  overflow: hidden;
}
.progress-track--lg { height: 8px; overflow: visible; }
.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 500ms ease;
}
.progress-fill--teal { background: linear-gradient(90deg, #14b8a6, #34d1bf); }
.progress-fill--green { background: var(--green); }
.progress-caption {
  position: absolute;
  right: 0;
  top: -18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--dash-muted);
}

/* ================= Section header ================= */
.section { margin-top: 30px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}
.section-title {
  font-size: 18px;
  font-weight: 800;
}
.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.domain-select {
  width: auto;
  min-width: 210px;
  min-height: 38px;
  border-radius: 999px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
}
.btn-outline {
  min-height: 38px;
  border: 1px solid var(--dash-border);
  border-radius: 999px;
  background: #fff;
  color: var(--dash-ink);
  padding: 0 16px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.btn-outline:hover { background: #f6f8fc; }
.tasks-count { font-size: 20px; font-weight: 800; }

/* ================= Product breakdown ================= */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.product-card {
  padding: 18px 20px 8px;
  display: flex;
  flex-direction: column;
}
.product-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.product-emblem {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #fff;
}
.emblem--coral { background: #f0604d; }
.product-name { font-size: 15px; font-weight: 800; }
.product-metric {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: right;
}
.product-metric-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--dash-muted);
}
.product-metric-value { font-size: 22px; font-weight: 800; }
.trend-badge, .pill {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}
.trend-badge.trend--up { background: #e9fbf1; color: #16a34a; }
.pill--mint { background: #e9f9f3; color: #0f766e; }

.product-body {
  flex: 1;
  padding: 8px 0 12px;
}
.product-body--donut {
  display: flex;
  align-items: center;
  gap: 18px;
}

.product-view {
  border-top: 1px solid var(--dash-border);
  padding: 12px 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--dash-muted);
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.product-view:hover { color: var(--dash-ink); }

/* bar chart */
.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  height: 150px;
  padding-top: 22px;
}
.bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 6px;
}
.bar-fill {
  width: 100%;
  max-width: 42px;
  background: var(--blue);
  border-radius: 6px 6px 0 0;
  min-height: 4px;
}
.bar-label { font-size: 11px; font-weight: 700; color: #445068; }

/* donut + legend */
.donut { flex: 0 0 auto; position: relative; }
.donut svg { display: block; }
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.donut-center .dc-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--dash-muted);
}
.donut-center .dc-value { font-size: 20px; font-weight: 800; }
.donut--lg .donut-center .dc-value { font-size: 30px; }

.legend {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}
.legend li { display: flex; align-items: center; gap: 8px; color: #445068; font-weight: 600; }
.legend .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }

/* key/value rows (Guardian) */
.kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}
.kv-label { font-size: 13px; color: #445068; font-weight: 600; }
.kv-value { font-size: 22px; font-weight: 800; }
.kv-value--danger { color: var(--red); }
.kv-value--success { color: #16a34a; }
.product-card #guardianCard .progress-track { margin-top: 8px; }

/* ================= Top tasks ================= */
.tasks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.task-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-content: start;
}
.task-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.task-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-cat { font-size: 12px; font-weight: 700; color: #445068; margin-right: auto; }
.badge-status {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
}
.badge-status--progress { background: #e9f9f3; color: #0f766e; }
.badge-status--todo { background: #eef1f6; color: #64748b; }
.badge-prio {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge-prio::after { content: "!"; width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 9px; }
.badge-prio--critical { background: #fdecec; color: #dc2626; }
.badge-prio--critical::after { background: #dc2626; }
.badge-prio--high { background: #fef6e7; color: #b45309; }
.badge-prio--high::after { background: #f5a623; }
.task-title { font-size: 14px; font-weight: 800; }
.task-desc { font-size: 12px; color: var(--dash-muted); line-height: 1.4; }
.task-assignee { font-size: 11px; color: #94a3b8; margin-top: 2px; }

.tasks-panel { padding: 16px 18px 8px; display: flex; flex-direction: column; }
.tasks-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.tasks-panel-head .product-metric { margin-left: auto; }

.assignee-list { list-style: none; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.assignee-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #fff;
}
.assignee-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.assignee-name { font-size: 13px; font-weight: 700; }
.assignee-bar-wrap { display: flex; align-items: center; gap: 10px; }
.assignee-bar { flex: 1; height: 6px; background: var(--track); border-radius: 999px; overflow: hidden; }
.assignee-bar span { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.assignee-meta { font-size: 11px; color: var(--dash-muted); white-space: nowrap; }
.assignee-meta .mi { color: var(--blue); }
.assignee-total { font-size: 14px; font-weight: 800; }
.assignee-row--muted .avatar { background: #cbd5e1; }

/* ================= Nice work banner ================= */
.nice-banner {
  margin-top: 30px;
  background: #e9f9f3;
  border: 1px solid #b9ead9;
  border-radius: var(--dash-card-radius);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.nice-check {
  width: 30px; height: 30px; border-radius: 50%;
  background: #14b8a6; color: #fff;
  display: grid; place-items: center; font-size: 16px; font-weight: 800;
  flex: 0 0 auto;
}
.nice-copy { display: flex; flex-direction: column; }
.nice-copy strong { font-size: 15px; }
.nice-copy span { font-size: 13px; color: #40655a; }
.nice-right { margin-left: auto; text-align: right; }
.nice-right-label { display: block; font-size: 12px; color: #40655a; }
.nice-right-level { font-size: 18px; font-weight: 800; color: #0f766e; }

/* ================= Accessibility journey ================= */
.journey-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr 0.9fr;
  gap: 28px;
  align-items: start;
}
.col-title { font-size: 15px; font-weight: 800; margin-bottom: 14px; }
.journey-col .section-title { margin-bottom: 14px; }
.journey-card {
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.issues-col { padding-top: 2px; }
.issues-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.issue-box {
  padding: 18px;
  text-align: center;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.issue-box.is-active { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.issue-box .ib-label { font-size: 12px; color: var(--dash-muted); font-weight: 600; }
.issue-box .ib-value { font-size: 20px; font-weight: 800; }

.severity-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.severity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 10px;
  font-weight: 700;
}
.severity-row .sev-value { font-size: 16px; font-weight: 800; }
.severity-row--critical { background: #fdecec; color: #b91c1c; }
.severity-row--high { background: #fef6e7; color: #b45309; }
.severity-row--advisory { background: #eef2ff; color: #4353a8; }

/* ================= Responsive ================= */
@media (max-width: 900px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .product-grid,
  .tasks-grid,
  .task-cards { grid-template-columns: 1fr; }
  .journey-grid { grid-template-columns: 1fr; }
}
