/*
 * CODSHIPX_R12_R121_DASHBOARD_FINAL_V1_R1
 * Isolated seller account-summary presentation.
 */

#cx-dashboard-r121-root {
  width: 100%;
  margin: 0 0 20px;
  box-sizing: border-box;
  color: var(--text-primary);
}

#cx-dashboard-r121-root *,
#cx-dashboard-r121-root *::before,
#cx-dashboard-r121-root *::after {
  box-sizing: border-box;
}

.cxdash-shell {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: var(--color-card);
  box-shadow: var(--shadow-card);
}

.cxdash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--color-border);
  background:
    linear-gradient(
      135deg,
      rgba(124,58,237,.08),
      rgba(79,70,229,.03)
    );
}

.cxdash-eyebrow {
  margin: 0 0 5px;
  color: #7c3aed;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.cxdash-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.cxdash-subtitle {
  margin: 6px 0 0;
  max-width: 720px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.cxdash-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.cxdash-button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 11px;
  background: var(--color-card);
  color: var(--text-primary);
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.cxdash-button-primary {
  border-color: transparent;
  background:
    linear-gradient(
      135deg,
      #7c3aed,
      #4f46e5
    );
  color: #fff;
}

.cxdash-body {
  padding: 18px 20px 20px;
}

.cxdash-loading,
.cxdash-error,
.cxdash-legacy {
  padding: 17px;
  border: 1px solid var(--color-border);
  border-radius: 15px;
  background: var(--color-card);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.cxdash-error {
  border-color: rgba(244,63,94,.30);
  background: rgba(244,63,94,.05);
}

.cxdash-grid-primary {
  display: grid;
  grid-template-columns:
    minmax(0,1.15fr)
    minmax(0,.85fr)
    minmax(0,.85fr);
  gap: 12px;
}

.cxdash-card,
.cxdash-metric {
  min-width: 0;
  border: 1px solid var(--color-border);
  background: var(--color-card);
}

.cxdash-card {
  padding: 15px;
  border-radius: 16px;
}

.cxdash-metric {
  padding: 13px;
  border-radius: 14px;
}

.cxdash-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cxdash-value-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.cxdash-value {
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 850;
  line-height: 1.15;
}

.cxdash-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(124,58,237,.12);
  color: #8b5cf6;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

.cxdash-pill-success {
  background: rgba(16,185,129,.12);
  color: #10b981;
}

.cxdash-pill-warn {
  background: rgba(245,158,11,.13);
  color: #f59e0b;
}

.cxdash-pill-danger {
  background: rgba(244,63,94,.12);
  color: #f43f5e;
}

.cxdash-copy {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

.cxdash-progress {
  width: 100%;
  height: 7px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(127,127,127,.16);
}

.cxdash-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(
      90deg,
      #7c3aed,
      #4f46e5
    );
}

.cxdash-metrics {
  display: grid;
  grid-template-columns:
    repeat(4,minmax(0,1fr));
  gap: 12px;
  margin-top: 12px;
}

.cxdash-metric-value {
  margin-top: 7px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.cxdash-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(124,58,237,.20);
  border-radius: 13px;
  background: rgba(124,58,237,.06);
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.5;
}

.cxdash-note-icon {
  flex: 0 0 auto;
  color: #8b5cf6;
  font-weight: 900;
}

@media (max-width:1100px) {
  .cxdash-grid-primary {
    grid-template-columns:
      repeat(2,minmax(0,1fr));
  }

  .cxdash-grid-primary
  .cxdash-card:first-child {
    grid-column: 1 / -1;
  }

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

@media (max-width:700px) {
  #cx-dashboard-r121-root {
    margin-bottom: 14px;
  }

  .cxdash-head {
    flex-direction: column;
    padding: 16px 14px 13px;
  }

  .cxdash-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .cxdash-body {
    padding: 14px;
  }

  .cxdash-grid-primary,
  .cxdash-metrics {
    grid-template-columns: 1fr;
  }

  .cxdash-grid-primary
  .cxdash-card:first-child {
    grid-column: auto;
  }

  .cxdash-button {
    flex: 1 1 auto;
    text-align: center;
  }
}
