.dashboard-page {
  background:
    radial-gradient(circle at 14% 0%, rgba(106, 67, 137, .22), transparent 30rem),
    radial-gradient(circle at 88% 10%, rgba(212, 175, 55, .08), transparent 24rem),
    linear-gradient(180deg, #16111b 0, var(--bg) 32rem);
}

.dashboard-brand {
  color: var(--text);
}

.dashboard-brand:hover {
  text-decoration: none;
}

.dashboard-brand > span {
  display: grid;
  line-height: 1.2;
}

.dashboard-brand b {
  font-size: 1.05rem;
}

.dashboard-brand small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.dashboard-main {
  max-width: 1280px;
  gap: 1.15rem;
}

.dashboard-message {
  position: sticky;
  top: 5.5rem;
  z-index: 8;
  min-height: auto;
  box-shadow: var(--shadow);
}

.dashboard-message.good {
  border-color: rgba(143, 240, 194, .45);
  color: var(--good);
}

.dashboard-message.bad {
  border-color: rgba(255, 143, 143, .48);
  color: var(--bad);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  min-height: 16rem;
  overflow: hidden;
  position: relative;
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  right: -7rem;
  bottom: -8rem;
  width: 22rem;
  height: 22rem;
  border: 1px solid rgba(212, 175, 55, .14);
  border-radius: 50%;
  box-shadow: 0 0 0 2.5rem rgba(167, 123, 232, .035), 0 0 0 5rem rgba(212, 175, 55, .025);
  pointer-events: none;
}

.dashboard-hero-copy,
.dashboard-hero-meta {
  position: relative;
  z-index: 1;
}

.dashboard-hero h1 {
  max-width: 17ch;
  margin: .15rem 0 .5rem;
}

.eyebrow {
  margin: 0 0 .2rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .16em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.15rem;
}

.primary-action {
  border-color: rgba(212, 175, 55, .7);
  background: linear-gradient(135deg, #5a4420, #38273d);
  color: #fff7e7;
}

.secondary-action {
  background: rgba(14, 11, 18, .54);
}

.dashboard-hero-meta {
  display: grid;
  justify-items: end;
  gap: 1rem;
  min-width: min(25rem, 100%);
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(6.5rem, 1fr));
  width: 100%;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 8, 13, .46);
  overflow: hidden;
}

.dashboard-metrics > div {
  padding: .8rem;
  text-align: center;
}

.dashboard-metrics > div + div {
  border-left: 1px solid var(--line);
}

.dashboard-metrics dt {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dashboard-metrics dd {
  margin: .15rem 0 0;
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.dashboard-priority-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(17rem, .7fr);
  gap: 1rem;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.panel-heading h2 {
  margin: 0;
}

.continue-character {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 7.5rem;
  margin-top: .85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(212, 175, 55, .07), rgba(167, 123, 232, .05));
}

.continue-character h3 {
  margin: 0 0 .25rem;
  font-size: 1.35rem;
}

.continue-character p {
  margin: .3rem 0;
}

.quick-link-list {
  display: grid;
  gap: .4rem;
  margin-top: .7rem;
}

.quick-link-list a {
  display: grid;
  gap: .1rem;
  padding: .65rem .7rem;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text);
}

.quick-link-list a:hover {
  border-color: var(--line2);
  background: rgba(255, 255, 255, .025);
  text-decoration: none;
}

.quick-link-list span {
  font-weight: 800;
}

.quick-link-list small {
  color: var(--muted);
}

.dashboard-section {
  padding: 1.1rem;
}

.dashboard-section-heading {
  align-items: center;
  margin-bottom: .85rem;
}

.section-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
}

.search-field {
  margin: 0;
}

.search-field input {
  min-width: min(18rem, 60vw);
}

.dashboard-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: .75rem;
}

.dashboard-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow: none;
}

.dashboard-card.archived {
  opacity: .78;
}

.dashboard-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.dashboard-card-header h3 {
  display: block;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.dashboard-card p {
  margin: .55rem 0 0;
}

.dashboard-card .actions {
  margin-top: auto;
  padding-top: .8rem;
}

.dashboard-card .actions > * {
  flex: 1 1 8rem;
}

.status-pills {
  min-height: 1.8rem;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: .25rem;
  padding: .25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, .2);
}

.segmented-control button {
  width: auto;
  min-height: 2.35rem;
  padding: .45rem .8rem;
  border-color: transparent;
}

.segmented-control button[aria-pressed="true"] {
  border-color: var(--line2);
  background: #382b43;
  color: var(--text);
}

.card-menu {
  margin-top: .7rem;
  border-top: 1px solid var(--line);
  padding-top: .65rem;
}

.card-menu summary {
  color: var(--muted);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 800;
}

.card-menu .actions {
  margin-top: .55rem;
  padding-top: 0;
}

.setup-section {
  scroll-margin-top: 6rem;
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-top: .85rem;
}

.setup-card {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(14, 11, 18, .42);
  overflow: hidden;
}

.setup-card summary {
  padding: .85rem;
  cursor: pointer;
  font-weight: 900;
}

.setup-card[open] summary {
  border-bottom: 1px solid var(--line);
  color: var(--accent);
}

.setup-card-body {
  padding: .2rem .85rem .85rem;
}

.setup-card-body button {
  margin-top: .75rem;
}

.empty-dashboard-state {
  grid-column: 1 / -1;
  padding: 1.25rem;
  border: 1px dashed var(--line2);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

.empty-dashboard-state p {
  margin: 0 0 .7rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 920px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .dashboard-hero-meta {
    justify-items: start;
  }

  .dashboard-priority-grid,
  .setup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dashboard-main {
    padding: .75rem;
    gap: .75rem;
  }

  .dashboard-hero,
  .dashboard-section,
  .continue-panel,
  .quick-panel {
    padding: 1rem;
    border-radius: 14px;
  }

  .dashboard-hero {
    min-height: auto;
  }

  .dashboard-hero h1 {
    font-size: clamp(1.8rem, 10vw, 2.4rem);
  }

  .dashboard-hero-meta {
    min-width: 0;
  }

  .dashboard-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-metrics > div {
    padding: .65rem .35rem;
  }

  .dashboard-metrics dt {
    font-size: .62rem;
  }

  .dashboard-metrics dd {
    font-size: 1.2rem;
  }

  .hero-actions,
  .section-tools,
  .continue-character,
  .dashboard-section-heading {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-actions > *,
  .section-tools > *,
  .continue-character .actions > * {
    width: 100%;
  }

  .search-field input {
    min-width: 0;
    width: 100%;
  }

  .segmented-control {
    width: 100%;
  }

  .dashboard-card-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-card .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-card .actions > * {
    width: 100%;
  }

  .dashboard-message {
    top: 4.6rem;
  }
}

/* B.2.M.20 Character portraits */
.dashboard-character-identity{display:flex;align-items:center;gap:.75rem;min-width:0}.dashboard-character-portrait{width:52px;height:52px;flex:0 0 52px;border-radius:14px;object-fit:cover;border:1px solid var(--line)}
