.onefsg-ai-panel {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto 18px;
  border: 1px solid #cbd5df;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fafc, #edf3f8);
  color: #162231;
  box-shadow: 0 14px 36px rgba(9, 20, 35, 0.16);
  overflow: hidden;
}

.onefsg-ai-panel * {
  box-sizing: border-box;
}

.onefsg-ai-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-bottom: 1px solid #d7e0e8;
}

.onefsg-ai-kicker {
  margin: 0 0 4px;
  color: #526579;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.onefsg-ai-head h2 {
  margin: 0;
  color: #162231;
  font-size: 20px;
  line-height: 1.2;
}

.onefsg-ai-head p {
  margin: 6px 0 0;
  color: #516174;
}

.onefsg-ai-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid #b9c6d4;
  background: #ffffff;
  color: #31445a;
  font-weight: 900;
  white-space: nowrap;
}

.onefsg-ai-mode.allowed {
  border-color: #92c4a8;
  background: #e8f6ee;
  color: #17633b;
}

.onefsg-ai-mode.metadata,
.onefsg-ai-mode.limited {
  border-color: #e2c08c;
  background: #fff6e5;
  color: #7a4b00;
}

.onefsg-ai-mode.blocked {
  border-color: #d7a3a0;
  background: #fff0ef;
  color: #8a241e;
}

.onefsg-ai-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
  padding: 16px 18px 18px;
}

.onefsg-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.onefsg-ai-button {
  border: 0;
  border-radius: 9px;
  padding: 10px 13px;
  background: #ff5a00;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.onefsg-ai-button.secondary {
  border: 1px solid #c5d0dc;
  background: #ffffff;
  color: #1d2b3a;
}

.onefsg-ai-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.onefsg-ai-rules,
.onefsg-ai-output {
  border: 1px solid #d2dde7;
  border-radius: 9px;
  background: #ffffff;
  padding: 12px;
}

.onefsg-ai-rules h3,
.onefsg-ai-output h3 {
  margin: 0 0 8px;
  color: #1b2b3b;
  font-size: 14px;
}

.onefsg-ai-rules ul,
.onefsg-ai-output ul {
  margin: 0;
  padding-left: 18px;
  color: #435469;
}

.onefsg-ai-rules li,
.onefsg-ai-output li {
  margin: 6px 0;
}

.onefsg-ai-output {
  min-height: 132px;
}

.onefsg-ai-output p {
  margin: 0 0 8px;
  color: #435469;
}

.onefsg-ai-output b {
  color: #1b2b3b;
}

@media (max-width: 900px) {
  .onefsg-ai-head,
  .onefsg-ai-body {
    grid-template-columns: 1fr;
  }

  .onefsg-ai-mode {
    justify-self: start;
  }
}
