:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18202a;
  background: #f6f7f9;
}
* { box-sizing: border-box; }
body {
  width: 370px;
  max-height: 620px;
  margin: 0;
  overflow: auto;
  background: #f6f7f9;
}
.shell {
  display: flex;
  flex-direction: column;
  padding: 14px;
  overflow: visible;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
h1, p { margin: 0; }
h1 { font-size: 20px; line-height: 1.2; }
header p, .field span, .status, .meta span { color: #657080; font-size: 12px; }
.icon-button { width: 34px; flex: 0 0 auto; }
.meta {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 8px;
  margin-top: 10px;
}
.meta div {
  min-width: 0;
  border: 1px solid #e1e5eb;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}
.meta strong {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.metrics div {
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #fff;
  padding: 7px 8px;
}
.metrics span {
  display: block;
  color: #657080;
  font-size: 11px;
}
.metrics strong {
  display: block;
  margin-top: 2px;
  font-size: 14px;
}
.grid { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
.grid label { border: 1px solid #e1e5eb; border-radius: 8px; background: #fff; padding: 7px 8px; font-size: 13px; }
.field { display: grid; gap: 6px; margin-top: 10px; }
textarea {
  width: 100%;
  height: 142px;
  max-height: 170px;
  border: 1px solid #d5dae2;
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
  overflow: auto;
  font: inherit;
  line-height: 1.45;
}
button {
  height: 34px;
  border: 1px solid #c8ced8;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  cursor: pointer;
}
button:hover { background: #eef2f7; }
.actions { display: flex; gap: 8px; margin-top: 10px; }
.actions button { flex: 1; }
.primary { border-color: #1f6feb; background: #1f6feb; color: #fff; }
.primary:hover { background: #195fc9; }
.history-block {
  margin-top: 10px;
  border: 1px solid #e1e5eb;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #657080;
  font-size: 12px;
}
.section-title button {
  width: auto;
  height: 26px;
  padding: 0 8px;
  font-size: 12px;
}
.history-list {
  display: grid;
  gap: 6px;
  margin-top: 7px;
}
.history-item {
  height: auto;
  min-height: 30px;
  padding: 6px 8px;
  overflow: hidden;
  color: #273142;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-empty {
  margin: 7px 0 0;
  color: #8a94a3;
  font-size: 12px;
}
.pro-card {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  border: 1px solid #bfd4ff;
  border-radius: 8px;
  background: #edf4ff;
  padding: 9px;
  color: #17365f;
  text-decoration: none;
}
.pro-card span {
  font-size: 11px;
  font-weight: 700;
}
.pro-card strong {
  font-size: 13px;
  line-height: 1.35;
}
.status { min-height: 14px; margin-top: 6px; color: #315f3c; }
