/* ============================================================
   Shared tool UI components (sth-)
   Used by individual tool pages
   ============================================================ */

.sth-tool-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sth-tool-main {
  flex: 1;
}

.sth-card {
  background: var(--sth-surface, #fff);
  border: 1px solid var(--sth-border, #e2e8f0);
  border-radius: var(--sth-radius, 16px);
  padding: 24px;
  box-shadow: var(--sth-shadow, 0 1px 3px rgba(15,23,42,0.06));
}

.sth-card + .sth-card {
  margin-top: 20px;
}

.sth-form-group {
  margin-bottom: 20px;
}

.sth-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--sth-navy, #0b1e3a);
  margin-bottom: 6px;
}

.sth-input,
.sth-select,
.sth-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--sth-border, #e2e8f0);
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--sth-text, #0f172a);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sth-input:focus,
.sth-select:focus,
.sth-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.sth-input::placeholder {
  color: #94a3b8;
}

.sth-hint {
  font-size: 0.8rem;
  color: var(--sth-text-muted, #64748b);
  margin-top: 6px;
}

.sth-alert {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.sth-alert--info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.sth-alert--success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.sth-alert--warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.sth-alert--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.sth-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--sth-text-muted, #64748b);
}

.sth-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: sth-spin 0.7s linear infinite;
}

@keyframes sth-spin {
  to { transform: rotate(360deg); }
}

.sth-score-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.4rem;
  background: conic-gradient(#10b981 calc(var(--score) * 1%), #e2e8f0 0);
}

.sth-score-ring span {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
}

.sth-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--sth-border, #e2e8f0);
  border-radius: 12px;
}

.sth-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.sth-table th,
.sth-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--sth-border, #e2e8f0);
}

.sth-table th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--sth-navy, #0b1e3a);
  white-space: nowrap;
}

.sth-table tr:last-child td {
  border-bottom: none;
}

.sth-status-pass {
  color: #059669;
  font-weight: 700;
}

.sth-status-fail {
  color: #dc2626;
  font-weight: 700;
}

.sth-status-warn {
  color: #d97706;
  font-weight: 700;
}

.sth-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
