/* TC-017G — operational dashboard information architecture. */

.dashboard-workspace {
  display: grid;
  gap: 20px;
  min-width: 0;
  padding-bottom: 32px;
}

.dashboard-command {
  min-width: 0;
  padding: 20px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.dashboard-command-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dashboard-eyebrow {
  margin-bottom: 4px;
  color: var(--color-primary);
  font-size: 11px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-command h2 {
  margin: 0;
  color: var(--color-text);
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
}

.dashboard-command-copy > p {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 20px;
}

.dashboard-command-stats {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px 18px;
  flex-wrap: wrap;
  color: var(--color-text-muted);
  font-size: 12px;
  line-height: 18px;
}

.dashboard-command-stats span {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.dashboard-command-stats span + span::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 7px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-border-strong);
}

.dashboard-command-stats strong {
  color: var(--color-text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.dashboard-source-card {
  width: min(390px, 38%);
  min-width: 300px;
  padding: 14px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 12px;
  align-items: center;
  border: 1px solid #b2ddff;
  border-radius: var(--radius-md);
  background: #f5faff;
}

.dashboard-source-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #eaf4ff;
  color: #175cd3;
}

.dashboard-source-icon svg,
.dashboard-source-card .icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-source-card > div {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.dashboard-source-card span:not(.dashboard-source-icon) {
  color: #175cd3;
  font-size: 11px;
  line-height: 16px;
  font-weight: 650;
}

.dashboard-source-card strong,
.dashboard-source-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-source-card strong {
  color: var(--color-text);
  font-size: 13px;
  line-height: 19px;
  font-weight: 650;
}

.dashboard-source-card small {
  color: var(--color-text-muted);
  font-size: 11px;
  line-height: 16px;
}

.dashboard-source-card .icon-btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: #175cd3;
}

.dashboard-source-card .icon-btn:hover {
  border-color: #b2ddff;
  background: #ffffff;
}

.dashboard-metrics {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-metric {
  min-width: 0;
  min-height: 132px;
  padding: 16px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  text-align: left;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition:
    transform var(--motion-normal) var(--motion-ease),
    border-color var(--motion-normal) var(--motion-ease),
    box-shadow var(--motion-normal) var(--motion-ease),
    background-color var(--motion-normal) var(--motion-ease);
}

.dashboard-metric:hover {
  transform: translateY(-1px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}

.dashboard-metric.critical:hover {
  border-color: #fda29b;
  background: #fffbfa;
}

.dashboard-metric.warning:hover {
  border-color: #fec84b;
  background: #fffdf5;
}

.dashboard-metric-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--color-neutral-bg);
  color: var(--color-text-secondary);
}

.dashboard-metric.critical .dashboard-metric-icon {
  background: #fef3f2;
  color: #b42318;
}

.dashboard-metric.warning .dashboard-metric-icon {
  background: #fffaeb;
  color: #b54708;
}

.dashboard-metric-icon svg,
.dashboard-metric-arrow svg,
.dashboard-row-arrow svg,
.dashboard-section-action svg,
.dashboard-quality-icon svg,
.dashboard-contract-status svg,
.dashboard-activity-icon svg,
.dashboard-quality-footnote svg,
.dashboard-empty > span svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-metric-copy {
  min-width: 0;
  display: grid;
  align-content: start;
}

.dashboard-metric-label {
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
}

.dashboard-metric-value {
  margin-top: 4px;
  color: var(--color-text);
  font-size: 30px;
  line-height: 34px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dashboard-metric-note {
  margin-top: 5px;
  color: var(--color-text-muted);
  font-size: 11px;
  line-height: 16px;
}

.dashboard-metric-arrow,
.dashboard-row-arrow {
  display: grid;
  place-items: center;
  color: var(--color-text-muted);
  align-self: center;
}

.dashboard-metric-arrow svg,
.dashboard-row-arrow svg {
  width: 17px;
  height: 17px;
}

.dashboard-primary-grid,
.dashboard-secondary-grid {
  min-width: 0;
  display: grid;
  gap: 16px;
  align-items: start;
}

.dashboard-primary-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(420px, 0.82fr);
}

.dashboard-secondary-grid {
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.72fr);
}

.dashboard-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.dashboard-section-head {
  min-height: 70px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.dashboard-section-head > div {
  min-width: 0;
}

.dashboard-section-head h3 {
  margin: 0;
  color: var(--color-text);
  font-size: 16px;
  line-height: 23px;
  font-weight: 650;
}

.dashboard-section-head p {
  margin: 2px 0 0;
  color: var(--color-text-muted);
  font-size: 11px;
  line-height: 16px;
}

.dashboard-section-action {
  min-height: 36px;
  padding: 0 8px 0 11px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-color: transparent;
  color: var(--color-primary);
  box-shadow: none;
  font-size: 12px;
  font-weight: 650;
}

.dashboard-section-action:hover {
  border-color: #b2ddff;
  background: #eff8ff;
}

.dashboard-section-action svg {
  width: 16px;
  height: 16px;
}

.dashboard-priority-list,
.dashboard-focus-list,
.dashboard-contract-list,
.dashboard-quality-list,
.dashboard-activity-list {
  min-width: 0;
}

.dashboard-priority-row,
.dashboard-focus-row,
.dashboard-contract-row,
.dashboard-quality-row,
.dashboard-activity-row {
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--motion-fast) var(--motion-ease);
}

.dashboard-priority-row:last-child,
.dashboard-focus-row:last-child,
.dashboard-contract-row:last-child,
.dashboard-quality-row:last-child,
.dashboard-activity-row:last-child {
  border-bottom: 0;
}

.dashboard-priority-row:hover,
.dashboard-focus-row:hover,
.dashboard-contract-row:hover,
.dashboard-quality-row:hover,
.dashboard-activity-row:hover {
  background: #f8fbff;
}

.dashboard-priority-row {
  min-height: 74px;
  padding: 10px 12px 10px 0;
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) minmax(150px, 0.42fr) 24px;
  gap: 12px;
  align-items: center;
}

.dashboard-priority-marker {
  width: 4px;
  height: 38px;
  align-self: center;
  border-radius: 0 4px 4px 0;
  background: var(--color-border-strong);
}

.dashboard-priority-marker.critical {
  background: #d92d20;
}

.dashboard-priority-marker.warning {
  background: #f79009;
}

.dashboard-priority-marker.info {
  background: #2e90fa;
}

.dashboard-priority-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-priority-topline {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dashboard-entity-label {
  color: var(--color-text-muted);
  font-size: 10px;
  line-height: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-severity {
  min-height: 20px;
  padding: 2px 6px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-neutral-bg);
  color: var(--color-text-secondary);
  font-size: 10px;
  line-height: 14px;
  font-weight: 650;
  white-space: nowrap;
}

.dashboard-severity.critical {
  border-color: #fecdca;
  background: #fef3f2;
  color: #b42318;
}

.dashboard-severity.warning {
  border-color: #fedf89;
  background: #fffaeb;
  color: #b54708;
}

.dashboard-severity.info {
  border-color: #b2ddff;
  background: #eff8ff;
  color: #175cd3;
}

.dashboard-priority-main > strong,
.dashboard-priority-meta,
.dashboard-priority-reason {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-priority-main > strong {
  color: var(--color-text);
  font-size: 13px;
  line-height: 18px;
  font-weight: 650;
}

.dashboard-priority-meta {
  color: var(--color-text-muted);
  font-size: 11px;
  line-height: 16px;
}

.dashboard-priority-reason {
  color: var(--color-text-secondary);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
}

.dashboard-focus-row {
  min-height: 68px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr) minmax(120px, 0.55fr) 20px;
  gap: 10px;
  align-items: center;
}

.dashboard-focus-date,
.dashboard-focus-main,
.dashboard-focus-owner {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-focus-date {
  padding: 7px 8px;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: var(--color-surface-muted);
}

.dashboard-focus-date.critical {
  border-color: #fecdca;
  background: #fef3f2;
}

.dashboard-focus-date.warning {
  border-color: #fedf89;
  background: #fffaeb;
}

.dashboard-focus-date.info {
  border-color: #b2ddff;
  background: #eff8ff;
}

.dashboard-focus-date strong,
.dashboard-focus-main strong,
.dashboard-focus-owner strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text);
  font-size: 11px;
  line-height: 16px;
  font-weight: 650;
}

.dashboard-focus-date span,
.dashboard-focus-main span,
.dashboard-focus-owner span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-muted);
  font-size: 10px;
  line-height: 15px;
}

.dashboard-contract-row {
  min-height: 64px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 78px minmax(130px, 0.65fr) 20px;
  gap: 10px;
  align-items: center;
}

.dashboard-contract-status {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--color-neutral-bg);
  color: var(--color-text-muted);
}

.dashboard-contract-status.critical {
  background: #fef3f2;
  color: #b42318;
}

.dashboard-contract-status.warning {
  background: #fffaeb;
  color: #b54708;
}

.dashboard-contract-status svg {
  width: 17px;
  height: 17px;
}

.dashboard-contract-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-contract-main strong,
.dashboard-contract-main span,
.dashboard-contract-service,
.dashboard-contract-reason {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-contract-main strong {
  color: var(--color-text);
  font-size: 12px;
  line-height: 17px;
  font-weight: 650;
}

.dashboard-contract-main span,
.dashboard-contract-service,
.dashboard-contract-reason {
  color: var(--color-text-muted);
  font-size: 10px;
  line-height: 15px;
}

.dashboard-contract-service {
  padding: 3px 6px;
  border-radius: 7px;
  background: #eff8ff;
  color: #175cd3;
  font-weight: 650;
  text-align: center;
}

.dashboard-contract-reason {
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.dashboard-quality-row {
  min-height: 66px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 42px 20px;
  gap: 10px;
  align-items: center;
}

.dashboard-quality-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fef3f2;
  color: #b42318;
}

.dashboard-quality-row.good .dashboard-quality-icon {
  background: #ecfdf3;
  color: #067647;
}

.dashboard-quality-icon svg {
  width: 17px;
  height: 17px;
}

.dashboard-quality-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-quality-copy strong,
.dashboard-quality-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-quality-copy strong {
  color: var(--color-text);
  font-size: 12px;
  line-height: 17px;
  font-weight: 650;
}

.dashboard-quality-copy span {
  color: var(--color-text-muted);
  font-size: 10px;
  line-height: 15px;
}

.dashboard-quality-count {
  min-width: 36px;
  height: 28px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #fedf89;
  border-radius: 9px;
  background: #fffaeb;
  color: #b54708;
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dashboard-quality-row.good .dashboard-quality-count {
  border-color: #abefc6;
  background: #ecfdf3;
  color: #067647;
}

.dashboard-quality-footnote {
  margin: 10px 12px 12px;
  padding: 9px 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid #b2ddff;
  border-radius: 10px;
  background: #eff8ff;
  color: #175cd3;
  font-size: 10px;
  line-height: 15px;
}

.dashboard-quality-footnote svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.dashboard-activity-row {
  min-height: 62px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(190px, 0.5fr) 20px;
  gap: 10px;
  align-items: center;
}

.dashboard-activity-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--color-neutral-bg);
  color: var(--color-text-muted);
}

.dashboard-activity-icon svg {
  width: 17px;
  height: 17px;
}

.dashboard-activity-main,
.dashboard-activity-actor {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-activity-main strong,
.dashboard-activity-main span,
.dashboard-activity-actor strong,
.dashboard-activity-actor span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-activity-main strong,
.dashboard-activity-actor strong {
  color: var(--color-text);
  font-size: 11px;
  line-height: 16px;
  font-weight: 650;
}

.dashboard-activity-main span,
.dashboard-activity-actor span {
  color: var(--color-text-muted);
  font-size: 10px;
  line-height: 15px;
}

.dashboard-activity-actor {
  text-align: right;
}

.dashboard-empty {
  min-height: 220px;
  padding: 28px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  text-align: center;
  color: var(--color-text-muted);
}

.dashboard-empty > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #ecfdf3;
  color: #067647;
}

.dashboard-empty > span svg {
  width: 22px;
  height: 22px;
}

.dashboard-empty strong {
  color: var(--color-text);
  font-size: 14px;
  line-height: 20px;
}

.dashboard-empty p {
  max-width: 380px;
  margin: 0;
  font-size: 12px;
  line-height: 18px;
}

@media (max-width: 1500px) {
  .dashboard-primary-grid,
  .dashboard-secondary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-focus-row {
    grid-template-columns: 124px minmax(0, 1fr) minmax(180px, 0.45fr) 20px;
  }
}

@media (max-width: 1280px) {
  .dashboard-command {
    flex-direction: column;
  }

  .dashboard-source-card {
    width: 100%;
    min-width: 0;
  }

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

@media (max-width: 900px) {
  .dashboard-workspace {
    gap: 14px;
  }

  .dashboard-command {
    padding: 16px;
    gap: 16px;
  }

  .dashboard-command h2 {
    font-size: 21px;
    line-height: 28px;
  }

  .dashboard-priority-row {
    grid-template-columns: 4px minmax(0, 1fr) 20px;
  }

  .dashboard-priority-reason {
    grid-column: 2 / -1;
    padding-right: 24px;
  }

  .dashboard-focus-row {
    grid-template-columns: 118px minmax(0, 1fr) 20px;
  }

  .dashboard-focus-owner {
    display: none;
  }

  .dashboard-contract-row {
    grid-template-columns: 34px minmax(0, 1fr) 68px 20px;
  }

  .dashboard-contract-reason {
    grid-column: 2 / -1;
    padding-right: 20px;
  }

  .dashboard-activity-row {
    grid-template-columns: 34px minmax(0, 1fr) 20px;
  }

  .dashboard-activity-actor {
    grid-column: 2 / -1;
    text-align: left;
    padding-right: 20px;
  }
}

@media (max-width: 620px) {
  .dashboard-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-metric {
    min-height: 112px;
  }

  .dashboard-command-stats {
    display: grid;
    gap: 5px;
  }

  .dashboard-command-stats span + span::before {
    display: none;
  }

  .dashboard-source-card {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    padding: 12px;
  }

  .dashboard-source-icon,
  .dashboard-source-card .icon-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
  }

  .dashboard-section-head {
    align-items: flex-start;
    padding: 13px 12px;
  }

  .dashboard-section-action {
    width: 36px;
    min-width: 36px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    position: relative;
  }

  .dashboard-section-action svg {
    position: absolute;
    inset: 10px;
    color: var(--color-primary);
  }

  .dashboard-priority-row {
    min-height: 82px;
    gap: 9px;
  }

  .dashboard-priority-topline {
    flex-wrap: wrap;
  }

  .dashboard-focus-row {
    grid-template-columns: 102px minmax(0, 1fr) 18px;
    padding-inline: 10px;
  }

  .dashboard-focus-date {
    padding: 6px;
  }

  .dashboard-contract-row {
    grid-template-columns: 32px minmax(0, 1fr) 18px;
    padding-inline: 10px;
  }

  .dashboard-contract-service {
    display: none;
  }

  .dashboard-quality-row {
    grid-template-columns: 32px minmax(0, 1fr) 36px 18px;
    padding-inline: 10px;
  }

  .dashboard-quality-icon,
  .dashboard-contract-status,
  .dashboard-activity-icon {
    width: 32px;
    height: 32px;
  }

  .dashboard-activity-row {
    grid-template-columns: 32px minmax(0, 1fr) 18px;
    padding-inline: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-metric,
  .dashboard-priority-row,
  .dashboard-focus-row,
  .dashboard-contract-row,
  .dashboard-quality-row,
  .dashboard-activity-row {
    transition: none !important;
  }

  .dashboard-metric:hover {
    transform: none;
  }
}
