/**
 * END-DP2 — Home dashboard
 * Design system pass: typography hierarchy, calm spacing, login-aligned palette
 */

.ed-dashboard-root {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.ed-dashboard-root .card-body {
  padding: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

.ed-dashboard {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-4);
  min-width: 0;
}

.ed-dash-toolbar {
  display: flex;
  align-items: center;
  gap: var(--ed-space-2);
  flex-wrap: wrap;
}

.ed-dash-toolbar .ed-search {
  flex: 1;
  min-width: 220px;
}

.ed-dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 0.75fr);
  grid-template-rows: auto auto;
  gap: var(--ed-space-4);
  align-items: start;
}

.ed-dash-card {
  background: var(--ed-white);
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius);
  box-shadow: var(--ed-shadow-sm);
  padding: var(--ed-space-4) var(--ed-space-4) var(--ed-space-3);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ed-dash-continue { grid-column: 1 / 3; grid-row: 1; }
.ed-dash-attention { grid-column: 3; grid-row: 1; }
.ed-dash-recent { grid-column: 1; grid-row: 2; }
.ed-dash-contracts { grid-column: 2; grid-row: 2; }
.ed-dash-activity { grid-column: 3; grid-row: 2; }

.ed-dash-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--ed-space-2);
  margin-bottom: var(--ed-space-3);
  padding-bottom: var(--ed-space-2);
  border-bottom: 1px solid var(--ed-border-light);
  min-height: 28px;
}

.ed-dash-card-title {
  margin: 0;
  font-family: var(--ed-font);
  font-size: var(--ed-text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-navy);
}

.ed-dash-card-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: var(--ed-text-xs);
  font-weight: 500;
  color: var(--ed-amber);
  cursor: pointer;
  white-space: nowrap;
}

.ed-dash-card-link:hover { text-decoration: underline; }

.ed-dash-card-body {
  flex: 0 1 auto;
  min-height: 0;
}

.ed-dash-empty {
  padding: var(--ed-space-2) 0;
  font-size: var(--ed-text-sm);
  font-weight: 400;
  color: var(--ed-text-muted);
  line-height: 1.45;
}

.ed-dash-empty-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ed-space-2);
  padding: 2px 0;
}

.ed-dash-empty-compact-text {
  font-size: var(--ed-text-sm);
  font-weight: 400;
  color: var(--ed-text-muted);
}

.ed-dash-empty-compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ed-dash-footnote {
  margin: var(--ed-space-2) 0 0;
  font-size: var(--ed-text-xs);
  font-weight: 400;
  color: var(--ed-text-subtle);
}

/* Continue working */
.ed-dash-work-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ed-dash-work-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: var(--ed-space-3);
  width: 100%;
  padding: 10px var(--ed-space-3);
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius-sm);
  background: var(--ed-surface);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ed-dash-work-row:hover {
  border-color: var(--ed-border);
  background: var(--ed-white);
}

.ed-dash-work-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--ed-ivory-deep);
  color: var(--ed-navy-soft);
}

.ed-dash-work-icon.icon-quote { background: var(--ed-amber-soft); color: var(--ed-amber); }
.ed-dash-work-icon.icon-file { background: var(--ed-ivory); color: var(--ed-navy-soft); }

.ed-dash-work-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.75;
}

.ed-dash-work-title {
  display: block;
  font-size: var(--ed-text-base);
  font-weight: 500;
  color: var(--ed-navy);
  line-height: 1.3;
}

.ed-dash-work-sub {
  display: block;
  font-size: var(--ed-text-xs);
  font-weight: 400;
  color: var(--ed-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ed-dash-work-properties {
  display: block;
  font-size: var(--ed-text-xs);
  font-weight: 400;
  color: var(--ed-text-muted);
  line-height: 1.35;
}

.ed-dash-work-meta {
  font-size: var(--ed-text-xs);
  font-weight: 400;
  color: var(--ed-text-muted);
  white-space: nowrap;
}

.ed-dash-work-meta.highlight {
  color: var(--ed-amber);
  font-weight: 500;
}

.ed-dash-work-arrow {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  pointer-events: none;
  font-size: var(--ed-text-sm);
  color: var(--ed-text-subtle);
}

/* Needs attention */
.ed-dash-attn-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ed-dash-attn-row {
  display: flex;
  align-items: center;
  gap: var(--ed-space-3);
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
}

.ed-dash-attn-row:not([data-action]) { cursor: default; }

.ed-dash-attn-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--ed-text-xs);
  font-weight: 600;
  flex-shrink: 0;
}

.ed-dash-attn-badge.tone-warn { background: var(--ed-amber-soft); color: var(--ed-amber); }
.ed-dash-attn-badge.tone-muted { background: var(--ed-ivory-deep); color: var(--ed-text-muted); }
.ed-dash-attn-badge.tone-info { background: var(--ed-ivory-deep); color: var(--ed-navy-soft); }

.ed-dash-attn-text {
  font-size: var(--ed-text-sm);
  font-weight: 400;
  color: var(--ed-navy);
  line-height: 1.4;
}

/* Recent properties */
.ed-dash-prop-list {
  display: flex;
  flex-direction: column;
}

.ed-dash-prop-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--ed-space-3);
  width: 100%;
  padding: 8px 0;
  border: none;
  border-bottom: 1px solid var(--ed-border-light);
  background: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
}

.ed-dash-prop-row:last-child { border-bottom: none; }

.ed-dash-prop-name {
  display: block;
  font-size: var(--ed-text-base);
  font-weight: 500;
  color: var(--ed-navy);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ed-dash-prop-loc {
  display: block;
  font-size: var(--ed-text-xs);
  font-weight: 400;
  color: var(--ed-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ed-dash-prop-badge {
  font-size: var(--ed-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--ed-radius-pill);
  flex-shrink: 0;
}

.ed-dash-prop-badge.draft {
  background: var(--ed-ivory-deep);
  color: var(--ed-text-muted);
}

.ed-dash-prop-badge.year {
  background: var(--ed-amber-soft);
  color: var(--ed-amber-muted);
  border: 1px solid var(--ed-amber-border);
}

/* Contracts overview */
.ed-dash-contracts .ed-dash-card-body {
  padding-top: var(--ed-space-1);
}

.ed-dash-contracts-inner {
  display: flex;
  align-items: center;
  gap: var(--ed-space-3);
  flex-wrap: nowrap;
}

.ed-dash-donut-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.ed-dash-donut {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.ed-dash-donut-center {
  position: absolute;
  inset: 17px;
  background: var(--ed-white);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2px;
  padding: 0 6px;
}

.ed-dash-donut-total {
  font-size: 1.375rem;
  font-weight: 600;
  font-family: var(--ed-font);
  color: var(--ed-navy);
  line-height: 1;
}

.ed-dash-donut-label {
  font-size: var(--ed-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ed-text-muted);
  line-height: 1.2;
  max-width: 58px;
}

.ed-dash-legend {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.ed-dash-legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--ed-text-xs);
  font-weight: 400;
  color: var(--ed-text-muted);
  line-height: 1.3;
}

.ed-dash-legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ed-dash-legend-row strong {
  margin-left: auto;
  color: var(--ed-navy);
  font-weight: 600;
  font-size: var(--ed-text-xs);
}

.ed-dash-new-contract {
  margin-top: var(--ed-space-2);
  width: 100%;
}

.ed-dash-new-contract.btn {
  padding: 7px var(--ed-space-3);
  font-size: var(--ed-text-xs);
}

/* Recent activity */
.ed-dash-feed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ed-dash-feed-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: start;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
}

.ed-dash-feed-row:not([data-action]) { cursor: default; }

.ed-dash-feed-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.ed-dash-feed-icon svg {
  width: 12px;
  height: 12px;
  stroke-width: 1.75;
}

.ed-dash-feed-icon.kind-contract {
  background: var(--ed-ivory-deep);
  color: var(--ed-navy-soft);
}

.ed-dash-feed-icon.kind-file {
  background: var(--ed-ivory);
  color: var(--ed-navy-soft);
}

.ed-dash-feed-icon.kind-quote {
  background: var(--ed-amber-soft);
  color: var(--ed-amber);
}

.ed-dash-feed-text {
  min-width: 0;
  font-size: var(--ed-text-sm);
  font-weight: 400;
  color: var(--ed-navy);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ed-dash-feed-time {
  font-size: var(--ed-text-xs);
  font-weight: 400;
  color: var(--ed-text-subtle);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 1px;
}

.ed-dash-search-results {
  background: var(--ed-white);
  border: 1px solid var(--ed-border-light);
  border-radius: var(--ed-radius-lg);
  box-shadow: var(--ed-shadow-sm);
  padding: var(--ed-space-4);
}

.ed-dash-search-results .group-heading {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .ed-dash-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ed-dash-continue { grid-column: 1 / -1; grid-row: auto; }
  .ed-dash-attention { grid-column: 1 / -1; grid-row: auto; }
  .ed-dash-recent { grid-column: 1; }
  .ed-dash-contracts { grid-column: 2; }
  .ed-dash-activity { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .ed-dash-grid { grid-template-columns: 1fr; }
  .ed-dash-continue,
  .ed-dash-attention,
  .ed-dash-recent,
  .ed-dash-contracts,
  .ed-dash-activity { grid-column: 1; }

  .ed-dash-work-row {
    grid-template-columns: auto 1fr auto;
  }
  .ed-dash-work-meta { display: none; }
}
