.dashboard-shell {
  display: grid;
  gap: 18px;
}

.dashboard-hero,
.dashboard-draft,
.dashboard-panel,
.dashboard-empty {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 249, 0.94);
  box-shadow: var(--shadow-soft);
}

.dashboard-draft {
  min-height: 390px;
  padding: clamp(30px, 5vw, 58px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  align-items: center;
  gap: 44px;
  background:
    radial-gradient(circle at 86% 10%, rgba(191, 138, 37, 0.2), transparent 32%),
    rgba(255, 253, 249, 0.94);
}

.dashboard-draft h1 {
  margin-top: 8px;
  font-size: clamp(40px, 5vw, 62px);
}

.dashboard-draft p {
  max-width: 620px;
  margin-top: 16px;
  color: var(--muted);
}

.dashboard-draft .btn {
  margin-top: 24px;
}

.dashboard-draft-meta {
  font-size: 12px;
}

.draft-meter {
  display: grid;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
}

.draft-meter > strong {
  font-family: var(--display);
  font-size: clamp(58px, 8vw, 88px);
  line-height: 1;
}

.draft-meter > span {
  color: var(--muted);
  font-size: 13px;
}

.draft-progress {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--neutral-soft);
}

.draft-progress span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--warn);
}

.dashboard-hero {
  min-height: 330px;
  padding: clamp(28px, 5vw, 54px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.64fr);
  align-items: center;
  gap: 34px;
  background:
    radial-gradient(circle at 86% 8%, rgba(102, 83, 199, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(220, 238, 229, 0.9), rgba(255, 253, 249, 0.96));
}

.dashboard-hero h1 {
  margin-top: 8px;
  font-size: clamp(36px, 5vw, 62px);
}

.dashboard-case-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.dashboard-probability {
  display: grid;
  justify-items: end;
}

.probability-number {
  display: flex;
  align-items: flex-start;
  font-family: var(--display);
  font-size: clamp(76px, 10vw, 126px);
  line-height: 0.85;
  letter-spacing: -0.07em;
}

.probability-number span {
  margin: 10px 0 0 8px;
  font-family: var(--sans);
  font-size: 22px;
  letter-spacing: 0;
}

.dashboard-probability > p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.case-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.case-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.case-tab {
  min-height: 44px;
  padding: 0 16px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel);
}

.case-tab.active {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
}

.status-track {
  height: 34px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--neutral-soft);
}

.status-track span {
  min-width: 4px;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.status-track .complete {
  background: var(--mint);
}

.status-track .partial {
  background: var(--sky);
}

/* Brand coral is light; navy text keeps the count legible on the fill. */
.status-track .missing {
  background: var(--coral);
}

.status-track .unassessed {
  background: var(--neutral-soft);
}

.status-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.status-legend span::before {
  content: "";
  width: 9px;
  height: 9px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--neutral-soft);
}

.status-legend .complete::before {
  background: var(--mint);
}

.status-legend .partial::before {
  background: var(--sky);
}

.status-legend .missing::before {
  background: var(--coral);
}

.status-legend .unassessed::before {
  background: var(--neutral-soft);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
  gap: 18px;
}

.dashboard-panel {
  padding: 26px;
}

.dashboard-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-panel-heading h2 {
  font-size: 26px;
}

.criteria-list,
.action-list,
.history-list {
  display: grid;
  gap: 10px;
}

.criterion-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.criterion-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--neutral-soft);
}

.criterion-row.complete .criterion-dot {
  background: var(--mint);
}

.criterion-row.partial .criterion-dot {
  background: var(--sky);
}

.criterion-row.missing .criterion-dot {
  background: var(--coral);
}

.criterion-row.unassessed .criterion-dot {
  background: var(--neutral-soft);
}

.criterion-row p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.criterion-status {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.action-item {
  padding: 16px;
  border-radius: 14px;
  background: var(--violet-soft);
}

.action-item:nth-child(2) {
  background: var(--warn-soft);
}

.action-item:nth-child(3) {
  background: var(--good-soft);
}

.action-item small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
}

.history-list {
  margin-top: 22px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.dashboard-disclaimer {
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 253, 249, 0.72);
  font-size: 12px;
}

.dashboard-empty {
  min-height: 560px;
  padding: clamp(34px, 7vw, 82px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.55fr);
  align-items: center;
  gap: 48px;
}

.dashboard-empty h1 {
  margin-top: 8px;
  max-width: 720px;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1;
}

.dashboard-empty p {
  max-width: 620px;
  margin-top: 18px;
  color: var(--muted);
}

.dashboard-empty .btn {
  margin-top: 24px;
}

.empty-meter {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background:
    radial-gradient(circle at center, var(--panel) 54%, transparent 55%),
    conic-gradient(var(--neutral-soft) 0 100%);
  font-weight: 800;
}

.empty-meter.loading {
  background:
    radial-gradient(circle at center, var(--panel) 54%, transparent 55%),
    conic-gradient(var(--good) 0 28%, var(--neutral-soft) 28% 100%);
}

.dashboard-system-state .empty-meter span {
  max-width: 130px;
  text-align: center;
}

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

@media (max-width: 760px) {
  .dashboard-panel {
    padding: 22px;
  }

  .case-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-hero,
  .dashboard-draft,
  .dashboard-empty {
    grid-template-columns: 1fr;
  }

  .dashboard-probability {
    justify-items: start;
  }

  .dashboard-probability > p {
    text-align: left;
  }

  .criterion-row {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .criterion-status {
    grid-column: 2;
  }
}

/* ---- 2026 UI/UX workspace refresh ------------------------------------ */
.dashboard-hero,
.dashboard-draft,
.dashboard-empty {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--ink);
  background:
    radial-gradient(circle at 6% 4%, rgba(156, 235, 215, 0.96), transparent 44%),
    radial-gradient(circle at 94% 8%, rgba(164, 157, 255, 0.9), transparent 42%),
    linear-gradient(125deg, #aeeedc, #b9e3ff 52%, #c5c0ff);
  box-shadow: 0 28px 62px rgba(17, 18, 23, 0.14);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 57%;
  bottom: 18px;
  width: clamp(120px, 14vw, 178px);
  aspect-ratio: 1402 / 1122;
  background: url("../assets/brand/dobby-flying.png") center / contain no-repeat;
  filter: drop-shadow(0 14px 24px rgba(23, 27, 75, 0.14));
  transform: translateX(-50%) rotate(-4deg);
  pointer-events: none;
}

.dashboard-hero > * {
  position: relative;
  z-index: 1;
}

.dashboard-panel,
.dashboard-disclaimer {
  border-color: var(--line-strong);
  background: rgba(237, 239, 240, 0.88);
  box-shadow: none;
}

.draft-meter,
.criterion-row {
  border-color: rgba(17, 18, 23, 0.11);
  background: rgba(255, 255, 255, 0.66);
}

.status-track {
  height: 38px;
  border-color: var(--ink);
  background: #eef0f1;
}

.status-track .complete {
  background: #63e8ad;
}

.status-track .partial {
  background: var(--sky);
}

.status-track .missing {
  background: var(--coral);
}

.action-item {
  border: 1px solid rgba(17, 18, 23, 0.08);
  background: var(--peri);
}

.action-item:nth-child(2) {
  background: var(--coral);
}

.action-item:nth-child(3) {
  background: var(--mint);
}

.case-tab.active {
  border-color: var(--ink);
  background: var(--ink);
}

@media (max-width: 760px) {
  .dashboard-hero::after {
    display: none;
  }
}
