/* InsightTools Kit — front-end styles */

.aitk-app-wrap {
  margin: 1.8em 0;
}

.aitk-noscript {
  background: #fff3cd;
  border: 1px solid #ffe69c;
  padding: 12px 16px;
  border-radius: 8px;
}

.aitk-app {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  padding: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: #1f2430;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}

.aitk-app textarea {
  width: 100%;
  min-height: 180px;
  padding: 12px 14px;
  border: 1px solid #cfd6e0;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  background: #fbfcfe;
}

.aitk-app textarea:focus {
  outline: 2px solid #2563eb;
  border-color: #2563eb;
}

.aitk-toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 12px;
  align-items: stretch;
}

.aitk-btn {
  background: #2563eb;
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex: 1 1 0;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aitk-btn:hover { background: #1d4ed8; }

.aitk-btn.aitk-btn-ghost {
  background: transparent;
  color: #475569;
  border: 1px solid #cfd6e0;
  font-weight: 500;
}

.aitk-btn.aitk-btn-ghost:hover { background: #f1f5f9; }

.aitk-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 4px;
  font-size: 13px;
  color: #64748b;
}

.aitk-meta-strip span {
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 999px;
}

.aitk-results {
  margin-top: 20px;
  border-top: 1px solid #e4e7ec;
  padding-top: 16px;
}

.aitk-results h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.aitk-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.aitk-metric {
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.aitk-metric-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.aitk-metric-value {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.aitk-metric-sub { font-size: 12px; color: #94a3b8; }

.aitk-scores { margin-bottom: 16px; }

.aitk-score {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fbfcfe;
}

.aitk-score-head {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
}

.aitk-score-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.aitk-score-fill {
  height: 100%;
  border-radius: 999px;
}

.aitk-score-good { background: #16a34a; }
.aitk-score-ok { background: #f59e0b; }
.aitk-score-bad { background: #dc2626; }

.aitk-score-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: #64748b;
}

.aitk-insights {
  border: 1px dashed #2563eb;
  border-radius: 10px;
  padding: 14px 16px;
  background: #f5f8ff;
  margin-top: 8px;
}

.aitk-insights-title {
  margin: 0 0 10px;
  font-size: 15px;
  color: #1e3a8a;
}

.aitk-insight-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aitk-insight {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #e4e7ec;
}

.aitk-insight:last-child { border-bottom: 0; }

.aitk-insight-icon { font-size: 15px; line-height: 1.5; }

.aitk-insight-body { flex: 1; }

.aitk-insight-body strong { display: block; font-size: 14px; }

.aitk-insight-body p {
  margin: 3px 0 0;
  font-size: 13px;
  color: #475569;
}

/* Headline variants */
.aitk-variants {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #f8fafc;
}

.aitk-variants h4 { margin: 0 0 8px; font-size: 14px; }

.aitk-variants ol {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
}

.aitk-variants li { margin-bottom: 6px; }

.aitk-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.aitk-tag {
  background: #e0f2fe;
  color: #075985;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
}

.aitk-word-item {
  display: inline-block;
  background: #fef3c7;
  border-radius: 6px;
  padding: 2px 8px;
  margin: 2px 3px;
  font-size: 13px;
}

.aitk-replace {
  color: #16a34a;
  font-weight: 600;
}

.aitk-error {
  color: #b91c1c;
  background: #fef2f2;
  padding: 10px 12px;
  border-radius: 8px;
}

.aitk-file-input {
  border: 1px dashed #cfd6e0;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  color: #64748b;
  cursor: pointer;
}

/* Admin dashboard */
.aitk-dashboard-wrap .aitk-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.aitk-dashboard-wrap .aitk-stat-card {
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  padding: 18px;
  text-align: center;
}

.aitk-dashboard-wrap .aitk-stat-num {
  display: block;
  font-size: 30px;
  font-weight: 700;
  color: #2563eb;
}

.aitk-dashboard-wrap .aitk-stat-label {
  display: block;
  margin-top: 4px;
  color: #64748b;
}

.aitk-dashboard-wrap .aitk-quick-start,
.aitk-dashboard-wrap .aitk-roadmap {
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  padding: 16px 20px 16px 32px;
  max-width: 720px;
}
