.smartcid-document-check {
  margin: 0 0 16px 0;
  padding: 13px;
  border: 1px solid #d7dee7;
  border-radius: 12px;
  background: #f8fafc;
  box-sizing: border-box;
  transition: padding .18s ease, margin .18s ease;
}

.smartcid-document-check .scdc-quality-header {
  display: block;
}

.smartcid-document-check .scdc-quality-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.smartcid-document-check .scdc-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: #003366;
}

.smartcid-document-check .scdc-quality-score {
  flex: 0 0 auto;
  font-size: 17px;
  color: #003366;
}

.smartcid-document-check .scdc-quality-track {
  height: 9px;
  margin: 9px 0 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe6ed;
}

.smartcid-document-check .scdc-quality-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #b42318;
  transition: width .35s ease, background-color .25s ease;
}

.smartcid-document-check .scdc-quality-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
  font-size: 11.5px;
  font-weight: 650;
  color: #4b5563;
}

.smartcid-document-check .scdc-quality-potential {
  text-align: right;
  color: #003366;
}

.smartcid-document-check .scdc-summary {
  margin: 0 0 8px 0;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.smartcid-document-check .scdc-summary-ok {
  background: #eaf7ee;
  border: 1px solid #abd8b7;
  color: #176b35;
}

.smartcid-document-check .scdc-summary-warning {
  background: #fff8e6;
  border: 1px solid #ecd18a;
  color: #7a5600;
}

.smartcid-document-check .scdc-summary-error {
  background: #fff0f0;
  border: 1px solid #e3aaaa;
  color: #9b1c1c;
}

.smartcid-document-check .scdc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.smartcid-document-check .scdc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 0;
  border-bottom: 1px solid #e5e7eb;
}

.smartcid-document-check .scdc-item:last-child {
  border-bottom: 0;
}

.smartcid-document-check .scdc-icon {
  flex: 0 0 20px;
  width: 20px;
  min-width: 20px;
  text-align: center;
  font-weight: 700;
  line-height: 1.2;
}

.smartcid-document-check .scdc-status-ok .scdc-icon { color: #15803d; }
.smartcid-document-check .scdc-status-warning .scdc-icon { color: #b7791f; }
.smartcid-document-check .scdc-status-error .scdc-icon { color: #c53030; }
.smartcid-document-check .scdc-status-pending .scdc-icon { color: #64748b; }

.smartcid-document-check .scdc-content {
  flex: 1 1 auto;
  min-width: 0;
}

.smartcid-document-check .scdc-label {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.25;
  color: #1f2937;
}

.smartcid-document-check .scdc-detail {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  line-height: 1.25;
  color: #6b7280;
}

.smartcid-document-check .scdc-status-ok .scdc-detail {
  display: none;
}

.smartcid-document-check .scdc-action {
  flex: 0 0 auto;
  border: 1px solid #7d98b3;
  border-radius: 7px;
  background: #fff;
  color: #003366;
  padding: 5px 7px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.smartcid-document-check .scdc-action:hover {
  background: #edf4fa;
}


/* Il dettaglio dell'Indice di Qualità deve rimanere sempre visibile. */
.smartcid-document-check .scdc-details,
.smartcid-document-check.scdc-compact .scdc-details {
  display: block !important;
}

@media (max-width: 560px) {
  .smartcid-document-check {
    padding: 11px;
  }

  .smartcid-document-check .scdc-title {
    font-size: 14px;
  }

  .smartcid-document-check .scdc-quality-score {
    font-size: 15px;
  }

  .smartcid-document-check .scdc-item {
    gap: 6px;
  }

  .smartcid-document-check .scdc-label {
    font-size: 12px;
  }

  .smartcid-document-check .scdc-detail {
    font-size: 10.5px;
  }

  .smartcid-document-check .scdc-action {
    padding: 5px 6px;
    font-size: 10px;
  }

  .smartcid-document-check .scdc-quality-meta {
    font-size: 10.5px;
  }
}

@media (max-width: 390px) {
  .smartcid-document-check .scdc-quality-heading {
    align-items: flex-start;
  }

  .smartcid-document-check .scdc-title {
    max-width: 74%;
  }

  .smartcid-document-check .scdc-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .smartcid-document-check .scdc-content {
    width: calc(100% - 28px);
  }

  .smartcid-document-check .scdc-action {
    margin-left: 26px;
    max-width: calc(100% - 26px);
  }

  .smartcid-document-check .scdc-summary {
    font-size: 11.5px;
  }

  .smartcid-document-check .scdc-quality-meta {
    display: block;
  }

  .smartcid-document-check .scdc-quality-potential {
    display: block;
    margin-top: 2px;
    text-align: left;
  }
}


/* SmartCID: lista controllo qualità in tre colonne */
.smartcid-document-check .scdc-item {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr) 76px;
  align-items: center !important;
  column-gap: 7px;
  min-height: 34px;
  padding: 6px 0;
}

.smartcid-document-check .scdc-icon {
  width: 20px;
  min-width: 20px;
  text-align: center;
}

.smartcid-document-check .scdc-content {
  min-width: 0;
  width: auto !important;
}

.smartcid-document-check .scdc-label,
.smartcid-document-check .scdc-detail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smartcid-document-check .scdc-label {
  font-size: 12px;
  line-height: 1.2;
}

.smartcid-document-check .scdc-detail {
  font-size: 10px;
  line-height: 1.15;
}

.smartcid-document-check .scdc-action {
  width: 76px;
  min-width: 76px;
  margin: 0 !important;
  padding: 5px 4px;
  font-size: 9.5px;
  line-height: 1.1;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .smartcid-document-check .scdc-item {
    grid-template-columns: 18px minmax(0, 1fr) 68px;
    column-gap: 5px;
    min-height: 31px;
    padding: 5px 0;
  }

  .smartcid-document-check .scdc-icon {
    width: 18px;
    min-width: 18px;
    font-size: 12px;
  }

  .smartcid-document-check .scdc-label {
    font-size: 10.5px;
  }

  .smartcid-document-check .scdc-detail {
    font-size: 9px;
  }

  .smartcid-document-check .scdc-action {
    width: 68px;
    min-width: 68px;
    margin: 0 !important;
    padding: 5px 3px;
    font-size: 8.5px;
  }
}

/* SmartCID: colori e indicatori del controllo qualità */
.smartcid-document-check .scdc-item {
  position: relative;
  padding-left: 8px;
  border-left: 4px solid transparent;
  border-radius: 5px;
}
.smartcid-document-check .scdc-status-ok { border-left-color: #4aa564; }
.smartcid-document-check .scdc-status-warning { border-left-color: #e7a928; }
.smartcid-document-check .scdc-status-error { border-left-color: #cf4d4d; }
.smartcid-document-check .scdc-status-pending { border-left-color: #8b9aaa; }

.smartcid-document-check .scdc-action {
  width: 76px;
  min-width: 76px;
  color: #fff;
  border: 0;
  box-shadow: none;
}
.smartcid-document-check .scdc-action-open { background: #2f76d2; }
.smartcid-document-check .scdc-action-complete { background: #cf4d4d; }
.smartcid-document-check .scdc-action-integrate,
.smartcid-document-check .scdc-action-add { background: #e49a18; }
.smartcid-document-check .scdc-action-check { background: #748596; }

.smartcid-document-check .scdc-missing-list {
  margin: 5px 0 0;
  padding-left: 17px;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.25;
}
.smartcid-document-check .scdc-missing-list li { margin: 2px 0; }

@media (max-width: 560px) {
  .smartcid-document-check .scdc-item {
    padding-left: 6px;
    border-left-width: 3px;
  }
  .smartcid-document-check .scdc-action {
    width: 68px;
    min-width: 68px;
  }
  .smartcid-document-check .scdc-missing-list { font-size: 9.5px; }
}
