/* Shared tool-page shell: login, status, input and result framing. */
.tool-shell-ready .front-auth-panel {
  padding: 22px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 34, 58, 0.08);
}

.tool-shell-ready .front-auth-title {
  margin: 0 0 14px;
  color: #152236;
  font-size: 20px;
  line-height: 1.35;
}

.tool-shell-ready .front-auth-tip,
.tool-shell-status {
  min-height: 22px;
  color: #5c6c82;
  font-size: 13px;
  line-height: 1.6;
}

.tool-shell-ready .front-auth-tip.is-error,
.tool-shell-status.is-error {
  color: #c0392b;
}

.tool-shell-ready .front-auth-tip.is-ok,
.tool-shell-status.is-ok {
  color: #16845d;
}

.tool-shell-card {
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(20, 34, 58, 0.05);
}

.tool-shell-section-title {
  margin: 0 0 8px;
  color: #152236;
  font-size: 18px;
  line-height: 1.35;
}

.tool-shell-muted {
  color: #617087;
  font-size: 13px;
  line-height: 1.7;
}

.tool-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.tool-result-card {
  min-width: 0;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(20, 34, 58, 0.05);
  overflow: hidden;
}

.tool-result-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px 7px;
  color: #152236;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  border-bottom: 1px solid #edf2f7;
}

.tool-result-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-result-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid #cfe0f5;
  border-radius: 999px;
  background: #f3f8ff;
  color: #2563a8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}

.tool-result-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  overflow: hidden;
}

.tool-result-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tool-result-meta {
  padding: 7px 10px;
  color: #617087;
  font-size: 12px;
  line-height: 1.45;
  border-top: 1px solid #edf2f7;
  background: #fff;
}

.tool-result-notes {
  padding: 8px 10px;
  color: #42526a;
  font-size: 12px;
  line-height: 1.55;
  border-top: 1px solid #edf2f7;
  background: #fbfdff;
}

.tool-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 10px 10px;
  border-top: 1px solid #edf2f7;
}

.tool-result-action {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #b8d3ef;
  border-radius: 6px;
  background: #eef6ff;
  color: #175f9d;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
}

.tool-result-action:hover:not(:disabled) {
  background: #dceeff;
}

.tool-result-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 768px) {
  .tool-shell-ready .front-auth-panel {
    padding: 16px;
    border-radius: 8px;
  }

  .tool-result-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}
