.stcdb-rc-wrapper {
  max-width: 720px;
  margin: 2rem auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Search */
.stcdb-rc-search-wrap {
  position: relative;
  margin-bottom: 1.5rem;
}

.stcdb-rc-search-wrap label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #023E73;
  font-size: 0.95rem;
}

.stcdb-rc-search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  font-size: 1.05rem;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.stcdb-rc-search-input:focus {
  outline: none;
  border-color: #0077B6;
}

/* Autocomplete */
.stcdb-rc-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #dee2e6;
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 100;
  max-height: 300px;
  overflow-y: auto;
}

.stcdb-rc-autocomplete-item {
  padding: 0.65rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}

.stcdb-rc-autocomplete-item:last-child {
  border-bottom: none;
}

.stcdb-rc-autocomplete-item:hover {
  background: #f0f9ff;
}

.stcdb-rc-autocomplete-item strong {
  color: #023E73;
  font-size: 0.95rem;
}

.stcdb-rc-autocomplete-item span {
  color: #888;
  font-size: 0.82rem;
}

/* Loading / Error */
.stcdb-rc-loading,
.stcdb-rc-error {
  text-align: center;
  padding: 2rem;
  font-size: 1rem;
  color: #666;
}

.stcdb-rc-error {
  color: #dc3545;
}

/* Card */
.stcdb-rc-card {
  border: 2px solid #0077B6;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

/* Header */
.stcdb-rc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #023E73 0%, #0077B6 100%);
  color: #fff;
}

.stcdb-rc-header-info {
  flex: 1;
}

.stcdb-rc-ship-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.stcdb-rc-ship-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  opacity: 0.85;
}

/* Grade circle */
.stcdb-rc-grade {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 1rem;
  border: 3px solid rgba(255,255,255,0.3);
}

.stcdb-rc-grade--green { background: #28a745; }
.stcdb-rc-grade--blue { background: #0077B6; }
.stcdb-rc-grade--yellow { background: #ffc107; color: #333; }
.stcdb-rc-grade--red { background: #dc3545; }

.stcdb-rc-grade-letter {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.stcdb-rc-grade-score {
  font-size: 0.65rem;
  opacity: 0.9;
  margin-top: 2px;
}

/* Category cards */
.stcdb-rc-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.stcdb-rc-cat-card {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid #eee;
  border-right: 1px solid #eee;
}

.stcdb-rc-cat-card:nth-child(3n) {
  border-right: none;
}

.stcdb-rc-cat-card:nth-child(n+4) {
  border-bottom: none;
}

.stcdb-rc-cat-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  margin-bottom: 0.3rem;
}

.stcdb-rc-cat-value {
  font-size: 1.15rem;
  font-weight: 700;
}

.stcdb-rc-cat--green .stcdb-rc-cat-value { color: #28a745; }
.stcdb-rc-cat--yellow .stcdb-rc-cat-value { color: #e67e00; }
.stcdb-rc-cat--red .stcdb-rc-cat-value { color: #dc3545; }
.stcdb-rc-cat--gray .stcdb-rc-cat-value { color: #aaa; }

.stcdb-rc-cat-sub {
  font-size: 0.78rem;
  color: #888;
  margin-top: 0.15rem;
}

/* Trend arrows */
.stcdb-rc-trend { font-weight: 700; }
.stcdb-rc-trend--up { color: #28a745; }
.stcdb-rc-trend--down { color: #dc3545; }
.stcdb-rc-trend--stable { color: #888; }

/* Sparkline */
.stcdb-rc-sparkline {
  padding: 1rem 1.5rem;
  border-top: 1px solid #eee;
}

.stcdb-rc-sparkline-label {
  font-size: 0.78rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stcdb-rc-sparkline-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 100px;
}

.stcdb-rc-spark-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  padding-top: 4px;
  min-height: 20px;
}

.stcdb-rc-spark--green { background: #28a745; }
.stcdb-rc-spark--yellow { background: #ffc107; color: #333; }
.stcdb-rc-spark--red { background: #dc3545; }

/* Verdict */
.stcdb-rc-verdict {
  padding: 1rem 1.5rem;
  background: #fffbf0;
  border-top: 1px solid #f0e6c8;
}

.stcdb-rc-verdict-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #856404;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.stcdb-rc-verdict p {
  margin: 0;
  font-size: 0.92rem;
  color: #555;
  line-height: 1.5;
  font-style: italic;
}

/* Actions */
.stcdb-rc-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #eee;
  background: #f8f9fa;
}

.stcdb-rc-full-profile {
  flex: 1;
  text-align: center;
  padding: 0.6rem;
  background: #0077B6;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.stcdb-rc-full-profile:hover {
  background: #005f8f;
}

.stcdb-rc-share {
  flex: 1;
  padding: 0.6rem;
  background: #023E73;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.stcdb-rc-share:hover {
  background: #012b52;
}

/* Responsive */
@media (max-width: 600px) {
  .stcdb-rc-header {
    flex-direction: column;
    text-align: center;
  }

  .stcdb-rc-grade {
    margin: 0.75rem auto 0;
  }

  .stcdb-rc-ship-meta {
    justify-content: center;
  }

  .stcdb-rc-categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .stcdb-rc-cat-card:nth-child(3n) {
    border-right: 1px solid #eee;
  }

  .stcdb-rc-cat-card:nth-child(2n) {
    border-right: none;
  }

  .stcdb-rc-cat-card:nth-child(n+4) {
    border-bottom: 1px solid #eee;
  }

  .stcdb-rc-cat-card:last-child {
    border-bottom: none;
  }

  .stcdb-rc-actions {
    flex-direction: column;
  }
}
